Support showing notifications as badges.
And remove unneeded app level settings. Change-Id: I88f506b0704195181d1748a3135f8ee0f39b774f Test: manual for now. will add tests when have real mocks for the pages
This commit is contained in:
@@ -81,64 +81,4 @@ public class AppStateNotificationBridge extends AppStateBaseBridge {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_SILENCED = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
if (info == null || info.extraInfo == null) {
|
||||
return false;
|
||||
}
|
||||
AppRow row = (AppRow) info.extraInfo;
|
||||
return row.appImportance > NotificationManager.IMPORTANCE_NONE
|
||||
&& row.appImportance < NotificationManager.IMPORTANCE_DEFAULT;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_PRIORITY = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
if (info == null || info.extraInfo == null) {
|
||||
return false;
|
||||
}
|
||||
return ((AppRow) info.extraInfo).appBypassDnd;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_HIDE_SENSITIVE = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
if (info == null || info.extraInfo == null) {
|
||||
return false;
|
||||
}
|
||||
return ((AppRow) info.extraInfo).lockScreenSecure
|
||||
&& ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_PRIVATE;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_HIDE_ALL = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
if (info == null || info.extraInfo == null) {
|
||||
return false;
|
||||
}
|
||||
return ((AppRow) info.extraInfo).lockScreenSecure
|
||||
&& ((AppRow) info.extraInfo).appVisOverride == Notification.VISIBILITY_SECRET;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user