summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2011-08-31 12:03:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-31 12:03:50 -0700
commit528e382f48681a2175a24e7403f63a4493d7c44b (patch)
tree8a56574d62f7ae25302f5756160ff97bcddfc474 /media
parentac73e4bb420dbda31a866f3b86b207c71ecfa2f6 (diff)
parent338794576667745b060ac269b2c2b36e0c6964f2 (diff)
downloadframeworks_base-528e382f48681a2175a24e7403f63a4493d7c44b.zip
frameworks_base-528e382f48681a2175a24e7403f63a4493d7c44b.tar.gz
frameworks_base-528e382f48681a2175a24e7403f63a4493d7c44b.tar.bz2
Merge "Fix 5242200 only update RemoteControlDisplay when a client is present"
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioService.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index bfc6b5d..de94ebd 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -3193,7 +3193,7 @@ public class AudioService extends IAudioService.Stub {
/**
* Helper function:
* Called synchronized on mRCStack
- * mRCStack.empty() is false
+ * mRCStack.isEmpty() is false
*/
private void updateRemoteControlDisplay_syncRcs(int infoChangedFlags) {
RemoteControlStackEntry rcse = mRCStack.peek();
@@ -3247,6 +3247,7 @@ public class AudioService extends IAudioService.Stub {
return;
}
// refresh conditions were verified: update the remote controls
+ // ok to call, mRCStack is not empty
updateRemoteControlDisplay_syncRcs(infoChangedFlags);
}
@@ -3460,8 +3461,10 @@ public class AudioService extends IAudioService.Stub {
}
}
- // we have a new display, of which all the clients are now aware: have it be updated
- updateRemoteControlDisplay_syncRcs(RC_INFO_ALL);
+ if (!mRCStack.isEmpty()) {
+ // we have a new display, of which all the clients are now aware: have it be updated
+ updateRemoteControlDisplay_syncRcs(RC_INFO_ALL);
+ }
}
}