commit | 23f58260bd70dc9ca2787f54093ec0369dc3f02c | [log] [tgz] |
---|---|---|
author | Carlos Valdivia <carlosvaldivia@google.com> | Fri Sep 05 10:52:41 2014 -0700 |
committer | Carlos Valdivia <carlosvaldivia@google.com> | Fri Sep 05 13:58:31 2014 -0700 |
tree | 771585c003af393268f8dbe139549c25276456fe | |
parent | 43a2d06166f9d5aa46371c6496ec99a9fba8df00 [diff] [blame] |
We shouldn't delete accounts when a package is being updated. Bug: 17158237 Change-Id: Icbf9e672a6a698737b08ed39c78a64c161a7b802
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index c469b42..888fa1a 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -265,7 +265,11 @@ mContext.registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context1, Intent intent) { - purgeOldGrantsAll(); + // Don't delete accounts when updating a authenticator's + // package. + if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) { + purgeOldGrantsAll(); + } } }, intentFilter);