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

Commit 78fe6e71 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Workaround for slow -1 drawing when swiping home" into tm-qpr-dev am:...

Merge "Workaround for slow -1 drawing when swiping home" into tm-qpr-dev am: 2a6ddead am: e3c14772

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20033709



Change-Id: I00ab9197399b6169396a3dfadc8fef9d1830f1aa
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 16d89714 e3c14772
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class RecentsAnimationController implements DeathRecipient {
    private boolean mWillFinishToHome = false;
    private final Runnable mFailsafeRunnable = this::onFailsafe;

    // The recents component app token that is shown behind the visibile tasks
    // The recents component app token that is shown behind the visible tasks
    private ActivityRecord mTargetActivityRecord;
    private DisplayContent mDisplayContent;
    private int mTargetActivityType;
@@ -456,6 +456,22 @@ public class RecentsAnimationController implements DeathRecipient {
        }
    }

    /**
     * Return whether the given window should still be considered interesting for the all-drawn
     * state.  This is only interesting for the target app, which may have child windows that are
     * not actually visible and should not be considered interesting and waited upon.
     */
    protected boolean isInterestingForAllDrawn(WindowState window) {
        if (isTargetApp(window.getActivityRecord())) {
            if (window.getWindowType() != TYPE_BASE_APPLICATION
                    && window.getAttrs().alpha == 0f) {
                // If there is a cihld window that is alpha 0, then ignore that window
                return false;
            }
        }
        // By default all windows are still interesting for all drawn purposes
        return true;
    }

    /**
     * Whether a task should be filtered from the recents animation. This can be true for tasks
+5 −1
Original line number Diff line number Diff line
@@ -2042,9 +2042,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * it must be drawn before allDrawn can become true.
     */
    boolean isInteresting() {
        final RecentsAnimationController recentsAnimationController =
                mWmService.getRecentsAnimationController();
        return mActivityRecord != null && !mAppDied
                && (!mActivityRecord.isFreezingScreen() || !mAppFreezing)
                && mViewVisibility == View.VISIBLE;
                && mViewVisibility == View.VISIBLE
                && (recentsAnimationController == null
                         || recentsAnimationController.isInterestingForAllDrawn(this));
    }

    /**