Commit Graph

307 Commits

Author SHA1 Message Date
Jernej Virag
4f1e17eba1 Create a setting for Assist invocation via long press power button
Adds a setting which allows the user to enable invoking the Assist app via long pressing the power button. The availability of setting is controlled by config_longPressOnPowerForAssistantSettingAvailable configuration value.

Bug: 179175321
Bug: 182983853
Test: make RunSettingsRoboTests
Change-Id: I2eb23e5b7539b2fb8e5bc85d23ca5795a08366c5
2021-03-29 07:57:13 +00:00
Jason Chang
858bda81f1 Fix refresh in Gestures, not reflecting the changes after
toggling on/off one-handed mode

1) Remove disabling on swipe down notification.
2) Update to align asset with One-Handed mode temporarily.
3) Change some states when toggle on/off and align with
One-Handed mode.
4) Set temporary asset style to "centerInside" to avoid image
corrupted problem when device rotate.
5) Add new string on Swipe down notification toggle switch.

Bug: 177679988
Bug: 181970213

Test: manual verified on Settings > System > Gesture page
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures.OneHandedSettingsTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures
      .OneHandedAppTapsExitPreferenceControllerTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures
      .OneHandedEnablePreferenceControllerTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures
      .OneHandedTimeoutPreferenceControllerTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures.OneHandedSettingsUtilsTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures.SwipeBottomToNotificationPreferenceControllerTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures.SwipeBottomToNotificationSettingsTest"

Change-Id: Ifd2346a7694323d21eb424891987c8317847e7c5
2021-03-24 21:40:08 +08:00
Bill Lin
dd2654493f 2/ Set Swipe bottom for notification OFF by default
Note:
1) The "Swipe bottom for notification" will still available
   in Settings
2) If user had ever turn ON this settings, then we will NOT help
user change() any setting for this purpose.

Test: facory reset and observe the default function if OFF
Bug: 182711813
Change-Id: I9d76c6c5c83a1dcfaaf289b5af9dcc996bb943fa
2021-03-18 15:47:21 +08:00
jasonwshsu
e2c69bcd7b Remove the accessibility gesture tutorial dialog in system navigation
Accessibility gesture is replaced by the accessibility floating menu, remove the accessibility gesture tutorial dialog when choosing to use gesture navigation mode.

cherry picked from commit 1a0e2b1be5

Bug: 173990914
Test: manual test
Change-Id: Iae5297747594fcc73fc9bc14537c8fdecb86b660
Merged-In: Iae5297747594fcc73fc9bc14537c8fdecb86b660
2021-03-17 23:03:45 +08:00
Mill Chen
46cf90af0e Remove search and help menu items from toolbar
Based on the Settings UI guideline, both of search and help menu items
will be removed from toolbar on Android S.

Bug: 179332520
Test: visual verified
1) Settings -> System -> Gestures -> System navigation
2) Observe the toolbar and check if search and help icons are existing

Change-Id: I3d71eddffb8876f936cf56858d0604aba7d4ee4b
2021-02-18 23:29:21 +08:00
Edgar Wang
bd0dd5d886 Rearrange System settings
- Fork system_dashboard_fragment_v2 for dev.
- Reorder the preference
- Remove summary

Bug: 174965365
Test: manual & robotest
Change-Id: Icc994f3b2e38ad54958deb5c9f80b6cd085029f0
2021-01-29 12:10:58 +00:00
Fan Zhang
e81091175e Default emergency gesture setting On.
And a few drive-by fixes:
* Move all emergency gesture fragments and controllers to emergency
  package for better code colocation.
* Remove the placeholder video preference from emergency_gesture_settings.xml

Bug: 178009196
Test: reran robotests
Change-Id: Ifcb591e7ab8e5e5494c480cbbe9410c08c296f8e
2021-01-20 13:08:04 -08:00
Stanley Wang
57098f4589 Use SettingsLib's MainSwitchPreference to replace the Switches which use
LayoutPreference.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: I4588d1fc3004970b174e7c5c5d1aa7745f774985
2021-01-12 23:12:01 +08:00
Yi-Ling Chuang
b058221b62 Add inline toggle for Prevent Ringing gesture.
- Fork sound_settings_v2 for dev.
- Replace Preference with PrimarySwitchPreference for the Prevent
Ringing entry.
- When the toggle is on, only show the status text without the on/off
info.
- Remove unused codes.

Bug: 174964721
Test: robotests
Change-Id: I990f5c778436c8058d4a5953c7f15a9a7eb580d8
2021-01-12 12:48:41 +08:00
Fan Zhang
80c7251526 Switch to use EmergencyNumberUtils to update e-number.
The backend storage choice is delegated to EmergencyNumberUtils. Using
the utils class abstrats underlying details away from Settings app.

