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.
 * Devices that provide Doze settings typically implement own AOD pref,
   so hide AOSP one.
 * 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".

Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: I22fd7e6307b370807415ce2132bed4808b2befe1
This commit is contained in:
Steve Kondik 2016-10-14 21:46:42 -07:00 committed by LuK1337
parent 2396e35310
commit 929b575a10
No known key found for this signature in database

View file

@ -132,6 +132,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