Merge "Add placeholder values to placeholder settings" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-30 14:12:51 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
android:key="conversations" android:key="conversations"
android:order="1" android:order="1"
android:title="@string/conversations_category_title" android:title="@string/conversations_category_title"
android:summary=" "
settings:controller="com.android.settings.notification.ConversationListSummaryPreferenceController" settings:controller="com.android.settings.notification.ConversationListSummaryPreferenceController"
android:fragment="com.android.settings.notification.app.ConversationListSettings" android:fragment="com.android.settings.notification.app.ConversationListSettings"
/> />
@@ -44,12 +45,18 @@
<!-- Placeholder for a list of recent apps --> <!-- Placeholder for a list of recent apps -->
<com.android.settings.widget.PrimarySwitchPreference <com.android.settings.widget.PrimarySwitchPreference
android:key="app1" android:key="app1"
android:title=" "
android:summary=" "
android:order="5"/> android:order="5"/>
<com.android.settings.widget.PrimarySwitchPreference <com.android.settings.widget.PrimarySwitchPreference
android:key="app2" android:key="app2"
android:title=" "
android:summary=" "
android:order="6"/> android:order="6"/>
<com.android.settings.widget.PrimarySwitchPreference <com.android.settings.widget.PrimarySwitchPreference
android:key="app3" android:key="app3"
android:title=" "
android:summary=" "
android:order="7"/> android:order="7"/>
<!-- See all apps button --> <!-- See all apps button -->

View File

@@ -149,6 +149,9 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
@VisibleForTesting @VisibleForTesting
void refreshUi(Context prefContext) { 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(() -> { ThreadUtils.postOnBackgroundThread(() -> {
reloadData(); reloadData();
final List<NotifyingApp> recentApps = getDisplayableRecentAppList(); final List<NotifyingApp> recentApps = getDisplayableRecentAppList();