diff options
| author | 2024-03-01 00:33:14 +0000 | |
|---|---|---|
| committer | 2024-03-01 01:43:13 +0000 | |
| commit | aa6eda4416353129c6c973af1fc1ceaa6b149b09 (patch) | |
| tree | d55f24963ec8106cf375404e4c8534359e075bd1 /tests/SystemUIDemoModeController | |
| parent | cb5c34af4ba852aa1fbd354cba493bb97a46c47a (diff) | |
Close the decoration before removing it from the cache
This is a speculative fix for a NullPointerException triggered
in DesktopModeTouchEventListener#onTouch where obtaining a decoration
returns null unexpectedly.
A task closing while the caption window still has a touch target ends
up dispatching one final MotionEvent (cancel) to the caption window
touch listener, who expects a non-null decoration to be found in the
decoration cache. This dispatching is triggered by
WindowDecoration#close, which is called by #destroyWindowDecoration.
However, right before #close is called, the decoration was cleaned up
from the decoration cache, guaranteeing a NPE when the motion event is
handled.
This change moves the clean up until after WindowDecoration#close is
called, to allow the touch handler to still have a valid reference to
the closing decoration when it receives the final motion event.
Fix: 327664694
Fix: 323347594
Test: m
Change-Id: I1a0e8370453f59d81735f024093579a0fbe3324c
Diffstat (limited to 'tests/SystemUIDemoModeController')
0 files changed, 0 insertions, 0 deletions