OSDN Git Service

am 59dc8d1d: SIM settings display name changes
authorSanket Padawe <sanketpadawe@google.com>
Wed, 22 Oct 2014 21:22:25 +0000 (21:22 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Wed, 22 Oct 2014 21:22:25 +0000 (21:22 +0000)
* commit '59dc8d1db4c557ace1ded52122993be2e73f6863':
  SIM settings display name changes

src/com/android/settings/sim/SimSettings.java

index 3aa79b9..cd556b6 100644 (file)
@@ -428,12 +428,12 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
         public void update() {
             final Resources res = getResources();
 
-            if(mSubInfoRecord.displayName.length() == 0) {
-                setTitle(getCarrierName());
-            } else {
-                setTitle(mSubInfoRecord.displayName);
-            }
             if (mSubInfoRecord != null) {
+                if(TextUtils.isEmpty(mSubInfoRecord.displayName)) {
+                    setTitle(getCarrierName());
+                } else {
+                    setTitle(mSubInfoRecord.displayName);
+                }
                 setSummary(mSubInfoRecord.number.toString());
                 setEnabled(true);
             } else {