Loading core/java/android/view/IWindowSession.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,12 @@ interface IWindowSession { @UnsupportedAppUsage boolean performHapticFeedback(int effectId, boolean always); /** * Called by attached views to perform predefined haptic feedback without requiring VIBRATE * permission. */ oneway void performHapticFeedbackAsync(int effectId, boolean always); /** * Initiate the drag operation itself * Loading core/java/android/view/ViewRootImpl.java +15 −1 Original line number Diff line number Diff line Loading @@ -279,6 +279,14 @@ 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 caption is drawn by the shell. * @hide Loading Loading @@ -8583,7 +8591,13 @@ public final class ViewRootImpl implements ViewParent, } try { if (USE_ASYNC_PERFORM_HAPTIC_FEEDBACK) { mWindowSession.performHapticFeedbackAsync(effectId, always); return true; } else { // Original blocking binder call path. return mWindowSession.performHapticFeedback(effectId, always); } } catch (RemoteException e) { return false; } Loading core/java/android/view/WindowlessWindowManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -465,6 +465,11 @@ public class WindowlessWindowManager implements IWindowSession { return false; } @Override public void performHapticFeedbackAsync(int effectId, boolean always) { performHapticFeedback(effectId, always); } @Override public android.os.IBinder performDrag(android.view.IWindow window, int flags, android.view.SurfaceControl surface, int touchSource, float touchX, float touchY, Loading services/core/java/com/android/server/wm/Session.java +5 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,11 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { } } @Override public void performHapticFeedbackAsync(int effectId, boolean always) { performHapticFeedback(effectId, always); } /* Drag/drop */ @Override Loading Loading
core/java/android/view/IWindowSession.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,12 @@ interface IWindowSession { @UnsupportedAppUsage boolean performHapticFeedback(int effectId, boolean always); /** * Called by attached views to perform predefined haptic feedback without requiring VIBRATE * permission. */ oneway void performHapticFeedbackAsync(int effectId, boolean always); /** * Initiate the drag operation itself * Loading
core/java/android/view/ViewRootImpl.java +15 −1 Original line number Diff line number Diff line Loading @@ -279,6 +279,14 @@ 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 caption is drawn by the shell. * @hide Loading Loading @@ -8583,7 +8591,13 @@ public final class ViewRootImpl implements ViewParent, } try { if (USE_ASYNC_PERFORM_HAPTIC_FEEDBACK) { mWindowSession.performHapticFeedbackAsync(effectId, always); return true; } else { // Original blocking binder call path. return mWindowSession.performHapticFeedback(effectId, always); } } catch (RemoteException e) { return false; } Loading
core/java/android/view/WindowlessWindowManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -465,6 +465,11 @@ public class WindowlessWindowManager implements IWindowSession { return false; } @Override public void performHapticFeedbackAsync(int effectId, boolean always) { performHapticFeedback(effectId, always); } @Override public android.os.IBinder performDrag(android.view.IWindow window, int flags, android.view.SurfaceControl surface, int touchSource, float touchX, float touchY, Loading
services/core/java/com/android/server/wm/Session.java +5 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,11 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { } } @Override public void performHapticFeedbackAsync(int effectId, boolean always) { performHapticFeedback(effectId, always); } /* Drag/drop */ @Override Loading