[Media ML] Refactor APIs for dispatching key events
There are currently two APIs with the same name:
dispatchMediaKeyEventAsSystemService(KeyEvent), and
dispatchMediaKeyEventAsSystemService(KeyEvent, MediaSession.Token),
but their internal implementations and return types do not overlap.
Instead rename the second API to
dispatchMediaKeyEventToSessionAsSystemService(...) to avoid
associating the two APIs.
The same logic is applied to dispatchVolumeKeyEventAsSystemService.
Bug: 166262380
Test: build
Change-Id: I20f7c6d4dd97eff6625307cf9bbc14ff824c3286
diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt
index 65b29f1..88e8935 100644
--- a/api/module-lib-current.txt
+++ b/api/module-lib-current.txt
@@ -76,9 +76,9 @@
   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 dispatchMediaKeyEventAsSystemService(@NonNull android.view.KeyEvent);
-    method public boolean dispatchMediaKeyEventAsSystemService(@NonNull android.media.session.MediaSession.Token, @NonNull android.view.KeyEvent);
+    method public boolean dispatchMediaKeyEventToSessionAsSystemService(@NonNull android.view.KeyEvent, @NonNull android.media.session.MediaSession.Token);
     method public void dispatchVolumeKeyEventAsSystemService(@NonNull android.view.KeyEvent, int);
-    method public void dispatchVolumeKeyEventAsSystemService(@NonNull android.media.session.MediaSession.Token, @NonNull android.view.KeyEvent);
+    method public void dispatchVolumeKeyEventToSessionAsSystemService(@NonNull android.view.KeyEvent, @NonNull android.media.session.MediaSession.Token);
     field public static final int RESULT_MEDIA_KEY_HANDLED = 1; // 0x1
     field public static final int RESULT_MEDIA_KEY_NOT_HANDLED = 0; // 0x0
   }