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

Commit 6e4ff4df authored by shinchul.kang's avatar shinchul.kang
Browse files

Fix wrong calculation of ota sp Number schema



The system selection code schema is:
    SELC,the # of code pairs,min1,max1,min2,max2,...
    e.g "SELC,3,10,20,30,40,60,70" indicates that there are 3 pairs of
    selection codes, and they are {10,20}, {30,40} and {60,70} respectively.
The checkOtaSpNumBasedOnSysSelCode API is implemented with incorrect logic.
So, fixed wrong calculation of ota sp Number schema.

Change-Id: I59781f0660cfe8a115841ccee3cbed7cbba11c04
Signed-off-by: default avatarShinchul Kang <shinchul.kang@lge.com>
parent f54703d1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3666,9 +3666,9 @@ public class GsmCdmaPhone extends Phone {
            // Get how many number of system selection code ranges
            int selRc = Integer.parseInt(sch[1]);
            for (int i = 0; i < selRc; i++) {
                if (!TextUtils.isEmpty(sch[i+2]) && !TextUtils.isEmpty(sch[i+3])) {
                    int selMin = Integer.parseInt(sch[i+2]);
                    int selMax = Integer.parseInt(sch[i+3]);
                if (!TextUtils.isEmpty(sch[i*2+2]) && !TextUtils.isEmpty(sch[i*2+3])) {
                    int selMin = Integer.parseInt(sch[i*2+2]);
                    int selMax = Integer.parseInt(sch[i*2+3]);
                    // Check if the selection code extracted from the dial string falls
                    // within any of the range pairs specified in the schema.
                    if ((sysSelCodeInt >= selMin) && (sysSelCodeInt <= selMax)) {