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

Commit 1528c875 authored by Jackal Guo's avatar Jackal Guo
Browse files

Correct return value of MagnificationController#reset

It only returns true if magnification changes from magnifying to
non-magnifying. This is inconsistent with the docs. Return true if
the magnification scale and center is reset.

Bug: 64616261
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I0c496c5c45c2e35025f1887842a2a9741c440af1
parent 6eac8af6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -860,7 +860,10 @@ abstract class AbstractAccessibilityServiceConnection extends IAccessibilityServ
        }
        final long identity = Binder.clearCallingIdentity();
        try {
            return mSystemSupport.getMagnificationController().reset(animate);
            MagnificationController magnificationController =
                    mSystemSupport.getMagnificationController();
            return (magnificationController.reset(animate)
                    || !magnificationController.isMagnifying());
        } finally {
            Binder.restoreCallingIdentity(identity);
        }