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

Commit 3f912b02 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Create View.performHapticFeedback API that takes vibration usage

The preexisting haptic feedback APIs statically derived the vibration
usage for each feedback constants. This meant that a given constant
could only be played with that statically defined usage.

To enable a more dynamic usage of haptic feedback, we are adding a
performHapticFeedback API that allows specifying the vibration usage for
the feedback. This usage should be of USAGE_CLASS_FEEDBACK. Other than
this difference, this new API works the same way as the existing haptic
feedback APIs.

Bug: 397602072
Bug: 408393305
Test: atest VibratorManagerServiceTest
Test: atest ViewTest
Test: atest HapticFeedbackVibrationProviderTest
Flag: android.os.vibrator.haptic_feedback_with_custom_usage
Test: adb shell cmd vibrator_manager feedback -u 50 0
Change-Id: I7fdeeef0b80c978cacda06cc3d090c5fc827cbd8
parent f225fe41
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