diff options
| author | Julian Odell <juliano@google.com> | 2021-09-17 08:18:01 -0700 |
|---|---|---|
| committer | Julian Odell <juliano@google.com> | 2021-09-28 20:24:07 +0000 |
| commit | 7c3d133d65926ee79c65619d7ba237bcb9006c06 (patch) | |
| tree | 022cd35d64bcb6a8b97a47df176c2a53906910f0 /core/java/android | |
| parent | be0bdf6178e8084b928f8bd98ce3e0a1a53dd3d9 (diff) | |
Notify content capture on detach before setting attachInfo to null.
If a view is detached before being removed (which seems common with some
recycler list views) then no content capture view removed event is sent
(notifyAppearedOrDisappearedForContentCaptureIfNeeded does nothing
if mAttachInfo is null).
Fix: 200166989
Test: Manual verification using AiAi logging
Change-Id: Ic04af005bb4ad425ba8398439f1f47bb6bcb334c
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/View.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index f4223fb467f5..cf12955787b1 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -20830,13 +20830,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mPrivateFlags &= ~PFLAG_SCROLL_CONTAINER_ADDED; } + notifyAppearedOrDisappearedForContentCaptureIfNeeded(false); + mAttachInfo = null; if (mOverlay != null) { mOverlay.getOverlayView().dispatchDetachedFromWindow(); } notifyEnterOrExitForAutoFillIfNeeded(false); - notifyAppearedOrDisappearedForContentCaptureIfNeeded(false); } /** |
