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

Commit 42121e83 authored by Roy Chou's avatar Roy Chou Committed by Android (Google) Code Review
Browse files

Merge "chore(magnification): cleanup flag usage of...

Merge "chore(magnification): cleanup flag usage of use_window_original_touchable_region_when_magnification_recompute_bounds" into main
parents fab1a590 eb2f4aae
Loading
Loading
Loading
Loading
+20 −30
Original line number Diff line number Diff line
@@ -984,7 +984,7 @@ final class AccessibilityController {
                Region touchableRegion = mTempRegion3;
                windowState.getTouchableRegion(touchableRegion);
                Region windowBounds = mTempRegion2;
                if (Flags.useWindowOriginalTouchableRegionWhenMagnificationRecomputeBounds()) {

                // For b/323366243, if using the bounds from touchableRegion.getBounds, in
                // non-magnifiable windowBounds computation, part of the non-touchableRegion
                // may be included into nonMagnifiedBounds. This will make users lose
@@ -1003,17 +1003,7 @@ final class AccessibilityController {
                        -windowState.getFrame().top);
                applyMatrixToRegion(matrix, touchableRegion);
                windowBounds.set(touchableRegion);
                } else {
                    Rect touchableFrame = mTempRect1;
                    touchableRegion.getBounds(touchableFrame);
                    RectF windowFrame = mTempRectF;
                    windowFrame.set(touchableFrame);
                    windowFrame.offset(-windowState.getFrame().left,
                            -windowState.getFrame().top);
                    matrix.mapRect(windowFrame);
                    windowBounds.set((int) windowFrame.left, (int) windowFrame.top,
                            (int) windowFrame.right, (int) windowFrame.bottom);
                }

                // Only update new regions
                Region portionOfWindowAlreadyAccountedFor = mTempRegion3;
                portionOfWindowAlreadyAccountedFor.set(mMagnificationRegion);