OSDN Git Service

Protect against monkey crash
authorJason Monk <jmonk@google.com>
Wed, 13 Apr 2016 16:34:37 +0000 (12:34 -0400)
committerJason Monk <jmonk@google.com>
Wed, 13 Apr 2016 16:34:37 +0000 (12:34 -0400)
Change-Id: If1fd7dd51247bf29e86db16d4a01b2a45fac791e
Fixes: 27678593

src/com/android/settings/datausage/DataSaverSummary.java

index e12afbf..e8c8cdd 100644 (file)
@@ -100,6 +100,9 @@ public class DataSaverSummary extends SettingsPreferenceFragment
 
     @Override
     public void onExtraInfoUpdated() {
+        if (!isAdded()) {
+            return;
+        }
         int count = 0;
         final ArrayList<AppEntry> allApps = mSession.getAllApps();
         final int N = allApps.size();