am fad80911: am 4ed38cc1: am 2128e365: Merge "Resend notifications when Accounts are changed" into ub-gmail-ur14-dev

* commit 'fad809111cdd90117c2047b9b8625e2ddd9dadf0':
  Resend notifications when Accounts are changed
This commit is contained in:
Régis Décamps 2014-11-02 17:38:09 +00:00 committed by Android Git Automerger
commit b5e2358fc1

View File

@ -40,13 +40,13 @@ import com.android.email.R;
import com.android.email.SecurityPolicy; import com.android.email.SecurityPolicy;
import com.android.email.provider.AccountReconciler; import com.android.email.provider.AccountReconciler;
import com.android.emailcommon.Logging; import com.android.emailcommon.Logging;
import com.android.emailcommon.VendorPolicyLoader;
import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.EmailContent; import com.android.emailcommon.provider.EmailContent;
import com.android.emailcommon.provider.EmailContent.AccountColumns; import com.android.emailcommon.provider.EmailContent.AccountColumns;
import com.android.emailcommon.provider.HostAuth; import com.android.emailcommon.provider.HostAuth;
import com.android.mail.providers.UIProvider; import com.android.mail.providers.UIProvider;
import com.android.mail.utils.LogUtils; import com.android.mail.utils.LogUtils;
import com.android.mail.utils.NotificationActionUtils;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
@ -367,5 +367,9 @@ public class EmailBroadcastProcessorService extends IntentService {
private void onSystemAccountChanged() { private void onSystemAccountChanged() {
LogUtils.i(Logging.LOG_TAG, "System accounts updated."); LogUtils.i(Logging.LOG_TAG, "System accounts updated.");
reconcileAndStartServices(); 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 */);
} }
} }