summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-10-01 21:00:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-01 21:00:10 +0000
commit0bc0f109dfe935a4ede91862d1f556e7f03a8bf2 (patch)
tree410b2a0609cb832b7f54937f8ad5efa61569808b /media
parent5088fc858c5a7f234310b51c0fa87a9a617eef7d (diff)
parenta4dfbdc54d8898491d3a7d1d9d818c7db3fd773d (diff)
downloadframeworks_base-0bc0f109dfe935a4ede91862d1f556e7f03a8bf2.zip
frameworks_base-0bc0f109dfe935a4ede91862d1f556e7f03a8bf2.tar.gz
frameworks_base-0bc0f109dfe935a4ede91862d1f556e7f03a8bf2.tar.bz2
Merge "audioservice: always acquire wake lock as AudioService" into klp-dev
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 3425c91..84ea4c9 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -2687,7 +2687,11 @@ public class AudioService extends IAudioService.Stub {
*/
private void queueMsgUnderWakeLock(Handler handler, int msg,
int arg1, int arg2, Object obj, int delay) {
+ final long ident = Binder.clearCallingIdentity();
+ // Always acquire the wake lock as AudioService because it is released by the
+ // message handler.
mAudioEventWakeLock.acquire();
+ Binder.restoreCallingIdentity(ident);
sendMsg(handler, msg, SENDMSG_QUEUE, arg1, arg2, obj, delay);
}