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

Skip to content
Commit 4668cc85 authored by Lais Andrade's avatar Lais Andrade
Browse files

Add flag to refresh of user vibration settings before vibrating

Add hidden flag to VibrationAttributes that enforces the service to
refresh the cached user settings values before vibrating with the given
effect. This allows user settings to apply this to vibratins played as
preview of new intensities set by the slider.

This solution still requires the Settings to update the user intensity
before playing the preview, but it doesn't bypass any user settings or
policies in order to play the preview, avoiding a shortcut that could be
used to enforce vibrations without user control.

This setting is also applied to external vibrations, which could be used
to preview haptics instead if a prebaked effect. It also applies to
ringer mode, that is now cached by the service instead of queried on
each vibrate call.

Fix: 219693646
Fix: 219695212
Fix: 157533521
Test: VibrationSettingsTest & VibratorManagerServiceTest
Change-Id: I605ccd2a4a3b89f1ba5bc86d8f3f64dd6d2714eb
parent c46b5540
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment