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

Commit eb2f4aae authored by Roy Chou's avatar Roy Chou
Browse files

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

chore(magnification): cleanup flag usage of use_window_original_touchable_region_when_magnification_recompute_bounds

The bug-fix flag is already soaking in trunkfood full stage for a while.
Since there is no coming issues related to the fix, we can apply the fix
and remove the flag usage.

Bug: 341202777
Flag: NONE
Test: manually
      atest AccessibilityMagnificationTest
Change-Id: I6680fbb3444db65c100638b07b42f39ba9e43f3c
parent 902a4fa9
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);