From 66121902a51b67ef29bd24cc42b5b6201fa52ad6 Mon Sep 17 00:00:00 2001 From: TYM Tsai Date: Tue, 3 Dec 2019 14:52:15 +0800 Subject: Fix crash after destroyed Remove the touch listener while destroyed to avoid causing the IllegalStateException. Fixes: 144703050 Test: atest CtsAutoFillServiceTestCases Change-Id: I04b30fa3cef5bea00a4dbd9957cae8246f09a802 (cherry picked from commit 93e16223652c635cb79739e2fea2ed8d4283556e) --- core/java/android/service/autofill/augmented/FillWindow.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/java/android/service/autofill/augmented/FillWindow.java b/core/java/android/service/autofill/augmented/FillWindow.java index 6a29d485b997..5d003706ac83 100644 --- a/core/java/android/service/autofill/augmented/FillWindow.java +++ b/core/java/android/service/autofill/augmented/FillWindow.java @@ -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); } -- cgit v1.2.3-59-g8ed1b