[Panic gesture settings] Add deep link to emergency contact

And update icons for all setting items in this page.

Bug: 161394591
Test: manual
Change-Id: I5126e04e3dc06223c9e733be6f953e1f6dc8d495
This commit is contained in:
Fan Zhang
2020-08-20 12:41:08 -07:00
parent 54a5f51dba
commit 9e9dcd2086
5 changed files with 104 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:pathData="M22,3H2C0.9,3 0,3.9 0,5V19C0,20.1 0.9,21 2,21H22C23.1,21 23.99,20.1 23.99,19L24,5C24,3.9 23.1,3 22,3ZM22,5V19H2V5H22ZM12,9C12,10.66 10.66,12 9,12C7.34,12 6,10.66 6,9C6,7.34 7.34,6 9,6C10.66,6 12,7.34 12,9ZM9,8C9.55,8 10,8.45 10,9C10,9.55 9.55,10 9,10C8.45,10 8,9.55 8,9C8,8.45 8.45,8 9,8ZM9,12.75C11,12.75 15,13.76 15,15.75V18H3V15.75C3,13.76 7,12.75 9,12.75ZM5,16V15.91C5.48,15.41 7.51,14.75 9,14.75C10.49,14.75 12.52,15.41 13,15.91V16H5ZM18.8039,6H17.1962V7.6077L15.8038,6.8039L15,8.1962L16.3923,9L15,9.8038L15.8038,11.1961L17.1962,10.3922V11.9999H18.8039V10.3922L20.1962,11.1961L21,9.8038L19.6077,9L21,8.1962L20.1962,6.8039L18.8039,7.6076V6Z"
android:fillColor="@android:color/white"
android:fillType="evenOdd"/>
</vector>

View File

@@ -0,0 +1,32 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:pathData="M5.64,6.64l2.36,-1.14l-2.36,-1.14l-1.14,-2.36l-1.14,2.36l-2.36,1.14l2.36,1.14l1.14,2.36z"
android:fillColor="#000000"/>
<path
android:pathData="M20.3,15.7l-1.3,-2.7l-1.3,2.7l-2.7,1.3l2.7,1.3l1.3,2.7l1.3,-2.7l2.7,-1.3z"
android:fillColor="#000000"/>
<path
android:pathData="M12.33,20.5c-0.73,0 -1.41,-0.31 -1.89,-0.86l-4.39,-5.06l0.35,-0.35c0.09,-0.09 0.36,-0.24 0.63,-0.06c1.95,1.3 1.18,0.79 3.97,2.65c0,-3.92 0,-6.81 0,-10.8c0,-0.28 0.22,-0.5 0.5,-0.5S12,5.72 12,6c0,1.5 0,6 0,6h1.5c0,-2.92 0,-5.06 0,-8c0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,0.08 0,1.13 0,8H16c0,0 0,-0.51 0,-7c0,-0.28 0.22,-0.5 0.5,-0.5S17,4.72 17,5v2c0,1.25 0,5 0,5h1.5c0,0 0,-3.75 0,-5c0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5v3.5H21V7c0,-1.1 -0.9,-2 -2,-2c-0.17,0 -0.34,0.03 -0.5,0.07V5c0,-1.1 -0.9,-2 -2,-2c-0.25,0 -0.48,0.05 -0.7,0.13C15.47,2.47 14.79,2 14,2c-1.1,0 -2,0.9 -2,2v0.07C11.84,4.03 11.67,4 11.5,4c-1.1,0 -2,0.9 -2,2c0,2.92 0,5.02 0,8l-1.64,-1.09c-0.79,-0.53 -1.85,-0.42 -2.52,0.25L4,14.5l5.3,6.12C10.06,21.5 11.17,22 12.33,22h4.17l-0.75,-1.5H12.33z"
android:fillColor="#000000"/>
</vector>

View File

