Add haptic feedback to rotation button am: eab69869a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16465449 Change-Id: Ic386ca454ddbeb2c53146c923aca10a20f8ce4db
This commit is contained in:
@@ -36,6 +36,7 @@ import android.os.Looper;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.HapticFeedbackConstants;
|
||||||
import android.view.IRotationWatcher;
|
import android.view.IRotationWatcher;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
@@ -453,6 +454,7 @@ public class RotationButtonController {
|
|||||||
mUiEventLogger.log(RotationButtonEvent.ROTATION_SUGGESTION_ACCEPTED);
|
mUiEventLogger.log(RotationButtonEvent.ROTATION_SUGGESTION_ACCEPTED);
|
||||||
incrementNumAcceptedRotationSuggestionsIfNeeded();
|
incrementNumAcceptedRotationSuggestionsIfNeeded();
|
||||||
setRotationLockedAtAngle(mLastRotationSuggestion);
|
setRotationLockedAtAngle(mLastRotationSuggestion);
|
||||||
|
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean onRotateSuggestionHover(View v, MotionEvent event) {
|
private boolean onRotateSuggestionHover(View v, MotionEvent event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user