@@ -90,7 +90,6 @@ public class MediaSessionService extends SystemService implements Monitor {
9090 private ContentResolver mContentResolver ;
9191 private SettingsObserver mSettingsObserver ;
9292
93- private MediaSessionRecord mPrioritySession ;
9493 private int mCurrentUserId = -1 ;
9594
9695 // Used to notify system UI when remote volume was changed. TODO find a
@@ -130,18 +129,6 @@ public void updateSession(MediaSessionRecord record) {
130129 return ;
131130 }
132131 mPriorityStack .onSessionStateChange (record );
133- if (record .isSystemPriority ()) {
134- if (record .isActive ()) {
135- if (mPrioritySession != null ) {
136- Log .w (TAG , "Replacing existing priority session with a new session" );
137- }
138- mPrioritySession = record ;
139- } else {
140- if (mPrioritySession == record ) {
141- mPrioritySession = null ;
142- }
143- }
144- }
145132 }
146133 mHandler .post (MessageHandler .MSG_SESSIONS_CHANGED , record .getUserId (), 0 );
147134 }
@@ -285,9 +272,6 @@ private void destroySessionLocked(MediaSessionRecord session) {
285272
286273 mPriorityStack .removeSession (session );
287274 mAllSessions .remove (session );
288- if (session == mPrioritySession ) {
289- mPrioritySession = null ;
290- }
291275
292276 try {
293277 session .getCallback ().asBinder ().unlinkToDeath (session , 0 );
@@ -770,10 +754,6 @@ public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
770754 pw .println ();
771755
772756 synchronized (mLock ) {
773- pw .println ("Session for calls:" + mPrioritySession );
774- if (mPrioritySession != null ) {
775- mPrioritySession .dump (pw , "" );
776- }
777757 int count = mAllSessions .size ();
778758 pw .println (count + " Sessions:" );
779759 for (int i = 0 ; i < count ; i ++) {
0 commit comments