Commit Graph

9 Commits

Author SHA1 Message Date
Lais Andrade
e000a21064 Enable touch feedback settings when the phone is in silent mode
Allow users to change this settings when the phone is in silent mode, if
they prefer to make all interactions as silent as possible in that
context.

Fix: 165478128
Test: [Alarm|HapticFeedback|Media]Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: I68f90559b2bf8088f22397412c149e2a4b91cf13
2022-02-22 19:01:51 +00:00
Lais Andrade
76b2cd60e5 Disable ring, notification and touch vibration in silent mode
Disable haptic settings for ring, notification and touch feedback when
the phone ringer mode is set to silent.

Preserve the setting values and display message explaining why those
settings are disabled.

Bug: 203188852
Test: *Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: I6c24079ece9d637f2feb487f756937888a92caa7
2022-01-24 11:01:08 +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
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
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Fan Zhang
6ccc81818d Convert VibrationSettings to DashboardFragment.
- DashboardFragment integrates Slices and settings search better than
  SettingsPreferenceFragment, and is more testable.

Test: robotests
Change-Id: I5f73836f94712c03521eac6b3f67964524381078
2018-02-20 16:20:59 -08:00