Lines Matching defs:channel

69     private static final String TAG_CHANNEL = "channel";
220 NotificationChannel channel = new NotificationChannel(id,
222 channel.populateFromXml(parser);
223 r.channels.put(id, channel);
291 // O apps should not have the default channel.
295 // Otherwise, this app should have the default channel.
306 // Keep the default channel until upgraded.
322 // Keep the default channel until upgraded.
327 NotificationChannel channel;
328 channel = new NotificationChannel(
332 channel.setBypassDnd(r.priority == Notification.PRIORITY_MAX);
333 channel.setLockscreenVisibility(r.visibility);
335 channel.lockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
338 channel.lockFields(NotificationChannel.USER_LOCKED_PRIORITY);
341 channel.lockFields(NotificationChannel.USER_LOCKED_VISIBILITY);
343 r.channels.put(channel.getId(), channel);
384 for (NotificationChannel channel : r.channels.values()) {
385 if (!forBackup || (forBackup && !channel.isDeleted())) {
386 channel.writeXml(out);
538 public void createNotificationChannel(String pkg, int uid, NotificationChannel channel,
541 Preconditions.checkNotNull(channel);
542 Preconditions.checkNotNull(channel.getId());
543 Preconditions.checkArgument(!TextUtils.isEmpty(channel.getName()));
548 if (channel.getGroup() != null && !r.groups.containsKey(channel.getGroup())) {
551 if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(channel.getId())) {
555 NotificationChannel existing = r.channels.get(channel.getId());
561 // log a resurrected channel as if it's new again
562 MetricsLogger.action(getChannelLog(channel, pkg).setType(
566 existing.setName(channel.getName().toString());
567 existing.setDescription(channel.getDescription());
568 existing.setBlockableSystem(channel.isBlockableSystem());
573 if (channel.getImportance() < NotificationManager.IMPORTANCE_NONE
574 || channel.getImportance() > NotificationManager.IMPORTANCE_MAX) {
579 channel.setBypassDnd(r.priority == Notification.PRIORITY_MAX);
580 channel.setLockscreenVisibility(r.visibility);
582 clearLockedFields(channel);
583 if (channel.getLockscreenVisibility() == Notification.VISIBILITY_PUBLIC) {
584 channel.setLockscreenVisibility(Ranking.VISIBILITY_NO_OVERRIDE);
587 channel.setShowBadge(false);
589 r.channels.put(channel.getId(), channel);
590 MetricsLogger.action(getChannelLog(channel, pkg).setType(
595 void clearLockedFields(NotificationChannel channel) {
596 channel.unlockFields(channel.getUserLockedFields());
607 NotificationChannel channel = r.channels.get(updatedChannel.getId());
608 if (channel == null || channel.isDeleted()) {
614 lockFieldsForUpdate(channel, updatedChannel);
627 if (!channel.equals(updatedChannel)) {
658 NotificationChannel channel = r.channels.get(channelId);
659 if (channel != null) {
660 channel.setDeleted(true);
661 LogMaker lm = getChannelLog(channel, pkg);
792 * True for pre-O apps that only have the default channel, or pre O apps that have no
793 * channels yet. This method will create the default channel for pre-O apps that don't have it.
921 for (NotificationChannel channel : r.channels.values()) {
925 pw.println(channel);
966 for (NotificationChannel channel : r.channels.values()) {
967 record.put("channel", channel.toJson());
1032 * Dump only the channel information as structured JSON for the stats collector.
1139 private LogMaker getChannelLog(NotificationChannel channel, String pkg) {
1144 channel.getId())
1146 channel.getImportance());