Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c16c0d46 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

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
parent 0ddacf11
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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 @@
        <!-- Placeholder for a list of recent apps -->
        <com.android.settings.widget.PrimarySwitchPreference
            android:key="app1"
            android:title=" "
            android:summary=" "
            android:order="5"/>
        <com.android.settings.widget.PrimarySwitchPreference
            android:key="app2"
            android:title=" "
            android:summary=" "
            android:order="6"/>
        <com.android.settings.widget.PrimarySwitchPreference
            android:key="app3"
            android:title=" "
            android:summary=" "
            android:order="7"/>

        <!-- See all apps button -->
+3 −0
Original line number Diff line number Diff line
@@ -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<NotifyingApp> recentApps = getDisplayableRecentAppList();