diff options
| -rw-r--r-- | core/api/module-lib-current.txt | 3 | ||||
| -rw-r--r-- | media/java/android/media/session/MediaSessionManager.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index f22b0f4b22ad..ef6c8b713c2c 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -109,8 +109,11 @@ package android.media.session { public final class MediaSessionManager { method public void addOnActiveSessionsChangedListener(@NonNull android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, @Nullable android.content.ComponentName, int, @Nullable android.os.Handler); + method public void dispatchMediaKeyEvent(@NonNull android.view.KeyEvent); + method public void dispatchMediaKeyEvent(@NonNull android.view.KeyEvent, boolean); method public void dispatchMediaKeyEventAsSystemService(@NonNull android.view.KeyEvent); method public boolean dispatchMediaKeyEventToSessionAsSystemService(@NonNull android.view.KeyEvent, @NonNull android.media.session.MediaSession.Token); + method public void dispatchVolumeKeyEvent(@NonNull android.view.KeyEvent, int, boolean); method public void dispatchVolumeKeyEventAsSystemService(@NonNull android.view.KeyEvent, int); method public void dispatchVolumeKeyEventToSessionAsSystemService(@NonNull android.view.KeyEvent, @NonNull android.media.session.MediaSession.Token); method @NonNull public java.util.List<android.media.session.MediaController> getActiveSessionsForUser(@Nullable android.content.ComponentName, int); diff --git a/media/java/android/media/session/MediaSessionManager.java b/media/java/android/media/session/MediaSessionManager.java index f22bcd88f8c3..1fd132d00f10 100644 --- a/media/java/android/media/session/MediaSessionManager.java +++ b/media/java/android/media/session/MediaSessionManager.java @@ -547,6 +547,7 @@ public final class MediaSessionManager { * @param keyEvent the key event to send * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent) { dispatchMediaKeyEventInternal(keyEvent, /*asSystemService=*/false, /*needWakeLock=*/false); } @@ -558,6 +559,7 @@ public final class MediaSessionManager { * @param needWakeLock true if a wake lock should be held while sending the key * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent, boolean needWakeLock) { dispatchMediaKeyEventInternal(keyEvent, /*asSystemService=*/false, needWakeLock); } @@ -630,6 +632,7 @@ public final class MediaSessionManager { * @param musicOnly true if key event should only be sent to music stream * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public void dispatchVolumeKeyEvent(@NonNull KeyEvent keyEvent, int streamType, boolean musicOnly) { dispatchVolumeKeyEventInternal(keyEvent, streamType, musicOnly, /*asSystemService=*/false); |