diff options
| author | 2023-06-29 01:55:43 -0700 | |
|---|---|---|
| committer | 2023-09-02 01:39:42 +0000 | |
| commit | f90fe8db878a3055f08d6c1dcea2679bcace83ce (patch) | |
| tree | dc3d1977d14e9441fc7314dd6893874c677c2855 /libs/androidfw/ZipFileRO.cpp | |
| parent | 5b0a413127f825e6b01c0ab10866bba1ef66e1c8 (diff) | |
Create a hidden Vibrator API for haptic feedback.
Haptic feedbacks are played on a View (via the performHapticFeedback API
in the View class). This API used to go through the window manager code
space to derive the vibration effect/attribute for a given haptic
feedback ID, and use the vibrator to play the corresponding vibration.
To remove dependency on window manager, we are creating a hidden API in
Vibrator that will handle performing haptic feedback. View can pass a
haptic feedback request directly to this new Vibrator API (after making
sure that the View is attached to a window), and this API will handle
creating the vibration effect/attribute for the haptic feedback and
playing it, all without requiring the VIBRATE permission.
We are guarding View's direct call to the Vibrator API with a new
vibrator flag. Once this implementation has been seen to be stable, we
will remove the haptic feedback code in the window manager code space.
Test: atest VibratorManagerServiceTest
Test: atest HapticFeedbackVibrationProviderTest
Test: sample test app without VIBRATE permission plays haptic feedback
Bug: 295459081
Change-Id: Ic4d226f724bf0591bad9f465a4872a41ddca2c60
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
0 files changed, 0 insertions, 0 deletions