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

Commit 60f9bd6f authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "check empty EF_CFIS when validate call forward"

parents c89d0c91 ee602d6d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ public class SIMRecords extends IccRecords {
        }
    }

    // Validate data is !null.
    // Validate data is not null and not empty.
    private boolean validEfCfis(byte[] data) {
        if (data != null) {
            if (data[0] < 1 || data[0] > 4) {
@@ -492,8 +492,13 @@ public class SIMRecords extends IccRecords {
                // 1 and 4 according to ETSI TS 131 102 v11.3.0 section 4.2.64.
                logw("MSP byte: " + data[0] + " is not between 1 and 4", null);
            }
            // empty EF_CFIS should be considered as call forward disabled
            for (byte b : data) {
                if (b != (byte) 0xFF) {
                    return true;
                }
            }
        }
        return false;
    }