From d98f037ab26551e1a3aa1d4fa4e12394f7182f27 Mon Sep 17 00:00:00 2001 From: Taran Singh Date: Wed, 9 Mar 2022 20:22:20 +0000 Subject: Finish handwriting session for recents gesture Finish stylus handwriting session when user swipes to recent. Bug: 223748964 Test: Manually: 1. Open an app with editor 2. swipe on editor with stylus [or emulated stylus] 3. Observe ink trail drawn on screen 4. quickly sipe to recents, ink should go away. 5. repeat steps 1-3 for swipe to home Change-Id: Id750ff55cb447247c3eca75daf37cb5aeb1d0cfa --- core/java/android/inputmethodservice/InputMethodService.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'core/java/android/inputmethodservice/InputMethodService.java') diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index b46bb3257c86..4fdd53425328 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -992,6 +992,15 @@ public class InputMethodService extends AbstractInputMethodService { mOnPreparedStylusHwCalled = true; } + /** + * {@inheritDoc} + * @hide + */ + @Override + public void finishStylusHandwriting() { + InputMethodService.this.finishStylusHandwriting(); + } + /** * {@inheritDoc} */ @@ -2461,7 +2470,7 @@ public class InputMethodService extends AbstractInputMethodService { mHandwritingEventReceiver = null; mInkWindow.hide(false /* remove */); - mPrivOps.finishStylusHandwriting(requestId); + mPrivOps.resetStylusHandwriting(requestId); mOnPreparedStylusHwCalled = false; onFinishStylusHandwriting(); } -- cgit v1.2.3