Hide haptic intensity settings for devices without enough dynamic range.

Despite our hope, devices prior to P18 just don't have the dynamic range
to give three distinct vibration intensity settings. Given this, only
show an on / off toggle for devices by default unless they explicitly
opt-in to multiple intensity levels.

Test: m -j RunSettingsRoboTests
Bug: 80243632
Change-Id: I14ece855cf20f9fa44b0648d28f89c0053be5c5f
This commit is contained in:
Michael Wright
2018-05-25 22:57:03 +01:00
parent 2e0709b3b8
commit 3dbaac6e71
6 changed files with 184 additions and 49 deletions

View File

@@ -134,4 +134,9 @@
<!-- Whether or not to show the night light suggestion. -->
<bool name="config_night_light_suggestion_enabled">true</bool>
<!-- Whether or not the device is capable of multiple levels of vibration intensity.
Note that this is different from whether it can control the vibration amplitude as some
devices will be able to vary their amplitude but do not possess enough dynamic range to
have distinct intensity levels -->
<bool name="config_vibration_supports_multiple_intensities">false</bool>
</resources>