Improve handwriting Ink window lifetime

1. When the system removes the last known stylus device
and has no other stylus available, remove the Ink window.

2. Create InkWindow only if the device+IME combination supports
handwriting and the stylus is being used.

Bug: 243571274
Bug: 239121683
Bug: 210039666

Test: atest StylusHandwritingTest
Change-Id: Icd3eea91fe144cff7100d3ecf19191c064c0d196
This commit is contained in:
Taran Singh
2022-08-11 18:32:47 +00:00
parent b40e48cd51
commit f092a7cb23
7 changed files with 129 additions and 54 deletions

View File

@@ -40,7 +40,6 @@ oneway interface IInputMethod {
IBinder token;
IInputMethodPrivilegedOperations privilegedOperations;
int configChanges;
boolean stylusHandWritingSupported;
int navigationBarFlags;
}
@@ -86,4 +85,6 @@ oneway interface IInputMethod {
void initInkWindow();
void finishStylusHandwriting();
void removeStylusHandwritingWindow();
}