Loading media/java/android/media/AudioManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,17 @@ public class AudioManager { public static final String EXTRA_REMOTE_CONTROL_CLIENT = "android.media.EXTRA_REMOTE_CONTROL_CLIENT"; /** * @hide * The media button event receiver associated with the IRemoteControlClient. * The {@link android.content.ComponentName} value of the event receiver can be retrieved with * {@link android.content.ComponentName#unflattenFromString(String)} * * @see #REMOTE_CONTROL_CLIENT_CHANGED_ACTION */ public static final String EXTRA_REMOTE_CONTROL_EVENT_RECEIVER = "android.media.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER"; /** * @hide * The flags describing what information has changed in the current remote control client. Loading media/java/android/media/AudioService.java +7 −2 Original line number Diff line number Diff line Loading @@ -2167,8 +2167,10 @@ public class AudioService extends IAudioService.Stub { case MSG_RCDISPLAY_UPDATE: synchronized(mCurrentRcLock) { // msg.obj is guaranteed to be non null RemoteControlStackEntry rcse = (RemoteControlStackEntry)msg.obj; if ((mCurrentRcClient == null) || (!mCurrentRcClient.equals((IRemoteControlClient)msg.obj))) { (!mCurrentRcClient.equals(rcse.mRcClient))) { // the remote control display owner has changed between the // the message to update the display was sent, and the time it // gets to be processed (now) Loading @@ -2183,6 +2185,9 @@ public class AudioService extends IAudioService.Stub { rcClientIntent.putExtra( AudioManager.EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED, msg.arg1); rcClientIntent.putExtra( AudioManager.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER, rcse.mReceiverComponent.flattenToString()); rcClientIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcast(rcClientIntent); } Loading Loading @@ -3131,7 +3136,7 @@ public class AudioService extends IAudioService.Stub { mCurrentRcClient = rcse.mRcClient; } mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_UPDATE, infoFlagsAboutToBeUsed /* arg1 */, 0, rcse.mRcClient /* obj */) ); infoFlagsAboutToBeUsed /* arg1 */, 0, rcse /* obj, != null */) ); } /** Loading Loading
media/java/android/media/AudioManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1828,6 +1828,17 @@ public class AudioManager { public static final String EXTRA_REMOTE_CONTROL_CLIENT = "android.media.EXTRA_REMOTE_CONTROL_CLIENT"; /** * @hide * The media button event receiver associated with the IRemoteControlClient. * The {@link android.content.ComponentName} value of the event receiver can be retrieved with * {@link android.content.ComponentName#unflattenFromString(String)} * * @see #REMOTE_CONTROL_CLIENT_CHANGED_ACTION */ public static final String EXTRA_REMOTE_CONTROL_EVENT_RECEIVER = "android.media.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER"; /** * @hide * The flags describing what information has changed in the current remote control client. Loading
media/java/android/media/AudioService.java +7 −2 Original line number Diff line number Diff line Loading @@ -2167,8 +2167,10 @@ public class AudioService extends IAudioService.Stub { case MSG_RCDISPLAY_UPDATE: synchronized(mCurrentRcLock) { // msg.obj is guaranteed to be non null RemoteControlStackEntry rcse = (RemoteControlStackEntry)msg.obj; if ((mCurrentRcClient == null) || (!mCurrentRcClient.equals((IRemoteControlClient)msg.obj))) { (!mCurrentRcClient.equals(rcse.mRcClient))) { // the remote control display owner has changed between the // the message to update the display was sent, and the time it // gets to be processed (now) Loading @@ -2183,6 +2185,9 @@ public class AudioService extends IAudioService.Stub { rcClientIntent.putExtra( AudioManager.EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED, msg.arg1); rcClientIntent.putExtra( AudioManager.EXTRA_REMOTE_CONTROL_EVENT_RECEIVER, rcse.mReceiverComponent.flattenToString()); rcClientIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcast(rcClientIntent); } Loading Loading @@ -3131,7 +3136,7 @@ public class AudioService extends IAudioService.Stub { mCurrentRcClient = rcse.mRcClient; } mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_UPDATE, infoFlagsAboutToBeUsed /* arg1 */, 0, rcse.mRcClient /* obj */) ); infoFlagsAboutToBeUsed /* arg1 */, 0, rcse /* obj, != null */) ); } /** Loading