summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-11-13 19:59:19 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2013-11-13 20:06:41 -0800
commit320ad9fa1d45322e878496cc1c03137cabf20942 (patch)
tree7fd89a46568c69dc040eaa691fe0a39c38424817 /media
parentdc0acc6f5d4cc8e4ed6d2a13793030350cd6262d (diff)
downloadframeworks_base-320ad9fa1d45322e878496cc1c03137cabf20942.zip
frameworks_base-320ad9fa1d45322e878496cc1c03137cabf20942.tar.gz
frameworks_base-320ad9fa1d45322e878496cc1c03137cabf20942.tar.bz2
Fix RemoteController update in RemoteControlClient registration
A regression was introduced when trying to limit the number of internal synchronization generation IDs that caused RCC information to be shown only for applications that requested audio focus after media button receiver and RCC registration, (such as Play Music), not for applications that requested focus first (such as Play Movies). The correct behavior is to always check and update the RemoteControllers (seen by MediaFocusControl as RCD interfaces) whenever a RemoteControlClient is registered (even if it's a re-registration) when it is associated when an entry at the top of the remote control stack. Bug 11657655 Change-Id: I30716e2028f7f718a31e13401b191178735229ff
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/MediaFocusControl.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/media/java/android/media/MediaFocusControl.java b/media/java/android/media/MediaFocusControl.java
index 59d411d..34008bb 100644
--- a/media/java/android/media/MediaFocusControl.java
+++ b/media/java/android/media/MediaFocusControl.java
@@ -1930,7 +1930,6 @@ public class MediaFocusControl implements OnFinished {
int rccId = RemoteControlClient.RCSE_ID_UNREGISTERED;
synchronized(mAudioFocusLock) {
synchronized(mRCStack) {
- boolean wasCurrentRcController = isCurrentRcController(mediaIntent);
// store the new display information
try {
for (int index = mRCStack.size()-1; index >= 0; index--) {
@@ -1977,9 +1976,9 @@ public class MediaFocusControl implements OnFinished {
Log.e(TAG, "Wrong index accessing RC stack, lock error? ", e);
}
- // if the eventReceiver is now at the top of the stack but wasn't before
+ // if the eventReceiver is at the top of the stack
// then check for potential refresh of the remote controls
- if (isCurrentRcController(mediaIntent) && !wasCurrentRcController) {
+ if (isCurrentRcController(mediaIntent)) {
checkUpdateRemoteControlDisplay_syncAfRcs(RC_INFO_ALL);
}
}//synchronized(mRCStack)