diff options
| author | 2023-09-15 02:08:07 +0000 | |
|---|---|---|
| committer | 2023-09-15 23:14:34 +0000 | |
| commit | de65dbe0c382c23c3a158970409d5033ca583c2b (patch) | |
| tree | 627670eb72c76258756c1e76aa5f858d5ecf6ad5 | |
| parent | 433adc3e3f729e93a80312aa6d7b9219ac6b061b (diff) | |
Explicitly remove InkWindow from WM
Remove InkWindow from WM instead of marking decorView GONE.
Bug: 300546382
Test: atest StylusHandwritingTest and also verify manually that there are no dormant windows in "adb shell dumpsys window windows" using steps in bug.
Change-Id: I3b2e7c8271dd60b189d30a226a9483fb3c5cdcd9
| -rw-r--r-- | core/java/android/inputmethodservice/InkWindow.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/InkWindow.java b/core/java/android/inputmethodservice/InkWindow.java index 24d1c9577f82..1b8d925ec1cd 100644 --- a/core/java/android/inputmethodservice/InkWindow.java +++ b/core/java/android/inputmethodservice/InkWindow.java @@ -104,7 +104,11 @@ final class InkWindow extends PhoneWindow { */ void hide(boolean remove) { if (getDecorView() != null) { - getDecorView().setVisibility(remove ? View.GONE : View.INVISIBLE); + if (remove) { + mWindowManager.removeViewImmediate(getDecorView()); + } else { + getDecorView().setVisibility(View.INVISIBLE); + } } } |