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

Unverified Commit 6d24bf8d authored by Diogo Ferreira's avatar Diogo Ferreira Committed by Adrian DC
Browse files

Settings: Apn: Don't dereference a null mSubscriptionInfo

When switching sims mSubscriptionInfo can be temporarily null, don't
dereference it in those cases. The interface will be updated afterwards
when the subscription status changes.

RM-290

Change-Id: I1011a10434fad8fd911164217b9fb2d0dfb82b2a
Ticket: CYNGNOS-3291
parent 8cb03459
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -430,7 +430,8 @@ public class ApnSettings extends SettingsPreferenceFragment implements
        String key = null;

        Uri uri;
        if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null)  {
        if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null
                && mSubscriptionInfo != null)  {
            uri = Uri.withAppendedPath(PREFERRED_MSIM_APN_URI,
                    String.valueOf(mSubscriptionInfo.getSubscriptionId()));
            uri = Uri.withAppendedPath(uri, mImsi);