• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

修訂8d5925b2d977570fdf6e065ebe51ca90c66d97a5 (tree)
時間2016-10-26 00:46:00
作者Diogo Ferreira <diogo@unde...>
CommiterMarcos Marado

Log Message

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

Change Summary

差異

--- a/src/com/android/settings/ApnSettings.java
+++ b/src/com/android/settings/ApnSettings.java
@@ -430,7 +430,8 @@ public class ApnSettings extends SettingsPreferenceFragment implements
430430 String key = null;
431431
432432 Uri uri;
433- if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null) {
433+ if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null
434+ && mSubscriptionInfo != null) {
434435 uri = Uri.withAppendedPath(PREFERRED_MSIM_APN_URI,
435436 String.valueOf(mSubscriptionInfo.getSubscriptionId()));
436437 uri = Uri.withAppendedPath(uri, mImsi);