Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +33 −17 Original line number Diff line number Diff line Loading @@ -243,8 +243,11 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa pw.print(" mState: "); pw.println(mState.toString(4)); pw.print(" mShowDndTile: "); pw.println(mShowDndTile); pw.print(" mHasVibrator: "); pw.println(mHasVibrator); pw.print(" mRemoteStreams: "); pw.println(mMediaSessionsCallbacksW.mRemoteStreams synchronized (mMediaSessionsCallbacksW.mRemoteStreams) { pw.print(" mRemoteStreams: "); pw.println(mMediaSessionsCallbacksW.mRemoteStreams .values()); } pw.print(" mShowA11yStream: "); pw.println(mShowA11yStream); pw.println(); mMediaSessions.dump(pw); Loading Loading @@ -1075,7 +1078,10 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteUpdate(Token token, String name, PlaybackInfo pi) { addStream(token, "onRemoteUpdate"); final int stream = mRemoteStreams.get(token); int stream = 0; synchronized (mRemoteStreams) { stream = mRemoteStreams.get(token); } boolean changed = mState.states.indexOfKey(stream) < 0; final StreamState ss = streamStateW(stream); ss.dynamic = true; Loading @@ -1100,7 +1106,10 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteVolumeChanged(Token token, int flags) { addStream(token, "onRemoteVolumeChanged"); final int stream = mRemoteStreams.get(token); int stream = 0; synchronized (mRemoteStreams) { stream = mRemoteStreams.get(token); } final boolean showUI = shouldShowUI(flags); boolean changed = updateActiveStreamW(stream); if (showUI) { Loading @@ -1116,12 +1125,15 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteRemoved(Token token) { int stream = 0; synchronized (mRemoteStreams) { if (!mRemoteStreams.containsKey(token)) { if (D.BUG) Log.d(TAG, "onRemoteRemoved: stream doesn't exist, " + "aborting remote removed for token:" + token.toString()); return; } final int stream = mRemoteStreams.get(token); stream = mRemoteStreams.get(token); } mState.states.remove(stream); if (mState.activeStream == stream) { updateActiveStreamW(-1); Loading @@ -1139,15 +1151,18 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa } private Token findToken(int stream) { synchronized (mRemoteStreams) { for (Map.Entry<Token, Integer> entry : mRemoteStreams.entrySet()) { if (entry.getValue().equals(stream)) { return entry.getKey(); } } } return null; } private void addStream(Token token, String triggeringMethod) { synchronized (mRemoteStreams) { if (!mRemoteStreams.containsKey(token)) { mRemoteStreams.put(token, mNextStream); if (D.BUG) Log.d(TAG, triggeringMethod + ": added stream " + mNextStream Loading @@ -1156,6 +1171,7 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa } } } } public interface UserActivityListener { void onUserActivity(); Loading Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +33 −17 Original line number Diff line number Diff line Loading @@ -243,8 +243,11 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa pw.print(" mState: "); pw.println(mState.toString(4)); pw.print(" mShowDndTile: "); pw.println(mShowDndTile); pw.print(" mHasVibrator: "); pw.println(mHasVibrator); pw.print(" mRemoteStreams: "); pw.println(mMediaSessionsCallbacksW.mRemoteStreams synchronized (mMediaSessionsCallbacksW.mRemoteStreams) { pw.print(" mRemoteStreams: "); pw.println(mMediaSessionsCallbacksW.mRemoteStreams .values()); } pw.print(" mShowA11yStream: "); pw.println(mShowA11yStream); pw.println(); mMediaSessions.dump(pw); Loading Loading @@ -1075,7 +1078,10 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteUpdate(Token token, String name, PlaybackInfo pi) { addStream(token, "onRemoteUpdate"); final int stream = mRemoteStreams.get(token); int stream = 0; synchronized (mRemoteStreams) { stream = mRemoteStreams.get(token); } boolean changed = mState.states.indexOfKey(stream) < 0; final StreamState ss = streamStateW(stream); ss.dynamic = true; Loading @@ -1100,7 +1106,10 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteVolumeChanged(Token token, int flags) { addStream(token, "onRemoteVolumeChanged"); final int stream = mRemoteStreams.get(token); int stream = 0; synchronized (mRemoteStreams) { stream = mRemoteStreams.get(token); } final boolean showUI = shouldShowUI(flags); boolean changed = updateActiveStreamW(stream); if (showUI) { Loading @@ -1116,12 +1125,15 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa @Override public void onRemoteRemoved(Token token) { int stream = 0; synchronized (mRemoteStreams) { if (!mRemoteStreams.containsKey(token)) { if (D.BUG) Log.d(TAG, "onRemoteRemoved: stream doesn't exist, " + "aborting remote removed for token:" + token.toString()); return; } final int stream = mRemoteStreams.get(token); stream = mRemoteStreams.get(token); } mState.states.remove(stream); if (mState.activeStream == stream) { updateActiveStreamW(-1); Loading @@ -1139,15 +1151,18 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa } private Token findToken(int stream) { synchronized (mRemoteStreams) { for (Map.Entry<Token, Integer> entry : mRemoteStreams.entrySet()) { if (entry.getValue().equals(stream)) { return entry.getKey(); } } } return null; } private void addStream(Token token, String triggeringMethod) { synchronized (mRemoteStreams) { if (!mRemoteStreams.containsKey(token)) { mRemoteStreams.put(token, mNextStream); if (D.BUG) Log.d(TAG, triggeringMethod + ": added stream " + mNextStream Loading @@ -1156,6 +1171,7 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa } } } } public interface UserActivityListener { void onUserActivity(); Loading