Fix filter bug for non-internal app filtering.

By default, the filter would show all non-categorized apps. This,
however, regressed the external storage apps view which does not have
categorization (yet). By adding back in a legacy option to use the old
purely UUID filtering, we can fix the regression.

Change-Id: I72d8d3bc08fbdff53374eb1e973bce9f8d7e2e79
Fixes: 63542896
Test: Settings unit test
This commit is contained in:
Daniel Nishi
2017-07-11 13:38:38 -07:00
parent 75bcd075f2
commit 6f3900f6b5
3 changed files with 22 additions and 2 deletions

View File

@@ -214,8 +214,9 @@ public class ManageApplications extends InstrumentedPreferenceFragment
}
// Storage types. Used to determine what the extra item in the list of preferences is.
public static final int STORAGE_TYPE_DEFAULT = 0;
public static final int STORAGE_TYPE_DEFAULT = 0; // Show all apps that are not categorized.
public static final int STORAGE_TYPE_MUSIC = 1;
public static final int STORAGE_TYPE_LEGACY = 2; // Show apps even if they can be categorized.
// sort order
private int mSortOrder = R.id.sort_order_alpha;
@@ -433,7 +434,7 @@ public class ManageApplications extends InstrumentedPreferenceFragment
if (listType == LIST_TYPE_STORAGE) {
if (storageType == STORAGE_TYPE_MUSIC) {
filter = new CompoundFilter(ApplicationsState.FILTER_AUDIO, filter);
} else {
} else if (storageType == STORAGE_TYPE_DEFAULT) {
filter = new CompoundFilter(ApplicationsState.FILTER_OTHER_APPS, filter);
}
return filter;