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

Commit b695372c authored by kun.tang's avatar kun.tang
Browse files

Fixed NullPointerException when parseEfSpdi.

The return value of bcdPlmnToString may be null, so it is necessary to judge null here.
Test:build

Change-Id: I3d0c7bd69912f14ed6a9d4b8a8cc8c980157c4cf
parent 0624b77b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2036,7 +2036,7 @@ public class SIMRecords extends IccRecords {
            plmnCode = IccUtils.bcdPlmnToString(plmnEntries, i);
            plmnCode = IccUtils.bcdPlmnToString(plmnEntries, i);


            // Valid operator codes are 5 or 6 digits
            // Valid operator codes are 5 or 6 digits
            if (plmnCode.length() >= 5) {
            if (plmnCode != null && plmnCode.length() >= 5) {
                log("EF_SPDI network: " + plmnCode);
                log("EF_SPDI network: " + plmnCode);
                mSpdiNetworks.add(plmnCode);
                mSpdiNetworks.add(plmnCode);
            }
            }