OSDN Git Service

[Magnifier-25] Fix race condition after #dismiss
authorMihai Popa <popam@google.com>
Thu, 22 Feb 2018 19:30:24 +0000 (19:30 +0000)
committerMihai Popa <popam@google.com>
Thu, 22 Feb 2018 19:30:24 +0000 (19:30 +0000)
commit39a71338939f419ddf7faaacb73f82371cb7db16
tree43d5aa2bc1947ae7a26d9eb89eec4adfd02a4f64
parent3d529f764e4b1ef37db095d1436729e8f7b7c430
[Magnifier-25] Fix race condition after #dismiss

The CL adds synchronization around the InternalPopupWindow instance
used, between the main thread and the thread that handles pixel copy
results. This comes to fix a potential null pointer exception that
might occur after a #dismiss().

Bug: 73765118
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I8a8feb02f3ee418597ce3eee50db77b4b67e462e
core/java/android/widget/Magnifier.java