Bug: 177006940
Test: manual
Change-Id: I78c5ef79e141e3609ab9d10e558803457b617911
2021-01-07 22:45:39 -08:00
Edgar Wang
e49ae19b1e Merge "Replace some customized RadioButtonPreferences" 2021-01-06 16:31:02 +00:00
Edgar Wang
c0e7328a88 Replace some customized RadioButtonPreferences
- Deleted ZenCustomRadioButtonPreference
- Deleted RadioButtonPreferenceWithExtraWidget
- Replaced with RadioButtonPreference

Bug: 173472216
Test: robotest
Change-Id: I645b59d65ae14af1f384f16ee7b76b3c98e23e1f
2021-01-06 05:37:29 +00:00
Jason Chang
3abd4c2ff8 Merge "Fix swipe for notification default should be on instead of off" 2020-12-18 09:29:06 +00:00
Jason Chang
fc7fbdb8ae Fix swipe for notification default should be on instead of off
Set default "ON" when we can not get
SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED value.

Bug: 175084985

Test: manual check Settings > System > Gesture > Swipe for notifications
Test: manual check it is disabled after One-handed mode toggled on
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationSettingsTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationPreferenceControllerTest"

Change-Id: I176ba1c0e18c5ed7d1582d380db6ec190b6e1dec
2020-12-17 14:37:13 +08:00
Fan Zhang
8e154d094f a11y fix: read emergency numbers as digits, not numbers.
Instead of reading as one hundred and ten, it should read as one-one-o.

Also make the number override dialog text input box a little bigger

Fix: 175517632
Fix: 175514672
Test: robotests
Change-Id: I7e3e823792f885004868ede790fc414a3fa66f01
2020-12-15 12:29:39 -08:00
Fan Zhang
bab12ec15b Merge "Update emergency sos gesture string to match mock" 2020-11-19 20:33:32 +00:00
Fan Zhang
9ce66c865d Merge "Add a setting to overrid emergency number for Emergency SOS" 2020-11-19 18:53:00 +00:00
Fan Zhang
83275f2091 Add a setting to overrid emergency number for Emergency SOS
- Add a dialog preference and custom dialog to allow user input a phone
  number
- Use settingslib/emergencynumber util to set/get the user input into
  SettingsProvider

https://screenshot.googleplex.com/A9GmJrcSbp4jYfd.png

Bug: 172609395
Test: robotests
Change-Id: Iedd9bb9f32c212a310fd8fddffad852a997f3b0d
2020-11-18 14:59:14 -08:00
John Li
db2d3347d7 Add haptic feedback for the seekbar in Settings.
- set HAPTIC_FEEDBACK_MODE_ON_TICKS for Gesture Navigation.
- set HAPTIC_FEEDBACK_MODE_ON_TICKS for Battery Saver.
- set HAPTIC_FEEDBACK_MODE_ON_ENDS for Reduce Bright Colors.
- set HAPTIC_FEEDBACK_MODE_ON_ENDS for Night Light.

Bug: 172900709
Test: manual
Change-Id: I070a0f2e4cf690bf611f62c7a4a2bcef17e08571
2020-11-18 08:08:20 +00:00
Fan Zhang
b6007e29b0 Update emergency sos gesture string to match mock
Bug: 172609395
Test: manual
Change-Id: I8909c5ec0207216d7fe96cf9809deb58703e3f9e
2020-11-17 15:47:14 -08:00
Fan Zhang
d7c833278b No-op refactor on EmergencyGesturePreferenceController.
Move custom intent launching logic into a separate controller
(EmergencyGestureEntrypointPreferenceController).

This is in preparation of a mini-IA refresh and fixing a search
bug. The custom intent logic is only needed by the entrypoint
pref, and putting in the gesture PrefControler makes any fix
hard to implement.

Bug: 171067360
Bug: 172609395
Test: RunSettingsRoboTests
Change-Id: I1e26393872bfada98db80a1cc33e3e13dacb086b
2020-11-13 20:01:20 +00:00
Fan Zhang
f797a48af6 Rename panic gesture to emergency gesture in Settings
Bug: 171589858
Test: rebuild
Change-Id: I23847db82a397bdcd61501758e3ef66a4f088e22
2020-10-27 12:46:41 -07:00
Fan Zhang
6fef72aae4 Rename panic button in framework settings.
Renamed panic to "emergency" or "emergency gesture" to
avoid speculation once source code is accessible to
parties without full context.

The settings string and file names still use the word "panic". This
will be updated in a follow-up CL

