Lines Matching defs:record

164     public boolean shouldIntercept(NotificationRecord record) {
165 if (isSystem(record)) {
171 ZenLog.traceIntercepted(record, "none");
174 if (isAlarm(record)) {
179 if (record.getPackagePriority() == Notification.PRIORITY_MAX) {
180 ZenLog.traceNotIntercepted(record, "priorityApp");
183 if (isCall(record)) {
185 ZenLog.traceIntercepted(record, "!allowCalls");
188 return shouldInterceptAudience(record);
190 if (isMessage(record)) {
192 ZenLog.traceIntercepted(record, "!allowMessages");
195 return shouldInterceptAudience(record);
197 if (isEvent(record)) {
199 ZenLog.traceIntercepted(record, "!allowEvents");
204 ZenLog.traceIntercepted(record, "!priority");
211 private boolean shouldInterceptAudience(NotificationRecord record) {
212 if (!audienceMatches(record.getContactAffinity())) {
213 ZenLog.traceIntercepted(record, "!audienceMatches");
420 private static boolean isSystem(NotificationRecord record) {
421 return record.isCategory(Notification.CATEGORY_SYSTEM);
424 private static boolean isAlarm(NotificationRecord record) {
425 return record.isCategory(Notification.CATEGORY_ALARM)
426 || record.isAudioStream(AudioManager.STREAM_ALARM)
427 || record.isAudioAttributesUsage(AudioAttributes.USAGE_ALARM);
430 private static boolean isEvent(NotificationRecord record) {
431 return record.isCategory(Notification.CATEGORY_EVENT);
434 public boolean isCall(NotificationRecord record) {
435 return record != null && (isDefaultPhoneApp(record.sbn.getPackageName())
436 || record.isCategory(Notification.CATEGORY_CALL));
450 private boolean isDefaultMessagingApp(NotificationRecord record) {
451 final int userId = record.getUserId();
455 return Objects.equals(defaultApp, record.sbn.getPackageName());
458 private boolean isMessage(NotificationRecord record) {
459 return record.isCategory(Notification.CATEGORY_MESSAGE) || isDefaultMessagingApp(record);