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

Commit 1e84af1a authored by Roy Chou's avatar Roy Chou
Browse files

fix(#Magnification): check activated instead of scale to notify magnifier when transitions

In AccessibilityController, when transitions we adjust to check isForceShowingMagnifiableBounds() to decide whether to sent transition events to magnifier. Originally it checks viewport scale > 1.0, but when scale = 1.0 the magnifier might be activatd and thus need to be notified when the events. Therefore, we change to check isForceShowingMagnifiableBounds(), which returns true iff the fullscreen magnifier is activated.

Bug: 271257917
Test: manually
Change-Id: I9c8fd68fa605a59ba0b2a4e082366ee27ed06aaa
parent 470999f6
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -702,8 +702,8 @@ final class AccessibilityController {
                        + AppTransition.appTransitionOldToString(transition)
                        + " displayId: " + displayId);
            }
            final boolean magnifying = mMagnifedViewport.isMagnifying();
            if (magnifying) {
            final boolean isMagnifierActivated = isForceShowingMagnifiableBounds();
            if (isMagnifierActivated) {
                switch (transition) {
                    case WindowManager.TRANSIT_OLD_ACTIVITY_OPEN:
                    case WindowManager.TRANSIT_OLD_TASK_FRAGMENT_OPEN:
@@ -727,8 +727,8 @@ final class AccessibilityController {
                Slog.i(LOG_TAG, "Window transition: " + WindowManager.transitTypeToString(type)
                        + " displayId: " + displayId);
            }
            final boolean magnifying = mMagnifedViewport.isMagnifying();
            if (magnifying) {
            final boolean isMagnifierActivated = isForceShowingMagnifiableBounds();
            if (isMagnifierActivated) {
                // All opening/closing situations.
                switch (type) {
                    case WindowManager.TRANSIT_OPEN:
@@ -751,12 +751,12 @@ final class AccessibilityController {
                        + AppTransition.appTransitionOldToString(transition)
                        + " displayId: " + windowState.getDisplayId());
            }
            final boolean magnifying = mMagnifedViewport.isMagnifying();
            final boolean isMagnifierActivated = isForceShowingMagnifiableBounds();
            final int type = windowState.mAttrs.type;
            switch (transition) {
                case WindowManagerPolicy.TRANSIT_ENTER:
                case WindowManagerPolicy.TRANSIT_SHOW: {
                    if (!magnifying) {
                    if (!isMagnifierActivated) {
                        break;
                    }
                    switch (type) {