@Test public void configureLockScreenNotification_EVERYTHING() throws Exception { QMail.setLockScreenNotificationVisibility(LockScreenNotificationVisibility.EVERYTHING); lockScreenNotification.configureLockScreenNotification(builder, notificationData); verify(builder).setVisibility(NotificationCompat.VISIBILITY_PUBLIC); }
public void configureLockScreenNotification(Builder builder, NotificationData notificationData) { if (!NotificationController.platformSupportsLockScreenNotifications()) { return; } switch (QMail.getLockScreenNotificationVisibility()) { case NOTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_SECRET); break; } case APP_NAME: { builder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE); break; } case EVERYTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); break; } case SENDERS: { Notification publicNotification = createPublicNotificationWithSenderList(notificationData); builder.setPublicVersion(publicNotification); break; } case MESSAGE_COUNT: { Notification publicNotification = createPublicNotificationWithNewMessagesCount(notificationData); builder.setPublicVersion(publicNotification); break; } } }
LockScreenNotification { public void configureLockScreenNotification(Builder builder, NotificationData notificationData) { if (!NotificationController.platformSupportsLockScreenNotifications()) { return; } switch (QMail.getLockScreenNotificationVisibility()) { case NOTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_SECRET); break; } case APP_NAME: { builder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE); break; } case EVERYTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); break; } case SENDERS: { Notification publicNotification = createPublicNotificationWithSenderList(notificationData); builder.setPublicVersion(publicNotification); break; } case MESSAGE_COUNT: { Notification publicNotification = createPublicNotificationWithNewMessagesCount(notificationData); builder.setPublicVersion(publicNotification); break; } } } }
LockScreenNotification { public void configureLockScreenNotification(Builder builder, NotificationData notificationData) { if (!NotificationController.platformSupportsLockScreenNotifications()) { return; } switch (QMail.getLockScreenNotificationVisibility()) { case NOTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_SECRET); break; } case APP_NAME: { builder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE); break; } case EVERYTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); break; } case SENDERS: { Notification publicNotification = createPublicNotificationWithSenderList(notificationData); builder.setPublicVersion(publicNotification); break; } case MESSAGE_COUNT: { Notification publicNotification = createPublicNotificationWithNewMessagesCount(notificationData); builder.setPublicVersion(publicNotification); break; } } } LockScreenNotification(NotificationController controller); }
LockScreenNotification { public void configureLockScreenNotification(Builder builder, NotificationData notificationData) { if (!NotificationController.platformSupportsLockScreenNotifications()) { return; } switch (QMail.getLockScreenNotificationVisibility()) { case NOTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_SECRET); break; } case APP_NAME: { builder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE); break; } case EVERYTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); break; } case SENDERS: { Notification publicNotification = createPublicNotificationWithSenderList(notificationData); builder.setPublicVersion(publicNotification); break; } case MESSAGE_COUNT: { Notification publicNotification = createPublicNotificationWithNewMessagesCount(notificationData); builder.setPublicVersion(publicNotification); break; } } } LockScreenNotification(NotificationController controller); static LockScreenNotification newInstance(NotificationController controller); void configureLockScreenNotification(Builder builder, NotificationData notificationData); }
LockScreenNotification { public void configureLockScreenNotification(Builder builder, NotificationData notificationData) { if (!NotificationController.platformSupportsLockScreenNotifications()) { return; } switch (QMail.getLockScreenNotificationVisibility()) { case NOTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_SECRET); break; } case APP_NAME: { builder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE); break; } case EVERYTHING: { builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); break; } case SENDERS: { Notification publicNotification = createPublicNotificationWithSenderList(notificationData); builder.setPublicVersion(publicNotification); break; } case MESSAGE_COUNT: { Notification publicNotification = createPublicNotificationWithNewMessagesCount(notificationData); builder.setPublicVersion(publicNotification); break; } } } LockScreenNotification(NotificationController controller); static LockScreenNotification newInstance(NotificationController controller); void configureLockScreenNotification(Builder builder, NotificationData notificationData);  }