From b69ffd4dc2c8fa85e0064151141ebeee90de471e Mon Sep 17 00:00:00 2001 From: RoboErik Date: Fri, 30 May 2014 14:57:59 -0700 Subject: Minimum work to make volume handling work with sessions This is the minimum change to make adjusting volume work with MediaSessions. This only affects adjusting the volume and adjusting the volume with a suggested stream. Adjusting a specific stream or setting a specific stream will still use the same code. This does not fix existing remote volume handling in RCC, which will require a separate change to MediaController. Change-Id: I5b957ff4bece1ee11e2364e1f216e1c08343c983 --- tests/OneMedia/src/com/android/onemedia/PlayerSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/OneMedia/src/com/android/onemedia/PlayerSession.java b/tests/OneMedia/src/com/android/onemedia/PlayerSession.java index c1fa74f..d6f8118 100644 --- a/tests/OneMedia/src/com/android/onemedia/PlayerSession.java +++ b/tests/OneMedia/src/com/android/onemedia/PlayerSession.java @@ -82,7 +82,7 @@ public class PlayerSession { Log.d(TAG, "Creating session for package " + mContext.getBasePackageName()); mSession = man.createSession("OneMedia"); mSession.addCallback(mCallback); - mSession.addTransportControlsCallback(new TransportListener()); + mSession.addTransportControlsCallback(new TransportCallback()); mSession.setPlaybackState(mPlaybackState); mSession.setFlags(MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS); mSession.setRouteOptions(mRouteOptions); @@ -255,7 +255,7 @@ public class PlayerSession { } } - private class TransportListener extends MediaSession.TransportControlsCallback { + private class TransportCallback extends MediaSession.TransportControlsCallback { @Override public void onPlay() { mRenderer.onPlay(); -- cgit v1.1