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
Loading
Please register or sign in to comment