am e34c3677: Merge "Drawer resource updates" into ub-gmail-ur14-dev automerge: 1e6f26a

* commit 'e34c3677b429a935ac20443ae45136c49f62ca2f':
  Drawer resource updates
  Update Notifications (Email)
This commit is contained in:
Tony Mantler 2014-11-02 17:27:51 +00:00 committed by Android Git Automerger
commit 214cf5cf93
2 changed files with 12 additions and 14 deletions

View File

@ -123,14 +123,13 @@ public class NotificationController {
* @param title The first line of text. May NOT be {@code null}.
* @param contentText The second line of text. May NOT be {@code null}.
* @param intent The intent to start if the user clicks on the notification.
* @param largeIcon A large icon. May be {@code null}
* @param number A number to display using {@link Builder#setNumber(int)}. May be {@code null}.
* @param enableAudio If {@code false}, do not play any sound. Otherwise, play sound according
* to the settings for the given account.
* @return A {@link Notification} that can be sent to the notification service.
*/
private NotificationCompat.Builder createBaseAccountNotificationBuilder(long accountId,
String ticker, CharSequence title, String contentText, Intent intent, Bitmap largeIcon,
String ticker, CharSequence title, String contentText, Intent intent,
Integer number, boolean enableAudio, boolean ongoing) {
// Pending Intent
PendingIntent pending = null;
@ -144,7 +143,6 @@ public class NotificationController {
.setContentTitle(title)
.setContentText(contentText)
.setContentIntent(pending)
.setLargeIcon(largeIcon)
.setNumber(number == null ? 0 : number)
.setSmallIcon(R.drawable.ic_notification_mail_24dp)
.setWhen(mClock.getTime())
@ -172,7 +170,7 @@ public class NotificationController {
private void showNotification(long accountId, String ticker, String title,
String contentText, Intent intent, int notificationId) {
final NotificationCompat.Builder builder = createBaseAccountNotificationBuilder(accountId,
ticker, title, contentText, intent, null, null, true,
ticker, title, contentText, intent, null, true,
needsOngoingNotification(notificationId));
mNotificationManager.notify(notificationId, builder.build());
}

View File

@ -2675,13 +2675,13 @@ public class EmailProvider extends ContentProvider
+ " ELSE " + UIProvider.FolderType.DEFAULT + " END";
private static final String FOLDER_ICON = "CASE " + MailboxColumns.TYPE
+ " WHEN " + Mailbox.TYPE_INBOX + " THEN " + R.drawable.ic_drawer_inbox
+ " WHEN " + Mailbox.TYPE_DRAFTS + " THEN " + R.drawable.ic_drawer_drafts
+ " WHEN " + Mailbox.TYPE_OUTBOX + " THEN " + R.drawable.ic_drawer_outbox
+ " WHEN " + Mailbox.TYPE_SENT + " THEN " + R.drawable.ic_drawer_sent
+ " WHEN " + Mailbox.TYPE_TRASH + " THEN " + R.drawable.ic_drawer_trash
+ " WHEN " + Mailbox.TYPE_STARRED + " THEN " + R.drawable.ic_drawer_starred
+ " ELSE " + R.drawable.ic_drawer_folder + " END";
+ " WHEN " + Mailbox.TYPE_INBOX + " THEN " + R.drawable.ic_drawer_inbox_24dp
+ " WHEN " + Mailbox.TYPE_DRAFTS + " THEN " + R.drawable.ic_drawer_drafts_24dp
+ " WHEN " + Mailbox.TYPE_OUTBOX + " THEN " + R.drawable.ic_drawer_outbox_24dp
+ " WHEN " + Mailbox.TYPE_SENT + " THEN " + R.drawable.ic_drawer_sent_24dp
+ " WHEN " + Mailbox.TYPE_TRASH + " THEN " + R.drawable.ic_drawer_trash_24dp
+ " WHEN " + Mailbox.TYPE_STARRED + " THEN " + R.drawable.ic_drawer_starred_24dp
+ " ELSE " + R.drawable.ic_drawer_folder_24dp + " END";
/**
* Local-only folders set totalCount < 0; such folders should substitute message count for
@ -3799,11 +3799,11 @@ public class EmailProvider extends ContentProvider
}
} else if (column.equals(UIProvider.FolderColumns.ICON_RES_ID)) {
if (mailboxType == Mailbox.TYPE_INBOX) {
values[i] = R.drawable.ic_drawer_inbox;
values[i] = R.drawable.ic_drawer_inbox_24dp;
} else if (mailboxType == Mailbox.TYPE_UNREAD) {
values[i] = R.drawable.ic_drawer_unread;
values[i] = R.drawable.ic_drawer_unread_24dp;
} else if (mailboxType == Mailbox.TYPE_STARRED) {
values[i] = R.drawable.ic_drawer_starred;
values[i] = R.drawable.ic_drawer_starred_24dp;
}
}
}