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

Commit 53d41d5b authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

Add null check before accessing mContext

When APM enabled SIM powering down and all the SIMRecords
are disposed, during this time accessing the null set mContext
leading to NPE.

To avoid this added null check.

Change-Id: Id2ee14faee764b9f9d124a65736dec8ab8eb788e
CRs-Fixed: 754013
parent d1dea894
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1612,7 +1612,7 @@ public class SIMRecords extends IccRecords {
    @Override
    public int getDisplayRule(String plmn) {
        int rule;
        if (mContext.getResources().getBoolean(
        if ((mContext != null) && mContext.getResources().getBoolean(
                com.android.internal.R.bool.def_telephony_spn_spec_enabled)) {
            rule = SPN_RULE_SHOW_SPN;
            return rule;