Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java +0 −15 Original line number Diff line number Diff line Loading @@ -726,11 +726,6 @@ public class VolumeDialog { } row.slider.setProgress(newProgress); } if (mAutomute && mShowing) { if (vlevel == 0 && !row.ss.muted && row.stream == AudioManager.STREAM_MUSIC) { mController.setStreamMute(row.stream, true); } } } } Loading Loading @@ -934,16 +929,6 @@ public class VolumeDialog { final int userLevel = getImpliedLevel(seekBar, progress); if (mRow.ss.level != userLevel || mRow.ss.muted && userLevel > 0) { mRow.userAttempt = SystemClock.uptimeMillis(); if (mAutomute) { if (mRow.stream != AudioManager.STREAM_RING) { if (userLevel > 0 && mRow.ss.muted) { mController.setStreamMute(mRow.stream, false); } if (userLevel == 0 && mRow.ss.muteSupported && !mRow.ss.muted) { mController.setStreamMute(mRow.stream, true); } } } if (mRow.requestedLevel != userLevel) { mController.setStreamVolume(mRow.stream, userLevel); mRow.requestedLevel = userLevel; Loading services/core/java/com/android/server/audio/AudioService.java +5 −2 Original line number Diff line number Diff line Loading @@ -1368,10 +1368,11 @@ public class AudioService extends IAudioService.Stub { private void onSetStreamVolume(int streamType, int index, int flags, int device, String caller) { setStreamVolumeInt(mStreamVolumeAlias[streamType], index, device, false, caller); final int stream = mStreamVolumeAlias[streamType]; setStreamVolumeInt(stream, index, device, false, caller); // setting volume on ui sounds stream type also controls silent mode if (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) || (mStreamVolumeAlias[streamType] == getUiSoundsStreamType())) { (stream == getUiSoundsStreamType())) { int newRingerMode; if (index == 0) { newRingerMode = mHasVibrator ? AudioManager.RINGER_MODE_VIBRATE Loading @@ -1382,6 +1383,8 @@ public class AudioService extends IAudioService.Stub { } setRingerMode(newRingerMode, TAG + ".onSetStreamVolume", false /*external*/); } // setting non-zero volume for a muted stream unmutes the stream and vice versa mStreamStates[stream].mute(index == 0); } /** @see AudioManager#setStreamVolume(int, int, int) */ Loading Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java +0 −15 Original line number Diff line number Diff line Loading @@ -726,11 +726,6 @@ public class VolumeDialog { } row.slider.setProgress(newProgress); } if (mAutomute && mShowing) { if (vlevel == 0 && !row.ss.muted && row.stream == AudioManager.STREAM_MUSIC) { mController.setStreamMute(row.stream, true); } } } } Loading Loading @@ -934,16 +929,6 @@ public class VolumeDialog { final int userLevel = getImpliedLevel(seekBar, progress); if (mRow.ss.level != userLevel || mRow.ss.muted && userLevel > 0) { mRow.userAttempt = SystemClock.uptimeMillis(); if (mAutomute) { if (mRow.stream != AudioManager.STREAM_RING) { if (userLevel > 0 && mRow.ss.muted) { mController.setStreamMute(mRow.stream, false); } if (userLevel == 0 && mRow.ss.muteSupported && !mRow.ss.muted) { mController.setStreamMute(mRow.stream, true); } } } if (mRow.requestedLevel != userLevel) { mController.setStreamVolume(mRow.stream, userLevel); mRow.requestedLevel = userLevel; Loading
services/core/java/com/android/server/audio/AudioService.java +5 −2 Original line number Diff line number Diff line Loading @@ -1368,10 +1368,11 @@ public class AudioService extends IAudioService.Stub { private void onSetStreamVolume(int streamType, int index, int flags, int device, String caller) { setStreamVolumeInt(mStreamVolumeAlias[streamType], index, device, false, caller); final int stream = mStreamVolumeAlias[streamType]; setStreamVolumeInt(stream, index, device, false, caller); // setting volume on ui sounds stream type also controls silent mode if (((flags & AudioManager.FLAG_ALLOW_RINGER_MODES) != 0) || (mStreamVolumeAlias[streamType] == getUiSoundsStreamType())) { (stream == getUiSoundsStreamType())) { int newRingerMode; if (index == 0) { newRingerMode = mHasVibrator ? AudioManager.RINGER_MODE_VIBRATE Loading @@ -1382,6 +1383,8 @@ public class AudioService extends IAudioService.Stub { } setRingerMode(newRingerMode, TAG + ".onSetStreamVolume", false /*external*/); } // setting non-zero volume for a muted stream unmutes the stream and vice versa mStreamStates[stream].mute(index == 0); } /** @see AudioManager#setStreamVolume(int, int, int) */ Loading