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

Commit fe2de617 authored by arcwang's avatar arcwang Committed by Arc Wang
Browse files

Only check the least bit of status byte for EF_SMS free space

According to 3GPP 51.011 10.5.3 & 3GPP2 C.S0023 3.4.27,
Only the least bit (b1) of status byte should be used to judge free space of EF_SMS.

Bug: 113093468
Test: make & manual test
Change-Id: I3e4b546ef12d7b054594db1d7cc4a1d5e25e6b69
parent e3556760
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ public class IccSmsInterfaceManager {
            mSuccess = false;
            Message response = mHandler.obtainMessage(EVENT_UPDATE_DONE);

            if (status == STATUS_ON_ICC_FREE) {
            if ((status & 0x01) == STATUS_ON_ICC_FREE) {
                // RIL_REQUEST_DELETE_SMS_ON_SIM vs RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
                // Special case FREE: call deleteSmsOnSim/Ruim instead of
                // manipulating the record
@@ -741,7 +741,7 @@ public class IccSmsInterfaceManager {

        for (int i = 0; i < count; i++) {
            byte[] ba = messages.get(i);
            if (ba[0] == STATUS_ON_ICC_FREE) {
            if ((ba[0] & 0x01) == STATUS_ON_ICC_FREE) {
                ret.add(null);
            } else {
                ret.add(new SmsRawData(messages.get(i)));