Bug: 169946710
Test: rebuild
Change-Id: Ic1a3181145ca2b64ab6ef2a2989224395fa9a6f8
2020-10-23 22:51:01 +00:00
Fan Zhang
c63a13c858 Launch customized panic setting intent when configured.
When RRO provides a custom intent package for panic settings and there
is an app to handle it, launch the custom intent instead of the AOSP
version.

Bug: 169946508
Test: robotests
Change-Id: I8479c6e0dd4a90b5a03640035b710ae4ccc7809c
2020-10-14 12:20:33 -07:00
Fan Zhang
67d3454265 Add Panic button sound preference to panic gesture settings page.
Also renamed emergency_sos_* to panic_*. "emergency sos" is used by
other OEMs.

https://screenshot.googleplex.com/66097f3e-6aa0-4e2f-afb8-22f278bb0ed7.png

Bug: 161394591
Test: robotests
Change-Id: I14a59399fe7192d305d89a86dc93380c1e4c8a1c
2020-08-18 09:19:33 -07:00
Fan Zhang
0a23c4bf89 Add panic gesture settings page.
Ui is not final, the strings and video are placeholder only.

Bug: 161394591
Test: robotests
Change-Id: I8ada396506363e4711a1544e2c7ba1cd0e5d2dda
2020-07-28 09:54:12 -07:00
Jason Chang
9cfe959a23 Fix the description under timeout isn't translated completely
Reuse existing string instead of using new string for one-handed
timeout description.

Bug: 159298092

Test: manual
Change-Id: I903998dc58218f67d37fa449ef1a6a0615637bb5
2020-07-17 14:06:12 +08:00
Jerry Chang
8ff7abbb31 New settings preference to swipe bottom for notification
Add new gesture toggle at:
Settings > System > Gesture > Swipe for notification

Bug: 154080211
Test: manual check Settings > System > Gesture > Swipe for notifications
Test: manual check it is disabled after One-handed mode toggled on
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationSettingsTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
"SwipeBottomToNotificationPreferenceControllerTest"

Change-Id: Iec18dfd323981ae7489d142b79c6035f3499eb91
2020-07-03 19:05:42 +08:00
Stanley Wang
06c4e75612 Merge "Add log to capture the hardware status." into rvc-dev am: 1117895745 am: 843622806b am: 24eaff871f am: 6a331078b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11908539

Change-Id: Idb28a47e30b21016e369af6799d7e20002c4630f
2020-06-22 09:08:53 +00:00
Stanley Wang
f7e6c1e4c5 Add log to capture the hardware status.
Sometimes Settings Search show the items that are not supported by
the hardware. e.g. FaceLock.
Add log to check the HW status when the problem occurred.

Bug: 156667203
Test: watch the log output.
Change-Id: Ie6a89f338aac6f7bdefc69fc84cfa5bf848ed015
2020-06-20 20:02:35 +08:00
Mehdi Alizadeh
c89052a4fa Merge "Allows IndicatorView to have a different size than Settings Activity" into rvc-dev am: b50512b69a am: eab293354a am: 4d896e3da8 am: 296b9dcbe3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11835166

Change-Id: Ia1e671d00528170aad8b960ed3704fb25e407900
2020-06-17 00:04:18 +00:00
Mehdi Alizadeh
2552dffe6e Allows IndicatorView to have a different size than Settings Activity
The transparent IndicatorView need to be immersive fullscreen, while the
underneath activity should not cover the status bar or the nav bar.

Bug: 157747505
Test: Manual test to verify status bar and nav bar are visible.
Change-Id: I6d5a3f53dd3768524700c3e33135fa7dfde839f1
2020-06-15 14:30:39 -07:00
Fabian Kozynski
f3e82c50c8 Merge "Use PackageManager.FEATURE_CONTROLS to decide availability" into rvc-dev am: 43527ef8f4 am: 5a91550b9d am: f4678cd408 am: 61fcef26c8
Original change: undetermined

Change-Id: I96757fc174b9fdd8b5d21e4a284dfc0ba25fb634
2020-06-01 21:48:25 +00:00
Fabian Kozynski
43527ef8f4 Merge "Use PackageManager.FEATURE_CONTROLS to decide availability" into rvc-dev 2020-06-01 20:21:36 +00:00
Fabian Kozynski
d0d07ddceb Use PackageManager.FEATURE_CONTROLS to decide availability
Using this features, some of the Preference in Power Menu Settings can
change their availability and their summary.

