diff options
| author | Mark Renouf <mrenouf@google.com> | 2022-05-18 19:17:47 +0000 |
|---|---|---|
| committer | Mark Renouf <mrenouf@google.com> | 2022-05-18 19:25:05 +0000 |
| commit | ac9cef964f1634541e1b29ec6d71270101e8982d (patch) | |
| tree | d2906696667f24b1c4ba37fcd14cb17bef64cfd9 /core/java/android/util/SparseBooleanArray.java | |
| parent | 5843318c842052f1afb5748c8cfb6e067527bc7b (diff) | |
Avoid NPE on ScrollCaptureConnection callbacks
State is checked at the front half of some calls, but is
dispatched onto the UI thread. If the connection is closed
in this time, the queued call will NPE when the field it
uses is cleared.
This adds a simple null check in two places, and test for both.
Bug: 232375183
Test: atest ScrollCaptureConnectionTest
Change-Id: Ida7fbf0a21c206db8d774dc247b6ab5257dacabe
Diffstat (limited to 'core/java/android/util/SparseBooleanArray.java')
0 files changed, 0 insertions, 0 deletions
