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

Commit 5bde544a authored by Youming Ye's avatar Youming Ye Committed by Gerrit Code Review
Browse files

Merge "Prevents out of bounds exception when reading wfcSpnFormats"

parents 5c97b17d 5947fd2b
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];
        }