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

Commit aeab76c5 authored by Babis Triantafyllou's avatar Babis Triantafyllou Committed by Johan Redestig
Browse files

NullPointerException at handleMessage(GSMPhone.java)

NullPointerException at
com.android.internal.telephony.gsm.GSMPhone.handleMessage(GSMPhone.java)
Failing to retrieved the IMSI number from SIM card could lead to
an exception. A null pointer check will prevent this.

Change-Id: I26760543484504c8d35215bfb1e8f1ae664aeade
parent 7888486d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1227,7 +1227,8 @@ public class GSMPhone extends PhoneBase {
                // Check if this is a different SIM than the previous one. If so unset the
                // voice mail number.
                String imsi = getVmSimImsi();
                if (imsi != null && !getSubscriberId().equals(imsi)) {
                String imsiFromSIM = getSubscriberId();
                if (imsi != null && imsiFromSIM != null && !imsiFromSIM.equals(imsi)) {
                    storeVoiceMailNumber(null);
                    setVmSimImsi(null);
                }