Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d53c355c authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Introduce USAGE_IME_FEEDBACK & default keyboard vibration intensity config

The CL is to prepare clean-up FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE
check for keyboard vibration in VibratorManagerService (VMS).

With USAGE_IME_FEEDBACK hint, the keyboard vibration can be allowed to get
the current / default vibration intensity in VMS more natually through
config_defaultKeyboardVibrationIntensity in config.xml.

Note that in VibrationSettings#{getDefaultIntensity, getCurrentIntensity}
will apply the default keyboard vibration intensity when enabling keyboard
vibration settings support, otherwise will fallback to USAGE_TOUCH default
intensity.

Also ensure in VibrationAttriribute#getAudioUsage(usageHint) to return
the corresponding audio attribute USAGE_ASSISTANCE_SONIFICATION as
usage_touch for IME feedback hint.

In the next CL, we will apply this new usage hint so keyboard vibrations
can be handled by the scale logic in VibratorScaler vs. bypassing it.

Flag: android.os.vibrator.vibration_attribute_ime_usage_api
Bug: 332661766
Test: atest VibratorManagerServiceTest
Test: atest VibrationSettingsTest
Change-Id: I6256c4f47a8bbee4b649d35eabfbc0c94215c0d7
parent 12fd7706
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment