Migrate package level notification settings to topic level.
Bug: 22854014 Change-Id: If0c20bec3b3f8b01b86d195d2e7ff7aa1e15882e
This commit is contained in:
@@ -66,26 +66,4 @@ public class AppStateNotificationBridge extends AppStateBaseBridge {
|
||||
return info.extraInfo != null && ((AppRow) info.extraInfo).banned;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_PRIORITY = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
return info.extraInfo != null && ((AppRow) info.extraInfo).priority;
|
||||
}
|
||||
};
|
||||
|
||||
public static final AppFilter FILTER_APP_NOTIFICATION_SENSITIVE = new AppFilter() {
|
||||
@Override
|
||||
public void init() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean filterApp(AppEntry info) {
|
||||
return info.extraInfo != null && ((AppRow) info.extraInfo).sensitive;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -814,25 +814,7 @@ public class InstalledAppDetails extends AppInfoBase
|
||||
if (appRow.banned) {
|
||||
return context.getString(R.string.notifications_disabled);
|
||||
}
|
||||
ArrayList<CharSequence> notifSummary = new ArrayList<>();
|
||||
if (appRow.priority) {
|
||||
notifSummary.add(context.getString(R.string.notifications_priority));
|
||||
}
|
||||
if (appRow.sensitive) {
|
||||
notifSummary.add(context.getString(R.string.notifications_sensitive));
|
||||
}
|
||||
switch (notifSummary.size()) {
|
||||
case 3:
|
||||
return context.getString(R.string.notifications_three_items,
|
||||
notifSummary.get(0), notifSummary.get(1), notifSummary.get(2));
|
||||
case 2:
|
||||
return context.getString(R.string.notifications_two_items,
|
||||
notifSummary.get(0), notifSummary.get(1));
|
||||
case 1:
|
||||
return notifSummary.get(0);
|
||||
default:
|
||||
return context.getString(R.string.notifications_enabled);
|
||||
}
|
||||
return context.getString(R.string.notifications_enabled);
|
||||
}
|
||||
|
||||
private class MemoryUpdater extends AsyncTask<Void, Void, ProcStatsPackageEntry> {
|
||||
|
@@ -138,8 +138,6 @@ public class ManageApplications extends InstrumentedFragment
|
||||
R.string.filter_enabled_apps, // Enabled
|
||||
R.string.filter_apps_disabled, // Disabled
|
||||
R.string.filter_notif_blocked_apps, // Blocked Notifications
|
||||
R.string.filter_notif_priority_apps, // Priority Notifications
|
||||
R.string.filter_notif_sensitive_apps, // Sensitive Notifications
|
||||
R.string.filter_personal_apps, // Personal
|
||||
R.string.filter_work_apps, // Work
|
||||
R.string.filter_with_domain_urls_apps, // Domain URLs
|
||||
@@ -158,8 +156,6 @@ public class ManageApplications extends InstrumentedFragment
|
||||
ApplicationsState.FILTER_ALL_ENABLED, // Enabled
|
||||
ApplicationsState.FILTER_DISABLED, // Disabled
|
||||
AppStateNotificationBridge.FILTER_APP_NOTIFICATION_BLOCKED, // Blocked Notifications
|
||||
AppStateNotificationBridge.FILTER_APP_NOTIFICATION_PRIORITY, // Priority Notifications
|
||||
AppStateNotificationBridge.FILTER_APP_NOTIFICATION_SENSITIVE, // Sensitive Notifications
|
||||
ApplicationsState.FILTER_PERSONAL, // Personal
|
||||
ApplicationsState.FILTER_WORK, // Work
|
||||
ApplicationsState.FILTER_WITH_DOMAIN_URLS, // Apps with Domain URLs
|
||||
|
Reference in New Issue
Block a user