Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8aaa38d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Magnifier-60] Fix race condition after #dismiss"

parents c52784e2 ddcd5481
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -215,11 +215,11 @@ public final class Magnifier {
            final Point windowCoords = getCurrentClampedWindowCoordinates();
            final InternalPopupWindow currentWindowInstance = mWindow;
            sPixelCopyHandlerThread.getThreadHandler().post(() -> {
                synchronized (mLock) {
                    if (mWindow != currentWindowInstance) {
                        // The magnifier was dismissed (and maybe shown again) in the meantime.
                        return;
                    }
                synchronized (mLock) {
                    mWindow.setContentPositionForNextDraw(windowCoords.x, windowCoords.y);
                }
            });