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

Commit 5da14d38 authored by Steve Kondik's avatar Steve Kondik Committed by Bruno Martins
Browse files

Settings: Add a RemotePreference for device-specific doze settings

 * If a device has its own panel, we should replace the item under
   display settings instead of having to clutter up the dashboard.
 * This uses the new RemotePreference API to allow the external
   app to update the view.
 * The action for this is "org.lineageos.settings.device.DOZE_SETTINGS".

Change-Id: I22fd7e6307b370807415ce2132bed4808b2befe1
parent a00128c3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:lineage="http://schemas.android.com/apk/res/lineageos.platform"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:key="display_settings_screen"
    android:title="@string/display_settings"
@@ -106,6 +107,13 @@
        android:fragment="com.android.settings.display.AmbientDisplaySettings"
        settings:userRestriction="no_ambient_display" />

    <lineageos.preference.RemotePreference
        android:key="doze_device_settings"
        android:title="@string/ambient_display_screen_title"
        lineage:replacesKey="ambient_display">
        <intent android:action="org.lineageos.settings.device.DOZE_SETTINGS" />
    </lineageos.preference.RemotePreference>

    <!-- Hide night mode for now
    <ListPreference
        android:key="night_mode"