From c16c0d46286ed93234ffdb535ad87fe196920cf2 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Thu, 29 Apr 2021 15:56:33 -0400 Subject: [PATCH] Add placeholder values to placeholder settings So there are no animations when the real data is available. Test: manually view notification paget Fixes: 186494741 Fixes: 182232213 Fixes: 183177992 Change-Id: Ic210fa1b545537689df9b69eb5fe6b990f65ad13 --- res/xml/configure_notification_settings_v2.xml | 7 +++++++ .../RecentNotifyingAppsPreferenceController.java | 3 +++ 2 files changed, 10 insertions(+) diff --git a/res/xml/configure_notification_settings_v2.xml b/res/xml/configure_notification_settings_v2.xml index a0d2dabdc84..17033126711 100644 --- a/res/xml/configure_notification_settings_v2.xml +++ b/res/xml/configure_notification_settings_v2.xml @@ -25,6 +25,7 @@ android:key="conversations" android:order="1" android:title="@string/conversations_category_title" + android:summary=" " settings:controller="com.android.settings.notification.ConversationListSummaryPreferenceController" android:fragment="com.android.settings.notification.app.ConversationListSettings" /> @@ -44,12 +45,18 @@ diff --git a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java index c71a26aaede..87d25dd5cad 100644 --- a/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java +++ b/src/com/android/settings/notification/RecentNotifyingAppsPreferenceController.java @@ -149,6 +149,9 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC @VisibleForTesting void refreshUi(Context prefContext) { + ((PrimarySwitchPreference) mCategory.findPreference(KEY_PLACEHOLDER + 1)).setChecked(true); + ((PrimarySwitchPreference) mCategory.findPreference(KEY_PLACEHOLDER + 2)).setChecked(true); + ((PrimarySwitchPreference) mCategory.findPreference(KEY_PLACEHOLDER + 3)).setChecked(true); ThreadUtils.postOnBackgroundThread(() -> { reloadData(); final List recentApps = getDisplayableRecentAppList();