diff options
| author | 2022-09-12 18:01:15 +0800 | |
|---|---|---|
| committer | 2022-09-14 00:56:42 +0800 | |
| commit | 7b5ae86566d103d16f27f4c08f4a1f9e41738a92 (patch) | |
| tree | 574caf70466f325c887658d1edb26c5669cc25ac /services/coverage/java | |
| parent | 4a8abca2d87fc93137edcacf7ab2979c3232add2 (diff) | |
Fix a potential NPE after scheduleShowImePostLayout
When IME control targets request showing IME,
ImeInsetsSourceProvider#scheduleShowImePostLayout will end up being
called to schedule showInsets with a runner in the next layout.
However, there is a timing that the target may be removed before the
runner invoked (e.g. force-stop the app), and seeing
"uncaught exception in WindowManager" log from
applySurfaceChangesTransaction. Even though the exception won't make the
system server crash, it's still a potential risk.
Add a check in isReadyToShowIme() to ensure the control target is ready
to call showInsets when exists.
Fix: 244715663
Test: run atest CtsInputMethodTestCases without seeing "uncaught
exception in WindowManager" log during force-stop test packages.
Test: atest ImeInsetsSourceProviderTest
Change-Id: I5327077c2e7292f508d5141125738be46400e5d0
Diffstat (limited to 'services/coverage/java')
0 files changed, 0 insertions, 0 deletions