Merge "Add "Instant apps" filter to app listing"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cf650b6b7
@@ -134,12 +134,13 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
public static final int FILTER_APPS_ALL = 2;
|
||||
public static final int FILTER_APPS_ENABLED = 3;
|
||||
public static final int FILTER_APPS_DISABLED = 4;
|
||||
public static final int FILTER_APPS_BLOCKED = 5;
|
||||
public static final int FILTER_APPS_PERSONAL = 6;
|
||||
public static final int FILTER_APPS_WORK = 7;
|
||||
public static final int FILTER_APPS_USAGE_ACCESS = 8;
|
||||
public static final int FILTER_APPS_WITH_OVERLAY = 9;
|
||||
public static final int FILTER_APPS_WRITE_SETTINGS = 10;
|
||||
public static final int FILTER_APPS_INSTANT = 5;
|
||||
public static final int FILTER_APPS_BLOCKED = 6;
|
||||
public static final int FILTER_APPS_PERSONAL = 7;
|
||||
public static final int FILTER_APPS_WORK = 8;
|
||||
public static final int FILTER_APPS_USAGE_ACCESS = 9;
|
||||
public static final int FILTER_APPS_WITH_OVERLAY = 10;
|
||||
public static final int FILTER_APPS_WRITE_SETTINGS = 11;
|
||||
public static final int FILTER_APPS_INSTALL_SOURCES = 12;
|
||||
|
||||
// Storage types. Used to determine what the extra item in the list of preferences is.
|
||||
@@ -153,6 +154,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
R.string.filter_all_apps, // All apps
|
||||
R.string.filter_enabled_apps, // Enabled
|
||||
R.string.filter_apps_disabled, // Disabled
|
||||
R.string.filter_instant_apps, // Instant apps
|
||||
R.string.filter_notif_blocked_apps, // Blocked Notifications
|
||||
R.string.filter_personal_apps, // Personal
|
||||
R.string.filter_work_apps, // Work
|
||||
@@ -172,6 +174,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
ApplicationsState.FILTER_EVERYTHING, // All apps
|
||||
ApplicationsState.FILTER_ALL_ENABLED, // Enabled
|
||||
ApplicationsState.FILTER_DISABLED, // Disabled
|
||||
ApplicationsState.FILTER_INSTANT, // Instant
|
||||
AppStateNotificationBridge.FILTER_APP_NOTIFICATION_BLOCKED, // Blocked Notifications
|
||||
ApplicationsState.FILTER_PERSONAL, // Personal
|
||||
ApplicationsState.FILTER_WORK, // Work
|
||||
@@ -694,6 +697,10 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
mFilterAdapter.setFilterEnabled(FILTER_APPS_DISABLED, hasDisabledApps);
|
||||
}
|
||||
|
||||
public void setHasInstant(boolean haveInstantApps) {
|
||||
mFilterAdapter.setFilterEnabled(FILTER_APPS_INSTANT, haveInstantApps);
|
||||
}
|
||||
|
||||
static class FilterSpinnerAdapter extends ArrayAdapter<CharSequence> {
|
||||
|
||||
private final ManageApplications mManageApplications;
|
||||
@@ -1047,6 +1054,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
|
||||
}
|
||||
|
||||
mManageApplications.setHasDisabled(mState.haveDisabledApps());
|
||||
mManageApplications.setHasInstant(mState.haveInstantApps());
|
||||
}
|
||||
|
||||
private void rebuildSections() {
|
||||
|
Reference in New Issue
Block a user