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

Commit 31934942 authored by Winson Chung's avatar Winson Chung
Browse files

Remove assumptions about specific transition types for identifying recents

- There is not particular guarantee that transitions will be started
  with a specific type, in this case, we already set
  TRANSIT_FLAG_IS_RECENTS when starting a transient transition to
  home, so we can just check that directly

Fixes: 398161346
Flag: com.android.wm.shell.enable_recents_bookend_transition
Test: atest FullScreenMagnificationGestureHandlerTest
Change-Id: I35cc0b15598385896321d570e14983be9a0cf4a0
parent 81abb3be
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -712,12 +712,16 @@ final class AccessibilityController {
            if (!isMagnifierActivated) {
                return;
            }
            // All opening/closing situations.
            // All opening/closing/recents transitions
            boolean notify = (flags & TRANSIT_FLAG_IS_RECENTS) != 0;
            switch (type) {
                case WindowManager.TRANSIT_OPEN:
                case WindowManager.TRANSIT_TO_FRONT:
                case WindowManager.TRANSIT_CLOSE:
                case WindowManager.TRANSIT_TO_BACK:
                    notify = true;
            }
            if (notify) {
                mUserContextChangedNotifier.onWMTransition(type, flags);
            }
        }
@@ -1088,8 +1092,7 @@ final class AccessibilityController {
            // causing the notifying, or the recents/home window is removed, then we won't need the
            // delayed notification anymore.
            void onWMTransition(@TransitionType int type, @TransitionFlags int flags) {
                if (type == WindowManager.TRANSIT_TO_FRONT
                        && (flags & TRANSIT_FLAG_IS_RECENTS) != 0) {
                if ((flags & TRANSIT_FLAG_IS_RECENTS) != 0) {
                    // Delay the recents to front transition notification then send after if needed.
                    mHasDelayedNotificationForRecentsToFrontTransition = true;
                } else {