commit | ac9cef964f1634541e1b29ec6d71270101e8982d | [log] [tgz] |
---|---|---|
author | Mark Renouf <mrenouf@google.com> | Wed May 18 19:17:47 2022 +0000 |
committer | Mark Renouf <mrenouf@google.com> | Wed May 18 19:25:05 2022 +0000 |
tree | d2906696667f24b1c4ba37fcd14cb17bef64cfd9 | |
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