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

Commit 27a72e72 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove space at the bottom of dream settings" into main

parents 2c2e964e 576f869a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
        android:summary="@string/dream_home_controls_toggle_summary" />

    <com.android.settings.applications.SpacePreference
        android:key="dream_space_preference"
        android:layout_height="16dp" />

</PreferenceScreen>
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings.dream;

import static android.service.dreams.Flags.dreamsV2;

import static com.android.settings.dream.DreamMainSwitchPreferenceController.MAIN_SWITCH_PREF_KEY;

import android.app.settings.SettingsEnums;
@@ -55,6 +57,7 @@ public class DreamSettings extends DashboardFragment implements OnCheckedChangeL
    static final String EITHER_CHARGING_OR_DOCKED = "either_charging_or_docked";
    static final String WHILE_POSTURED_ONLY = "while_postured_only";
    static final String NEVER_DREAM = "never";
    private static final String SPACE_PREF_KEY = "dream_space_preference";

    private MainSwitchPreference mMainSwitchPreference;
    private Button mPreviewButton;
@@ -225,6 +228,12 @@ public class DreamSettings extends DashboardFragment implements OnCheckedChangeL
        if (mDreamPickerController != null) {
            mDreamPickerController.addCallback(mCallback);
        }

        // Remove the space preference manually only if the flag is enabled, which removes the
        // floating preview button, making the extra space unnecessary.
        if (dreamsV2()) {
            removePreference(SPACE_PREF_KEY);
        }
    }

    @Override