Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb4d0127 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 8621

* changes:
  Fix issue 2004738: Settings Backup Agent consistently throws ArrayIndexOutOfBoundsException during restore.
parents 7f90e47b d25ae67c
Loading
Loading
Loading
Loading
+21 −24
Original line number Diff line number Diff line
@@ -680,9 +680,7 @@ public class AudioService extends IAudioService.Stub {
        for (int streamType = 0; streamType < numStreamTypes; streamType++) {
            VolumeStreamState streamState = mStreamStates[streamType];

            // there is no volume setting for STREAM_BLUETOOTH_SCO
            if (streamType != AudioSystem.STREAM_BLUETOOTH_SCO) {
                String settingName = System.VOLUME_SETTINGS[streamType];
            String settingName = System.VOLUME_SETTINGS[STREAM_VOLUME_ALIAS[streamType]];
            String lastAudibleSettingName = settingName + System.APPEND_FOR_LAST_AUDIBLE;
            int index = Settings.System.getInt(mContentResolver,
                                           settingName,
@@ -704,7 +702,6 @@ public class AudioService extends IAudioService.Stub {
                index *= 10;
            }
            streamState.mLastAudibleIndex = streamState.getValidIndex(index);
            }

            // unmute stream that whas muted but is not affect by mute anymore
            if (streamState.muteCount() != 0 && !isStreamAffectedByMute(streamType)) {