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

Commit 7f8c8fbe authored by Tsukasa Gotou's avatar Tsukasa Gotou Committed by Zoran Jovanovic
Browse files

Invalid call forwarding indicator status check

According to ETSI specification, it is needed to check the value of
the first byte of EF_CFIS MSP, which is between 1 and 4. However,
existing many SIM cards don't follow ETSI specification, and hence,
CFU (Call Forwarding Unconditional) function is usually failed.

This patch deletes the check for the first byte of MSP so that
existing SIM cards can use CFU function.

Bug: 31851694
Change-Id: I78fe0f3ddc4d3650e8cae0efea80e0ed84917c2a
parent 03adc603
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -484,10 +484,17 @@ public class SIMRecords extends IccRecords {
        }
    }

    // Validate data is !null and the MSP (Multiple Subscriber Profile)
    // byte is between 1 and 4. See ETSI TS 131 102 v11.3.0 section 4.2.64.
    // Validate data is !null.
    private boolean validEfCfis(byte[] data) {
        return ((data != null) && (data[0] >= 1) && (data[0] <= 4));
        if (data != null) {
            if (data[0] < 1 || data[0] > 4) {
                // The MSP (Multiple Subscriber Profile) byte should be between
                // 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);
            }
            return true;
        }
        return false;
    }

    public int getVoiceMessageCount() {