OSDN Git Service

Don't crash while entering in DevelopmentSettings
authorMarcos Marado <mmarado@cyngn.com>
Fri, 15 Apr 2016 14:34:40 +0000 (15:34 +0100)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Tue, 13 Sep 2016 18:17:33 +0000 (11:17 -0700)
...when there's no Backup Manager

Change-Id: I24261cfc7d2709d07b895899216ab38d4a757095

src/com/android/settings/DevelopmentSettings.java

index 3666212..a30dba2 100644 (file)
@@ -956,6 +956,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
 
     private void updatePasswordSummary() {
         try {
+            if (mBackupManager == null) {
+               Log.e(TAG, "Backup Manager is unavailable!");
+               return;
+            }
             if (mBackupManager.hasBackupPassword()) {
                 mPassword.setSummary(R.string.local_backup_password_summary_change);
             } else {