Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_av
Commits
eced745a
Commit
eced745a
authored
11 years ago
by
Jeff Tinker
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Part of fix for TEE resource leaks when app crashes" into jb-mr2-dev
parents
f59a4b39
3d3f67f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
media/libmediaplayerservice/Drm.cpp
media/libmediaplayerservice/Drm.cpp
+14
-0
media/libmediaplayerservice/Drm.h
media/libmediaplayerservice/Drm.h
+5
-1
No files found.
media/libmediaplayerservice/Drm.cpp
View file @
eced745a
...
...
@@ -71,6 +71,12 @@ status_t Drm::initCheck() const {
status_t
Drm
::
setListener
(
const
sp
<
IDrmClient
>&
listener
)
{
Mutex
::
Autolock
lock
(
mEventLock
);
if
(
mListener
!=
NULL
){
mListener
->
asBinder
()
->
unlinkToDeath
(
this
);
}
if
(
listener
!=
NULL
)
{
listener
->
asBinder
()
->
linkToDeath
(
this
);
}
mListener
=
listener
;
return
NO_ERROR
;
}
...
...
@@ -576,4 +582,12 @@ status_t Drm::verify(Vector<uint8_t> const &sessionId,
return
mPlugin
->
verify
(
sessionId
,
keyId
,
message
,
signature
,
match
);
}
void
Drm
::
binderDied
(
const
wp
<
IBinder
>
&
the_late_who
)
{
delete
mPlugin
;
mPlugin
=
NULL
;
closeFactory
();
mListener
.
clear
();
}
}
// namespace android
This diff is collapsed.
Click to expand it.
media/libmediaplayerservice/Drm.h
View file @
eced745a
...
...
@@ -29,7 +29,9 @@ namespace android {
struct
DrmFactory
;
struct
DrmPlugin
;
struct
Drm
:
public
BnDrm
,
public
DrmPluginListener
{
struct
Drm
:
public
BnDrm
,
public
IBinder
::
DeathRecipient
,
public
DrmPluginListener
{
Drm
();
virtual
~
Drm
();
...
...
@@ -115,6 +117,8 @@ struct Drm : public BnDrm, public DrmPluginListener {
Vector
<
uint8_t
>
const
*
sessionId
,
Vector
<
uint8_t
>
const
*
data
);
virtual
void
binderDied
(
const
wp
<
IBinder
>
&
the_late_who
);
private:
mutable
Mutex
mLock
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment