Commit Graph

7 Commits

Author SHA1 Message Date
Tsung-Mao Fang
47875a5dff Revert "Add primary switch for vibration settings screen"
This reverts commit fd54fc34c6.

Reason for revert: b/215275738

Change-Id: I93612df6493a2a4184a98b3f049e23aa888095f2
2022-01-19 03:40:40 +00:00
Lais Andrade
fd54fc34c6 Add primary switch for vibration settings screen
Add primary switch that updates the VIBRATE_ON user setting.

Update all settings in this page to be disabled when this main toggle is
off.

Bug: 30028435
Test: VibrationMainSwitchPreferenceControllerTest
Change-Id: I752ca3b914c46678a1347034c5b6cf24fd40cc13
2022-01-18 22:31:30 +00:00
Lais Andrade
eaaf5331d6 Introduce alarm and media vibration intensity settings
Introduce toggles and sliders to configure the alarm and media
vibrations in the "Vibration & haptics" settings app.

Also update the multiple intensities configuration flag into a integer,
where the device can specify how many distinct levels are supported.
Follow existing implementation to map the intensities to higher setting
values.

Bug: 198346559
Bug: 207477604
Test: [Alarm|Media]Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: Ie3d570b72ba1229e613ecf0c45fac81233529e32
2022-01-18 16:03:01 +00:00
Lais Andrade
141b5bb3bc Update Settings to use intensity settings as main preference keys
Updating the Settings app to allow setting the value off for key
HAPTIC_FEEDBACK_INTENSITY. This setting state is also copied onto
HAPTIC_FEEDBACK_ENABLED setting, so both should be in sync after this
change.

Similar logic is applied between RING_VIBRATION_INTENSITY and
VIBRATE_WHEN_RINGING.

This will not disable the hardware feedback since that one is controlled
by a separate setting key now.

The "vibrate for calls" was also removed and the single toggle for
"vibrate first then ring gradually" was moved into the "Vibration &
haptics" page.

Bug: 185351540
Test: [HapticFeedback|NotificationVibration|RingVibration][Intensity|Toggle]PreferenceControllerTest
      and manual testing of the AOSP settings app
Change-Id: I9c94cef331a1500a1272a601ba32667ca995ddab
2022-01-12 22:59:29 +00:00
Lais Andrade
bd916b22a0 Use new Vibrator method to get default intensity per usage
Bug: 207477604
Test: builds
Change-Id: I031c1c532dac4762e1b74bebb77d773777f418a6
2022-01-10 15:43:16 +00:00
Yiwen Chen
494071463b Keep consistency between sound and accessibility settings.
Bug: 130741987
Test: Tested on device
Change-Id: Id6dd485c73f9453970b8d79929ffc04acb2c76c8
2019-05-23 00:13:01 -07:00
Alexey Kuzmin
3c51e824eb Split ring and notification vibration settings
Synchronize settings between sound and accessibility menus

Bug: 116172311
Test: See accessibility vibration settings - ring and notification
settings sould be separate. Try changing vibration settings in sound and
accessibility menus - the settings should stay in sync.

Change-Id: I515a7188cdf5a26a229ac8f08c6fcfe98e2f91a0
2019-01-10 14:22:49 +00:00