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
This commit is contained in:
committed by
Johan Redestig
parent
7888486d1c
commit
aeab76c5be
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user