diff options
author | RoboErik <epastern@google.com> | 2014-05-05 14:23:49 -0700 |
---|---|---|
committer | RoboErik <epastern@google.com> | 2014-05-06 17:26:06 -0700 |
commit | a8f951462791a16f47e8c07e552232f31dcefac5 (patch) | |
tree | a4a8d83d851f5a031333af2b842509d4370609b2 /tests | |
parent | e7880d8eb1903d42e4e2a90c99b58e2240e01e82 (diff) | |
download | frameworks_base-a8f951462791a16f47e8c07e552232f31dcefac5.zip frameworks_base-a8f951462791a16f47e8c07e552232f31dcefac5.tar.gz frameworks_base-a8f951462791a16f47e8c07e552232f31dcefac5.tar.bz2 |
Add a class for managing Session priority
Priority is given first to the system priorty session, then to
active local sessions, then to active remote sessions, then to
the rest of the sessions. Ordering within categories is by whoever
last performed an action we associate with the user.
The stack has methods for getting filtered sets of this priority.
This also:
-Changes publish to setActive(boolean)
-Adds a flag for handling media buttons.
-Adds a flag for transport controls instead of enabling once.
-Unhides the setFlags API.
-Updates the legacy helper to use the flags.
Change-Id: I6ebeb27410de1b24149fd6e1785613ac444f0774
Diffstat (limited to 'tests')
-rw-r--r-- | tests/OneMedia/src/com/android/onemedia/PlayerSession.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/OneMedia/src/com/android/onemedia/PlayerSession.java b/tests/OneMedia/src/com/android/onemedia/PlayerSession.java index 2e029f0..b7dcef7 100644 --- a/tests/OneMedia/src/com/android/onemedia/PlayerSession.java +++ b/tests/OneMedia/src/com/android/onemedia/PlayerSession.java @@ -84,11 +84,12 @@ public class PlayerSession { Log.d(TAG, "Creating session for package " + mContext.getBasePackageName()); mSession = man.createSession("OneMedia"); mSession.addCallback(mCallback); - mPerformer = mSession.setTransportPerformerEnabled(); + mPerformer = mSession.getTransportPerformer(); mPerformer.addListener(new TransportListener()); mPerformer.setPlaybackState(mPlaybackState); + mSession.setFlags(Session.FLAG_HANDLES_TRANSPORT_CONTROLS); mSession.setRouteOptions(mRouteOptions); - mSession.publish(); + mSession.setActive(true); } public void onDestroy() { |