packages/apps/Settings
修訂 | 8d5925b2d977570fdf6e065ebe51ca90c66d97a5 (tree) |
---|---|
時間 | 2016-10-26 00:46:00 |
作者 | Diogo Ferreira <diogo@unde...> |
Commiter | Marcos Marado |
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.
Change-Id: I1011a10434fad8fd911164217b9fb2d0dfb82b2a
Ticket: CYNGNOS-3291
@@ -430,7 +430,8 @@ public class ApnSettings extends SettingsPreferenceFragment implements | ||
430 | 430 | String key = null; |
431 | 431 | |
432 | 432 | Uri uri; |
433 | - if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null) { | |
433 | + if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null | |
434 | + && mSubscriptionInfo != null) { | |
434 | 435 | uri = Uri.withAppendedPath(PREFERRED_MSIM_APN_URI, |
435 | 436 | String.valueOf(mSubscriptionInfo.getSubscriptionId())); |
436 | 437 | uri = Uri.withAppendedPath(uri, mImsi); |