Using View.performHapticFeedback on Volume Dialog Impl when the silent and...
Using View.performHapticFeedback on Volume Dialog Impl when the silent and vibrate-only icons are pressed Moving towards the one-way API that can trigger haptic feedback from the UI thread. The feedback on touch events that activate silent mode and vibrate-only mode now trigger TOGGLE_OFF and TOGGLE_ON haptics, respectively. This is per the recommended constants of the new API, which are more suitable for the interactions they represent. Caveat: The case when the onStateChangedH callback handles dragging the ringer volume slider to 0 in the settings activity does not trigger haptics. This will be fixed in the future (b/290642122). To avoid inconsistent haptics, a flag was introduced to activate the new API. Test: Manual. To test, enable the oneway_haptics_api_migration flag and press the volume keys on the device. When the volume dialog appears, click the top icons for silent and vibrate-only mode. The vibrate mode triggers the vibration of the TOGGLE_ON haptic signal and silent mode triggers the TOGGLE_OFF signal. Sliding the ringer volume to 0 in settings will not produce haptic feedback (this is expected). Bug: 245528624 Change-Id: I427faf4cc415dfbaaf1a0a1f5d94e57ac734b7f5
Loading
Please register or sign in to comment