diff options
| author | Régis Décamps <regisd@google.com> | 2014-10-07 15:16:40 +0200 |
|---|---|---|
| committer | Régis Décamps <regisd@google.com> | 2014-10-08 13:27:00 +0200 |
| commit | ac03b5576516f9e14a089b79b00dd7bf2dd48cfa (patch) | |
| tree | 5189a203eee60882e1435bf61ba4b8f0890153ef /provider_src | |
| parent | ab3ed2cb7ac10a90d3bc9d4bc95f209c2de20d5a (diff) | |
| download | android_packages_apps_Email-ac03b5576516f9e14a089b79b00dd7bf2dd48cfa.tar.gz android_packages_apps_Email-ac03b5576516f9e14a089b79b00dd7bf2dd48cfa.tar.bz2 android_packages_apps_Email-ac03b5576516f9e14a089b79b00dd7bf2dd48cfa.zip | |
Resend notifications when Accounts are changed
When AccountManager notifies of account change, resend notifications
because the existing ones can point to an account that doesn't
exist anymore.
Bug: 17713589 Gmail crashes when accessing an old notification for an account that has been deleted.
Change-Id: I6c2cf5234006f4859fea5bbaa52970963bcfccdd
Diffstat (limited to 'provider_src')
| -rw-r--r-- | provider_src/com/android/email/service/EmailBroadcastProcessorService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/provider_src/com/android/email/service/EmailBroadcastProcessorService.java b/provider_src/com/android/email/service/EmailBroadcastProcessorService.java index 3b15904d7..7aa54673e 100644 --- a/provider_src/com/android/email/service/EmailBroadcastProcessorService.java +++ b/provider_src/com/android/email/service/EmailBroadcastProcessorService.java @@ -40,13 +40,13 @@ import com.android.email.R; import com.android.email.SecurityPolicy; import com.android.email.provider.AccountReconciler; import com.android.emailcommon.Logging; -import com.android.emailcommon.VendorPolicyLoader; import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.EmailContent; import com.android.emailcommon.provider.EmailContent.AccountColumns; import com.android.emailcommon.provider.HostAuth; import com.android.mail.providers.UIProvider; import com.android.mail.utils.LogUtils; +import com.android.mail.utils.NotificationActionUtils; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Maps; @@ -367,5 +367,9 @@ public class EmailBroadcastProcessorService extends IntentService { private void onSystemAccountChanged() { LogUtils.i(Logging.LOG_TAG, "System accounts updated."); reconcileAndStartServices(); + // Resend all notifications, so that there is no notification that points to a removed + // account. + NotificationActionUtils.resendNotifications(getApplicationContext(), + null /* all accounts */, null /* all folders */); } } |
