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

Commit fa86b3f7 authored by Youming Ye's avatar Youming Ye Committed by android-build-merger
Browse files

Merge "Prevents out of bounds exception when reading wfcSpnFormats"

am: 5bde544a

Change-Id: If1b067ce9bab9745cce9c05ea61ade98b0996ff4
parents ef71d529 5bde544a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2246,6 +2246,15 @@ public class ServiceStateTracker extends Handler {
                }
            }

            if (voiceIdx < 0 || voiceIdx >= wfcSpnFormats.length) {
                loge("updateSpnDisplay: KEY_WFC_SPN_FORMAT_IDX_INT out of bounds: " + voiceIdx);
                voiceIdx = 0;
            }
            if (dataIdx < 0 || dataIdx >= wfcSpnFormats.length) {
                loge("updateSpnDisplay: KEY_WFC_DATA_SPN_FORMAT_IDX_INT out of bounds: " + dataIdx);
                dataIdx = 0;
            }

            wfcVoiceSpnFormat = wfcSpnFormats[voiceIdx];
            wfcDataSpnFormat = wfcSpnFormats[dataIdx];
        }