MediaSession: Create getCurentControllerInfo()
Bug: 65739365
Test: Ran MediaControllerTest
Change-Id: I05c9179546d826e8fabb4fd4e4e03837dd4685ff
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 01f0d74..8c2ef20 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -1785,8 +1785,8 @@
}
});
} else {
- session.adjustVolume(direction, flags, getContext().getPackageName(),
- Process.SYSTEM_UID, true);
+ session.adjustVolume(getContext().getPackageName(), Process.myPid(),
+ Process.SYSTEM_UID, direction, flags, true);
}
}
@@ -1824,10 +1824,12 @@
mKeyEventReceiver.aquireWakeLockLocked();
}
// If we don't need a wakelock use -1 as the id so we won't release it later.
- session.sendMediaButton(keyEvent,
+ session.sendMediaButton(getContext().getPackageName(),
+ Process.myPid(),
+ Process.SYSTEM_UID,
+ keyEvent,
needWakeLock ? mKeyEventReceiver.mLastTimeoutId : -1,
- mKeyEventReceiver, Process.SYSTEM_UID,
- getContext().getPackageName());
+ mKeyEventReceiver);
if (mCurrentFullUserRecord.mCallback != null) {
try {
mCurrentFullUserRecord.mCallback.onMediaKeyEventDispatchedToMediaSession(