Lines Matching refs:channel

456         NotificationChannel channel =
458 channel.setSound(SOUND_URI, mAudioAttributes);
459 mHelper.createNotificationChannel(PKG, UID, channel, true);
461 ByteArrayOutputStream baos = writeXmlAndPurge(PKG, UID, true, channel.getId());
482 NotificationChannel channel =
484 channel.setSound(SOUND_URI, mAudioAttributes);
485 mHelper.createNotificationChannel(PKG, UID, channel, true);
486 ByteArrayOutputStream baos = writeXmlAndPurge(PKG, UID, true, channel.getId());
491 PKG, UID, channel.getId(), false);
503 NotificationChannel channel =
505 channel.setSound(SOUND_URI, mAudioAttributes);
506 mHelper.createNotificationChannel(PKG, UID, channel, true);
507 ByteArrayOutputStream baos = writeXmlAndPurge(PKG, UID, true, channel.getId());
512 PKG, UID, channel.getId(), false);
528 + "<channel id=\"" + id + "\" name=\"name\" importance=\"2\" "
531 + "<channel id=\"miscellaneous\" name=\"Uncategorized\" usage=\"5\" "
544 NotificationChannel channel =
546 channel.setSound(null, mAudioAttributes);
547 mHelper.createNotificationChannel(PKG, UID, channel, true);
548 ByteArrayOutputStream baos = writeXmlAndPurge(PKG, UID, true, channel.getId());
553 PKG, UID, channel.getId(), false);
703 // Should still have the newly created channel that wasn't in the xml.
720 fail("Was allowed to create a channel with invalid importance");
727 fail("Was allowed to create a channel with invalid importance");
734 fail("Was allowed to create a channel with invalid importance");
748 final NotificationChannel channel =
750 channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
751 channel.enableLights(true);
752 channel.setBypassDnd(true);
753 channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
755 mHelper.createNotificationChannel(PKG, UID, channel, false);
768 assertEquals(channel2, mHelper.getNotificationChannel(PKG, UID, channel.getId(), false));
800 final NotificationChannel channel = new NotificationChannel("id2", "name2", IMPORTANCE_LOW);
802 mHelper.createNotificationChannel(PKG, UID, channel, false);
808 channel.setShowBadge(false);
809 channel.setImportance(IMPORTANCE_NONE);
810 channel.setBypassDnd(true);
811 channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
813 mHelper.updateNotificationChannel(PKG, UID, channel, true);
830 final NotificationChannel channel =
832 channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
833 channel.enableLights(true);
834 channel.setBypassDnd(true);
835 channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
836 channel.setShowBadge(true);
841 channel.lockFields(lockMask);
843 mHelper.createNotificationChannel(PKG, UID, channel, true);
846 mHelper.getNotificationChannel(PKG, UID, channel.getId(), false);
848 assertEquals(channel.getName(), savedChannel.getName());
849 assertEquals(channel.shouldShowLights(), savedChannel.shouldShowLights());
852 assertEquals(channel.canShowBadge(), savedChannel.canShowBadge());
859 final NotificationChannel channel =
861 channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
862 channel.enableLights(true);
863 channel.setBypassDnd(true);
864 channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
865 channel.setShowBadge(true);
870 channel.lockFields(lockMask);
872 mHelper.createNotificationChannel(PKG, UID, channel, true);
875 mHelper.getNotificationChannel(PKG, UID, channel.getId(), false);
877 assertEquals(channel.getName(), savedChannel.getName());
878 assertEquals(channel.shouldShowLights(), savedChannel.shouldShowLights());
881 assertEquals(channel.canShowBadge(), savedChannel.canShowBadge());
886 final NotificationChannel channel = getChannel();
887 mHelper.clearLockedFields(channel);
888 assertEquals(0, channel.getUserLockedFields());
890 channel.lockFields(NotificationChannel.USER_LOCKED_PRIORITY
892 mHelper.clearLockedFields(channel);
893 assertEquals(0, channel.getUserLockedFields());
997 NotificationChannel channel = getChannel();
998 channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
999 channel.enableLights(true);
1000 channel.setBypassDnd(true);
1001 channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
1002 channel.enableVibration(true);
1003 channel.setVibrationPattern(new long[]{100, 67, 145, 156});
1005 mHelper.createNotificationChannel(PKG, UID, channel, true);
1006 mHelper.deleteNotificationChannel(PKG, UID, channel.getId());
1008 // Does not return deleted channel
1010 mHelper.getNotificationChannel(PKG, UID, channel.getId(), false);
1013 // Returns deleted channel
1014 response = mHelper.getNotificationChannel(PKG, UID, channel.getId(), true);
1015 compareChannels(channel, response);
1022 NotificationChannel channel =
1024 channel.setSound(new Uri.Builder().scheme("test").build(), mAudioAttributes);
1025 channel.enableLights(true);
1026 channel.setBypassDnd(true);
1027 channel.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
1028 channel.enableVibration(true);
1029 channel.setVibrationPattern(new long[]{100, 67, 145, 156});
1030 channelMap.put(channel.getId(), channel);
1034 mHelper.createNotificationChannel(PKG, UID, channel, true);
1037 mHelper.deleteNotificationChannel(PKG, UID, channel.getId());
1042 assertEquals(2, channels.size()); // Default channel + non-deleted channel
1051 assertEquals(3, channels.size()); // Includes default channel
1061 NotificationChannel channel =
1067 mHelper.createNotificationChannel(PKG, UID, channel, true);
1071 mHelper.deleteNotificationChannel(PKG, UID, channel.getId());
1081 NotificationChannel channel =
1083 channel.setVibrationPattern(vibration);
1085 mHelper.createNotificationChannel(PKG, UID, channel, true);
1086 mHelper.deleteNotificationChannel(PKG, UID, channel.getId());
1089 channel.getId(), channel.getName(), NotificationManager.IMPORTANCE_HIGH);
1095 compareChannels(channel,
1113 fail("Allowed to create default channel");
1122 NotificationChannel channel =
1124 channel.setVibrationPattern(vibration);
1126 mHelper.createNotificationChannel(PKG, UID, channel, true);
1129 channel.getId(), channel.getName(), NotificationManager.IMPORTANCE_HIGH);
1135 compareChannels(channel,
1142 final NotificationChannel channel = new NotificationChannel("id2", "name2",
1144 channel.setSound(sound, mAudioAttributes);
1145 mHelper.createNotificationChannel(PKG, UID, channel, true);
1147 PKG, UID, channel.getId(), false).getSound());
1162 // Only default channel remains
1216 // create records with the default channel for all user 0 and user 1 uids
1276 // create channel as api 26
1286 // make sure the default channel was readded
1314 fail("Created a channel with a bad group");
1364 assertEquals(2, group.getChannels().size()); // misc channel too
1374 fail("expected channel not found");
1446 // delete the first channel of the first package