am 2a96fc1f: Merge "Fix RemoteController update in RemoteControlClient registration" into klp-dev

* commit '2a96fc1f516f7ac7fcbf5bd8c8c4fe8c7b2a8a7f':
  Fix RemoteController update in RemoteControlClient registration
This commit is contained in:
Jean-Michel Trivi
2013-11-14 13:42:27 -08:00
committed by Android Git Automerger

View File

@ -1930,7 +1930,6 @@ public class MediaFocusControl implements OnFinished {
int rccId = RemoteControlClient.RCSE_ID_UNREGISTERED; int rccId = RemoteControlClient.RCSE_ID_UNREGISTERED;
synchronized(mAudioFocusLock) { synchronized(mAudioFocusLock) {
synchronized(mRCStack) { synchronized(mRCStack) {
boolean wasCurrentRcController = isCurrentRcController(mediaIntent);
// store the new display information // store the new display information
try { try {
for (int index = mRCStack.size()-1; index >= 0; index--) { 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); 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 // then check for potential refresh of the remote controls
if (isCurrentRcController(mediaIntent) && !wasCurrentRcController) { if (isCurrentRcController(mediaIntent)) {
checkUpdateRemoteControlDisplay_syncAfRcs(RC_INFO_ALL); checkUpdateRemoteControlDisplay_syncAfRcs(RC_INFO_ALL);
} }
}//synchronized(mRCStack) }//synchronized(mRCStack)