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

Commit 3ac9e17f authored by AragaoAnderson's avatar AragaoAnderson Committed by Michael Bestas
Browse files

Settings: Fix more derps after reorganization from 12.1

* Move Wallpaper fragment to Interface category
* Use CMSystemSettingSwitchPreference for:
  Prevent accidental wake-up
  Search in Recents

Change-Id: I49b184e4c838bce916271aae9409bb65f7338788
parent 8658bb87
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -44,12 +44,6 @@
                android:summary="@string/live_display_summary"
                android:fragment="com.android.settings.livedisplay.LiveDisplay" />

        <PreferenceScreen
                android:key="wallpaper"
                android:title="@string/wallpaper_settings_title"
                settings:keywords="@string/keywords_display_wallpaper"
                android:fragment="com.android.settings.WallpaperTypeSettings" />

        <!-- Rotation modes -->
        <PreferenceScreen
                android:key="display_rotation"
@@ -96,10 +90,11 @@
                android:persistent="false" />

        <!-- Prevent accidental wake-up -->
        <SwitchPreference
        <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
                android:key="proximity_on_wake"
                android:title="@string/proximity_wake_title"
                android:summary="@string/proximity_wake_summary"/>
                android:summary="@string/proximity_wake_summary"
                android:defaultValue="true" />

        <!-- Seconds before sleep -->
        <ListPreference
@@ -128,6 +123,13 @@
    <PreferenceCategory
            android:key="interface"
            android:title="@string/category_interface">
        <!-- wallpaper -->
        <PreferenceScreen
                android:key="wallpaper"
                android:title="@string/wallpaper_settings_title"
                settings:keywords="@string/keywords_display_wallpaper"
                android:fragment="com.android.settings.WallpaperTypeSettings" />

        <!-- expanded desktop -->
        <PreferenceScreen
                android:key="expanded_desktop"
@@ -155,7 +157,7 @@
                android:dialogTitle="@string/dialog_title_font_size" />

        <!-- Search in Recents -->
        <com.android.settings.cyanogenmod.SystemSettingSwitchPreference
        <com.android.settings.cyanogenmod.CMSystemSettingSwitchPreference
                android:key="recents_show_search_bar"
                android:title="@string/recents_show_searchbar"
                settings:keywords="@string/keywords_recents_show_searchbar"
+6 −6
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
    private SwitchPreference mLiftToWakePreference;
    private SwitchPreference mDozePreference;
    private SwitchPreference mTapToWakePreference;
    private SwitchPreference mProximityCheckOnWakePreference;
    private SwitchPreference mAutoBrightnessPreference;
    private SwitchPreference mWakeWhenPluggedOrUnplugged;

@@ -298,13 +299,12 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
            }
        }

        boolean proximityCheckOnWait = getResources().getBoolean(
        mProximityCheckOnWakePreference = (SwitchPreference) findPreference(KEY_PROXIMITY_WAKE);
        boolean proximityCheckOnWake = getResources().getBoolean(
                org.cyanogenmod.platform.internal.R.bool.config_proximityCheckOnWake);
        if (!proximityCheckOnWait) {
            SwitchPreference mProximityWakePreference =
                    (SwitchPreference) findPreference(KEY_PROXIMITY_WAKE);
            if (displayPrefs != null && mProximityWakePreference != null) {
                displayPrefs.removePreference(mProximityWakePreference);
        if (!proximityCheckOnWake) {
            if (displayPrefs != null && mProximityCheckOnWakePreference != null) {
                displayPrefs.removePreference(mProximityCheckOnWakePreference);
            }
            CMSettings.System.putInt(getContentResolver(), CMSettings.System.PROXIMITY_ON_WAKE, 1);
        }