Update configure notifications screen
Test: atest Bug: 153150072 Change-Id: I99ebe2cad5036a154c40bce54dbd6ddbd23c2323
This commit is contained in:
@@ -66,8 +66,7 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
private static final String TAG = "RecentNotisCtrl";
|
||||
private static final String KEY_PREF_CATEGORY = "recent_notifications_category";
|
||||
@VisibleForTesting
|
||||
static final String KEY_DIVIDER = "all_notifications_divider";
|
||||
|
||||
@VisibleForTesting
|
||||
static final String KEY_SEE_ALL = "all_notifications";
|
||||
private static final int SHOW_RECENT_APP_COUNT = 3;
|
||||
@@ -86,7 +85,6 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
private PreferenceCategory mCategory;
|
||||
private Preference mSeeAllPref;
|
||||
private Preference mDivider;
|
||||
protected List<Integer> mUserIds;
|
||||
|
||||
public RecentNotifyingAppsPreferenceController(Context context, NotificationBackend backend,
|
||||
@@ -130,14 +128,12 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
PreferenceControllerMixin.super.updateNonIndexableKeys(keys);
|
||||
// Don't index category name into search. It's not actionable.
|
||||
keys.add(KEY_PREF_CATEGORY);
|
||||
keys.add(KEY_DIVIDER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayPreference(PreferenceScreen screen) {
|
||||
mCategory = screen.findPreference(getPreferenceKey());
|
||||
mSeeAllPref = screen.findPreference(KEY_SEE_ALL);
|
||||
mDivider = screen.findPreference(KEY_DIVIDER);
|
||||
super.displayPreference(screen);
|
||||
refreshUi(mCategory.getContext());
|
||||
}
|
||||
@@ -208,7 +204,6 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
private void displayOnlyAllAppsLink() {
|
||||
mCategory.setTitle(null);
|
||||
mDivider.setVisible(false);
|
||||
mSeeAllPref.setTitle(R.string.notifications_title);
|
||||
mSeeAllPref.setIcon(null);
|
||||
int prefCount = mCategory.getPreferenceCount();
|
||||
@@ -222,7 +217,6 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
private void displayRecentApps(Context prefContext, List<NotifyingApp> recentApps) {
|
||||
mCategory.setTitle(R.string.recent_notifications);
|
||||
mDivider.setVisible(true);
|
||||
mSeeAllPref.setSummary(null);
|
||||
mSeeAllPref.setIcon(R.drawable.ic_chevron_right_24dp);
|
||||
|
||||
|
Reference in New Issue
Block a user