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

Commit 935b9b0b authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge "Fixed flicker when docking task from recents." into nyc-dev am: bc0a5cb2 am: 3f8b2621

am: a6611e98

* commit 'a6611e98':
  Fixed flicker when docking task from recents.

Change-Id: Ie7e49704c08e3ba0630f3bf0f52b34fec5d6451d
parents 1f43e356 a6611e98
Loading
Loading
Loading
Loading
+9 −7
Original line number Original line Diff line number Diff line
@@ -1819,22 +1819,24 @@ final class ActivityStack {
    private boolean shouldBeVisible(ActivityRecord r, boolean behindTranslucentActivity,
    private boolean shouldBeVisible(ActivityRecord r, boolean behindTranslucentActivity,
            boolean stackVisibleBehind, ActivityRecord visibleBehind,
            boolean stackVisibleBehind, ActivityRecord visibleBehind,
            boolean behindFullscreenActivity) {
            boolean behindFullscreenActivity) {
        // mLaunchingBehind: Activities launching behind are at the back of the task stack
        // but must be drawn initially for the animation as though they were visible.
        final boolean activityVisibleBehind =
                (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;


        if (!okToShowLocked(r)) {
        if (!okToShowLocked(r)) {
            return false;
            return false;
        }
        }


        // mLaunchingBehind: Activities launching behind are at the back of the task stack
        // but must be drawn initially for the animation as though they were visible.
        final boolean activityVisibleBehind =
                (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;

        boolean isVisible =
        boolean isVisible =
                !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind;
                !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind;


        if (isVisible && r.isRecentsActivity()) {
        if (isVisible && r.isRecentsActivity()) {
            // Recents activity can only be visible if the home stack isn't fullscreen or is the
            // Recents activity can only be visible if the home stack is the focused stack or we are
            // focused stack.
            // in split-screen mode.
            isVisible = !mFullscreen || mStackSupervisor.isFocusedStack(this);
            isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null
                    || mStackSupervisor.isFocusedStack(this);
        }
        }


        return isVisible;
        return isVisible;