Loading core/java/android/os/vibrator/flags.aconfig +0 −7 Original line number Diff line number Diff line package: "android.os.vibrator" container: "system" flag { namespace: "haptics" name: "use_vibrator_haptic_feedback" description: "Enables performHapticFeedback to directly use the vibrator service instead of going through the window session" bug: "295459081" } flag { namespace: "haptics" name: "haptic_feedback_vibration_oem_customization_enabled" Loading core/java/android/view/IWindowSession.aidl +0 −9 Original line number Diff line number Diff line Loading @@ -140,15 +140,6 @@ interface IWindowSession { oneway void finishDrawing(IWindow window, in SurfaceControl.Transaction postDrawTransaction, int seqId); @UnsupportedAppUsage boolean performHapticFeedback(int effectId, int flags, int privFlags); /** * Called by attached views to perform predefined haptic feedback without requiring VIBRATE * permission. */ oneway void performHapticFeedbackAsync(int effectId, int flags, int privFlags); /** * Initiate the drag operation itself * Loading core/java/android/view/View.java +2 −25 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; import android.os.Vibrator; import android.os.vibrator.Flags; import android.service.credentials.CredentialProviderService; import android.sysprop.DisplayProperties; import android.text.InputType; Loading Loading @@ -5712,9 +5711,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private PointerIcon mMousePointerIcon; /** Vibrator for haptic feedback. */ private Vibrator mVibrator; /** * @hide */ Loading Loading @@ -28672,14 +28668,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } int privFlags = computeHapticFeedbackPrivateFlags(); if (Flags.useVibratorHapticFeedback()) { if (!mAttachInfo.canPerformHapticFeedback()) { return false; } getSystemVibrator().performHapticFeedback(feedbackConstant, "View#performHapticFeedback", flags, privFlags); return true; } return mAttachInfo.mRootCallbacks.performHapticFeedback(feedbackConstant, flags, privFlags); } Loading Loading @@ -28711,16 +28699,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, feedbackConstant, inputDeviceId, inputSource, flags, privFlags); } private Vibrator getSystemVibrator() { if (mVibrator != null) { return mVibrator; } return mVibrator = mContext.getSystemService(Vibrator.class); } private boolean isPerformHapticFeedbackSuppressed(int feedbackConstant, int flags) { if (feedbackConstant == HapticFeedbackConstants.NO_HAPTICS || mAttachInfo == null) { || mAttachInfo == null || mAttachInfo.mSession == null) { return true; } //noinspection SimplifiableIfStatement Loading Loading @@ -32342,11 +32324,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return events; } private boolean canPerformHapticFeedback() { return mSession != null && (mDisplay.getFlags() & Display.FLAG_TOUCH_FEEDBACK_DISABLED) == 0; } @Nullable ScrollCaptureInternal getScrollCaptureInternal() { if (mScrollCaptureInternal != null) { core/java/android/view/ViewRootImpl.java +3 −19 Original line number Diff line number Diff line Loading @@ -362,14 +362,6 @@ public final class ViewRootImpl implements ViewParent, */ private static final boolean ENABLE_INPUT_LATENCY_TRACKING = true; /** * Controls whether to use the new oneway performHapticFeedback call. This returns * true in a few more conditions, but doesn't affect which haptics happen. Notably, it * makes the call to performHapticFeedback non-blocking, which reduces potential UI jank. * This is intended as a temporary flag, ultimately becoming permanently 'true'. */ private static final boolean USE_ASYNC_PERFORM_HAPTIC_FEEDBACK = true; /** * Whether the client (system UI) is handling the transient gesture and the corresponding * animation. Loading Loading @@ -9675,17 +9667,9 @@ public final class ViewRootImpl implements ViewParent, return false; } try { if (USE_ASYNC_PERFORM_HAPTIC_FEEDBACK) { mWindowSession.performHapticFeedbackAsync(effectId, flags, privFlags); getSystemVibrator().performHapticFeedback( effectId, "ViewRootImpl#performHapticFeedback", flags, privFlags); return true; } else { // Original blocking binder call path. return mWindowSession.performHapticFeedback(effectId, flags, privFlags); } } catch (RemoteException e) { return false; } } @Override Loading core/java/android/view/WindowlessWindowManager.java +0 −10 Original line number Diff line number Diff line Loading @@ -503,16 +503,6 @@ public class WindowlessWindowManager implements IWindowSession { } } @Override public boolean performHapticFeedback(int effectId, int flags, int privFlags) { return false; } @Override public void performHapticFeedbackAsync(int effectId, int flags, int privFlags) { performHapticFeedback(effectId, flags, privFlags); } @Override public android.os.IBinder performDrag(android.view.IWindow window, int flags, android.view.SurfaceControl surface, int touchSource, int touchDeviceId, Loading Loading
core/java/android/os/vibrator/flags.aconfig +0 −7 Original line number Diff line number Diff line package: "android.os.vibrator" container: "system" flag { namespace: "haptics" name: "use_vibrator_haptic_feedback" description: "Enables performHapticFeedback to directly use the vibrator service instead of going through the window session" bug: "295459081" } flag { namespace: "haptics" name: "haptic_feedback_vibration_oem_customization_enabled" Loading
core/java/android/view/IWindowSession.aidl +0 −9 Original line number Diff line number Diff line Loading @@ -140,15 +140,6 @@ interface IWindowSession { oneway void finishDrawing(IWindow window, in SurfaceControl.Transaction postDrawTransaction, int seqId); @UnsupportedAppUsage boolean performHapticFeedback(int effectId, int flags, int privFlags); /** * Called by attached views to perform predefined haptic feedback without requiring VIBRATE * permission. */ oneway void performHapticFeedbackAsync(int effectId, int flags, int privFlags); /** * Initiate the drag operation itself * Loading
core/java/android/view/View.java +2 −25 Original line number Diff line number Diff line Loading @@ -142,7 +142,6 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; import android.os.Vibrator; import android.os.vibrator.Flags; import android.service.credentials.CredentialProviderService; import android.sysprop.DisplayProperties; import android.text.InputType; Loading Loading @@ -5712,9 +5711,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private PointerIcon mMousePointerIcon; /** Vibrator for haptic feedback. */ private Vibrator mVibrator; /** * @hide */ Loading Loading @@ -28672,14 +28668,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } int privFlags = computeHapticFeedbackPrivateFlags(); if (Flags.useVibratorHapticFeedback()) { if (!mAttachInfo.canPerformHapticFeedback()) { return false; } getSystemVibrator().performHapticFeedback(feedbackConstant, "View#performHapticFeedback", flags, privFlags); return true; } return mAttachInfo.mRootCallbacks.performHapticFeedback(feedbackConstant, flags, privFlags); } Loading Loading @@ -28711,16 +28699,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, feedbackConstant, inputDeviceId, inputSource, flags, privFlags); } private Vibrator getSystemVibrator() { if (mVibrator != null) { return mVibrator; } return mVibrator = mContext.getSystemService(Vibrator.class); } private boolean isPerformHapticFeedbackSuppressed(int feedbackConstant, int flags) { if (feedbackConstant == HapticFeedbackConstants.NO_HAPTICS || mAttachInfo == null) { || mAttachInfo == null || mAttachInfo.mSession == null) { return true; } //noinspection SimplifiableIfStatement Loading Loading @@ -32342,11 +32324,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return events; } private boolean canPerformHapticFeedback() { return mSession != null && (mDisplay.getFlags() & Display.FLAG_TOUCH_FEEDBACK_DISABLED) == 0; } @Nullable ScrollCaptureInternal getScrollCaptureInternal() { if (mScrollCaptureInternal != null) {
core/java/android/view/ViewRootImpl.java +3 −19 Original line number Diff line number Diff line Loading @@ -362,14 +362,6 @@ public final class ViewRootImpl implements ViewParent, */ private static final boolean ENABLE_INPUT_LATENCY_TRACKING = true; /** * Controls whether to use the new oneway performHapticFeedback call. This returns * true in a few more conditions, but doesn't affect which haptics happen. Notably, it * makes the call to performHapticFeedback non-blocking, which reduces potential UI jank. * This is intended as a temporary flag, ultimately becoming permanently 'true'. */ private static final boolean USE_ASYNC_PERFORM_HAPTIC_FEEDBACK = true; /** * Whether the client (system UI) is handling the transient gesture and the corresponding * animation. Loading Loading @@ -9675,17 +9667,9 @@ public final class ViewRootImpl implements ViewParent, return false; } try { if (USE_ASYNC_PERFORM_HAPTIC_FEEDBACK) { mWindowSession.performHapticFeedbackAsync(effectId, flags, privFlags); getSystemVibrator().performHapticFeedback( effectId, "ViewRootImpl#performHapticFeedback", flags, privFlags); return true; } else { // Original blocking binder call path. return mWindowSession.performHapticFeedback(effectId, flags, privFlags); } } catch (RemoteException e) { return false; } } @Override Loading
core/java/android/view/WindowlessWindowManager.java +0 −10 Original line number Diff line number Diff line Loading @@ -503,16 +503,6 @@ public class WindowlessWindowManager implements IWindowSession { } } @Override public boolean performHapticFeedback(int effectId, int flags, int privFlags) { return false; } @Override public void performHapticFeedbackAsync(int effectId, int flags, int privFlags) { performHapticFeedback(effectId, flags, privFlags); } @Override public android.os.IBinder performDrag(android.view.IWindow window, int flags, android.view.SurfaceControl surface, int touchSource, int touchDeviceId, Loading