Loading services/core/java/com/android/server/media/MediaSessionService.java +0 −20 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ public class MediaSessionService extends SystemService implements Monitor { private ContentResolver mContentResolver; private SettingsObserver mSettingsObserver; private MediaSessionRecord mPrioritySession; private int mCurrentUserId = -1; // Used to notify system UI when remote volume was changed. TODO find a Loading Loading @@ -130,18 +129,6 @@ public class MediaSessionService extends SystemService implements Monitor { return; } mPriorityStack.onSessionStateChange(record); if (record.isSystemPriority()) { if (record.isActive()) { if (mPrioritySession != null) { Log.w(TAG, "Replacing existing priority session with a new session"); } mPrioritySession = record; } else { if (mPrioritySession == record) { mPrioritySession = null; } } } } mHandler.post(MessageHandler.MSG_SESSIONS_CHANGED, record.getUserId(), 0); } Loading Loading @@ -285,9 +272,6 @@ public class MediaSessionService extends SystemService implements Monitor { mPriorityStack.removeSession(session); mAllSessions.remove(session); if (session == mPrioritySession) { mPrioritySession = null; } try { session.getCallback().asBinder().unlinkToDeath(session, 0); Loading Loading @@ -770,10 +754,6 @@ public class MediaSessionService extends SystemService implements Monitor { pw.println(); synchronized (mLock) { pw.println("Session for calls:" + mPrioritySession); if (mPrioritySession != null) { mPrioritySession.dump(pw, ""); } int count = mAllSessions.size(); pw.println(count + " Sessions:"); for (int i = 0; i < count; i++) { Loading services/core/java/com/android/server/media/MediaSessionStack.java +4 −3 Original line number Diff line number Diff line Loading @@ -63,9 +63,6 @@ public class MediaSessionStack { */ public void addSession(MediaSessionRecord record) { mSessions.add(record); if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { mGlobalPrioritySession = record; } clearCache(); } Loading Loading @@ -110,6 +107,9 @@ public class MediaSessionStack { * @param record The record that changed. */ public void onSessionStateChange(MediaSessionRecord record) { if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { mGlobalPrioritySession = record; } // For now just clear the cache. Eventually we'll selectively clear // depending on what changed. clearCache(); Loading Loading @@ -220,6 +220,7 @@ public class MediaSessionStack { ArrayList<MediaSessionRecord> sortedSessions = getPriorityListLocked(false, 0, UserHandle.USER_ALL); int count = sortedSessions.size(); pw.println(prefix + "Global priority session is " + mGlobalPrioritySession); pw.println(prefix + "Sessions Stack - have " + count + " sessions:"); String indent = prefix + " "; for (int i = 0; i < count; i++) { Loading Loading
services/core/java/com/android/server/media/MediaSessionService.java +0 −20 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ public class MediaSessionService extends SystemService implements Monitor { private ContentResolver mContentResolver; private SettingsObserver mSettingsObserver; private MediaSessionRecord mPrioritySession; private int mCurrentUserId = -1; // Used to notify system UI when remote volume was changed. TODO find a Loading Loading @@ -130,18 +129,6 @@ public class MediaSessionService extends SystemService implements Monitor { return; } mPriorityStack.onSessionStateChange(record); if (record.isSystemPriority()) { if (record.isActive()) { if (mPrioritySession != null) { Log.w(TAG, "Replacing existing priority session with a new session"); } mPrioritySession = record; } else { if (mPrioritySession == record) { mPrioritySession = null; } } } } mHandler.post(MessageHandler.MSG_SESSIONS_CHANGED, record.getUserId(), 0); } Loading Loading @@ -285,9 +272,6 @@ public class MediaSessionService extends SystemService implements Monitor { mPriorityStack.removeSession(session); mAllSessions.remove(session); if (session == mPrioritySession) { mPrioritySession = null; } try { session.getCallback().asBinder().unlinkToDeath(session, 0); Loading Loading @@ -770,10 +754,6 @@ public class MediaSessionService extends SystemService implements Monitor { pw.println(); synchronized (mLock) { pw.println("Session for calls:" + mPrioritySession); if (mPrioritySession != null) { mPrioritySession.dump(pw, ""); } int count = mAllSessions.size(); pw.println(count + " Sessions:"); for (int i = 0; i < count; i++) { Loading
services/core/java/com/android/server/media/MediaSessionStack.java +4 −3 Original line number Diff line number Diff line Loading @@ -63,9 +63,6 @@ public class MediaSessionStack { */ public void addSession(MediaSessionRecord record) { mSessions.add(record); if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { mGlobalPrioritySession = record; } clearCache(); } Loading Loading @@ -110,6 +107,9 @@ public class MediaSessionStack { * @param record The record that changed. */ public void onSessionStateChange(MediaSessionRecord record) { if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { mGlobalPrioritySession = record; } // For now just clear the cache. Eventually we'll selectively clear // depending on what changed. clearCache(); Loading Loading @@ -220,6 +220,7 @@ public class MediaSessionStack { ArrayList<MediaSessionRecord> sortedSessions = getPriorityListLocked(false, 0, UserHandle.USER_ALL); int count = sortedSessions.size(); pw.println(prefix + "Global priority session is " + mGlobalPrioritySession); pw.println(prefix + "Sessions Stack - have " + count + " sessions:"); String indent = prefix + " "; for (int i = 0; i < count; i++) { Loading