Snap for 6732780 from 796e2b15d5
to rvc-qpr1-release
Change-Id: Ia2e2c98e66463fe40c90246993683d13030eba43
This commit is contained in:
@@ -26,8 +26,7 @@
|
||||
style="?android:attr/actionBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?android:attr/actionBarTheme"
|
||||
android:navigationContentDescription="@*android:string/back_button_label" />
|
||||
android:theme="?android:attr/actionBarTheme" />
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -58,12 +58,12 @@ public class AppFilterRegistry {
|
||||
// Filters will appear sorted based on their value defined here.
|
||||
public static final int FILTER_APPS_POWER_WHITELIST = 0;
|
||||
public static final int FILTER_APPS_POWER_WHITELIST_ALL = 1;
|
||||
public static final int FILTER_APPS_ALL = 2;
|
||||
public static final int FILTER_APPS_ENABLED = 3;
|
||||
public static final int FILTER_APPS_INSTANT = 4;
|
||||
public static final int FILTER_APPS_DISABLED = 5;
|
||||
public static final int FILTER_APPS_RECENT = 6;
|
||||
public static final int FILTER_APPS_FREQUENT = 7;
|
||||
public static final int FILTER_APPS_RECENT = 2;
|
||||
public static final int FILTER_APPS_FREQUENT = 3;
|
||||
public static final int FILTER_APPS_ALL = 4;
|
||||
public static final int FILTER_APPS_ENABLED = 5;
|
||||
public static final int FILTER_APPS_INSTANT = 6;
|
||||
public static final int FILTER_APPS_DISABLED = 7;
|
||||
public static final int FILTER_APPS_PERSONAL = 8;
|
||||
public static final int FILTER_APPS_WORK = 9;
|
||||
public static final int FILTER_APPS_USAGE_ACCESS = 10;
|
||||
|
@@ -476,7 +476,7 @@ public class ManageApplications extends InstrumentedFragment
|
||||
mFilterAdapter.enableFilter(FILTER_APPS_RECENT);
|
||||
mFilterAdapter.enableFilter(FILTER_APPS_FREQUENT);
|
||||
mFilterAdapter.enableFilter(FILTER_APPS_BLOCKED);
|
||||
mFilterAdapter.disableFilter(FILTER_APPS_ALL);
|
||||
mFilterAdapter.enableFilter(FILTER_APPS_ALL);
|
||||
}
|
||||
if (mListType == LIST_TYPE_HIGH_POWER) {
|
||||
mFilterAdapter.enableFilter(FILTER_APPS_POWER_WHITELIST_ALL);
|
||||
@@ -1089,12 +1089,16 @@ public class ManageApplications extends InstrumentedFragment
|
||||
mAppFilter = appFilter;
|
||||
|
||||
// Notification filters require resorting the list
|
||||
if (FILTER_APPS_FREQUENT == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_frequent_notification);
|
||||
} else if (FILTER_APPS_RECENT == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_recent_notification);
|
||||
} else if (FILTER_APPS_BLOCKED == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_alpha);
|
||||
if (mManageApplications.mListType == LIST_TYPE_NOTIFICATION) {
|
||||
if (FILTER_APPS_FREQUENT == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_frequent_notification);
|
||||
} else if (FILTER_APPS_RECENT == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_recent_notification);
|
||||
} else if (FILTER_APPS_BLOCKED == appFilter.getFilterType()) {
|
||||
rebuild(R.id.sort_order_alpha);
|
||||
} else {
|
||||
rebuild(R.id.sort_order_alpha);
|
||||
}
|
||||
} else {
|
||||
rebuild();
|
||||
}
|
||||
|
@@ -570,12 +570,14 @@ public class ManageApplicationsTest {
|
||||
|
||||
mFragment.createHeader();
|
||||
|
||||
assertThat(mFragment.mFilterAdapter.getCount()).isEqualTo(3);
|
||||
assertThat(mFragment.mFilterAdapter.getCount()).isEqualTo(4);
|
||||
assertThat(mFragment.mFilterAdapter.getItem(0)).isEqualTo(
|
||||
mContext.getString(R.string.sort_order_recent_notification));
|
||||
assertThat(mFragment.mFilterAdapter.getItem(1)).isEqualTo(
|
||||
mContext.getString(R.string.sort_order_frequent_notification));
|
||||
assertThat(mFragment.mFilterAdapter.getItem(2)).isEqualTo(
|
||||
mContext.getString(R.string.filter_all_apps));
|
||||
assertThat(mFragment.mFilterAdapter.getItem(3)).isEqualTo(
|
||||
mContext.getString(R.string.filter_notif_blocked_apps));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user