Loading media/java/android/media/session/MediaSessionManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -1082,10 +1082,11 @@ public final class MediaSessionManager { * has specified the target. * <p> * The session token can be {@link null} if the media button session is unset. In that case, * framework would dispatch to the last sessions's media button receiver. If the media * button receive isn't set as well, then it * packageName will return the package name of the last session's media button receiver, or * an empty string if the last session didn't set a media button receiver. * * @param packageName The package name who would receive the media key event. Can be empty. * @param packageName The package name of the component that will receive the media key * event. Can be empty. * @param sessionToken The media session's token. Can be {@code null}. */ void onMediaKeyEventSessionChanged(@NonNull String packageName, Loading services/core/java/com/android/server/media/MediaSessionService.java +2 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,8 @@ public class MediaSessionService extends SystemService implements Monitor { } else if (mCurrentFullUserRecord.mLastMediaButtonReceiverHolder != null) { String packageName = mLastMediaButtonReceiverHolder.getPackageName(); callback.onMediaKeyEventSessionChanged(packageName, null); } else { callback.onMediaKeyEventSessionChanged("", null); } } catch (RemoteException e) { Log.w(TAG, "Failed to pushAddressedPlayerChangedLocked", e); Loading Loading
media/java/android/media/session/MediaSessionManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -1082,10 +1082,11 @@ public final class MediaSessionManager { * has specified the target. * <p> * The session token can be {@link null} if the media button session is unset. In that case, * framework would dispatch to the last sessions's media button receiver. If the media * button receive isn't set as well, then it * packageName will return the package name of the last session's media button receiver, or * an empty string if the last session didn't set a media button receiver. * * @param packageName The package name who would receive the media key event. Can be empty. * @param packageName The package name of the component that will receive the media key * event. Can be empty. * @param sessionToken The media session's token. Can be {@code null}. */ void onMediaKeyEventSessionChanged(@NonNull String packageName, Loading
services/core/java/com/android/server/media/MediaSessionService.java +2 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,8 @@ public class MediaSessionService extends SystemService implements Monitor { } else if (mCurrentFullUserRecord.mLastMediaButtonReceiverHolder != null) { String packageName = mLastMediaButtonReceiverHolder.getPackageName(); callback.onMediaKeyEventSessionChanged(packageName, null); } else { callback.onMediaKeyEventSessionChanged("", null); } } catch (RemoteException e) { Log.w(TAG, "Failed to pushAddressedPlayerChangedLocked", e); Loading