Wire up CATEGORY_ALARM and CATEGORY_EVENT.

And remove the alarm package whitelist now that deskclock
uses a category.

Bug:16406214
Change-Id: I6ca400376a9df7646889e394e53e4d491c56a46c
This commit is contained in:
John Spurlock
2014-07-22 20:39:58 -04:00
parent 75111d83e6
commit 333f8dd78f

View File

@@ -90,9 +90,6 @@ public class ZenModeHelper {
"com.android.mms",
"com.android.example.notificationshowcase"
));
private static final Set<String> ALARM_PACKAGES = new HashSet<String>(Arrays.asList(
"com.google.android.deskclock"
));
private static final Set<String> SYSTEM_PACKAGES = new HashSet<String>(Arrays.asList(
"android",
"com.android.systemui"
@@ -313,7 +310,8 @@ public class ZenModeHelper {
}
private boolean isAlarm(NotificationRecord record) {
return ALARM_PACKAGES.contains(record.sbn.getPackageName());
return record.isCategory(Notification.CATEGORY_ALARM)
|| record.isCategory(Notification.CATEGORY_EVENT);
}
private boolean isCall(NotificationRecord record) {