From 8f30dd7aea1475e0d71f62ab30ea3f496bcd97ad Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Tue, 14 Dec 2021 14:38:52 +0800 Subject: [PATCH] Add haptic feedback to rotation button Fixes: 205503732 Test: tap rotation button in vibration only mode Change-Id: I8fe29afc03353943b56fea9e80618441f7bca174 --- .../systemui/shared/rotation/RotationButtonController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java index 78867f7220af0..605d37628ec7f 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/RotationButtonController.java @@ -36,6 +36,7 @@ import android.os.Looper; import android.os.RemoteException; import android.provider.Settings; import android.util.Log; +import android.view.HapticFeedbackConstants; import android.view.IRotationWatcher; import android.view.MotionEvent; import android.view.Surface; @@ -453,6 +454,7 @@ public class RotationButtonController { mUiEventLogger.log(RotationButtonEvent.ROTATION_SUGGESTION_ACCEPTED); incrementNumAcceptedRotationSuggestionsIfNeeded(); setRotationLockedAtAngle(mLastRotationSuggestion); + v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); } private boolean onRotateSuggestionHover(View v, MotionEvent event) {