@@ -0,0 +1,26 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:pathData="M17,20c-0.29,0 -0.56,-0.06 -0.76,-0.15 -0.71,-0.37 -1.21,-0.88 -1.71,-2.38 -0.51,-1.56 -1.47,-2.29 -2.39,-3 -0.79,-0.61 -1.61,-1.24 -2.32,-2.53C9.29,10.98 9,9.93 9,9c0,-2.8 2.2,-5 5,-5s5,2.2 5,5h2c0,-3.93 -3.07,-7 -7,-7S7,5.07 7,9c0,1.26 0.38,2.65 1.07,3.9 0.91,1.65 1.98,2.48 2.85,3.15 0.81,0.62 1.39,1.07 1.71,2.05 0.6,1.82 1.37,2.84 2.73,3.55 0.51,0.23 1.07,0.35 1.64,0.35 2.21,0 4,-1.79 4,-4h-2c0,1.1 -0.9,2 -2,2zM7.64,2.64L6.22,1.22C4.23,3.21 3,5.96 3,9s1.23,5.79 3.22,7.78l1.41,-1.41C6.01,13.74 5,11.49 5,9s1.01,-4.74 2.64,-6.36zM11.5,9c0,1.38 1.12,2.5 2.5,2.5s2.5,-1.12 2.5,-2.5 -1.12,-2.5 -2.5,-2.5 -2.5,1.12 -2.5,2.5z"
android:fillColor="#000000"/>
</vector>

View File

@@ -10954,6 +10954,9 @@
<!-- Preference summary to enable generating noisy sound before calling emergency services at panic/distress moments[CHAR_LIMIT=NONE]--> <!-- Preference summary to enable generating noisy sound before calling emergency services at panic/distress moments[CHAR_LIMIT=NONE]-->
<string name="panic_gesture_sound_setting_summary">Alert before starting the actions</string> <string name="panic_gesture_sound_setting_summary">Alert before starting the actions</string>
<!-- Preference title to let user edit their emergency contact list[CHAR_LIMIT=60]-->
<string name="panic_gesture_edit_emergency_contact_setting_title">Emergency contacts</string>
<!-- Title text for swiping downwards on fingerprint sensor for notifications [CHAR LIMIT=80]--> <!-- Title text for swiping downwards on fingerprint sensor for notifications [CHAR LIMIT=80]-->
<string name="fingerprint_swipe_for_notifications_title">Swipe fingerprint for notifications</string> <string name="fingerprint_swipe_for_notifications_title">Swipe fingerprint for notifications</string>
<!-- Title text for fingerprint gesture preference screen [CHAR LIMIT=25] --> <!-- Title text for fingerprint gesture preference screen [CHAR LIMIT=25] -->

View File

@@ -23,22 +23,35 @@
<com.android.settings.widget.VideoPreference <com.android.settings.widget.VideoPreference
android:key="panic_button_screen_video" android:key="panic_button_screen_video"
app:animation="@raw/gesture_double_tap" app:animation="@raw/gesture_double_tap"
app:preview="@drawable/gesture_double_tap" /> app:preview="@drawable/gesture_double_tap"/>
<SwitchPreference <SwitchPreference
android:key="gesture_panic_button" android:key="gesture_panic_button"
android:title="@string/panic_gesture_screen_title" android:title="@string/panic_gesture_screen_title"
android:summary="@string/panic_gesture_screen_summary" android:summary="@string/panic_gesture_screen_summary"
android:icon="@drawable/ic_hand_gesture"
app:keywords="@string/keywords_gesture" app:keywords="@string/keywords_gesture"
app:controller="com.android.settings.gestures.PanicGesturePreferenceController" app:controller="com.android.settings.gestures.PanicGesturePreferenceController"
app:allowDividerAbove="true" /> app:allowDividerAbove="true"/>
<SwitchPreference <SwitchPreference
android:key="panic_gesture_sound" android:key="panic_gesture_sound"
android:icon="@drawable/ic_hearing"
android:title="@string/panic_gesture_sound_setting_title" android:title="@string/panic_gesture_sound_setting_title"
android:summary="@string/panic_gesture_sound_setting_summary" android:summary="@string/panic_gesture_sound_setting_summary"
app:keywords="@string/keywords_gesture" app:keywords="@string/keywords_gesture"
app:controller="com.android.settings.gestures.PanicGestureSoundPreferenceController" app:controller="com.android.settings.gestures.PanicGestureSoundPreferenceController"
app:allowDividerAbove="true" /> app:allowDividerAbove="true"/>
<Preference
android:key="panic_emergency_contacts"
android:icon="@drawable/ic_emergency_contact"
android:title="@string/panic_gesture_edit_emergency_contact_setting_title"
app:keywords="@sttring/keywords_gesture"
app:allowDividerAbove="true">
<intent
android:action="android.settings.EDIT_EMERGENCY_INFO"
android:targetPackage="@string/config_aosp_emergency_package_name"/>
</Preference>
</PreferenceScreen> </PreferenceScreen>