Rename vector drawables used in notifications

This commit is contained in:
cketti 2015-12-29 16:53:52 +01:00
parent 69590af824
commit 1cbc67f09a
14 changed files with 23 additions and 23 deletions

View file

@ -71,6 +71,6 @@ abstract class BaseNotifications {
private int getNewMailNotificationIcon() {
return controller.platformSupportsVectorDrawables() ?
R.drawable.ic_notify_new_mail_vector : R.drawable.ic_notify_new_mail;
R.drawable.notification_icon_new_mail : R.drawable.ic_notify_new_mail;
}
}

View file

@ -66,7 +66,7 @@ class CertificateErrorNotifications {
private int getCertificateErrorNotificationIcon() {
//TODO: Use a different icon for certificate error notifications
return controller.platformSupportsVectorDrawables() ?
R.drawable.ic_notify_new_mail_vector : R.drawable.ic_notify_new_mail;
R.drawable.notification_icon_new_mail : R.drawable.ic_notify_new_mail;
}
private NotificationManagerCompat getNotificationManager() {

View file

@ -240,17 +240,17 @@ class DeviceNotifications extends BaseNotifications {
private int getMarkAsReadActionIcon() {
return controller.platformSupportsVectorDrawables() ?
R.drawable.ic_action_mark_as_read_dark_vector : R.drawable.ic_action_mark_as_read_dark;
R.drawable.notification_action_mark_as_read : R.drawable.ic_action_mark_as_read_dark;
}
private int getDeleteActionIcon() {
return NotificationController.platformSupportsLockScreenNotifications() ?
R.drawable.ic_action_delete_dark_vector : R.drawable.ic_action_delete_dark;
R.drawable.notification_action_delete : R.drawable.ic_action_delete_dark;
}
private int getReplyActionIcon() {
return controller.platformSupportsVectorDrawables() ?
R.drawable.ic_action_single_message_options_dark_vector :
R.drawable.notification_action_reply :
R.drawable.ic_action_single_message_options_dark;
}

View file

@ -96,7 +96,7 @@ class LockScreenNotification {
newMessages, newMessages);
return controller.createNotificationBuilder()
.setSmallIcon(R.drawable.ic_notify_new_mail_vector)
.setSmallIcon(R.drawable.notification_icon_new_mail)
.setColor(account.getChipColor())
.setNumber(unreadCount)
.setContentTitle(title);

View file

@ -57,7 +57,7 @@ class SendFailedNotifications {
private int getSendFailedNotificationIcon() {
//TODO: Use a different icon for send failure notifications
return controller.platformSupportsVectorDrawables() ?
R.drawable.ic_notify_new_mail_vector : R.drawable.ic_notify_new_mail;
R.drawable.notification_icon_new_mail : R.drawable.ic_notify_new_mail;
}
private NotificationManagerCompat getNotificationManager() {

View file

@ -48,7 +48,7 @@ public class BaseNotificationsTest {
Builder builder = notifications.createAndInitializeNotificationBuilder(account);
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setColor(ACCOUNT_COLOR);
verify(builder).setAutoCancel(true);
}

View file

@ -92,7 +92,7 @@ public class CertificateErrorNotificationsTest {
}
private void assertCertificateErrorNotificationContents() {
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setTicker("Certificate error for " + ACCOUNT_NAME);
verify(builder).setContentTitle("Certificate error for " + ACCOUNT_NAME);
verify(builder).setContentText("Check your server settings");

View file

@ -79,7 +79,7 @@ public class DeviceNotificationsTest {
Notification result = notifications.buildSummaryNotification(account, notificationData, false);
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setColor(ACCOUNT_COLOR);
verify(builder).setAutoCancel(true);
verify(builder).setNumber(UNREAD_MESSAGE_COUNT);
@ -98,7 +98,7 @@ public class DeviceNotificationsTest {
Notification result = notifications.buildSummaryNotification(account, notificationData, false);
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setColor(ACCOUNT_COLOR);
verify(builder).setAutoCancel(true);
verify(builder).setTicker(SUMMARY);
@ -106,9 +106,9 @@ public class DeviceNotificationsTest {
verify(builder).setContentTitle(SENDER);
verify(builder).setStyle(notifications.bigTextStyle);
verify(notifications.bigTextStyle).bigText(PREVIEW);
verify(builder).addAction(R.drawable.ic_action_single_message_options_dark_vector, "Reply", null);
verify(builder).addAction(R.drawable.ic_action_mark_as_read_dark_vector, "Mark Read", null);
verify(builder).addAction(R.drawable.ic_action_delete_dark_vector, "Delete", null);
verify(builder).addAction(R.drawable.notification_action_reply, "Reply", null);
verify(builder).addAction(R.drawable.notification_action_mark_as_read, "Mark Read", null);
verify(builder).addAction(R.drawable.notification_action_delete, "Delete", null);
verify(lockScreenNotification).configureLockScreenNotification(builder, notificationData);
assertEquals(FAKE_NOTIFICATION, result);
}
@ -122,7 +122,7 @@ public class DeviceNotificationsTest {
Notification result = notifications.buildSummaryNotification(account, notificationData, false);
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setColor(ACCOUNT_COLOR);
verify(builder).setAutoCancel(true);
verify(builder).setTicker(SUMMARY);
@ -136,8 +136,8 @@ public class DeviceNotificationsTest {
verify(notifications.inboxStyle).setSummaryText(ACCOUNT_NAME);
verify(notifications.inboxStyle).addLine(SUMMARY);
verify(notifications.inboxStyle).addLine(SUMMARY_2);
verify(builder).addAction(R.drawable.ic_action_mark_as_read_dark_vector, "Mark Read", null);
verify(builder).addAction(R.drawable.ic_action_delete_dark_vector, "Delete", null);
verify(builder).addAction(R.drawable.notification_action_mark_as_read, "Mark Read", null);
verify(builder).addAction(R.drawable.notification_action_delete, "Delete", null);
verify(lockScreenNotification).configureLockScreenNotification(builder, notificationData);
assertEquals(FAKE_NOTIFICATION, result);
}
@ -163,7 +163,7 @@ public class DeviceNotificationsTest {
notifications.buildSummaryNotification(account, notificationData, false);
verify(builder, never()).addAction(R.drawable.ic_action_delete_dark_vector, "Delete", null);
verify(builder, never()).addAction(R.drawable.notification_action_delete, "Delete", null);
}
@Test
@ -174,7 +174,7 @@ public class DeviceNotificationsTest {
notifications.buildSummaryNotification(account, notificationData, false);
verify(builder, never()).addAction(R.drawable.ic_action_delete_dark_vector, "Delete", null);
verify(builder, never()).addAction(R.drawable.notification_action_delete, "Delete", null);
}
private Builder createFakeNotificationBuilder() {

View file

@ -91,7 +91,7 @@ public class LockScreenNotificationTest {
lockScreenNotification.configureLockScreenNotification(builder, notificationData);
verify(publicBuilder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(publicBuilder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(publicBuilder).setNumber(1);
verify(publicBuilder).setContentTitle("1 new message");
verify(publicBuilder).setContentText(senderName);
@ -111,7 +111,7 @@ public class LockScreenNotificationTest {
lockScreenNotification.configureLockScreenNotification(builder, notificationData);
verify(publicBuilder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(publicBuilder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(publicBuilder).setNumber(UNREAD_MESSAGE_COUNT);
verify(publicBuilder).setContentTitle(NEW_MESSAGE_COUNT + " new messages");
verify(publicBuilder).setContentText(
@ -149,7 +149,7 @@ public class LockScreenNotificationTest {
lockScreenNotification.configureLockScreenNotification(builder, notificationData);
verify(publicBuilder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(publicBuilder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(publicBuilder).setNumber(UNREAD_MESSAGE_COUNT);
verify(publicBuilder).setContentTitle(NEW_MESSAGE_COUNT + " new messages");
verify(publicBuilder).setContentText(ACCOUNT_NAME);

View file

@ -60,7 +60,7 @@ public class SendFailedNotificationsTest {
sendFailedNotifications.showSendFailedNotification(account, exception);
verify(notificationManager).notify(eq(notificationId), any(Notification.class));
verify(builder).setSmallIcon(R.drawable.ic_notify_new_mail_vector);
verify(builder).setSmallIcon(R.drawable.notification_icon_new_mail);
verify(builder).setTicker("Failed to send some messages");
verify(builder).setContentTitle("Failed to send some messages");
verify(builder).setContentText("Exception");