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

Unverified Commit f948264a authored by Steve Kondik's avatar Steve Kondik Committed by Michael Bestas
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".

This is squashed with:

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Sun Oct 25 15:20:06 2020 +0000

    Settings: Hide AOD pref is device provides Doze settings

    Devices that provide Doze settings typically implement own AOD pref,
    so hide AOSP one.

    Change-Id: I458de41a1c8e17203374866a0032b33c48690aac

Change-Id: I22fd7e6307b370807415ce2132bed4808b2befe1
parent 5fdf5730
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -122,6 +122,13 @@
            android:summary="@string/doze_summary"
            settings:controller="com.android.settings.display.AmbientDisplayNotificationsPreferenceController" />

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

    </PreferenceCategory>

    <!-- Work profile settings are at the bottom with high order value to avoid users thinking that