OSDN Git Service

Fix crash when adding account
authorAmith Yamasani <yamasani@google.com>
Wed, 30 Apr 2014 17:38:56 +0000 (10:38 -0700)
committerThe Android Automerger <android-build@android.com>
Wed, 30 Apr 2014 18:10:56 +0000 (11:10 -0700)
Remove the listener in onStop(), to be symmetrical with onStart().

Bug: 14393261
Change-Id: I5d4f0ca38d5ef52b97715b8f3791ff2a400c68e2

src/com/android/settings/dashboard/DashboardSummary.java

index 54a56ab..b04fe9a 100644 (file)
@@ -127,8 +127,8 @@ public class DashboardSummary extends Fragment implements OnAccountsUpdateListen
     }
 
     @Override
-    public void onPause() {
-        super.onPause();
+    public void onStop() {
+        super.onStop();
 
         AccountManager.get(getActivity()).removeOnAccountsUpdatedListener(this);
     }