Test: Robotest Settings
Fixes: 157244528
Change-Id: I704438dda181aa6347c3f168ac5ef6bd16148993
2020-05-29 13:12:08 -04:00
Automerger Merge Worker
cf3792525b Merge "Merge "Update summary of Gesture" into rvc-dev am: e1a9a56451 am: c3ce91706a" into rvc-d1-dev-plus-aosp am: 6fd3b32197 am: 91a0015d5d
Change-Id: Ia4f55724adcd915d3f6d0df9e9d4d49c4bcd5cf3
2020-05-27 08:57:01 +00:00
Jason Chang
6c8fd325ee Merge "Update new string for One-Handed feature" 2020-05-26 10:08:23 +00:00
Jason Chang
cc35ece032 Update new string for One-Handed feature
According One-handed mode string review doc to change strings.

Bug: 151993111

Test: manual
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings
.gestures.OneHandedTimeoutPreferenceControllerTest"

Change-Id: I7dc961387c1e14b25438e051ce6b1cc70fb59417
2020-05-25 23:25:05 +08:00
Edgar Wang
cef1020f75 Update summary of Gesture
when quick gesture enabled, update summary to reflect correct status

Bug: 138149556
Test: manual & robotest
Change-Id: I072134cd8327ad5eb1d0862604acef83e1bdcec0
2020-05-25 18:23:53 +08:00
Mehdi Alizadeh
a28144da66 Reads back inset scale value from config.xml instead of hardcoded values am: a5eb615038 am: 01f83bc633 am: 3c7212a62b am: a7a427a9c9
Change-Id: I67a3a2a8dcf14b499355b31db9709b8c2ba8abb4
2020-05-19 04:21:58 +00:00
Mehdi Alizadeh
a5eb615038 Reads back inset scale value from config.xml instead of hardcoded values
Bug: 152364314
Test: Manual
Change-Id: Ie8de080a26bda3b63c6a5ee726e7adce2d3859f7
2020-05-18 23:51:48 +00:00
Jason Chang
f62888975e Enable(visible) or Disabled(invisible) all one-handed settings
preference by System Property flag configuration.

To check System Property flag "support_one_handed_mode" configuration
then enable(visible) or disable(invisible) all one-handed settings
preference.

Bug: 154290458

Test: manual
Test: RunSettingsRoboTests
Change-Id: Ib6ed12dd65e66747e53b6333574ba0ad5be3c6e0
2020-05-13 00:38:26 +08:00
Mehdi Alizadeh
a295e44763 Merge "Hides gesture nav settings page from search, when not available" into rvc-dev am: bddb0eb3dd am: 23140d190f am: 59f0691ad7 am: 467a9209ec
Change-Id: I2023440863f1e93e645aa8f1705361e031a85917
2020-05-08 18:41:21 +00:00
Mehdi Alizadeh
6421bec35a Hides gesture nav settings page from search, when not available
Bug: 149846147
Test: Manual test
Change-Id: If95e521caf0fe8ea8489747a75a7d1600ea7d1a0
2020-05-07 21:11:17 -07:00
Fabian Kozynski
1cefc2e23b Merge "Fix default for CONTROLS_ENABLED" into rvc-dev am: 64097cbb11 am: 0533f91da7 am: 0f6205e51c am: 8d36410fa5
Change-Id: I52e968e2d8f3bfa63a2b1cef0ca6c38058199de8
2020-05-07 14:38:59 +00:00
Fabian Kozynski
64097cbb11 Merge "Fix default for CONTROLS_ENABLED" into rvc-dev 2020-05-07 13:24:04 +00:00
Fabian Kozynski
69ee49c8d1 Fix default for CONTROLS_ENABLED
The default value for this setting if it doesn't exist is 1.

Test: Robotest PowerMenuPrivacyPreferenceControllerTest
Fixes: 155877682
Change-Id: I9025ea9c4f67492220f9ed67e11a167a65a99ec7
2020-05-06 12:36:18 -04:00
TreeHugger Robot
ddb40590ab Merge "In system nav settings, makes back inset animation full screen." into rvc-dev am: 9b940670c1 am: 2ae4a10843 am: f2f6143146 am: 19fd1718a8
Change-Id: I7f7e1680a3c50e0257f30c2604719070d2cde4bc
2020-05-06 06:27:26 +00:00
Mehdi Alizadeh
3c895271ad In system nav settings, makes back inset animation full screen.
The animated inset size now appears above status bar and nav bar.

Bug: 154005084
Test: Manual test in light and dark themes.
Change-Id: I1fc9d3ab6e478d29b72b15ffec09ca3a5a50de5b
2020-05-05 19:05:26 -07:00
TreeHugger Robot
7874d035fe Merge "Add SearchIndexable to Power Menu" into rvc-dev am: 482968c84b am: 5bd1d6693f am: 2a0847f29f am: 7654605718
Change-Id: I16948376f872d7d9b4008b571648201eba5c9b6c
2020-04-24 20:16:01 +00:00