Loading media/java/android/media/AudioManager.java +0 −3 Original line number Diff line number Diff line Loading @@ -1076,9 +1076,6 @@ public class AudioManager { * <p> * This method has no effect if the device implements a fixed volume policy * as indicated by {@link #isVolumeFixed()}. * <p>From N onward, stream mute changes that would toggle Do Not Disturb are not allowed unless * the app has been granted Do Not Disturb Access. * See {@link NotificationManager#isNotificationPolicyAccessGranted()}. * <p> * This method was deprecated in API level 22. Prior to API level 22 this * method had significantly different behavior and should be used carefully. Loading services/core/java/com/android/server/audio/AudioService.java +2 −8 Original line number Diff line number Diff line Loading @@ -1290,7 +1290,7 @@ public class AudioService extends IAudioService.Stub { // Check if the ringer mode handles this adjustment. If it does we don't // need to adjust the volume further. final int result = checkForRingerModeChange(aliasIndex, direction, step, streamState.mIsMuted, caller); streamState.mIsMuted); adjustVolume = (result & FLAG_ADJUST_VOLUME) != 0; // If suppressing a volume adjustment in silent mode, display the UI hint if ((result & AudioManager.FLAG_SHOW_SILENT_HINT) != 0) { Loading Loading @@ -3361,8 +3361,7 @@ public class AudioService extends IAudioService.Stub { * adjusting volume. If so, this will set the proper ringer mode and volume * indices on the stream states. */ private int checkForRingerModeChange(int oldIndex, int direction, int step, boolean isMuted, String caller) { private int checkForRingerModeChange(int oldIndex, int direction, int step, boolean isMuted) { final boolean isTv = mPlatformType == AudioSystem.PLATFORM_TELEVISION; int result = FLAG_ADJUST_VOLUME; int ringerMode = getRingerModeInternal(); Loading Loading @@ -3451,11 +3450,6 @@ public class AudioService extends IAudioService.Stub { break; } if (isAndroidNPlus(caller) && wouldToggleZenMode(ringerMode) && !mNm.isNotificationPolicyAccessGrantedForPackage(caller)) { throw new SecurityException("Not allowed to change Do Not Disturb state"); } setRingerMode(ringerMode, TAG + ".checkForRingerModeChange", false /*external*/); mPrevVolDirection = direction; Loading Loading
media/java/android/media/AudioManager.java +0 −3 Original line number Diff line number Diff line Loading @@ -1076,9 +1076,6 @@ public class AudioManager { * <p> * This method has no effect if the device implements a fixed volume policy * as indicated by {@link #isVolumeFixed()}. * <p>From N onward, stream mute changes that would toggle Do Not Disturb are not allowed unless * the app has been granted Do Not Disturb Access. * See {@link NotificationManager#isNotificationPolicyAccessGranted()}. * <p> * This method was deprecated in API level 22. Prior to API level 22 this * method had significantly different behavior and should be used carefully. Loading
services/core/java/com/android/server/audio/AudioService.java +2 −8 Original line number Diff line number Diff line Loading @@ -1290,7 +1290,7 @@ public class AudioService extends IAudioService.Stub { // Check if the ringer mode handles this adjustment. If it does we don't // need to adjust the volume further. final int result = checkForRingerModeChange(aliasIndex, direction, step, streamState.mIsMuted, caller); streamState.mIsMuted); adjustVolume = (result & FLAG_ADJUST_VOLUME) != 0; // If suppressing a volume adjustment in silent mode, display the UI hint if ((result & AudioManager.FLAG_SHOW_SILENT_HINT) != 0) { Loading Loading @@ -3361,8 +3361,7 @@ public class AudioService extends IAudioService.Stub { * adjusting volume. If so, this will set the proper ringer mode and volume * indices on the stream states. */ private int checkForRingerModeChange(int oldIndex, int direction, int step, boolean isMuted, String caller) { private int checkForRingerModeChange(int oldIndex, int direction, int step, boolean isMuted) { final boolean isTv = mPlatformType == AudioSystem.PLATFORM_TELEVISION; int result = FLAG_ADJUST_VOLUME; int ringerMode = getRingerModeInternal(); Loading Loading @@ -3451,11 +3450,6 @@ public class AudioService extends IAudioService.Stub { break; } if (isAndroidNPlus(caller) && wouldToggleZenMode(ringerMode) && !mNm.isNotificationPolicyAccessGrantedForPackage(caller)) { throw new SecurityException("Not allowed to change Do Not Disturb state"); } setRingerMode(ringerMode, TAG + ".checkForRingerModeChange", false /*external*/); mPrevVolDirection = direction; Loading