diff options
| author | 2023-07-31 19:11:16 +0000 | |
|---|---|---|
| committer | 2023-07-31 19:11:16 +0000 | |
| commit | e5c151fdf1694b4948beddffa19b7a4daed1b8b5 (patch) | |
| tree | c4659147dd3ee8390e06428b0c4f646d756883c1 | |
| parent | e0b285984e86e9380e901399f36b181e8f89fd22 (diff) | |
| parent | f3b13f106f0d9811db4d283210fbf55b83cd88dc (diff) | |
Merge "Dont finish handwriting inking was prepared for session" into udc-qpr-dev am: f3b13f106f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24023608
Change-Id: If0d4b96c4b2b4a737a2d882f51849beca846e336
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 7b5dd55f385b..795eb4a737ef 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -1019,8 +1019,9 @@ public class InputMethodService extends AbstractInputMethodService { if (!mOnPreparedStylusHwCalled) { // prepare hasn't been called by Stylus HOVER. onPrepareStylusHandwriting(); - mOnPreparedStylusHwCalled = true; } + // reset flag as it's not relevant after onStartStylusHandwriting(). + mOnPreparedStylusHwCalled = false; if (onStartStylusHandwriting()) { cancelStylusWindowIdleTimeout(); mPrivOps.onStylusHandwritingReady(requestId, Process.myPid()); @@ -3089,7 +3090,8 @@ public class InputMethodService extends AbstractInputMethodService { mInputStarted = false; mStartedInputConnection = null; mCurCompletions = null; - if (mInkWindow != null) { + if (!mOnPreparedStylusHwCalled) { + // If IME didn't prepare to show InkWindow for current handwriting session. finishStylusHandwriting(); } // Back callback is typically unregistered in {@link #hideWindow()}, but it's possible |