summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorFeng Cao <fengcao@google.com>2020-05-13 11:54:40 -0700
committerFeng Cao <fengcao@google.com>2020-05-13 11:55:58 -0700
commit723ba2e82bb7ab37742e5e46c23fffa43e3a1f13 (patch)
tree3a823810dce64cc0b021fb897f53c4bc696b8afe /tools/aapt2/java/JavaClassGenerator_test.cpp
parent7a57308262e4cfdb6482e18cecea32d57511ade3 (diff)
Fix inline suggestion ref counting to not over-count
* Imagine this event sequence: 1) the IME tries to re-attach an inline suggestion view to the window (e.g. because IME layout changes), it calls into the system server which causes recreating the backing view because it was destroyed earlier due to 0 ref-count (this happens under the hood without IME knowing it happens, so the view is still attached to the window). 2) the IME receives a new inline suggestion pointing to the same backing view (perhaps due to filtering kicks in). 3) the recreation from step 1 finishes, but now it will callback to the new inline suggestion, therefore the old view doesn't receive the new SurfacePackage. See RemoteInlineSuggestionUi for why. 4) the view in step 1 is detached from window, since it never receives a SurfacePackage from the remote view, its detach shouldn't cause a reference count down on the remote view. Test: atest android.autofillservice.cts.inline (sanity test) Bug: 154683107 Change-Id: I2e6814ef3889de603f6e170efcb795b69ec9febe
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions