Change notification code to key off android.accounts.Account
b/11023774 Change-Id: I6dd267591148378265b0f12c7ea6d74b450a0f3d
This commit is contained in:
parent
26c8e7551d
commit
f086deac70
@ -514,7 +514,7 @@ public class NotificationController {
|
||||
* as well as special login/security notifications.
|
||||
*/
|
||||
public static void cancelNotifications(final Context context, final Account account) {
|
||||
NotificationUtils.clearAccountNotifications(context, account.mEmailAddress);
|
||||
NotificationUtils.clearAccountNotifications(context, account.mAmAccount);
|
||||
|
||||
final NotificationManager notificationManager = getInstance(context).mNotificationManager;
|
||||
|
||||
@ -559,6 +559,12 @@ public class NotificationController {
|
||||
accountCursor.close();
|
||||
}
|
||||
|
||||
if (account == null) {
|
||||
LogUtils.d(LOG_TAG, "Tried to create a notification for a missing account %d",
|
||||
mAccountId);
|
||||
return;
|
||||
}
|
||||
|
||||
final Cursor mailboxCursor = contentResolver.query(
|
||||
ContentUris.withAppendedId(EmailContent.MAILBOX_NOTIFICATION_URI, mAccountId),
|
||||
null, null, null, null);
|
||||
@ -678,6 +684,7 @@ public class NotificationController {
|
||||
try {
|
||||
mLock.wait();
|
||||
} catch (InterruptedException ex) {
|
||||
// Loop around and wait again
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user