Loading media/java/android/media/AudioManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,7 @@ public class AudioManager { /** * Get the stream type whose volume is driving the UI sounds volume. * UI sounds are screen lock/unlock, camera shutter, key clicks... * It is assumed that this stream type is also tied to ringer mode changes. * @hide */ public int getMasterStreamType() { Loading media/java/android/media/AudioService.java +4 −12 Original line number Diff line number Diff line Loading @@ -291,14 +291,14 @@ public class AudioService extends IAudioService.Stub { }; private final int[] STREAM_VOLUME_ALIAS_DEFAULT = new int[] { AudioSystem.STREAM_VOICE_CALL, // STREAM_VOICE_CALL AudioSystem.STREAM_MUSIC, // STREAM_SYSTEM AudioSystem.STREAM_RING, // STREAM_SYSTEM AudioSystem.STREAM_RING, // STREAM_RING AudioSystem.STREAM_MUSIC, // STREAM_MUSIC AudioSystem.STREAM_ALARM, // STREAM_ALARM AudioSystem.STREAM_RING, // STREAM_NOTIFICATION AudioSystem.STREAM_BLUETOOTH_SCO, // STREAM_BLUETOOTH_SCO AudioSystem.STREAM_MUSIC, // STREAM_SYSTEM_ENFORCED AudioSystem.STREAM_MUSIC, // STREAM_DTMF AudioSystem.STREAM_RING, // STREAM_SYSTEM_ENFORCED AudioSystem.STREAM_RING, // STREAM_DTMF AudioSystem.STREAM_MUSIC // STREAM_TTS }; private int[] mStreamVolumeAlias; Loading Loading @@ -1572,15 +1572,7 @@ public class AudioService extends IAudioService.Stub { /** @see AudioManager#getMasterStreamType() */ public int getMasterStreamType() { switch (mPlatformType) { case PLATFORM_VOICE: return AudioSystem.STREAM_RING; case PLATFORM_TELEVISION: return AudioSystem.STREAM_MUSIC; default: break; } return AudioSystem.STREAM_NOTIFICATION; return mStreamVolumeAlias[AudioSystem.STREAM_SYSTEM]; } /** @see AudioManager#setMicrophoneMute(boolean) */ Loading packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +4 −4 Original line number Diff line number Diff line Loading @@ -680,15 +680,15 @@ public class VolumePanel extends Handler { // never disable touch interactions for remote playback, the muting is not tied to // the state of the phone. sc.seekbarView.setEnabled(!fixedVolume); } else if (fixedVolume || (sc.streamType != mAudioManager.getMasterStreamType() && muted) || (sSafetyWarning != null)) { sc.seekbarView.setEnabled(false); } else if (isRinger && mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT) { sc.seekbarView.setEnabled(false); sc.icon.setEnabled(false); sc.icon.setAlpha(mDisabledAlpha); sc.icon.setClickable(false); } else if (fixedVolume || (sc.streamType != mAudioManager.getMasterStreamType() && muted) || (sSafetyWarning != null)) { sc.seekbarView.setEnabled(false); } else { sc.seekbarView.setEnabled(true); sc.icon.setEnabled(true); Loading Loading
media/java/android/media/AudioManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,7 @@ public class AudioManager { /** * Get the stream type whose volume is driving the UI sounds volume. * UI sounds are screen lock/unlock, camera shutter, key clicks... * It is assumed that this stream type is also tied to ringer mode changes. * @hide */ public int getMasterStreamType() { Loading
media/java/android/media/AudioService.java +4 −12 Original line number Diff line number Diff line Loading @@ -291,14 +291,14 @@ public class AudioService extends IAudioService.Stub { }; private final int[] STREAM_VOLUME_ALIAS_DEFAULT = new int[] { AudioSystem.STREAM_VOICE_CALL, // STREAM_VOICE_CALL AudioSystem.STREAM_MUSIC, // STREAM_SYSTEM AudioSystem.STREAM_RING, // STREAM_SYSTEM AudioSystem.STREAM_RING, // STREAM_RING AudioSystem.STREAM_MUSIC, // STREAM_MUSIC AudioSystem.STREAM_ALARM, // STREAM_ALARM AudioSystem.STREAM_RING, // STREAM_NOTIFICATION AudioSystem.STREAM_BLUETOOTH_SCO, // STREAM_BLUETOOTH_SCO AudioSystem.STREAM_MUSIC, // STREAM_SYSTEM_ENFORCED AudioSystem.STREAM_MUSIC, // STREAM_DTMF AudioSystem.STREAM_RING, // STREAM_SYSTEM_ENFORCED AudioSystem.STREAM_RING, // STREAM_DTMF AudioSystem.STREAM_MUSIC // STREAM_TTS }; private int[] mStreamVolumeAlias; Loading Loading @@ -1572,15 +1572,7 @@ public class AudioService extends IAudioService.Stub { /** @see AudioManager#getMasterStreamType() */ public int getMasterStreamType() { switch (mPlatformType) { case PLATFORM_VOICE: return AudioSystem.STREAM_RING; case PLATFORM_TELEVISION: return AudioSystem.STREAM_MUSIC; default: break; } return AudioSystem.STREAM_NOTIFICATION; return mStreamVolumeAlias[AudioSystem.STREAM_SYSTEM]; } /** @see AudioManager#setMicrophoneMute(boolean) */ Loading
packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +4 −4 Original line number Diff line number Diff line Loading @@ -680,15 +680,15 @@ public class VolumePanel extends Handler { // never disable touch interactions for remote playback, the muting is not tied to // the state of the phone. sc.seekbarView.setEnabled(!fixedVolume); } else if (fixedVolume || (sc.streamType != mAudioManager.getMasterStreamType() && muted) || (sSafetyWarning != null)) { sc.seekbarView.setEnabled(false); } else if (isRinger && mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT) { sc.seekbarView.setEnabled(false); sc.icon.setEnabled(false); sc.icon.setAlpha(mDisabledAlpha); sc.icon.setClickable(false); } else if (fixedVolume || (sc.streamType != mAudioManager.getMasterStreamType() && muted) || (sSafetyWarning != null)) { sc.seekbarView.setEnabled(false); } else { sc.seekbarView.setEnabled(true); sc.icon.setEnabled(true); Loading