Split Ambient Display settings.
1. Reverting the changes for Display->Ambient Display; this setting
will control incoming notification pulse.
2. Added 2 separate entries in gestures settings to control pick up
and double tap gestures-triggered pulsing for Ambient Display.
3. Added automated tests to verify the preference initializes to the
correct default value, and also verify that toggling the preference
updates the corresponding settings correctly.
Test: make SettingsTests
Bug: 30595437
Change-Id: I125bf75fc4ccfea126a00ffae4207fcb789f487a
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index e797b4f..b5e2848 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -79,19 +79,10 @@
android:key="lift_to_wake"
android:title="@string/lift_to_wake_title" />
- <PreferenceScreen
+ <SwitchPreference
android:key="doze"
- android:title="@string/ambient_display_title"
- android:summary="@string/doze_summary" >
- <intent
- android:targetPackage="com.android.settings"
- android:targetClass="com.android.settings.Settings$GestureSettingsActivity" >
- <extra android:name="show_drawer_menu"
- android:value="true" />
- <extra android:name="gesture_scroll_to_preference"
- android:value="gesture_pick_up_and_nudge" />
- </intent>
- </PreferenceScreen>
+ android:title="@string/doze_title"
+ android:summary="@string/doze_summary" />
<SwitchPreference
android:key="tap_to_wake"
diff --git a/res/xml/gesture_settings.xml b/res/xml/gesture_settings.xml
index c5d4ab4..af365bf 100644
--- a/res/xml/gesture_settings.xml
+++ b/res/xml/gesture_settings.xml
@@ -20,10 +20,10 @@
settings:keywords="@string/keywords_gesture">
<com.android.settings.gestures.GesturePreference
- android:key="gesture_swipe_down_fingerprint"
- android:title="@string/fingerprint_swipe_for_notifications_title"
- android:summary="@string/fingerprint_swipe_for_notifications_summary"
- settings:animation="@raw/gesture_fingerprint_swipe"/>
+ android:key="gesture_swipe_down_fingerprint"
+ android:title="@string/fingerprint_swipe_for_notifications_title"
+ android:summary="@string/fingerprint_swipe_for_notifications_summary"
+ settings:animation="@raw/gesture_fingerprint_swipe"/>
<com.android.settings.gestures.GesturePreference
android:key="gesture_double_tap_power"
@@ -38,9 +38,15 @@
settings:animation="@raw/gesture_twist"/>
<com.android.settings.gestures.GesturePreference
- android:key="gesture_pick_up_and_nudge"
+ android:key="gesture_double_tap_screen"
android:title="@string/ambient_display_title"
android:summary="@string/ambient_display_summary"
settings:animation="@raw/gesture_ambient_tap"/>
+ <com.android.settings.gestures.GesturePreference
+ android:key="gesture_pick_up"
+ android:title="@string/ambient_display_pickup_title"
+ android:summary="@string/ambient_display_pickup_summary"
+ settings:animation="@raw/gesture_ambient_lift"/>
+
</PreferenceScreen>
\ No newline at end of file