Fix crash after destroyed

Remove the touch listener while destroyed to avoid causing the
IllegalStateException.

Fixes: 144703050
Test: atest CtsAutoFillServiceTestCases
Change-Id: I04b30fa3cef5bea00a4dbd9957cae8246f09a802
This commit is contained in:
TYM Tsai
2019-12-03 14:52:15 +08:00
parent 14a2a901bd
commit 93e1622365

View File

@@ -242,6 +242,7 @@ public final class FillWindow implements AutoCloseable {
synchronized (mLock) {
if (mDestroyed) return;
if (mUpdateCalled) {
mFillView.setOnClickListener(null);
hide();
mProxy.report(AutofillProxy.REPORT_EVENT_UI_DESTROYED);
}