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

Commit 92ad2eed authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correct stackstack typo"

parents b43a529e 64e77cf3
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -1452,17 +1452,17 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    /**
    /**
     * @return The primary split-screen stack, but only if it is visible, and {@code null} otherwise.
     * @return The primary split-screen stack, but only if it is visible, and {@code null} otherwise.
     */
     */
    TaskStack getSplitScreenPrimaryStackStack() {
    TaskStack getSplitScreenPrimaryStack() {
        TaskStack stack = mTaskStackContainers.getSplitScreenPrimaryStackStack();
        TaskStack stack = mTaskStackContainers.getSplitScreenPrimaryStack();
        return (stack != null && stack.isVisible()) ? stack : null;
        return (stack != null && stack.isVisible()) ? stack : null;
    }
    }


    /**
    /**
     * Like {@link #getSplitScreenPrimaryStackStack}, but also returns the stack if it's currently
     * Like {@link #getSplitScreenPrimaryStack}, but also returns the stack if it's currently
     * not visible.
     * not visible.
     */
     */
    TaskStack getSplitScreenPrimaryStackStackIgnoringVisibility() {
    TaskStack getSplitScreenPrimaryStackIgnoringVisibility() {
        return mTaskStackContainers.getSplitScreenPrimaryStackStack();
        return mTaskStackContainers.getSplitScreenPrimaryStack();
    }
    }


    TaskStack getPinnedStack() {
    TaskStack getPinnedStack() {
@@ -1877,7 +1877,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            mTouchExcludeRegion.op(mTmpRegion, Region.Op.UNION);
            mTouchExcludeRegion.op(mTmpRegion, Region.Op.UNION);
        }
        }
        // TODO(multi-display): Support docked stacks on secondary displays.
        // TODO(multi-display): Support docked stacks on secondary displays.
        if (mDisplayId == DEFAULT_DISPLAY && getSplitScreenPrimaryStackStack() != null) {
        if (mDisplayId == DEFAULT_DISPLAY && getSplitScreenPrimaryStack() != null) {
            mDividerControllerLocked.getTouchRegion(mTmpRect);
            mDividerControllerLocked.getTouchRegion(mTmpRect);
            mTmpRegion.set(mTmpRect);
            mTmpRegion.set(mTmpRect);
            mTouchExcludeRegion.op(mTmpRegion, Op.UNION);
            mTouchExcludeRegion.op(mTmpRegion, Op.UNION);
@@ -2232,7 +2232,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
        if (pinnedStack != null) {
        if (pinnedStack != null) {
            pw.println(prefix + "pinnedStack=" + pinnedStack.getName());
            pw.println(prefix + "pinnedStack=" + pinnedStack.getName());
        }
        }
        final TaskStack splitScreenPrimaryStack = getSplitScreenPrimaryStackStack();
        final TaskStack splitScreenPrimaryStack = getSplitScreenPrimaryStack();
        if (splitScreenPrimaryStack != null) {
        if (splitScreenPrimaryStack != null) {
            pw.println(prefix + "splitScreenPrimaryStack=" + splitScreenPrimaryStack.getName());
            pw.println(prefix + "splitScreenPrimaryStack=" + splitScreenPrimaryStack.getName());
        }
        }
@@ -3401,7 +3401,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            return mPinnedStack;
            return mPinnedStack;
        }
        }


        TaskStack getSplitScreenPrimaryStackStack() {
        TaskStack getSplitScreenPrimaryStack() {
            return mSplitScreenPrimaryStack;
            return mSplitScreenPrimaryStack;
        }
        }


+8 −8
Original line number Original line Diff line number Diff line
@@ -321,7 +321,7 @@ public class DockedStackDividerController implements DimLayerUser {
        if (mWindow == null) {
        if (mWindow == null) {
            return;
            return;
        }
        }
        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();


        // If the stack is invisible, we policy force hide it in WindowAnimator.shouldForceHide
        // If the stack is invisible, we policy force hide it in WindowAnimator.shouldForceHide
        final boolean visible = stack != null;
        final boolean visible = stack != null;
@@ -361,7 +361,7 @@ public class DockedStackDividerController implements DimLayerUser {
    }
    }


    void positionDockedStackedDivider(Rect frame) {
    void positionDockedStackedDivider(Rect frame) {
        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackStack();
        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStack();
        if (stack == null) {
        if (stack == null) {
            // Unfortunately we might end up with still having a divider, even though the underlying
            // Unfortunately we might end up with still having a divider, even though the underlying
            // stack was already removed. This is because we are on AM thread and the removal of the
            // stack was already removed. This is because we are on AM thread and the removal of the
@@ -458,7 +458,7 @@ public class DockedStackDividerController implements DimLayerUser {
        long animDuration = 0;
        long animDuration = 0;
        if (animate) {
        if (animate) {
            final TaskStack stack =
            final TaskStack stack =
                    mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
                    mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
            final long transitionDuration = isAnimationMaximizing()
            final long transitionDuration = isAnimationMaximizing()
                    ? mService.mAppTransition.getLastClipRevealTransitionDuration()
                    ? mService.mAppTransition.getLastClipRevealTransitionDuration()
                    : DEFAULT_APP_TRANSITION_DURATION;
                    : DEFAULT_APP_TRANSITION_DURATION;
@@ -513,7 +513,7 @@ public class DockedStackDividerController implements DimLayerUser {
        mDockedStackListeners.register(listener);
        mDockedStackListeners.register(listener);
        notifyDockedDividerVisibilityChanged(wasVisible());
        notifyDockedDividerVisibilityChanged(wasVisible());
        notifyDockedStackExistsChanged(
        notifyDockedStackExistsChanged(
                mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility() != null);
                mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility() != null);
        notifyDockedStackMinimizedChanged(mMinimizedDock, false /* animate */,
        notifyDockedStackMinimizedChanged(mMinimizedDock, false /* animate */,
                isHomeStackResizable());
                isHomeStackResizable());
        notifyAdjustedForImeChanged(mAdjustedForIme, 0 /* animDuration */);
        notifyAdjustedForImeChanged(mAdjustedForIme, 0 /* animDuration */);
@@ -531,7 +531,7 @@ public class DockedStackDividerController implements DimLayerUser {
        final TaskStack stack = targetWindowingMode != WINDOWING_MODE_UNDEFINED
        final TaskStack stack = targetWindowingMode != WINDOWING_MODE_UNDEFINED
                ? mDisplayContent.getStack(targetWindowingMode)
                ? mDisplayContent.getStack(targetWindowingMode)
                : null;
                : null;
        final TaskStack dockedStack = mDisplayContent.getSplitScreenPrimaryStackStack();
        final TaskStack dockedStack = mDisplayContent.getSplitScreenPrimaryStack();
        boolean visibleAndValid = visible && stack != null && dockedStack != null;
        boolean visibleAndValid = visible && stack != null && dockedStack != null;
        if (visibleAndValid) {
        if (visibleAndValid) {
            stack.getDimBounds(mTmpRect);
            stack.getDimBounds(mTmpRect);
@@ -616,7 +616,7 @@ public class DockedStackDividerController implements DimLayerUser {
    }
    }


    private void checkMinimizeChanged(boolean animate) {
    private void checkMinimizeChanged(boolean animate) {
        if (mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility() == null) {
        if (mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility() == null) {
            return;
            return;
        }
        }
        final TaskStack homeStack = mDisplayContent.getHomeStack();
        final TaskStack homeStack = mDisplayContent.getHomeStack();
@@ -778,7 +778,7 @@ public class DockedStackDividerController implements DimLayerUser {
    }
    }


    private boolean setMinimizedDockedStack(boolean minimized) {
    private boolean setMinimizedDockedStack(boolean minimized) {
        final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
        final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
        notifyDockedStackMinimizedChanged(minimized, false /* animate */, isHomeStackResizable());
        notifyDockedStackMinimizedChanged(minimized, false /* animate */, isHomeStackResizable());
        return stack != null && stack.setAdjustedForMinimizedDock(minimized ? 1f : 0f);
        return stack != null && stack.setAdjustedForMinimizedDock(minimized ? 1f : 0f);
    }
    }
@@ -829,7 +829,7 @@ public class DockedStackDividerController implements DimLayerUser {
    }
    }


    private boolean animateForMinimizedDockedStack(long now) {
    private boolean animateForMinimizedDockedStack(long now) {
        final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
        final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
        if (!mAnimationStarted) {
        if (!mAnimationStarted) {
            mAnimationStarted = true;
            mAnimationStarted = true;
            mAnimationStartTime = now;
            mAnimationStartTime = now;
+1 −1
Original line number Original line Diff line number Diff line
@@ -419,7 +419,7 @@ class Task extends WindowContainer<AppWindowToken> implements DimLayer.DimLayerU
        return mFillsParent
        return mFillsParent
                || !inSplitScreenSecondaryWindowingMode()
                || !inSplitScreenSecondaryWindowingMode()
                || displayContent == null
                || displayContent == null
                || displayContent.getSplitScreenPrimaryStackStackIgnoringVisibility() != null;
                || displayContent.getSplitScreenPrimaryStackIgnoringVisibility() != null;
    }
    }


    /** Original bounds of the task if applicable, otherwise fullscreen rect. */
    /** Original bounds of the task if applicable, otherwise fullscreen rect. */
+3 −3
Original line number Original line Diff line number Diff line
@@ -294,7 +294,7 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
        if (mFillsParent
        if (mFillsParent
                || !inSplitScreenSecondaryWindowingMode()
                || !inSplitScreenSecondaryWindowingMode()
                || mDisplayContent == null
                || mDisplayContent == null
                || mDisplayContent.getSplitScreenPrimaryStackStack() != null) {
                || mDisplayContent.getSplitScreenPrimaryStack() != null) {
            return true;
            return true;
        }
        }
        return false;
        return false;
@@ -693,7 +693,7 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
                "animation background stackId=" + mStackId);
                "animation background stackId=" + mStackId);


        Rect bounds = null;
        Rect bounds = null;
        final TaskStack dockedStack = dc.getSplitScreenPrimaryStackStackIgnoringVisibility();
        final TaskStack dockedStack = dc.getSplitScreenPrimaryStackIgnoringVisibility();
        if (inSplitScreenPrimaryWindowingMode()
        if (inSplitScreenPrimaryWindowingMode()
                || (dockedStack != null && inSplitScreenSecondaryWindowingMode()
                || (dockedStack != null && inSplitScreenSecondaryWindowingMode()
                        && !dockedStack.fillsParent())) {
                        && !dockedStack.fillsParent())) {
@@ -773,7 +773,7 @@ public class TaskStack extends WindowContainer<Task> implements DimLayer.DimLaye
        }
        }


        final TaskStack dockedStack =
        final TaskStack dockedStack =
                mDisplayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
                mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
        if (dockedStack == null) {
        if (dockedStack == null) {
            // Not sure why you are calling this method when there is no docked stack...
            // Not sure why you are calling this method when there is no docked stack...
            throw new IllegalStateException(
            throw new IllegalStateException(
+2 −4
Original line number Original line Diff line number Diff line
@@ -80,7 +80,6 @@ import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIO
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_BOOT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_BOOT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_CONFIGURATION;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_CONFIGURATION;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DISPLAY;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DISPLAY;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_DRAG;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT_METHOD;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT_METHOD;
@@ -202,7 +201,6 @@ import android.view.IWindowSession;
import android.view.IWindowSessionCallback;
import android.view.IWindowSessionCallback;
import android.view.InputChannel;
import android.view.InputChannel;
import android.view.InputDevice;
import android.view.InputDevice;
import android.view.InputEvent;
import android.view.InputEventReceiver;
import android.view.InputEventReceiver;
import android.view.KeyEvent;
import android.view.KeyEvent;
import android.view.MagnificationSpec;
import android.view.MagnificationSpec;
@@ -3286,7 +3284,7 @@ public class WindowManagerService extends IWindowManager.Stub
            // Notify whether the docked stack exists for the current user
            // Notify whether the docked stack exists for the current user
            final DisplayContent displayContent = getDefaultDisplayContentLocked();
            final DisplayContent displayContent = getDefaultDisplayContentLocked();
            final TaskStack stack =
            final TaskStack stack =
                    displayContent.getSplitScreenPrimaryStackStackIgnoringVisibility();
                    displayContent.getSplitScreenPrimaryStackIgnoringVisibility();
            displayContent.mDividerControllerLocked.notifyDockedStackExistsChanged(
            displayContent.mDividerControllerLocked.notifyDockedStackExistsChanged(
                    stack != null && stack.hasTaskForUser(newUserId));
                    stack != null && stack.hasTaskForUser(newUserId));


@@ -6909,7 +6907,7 @@ public class WindowManagerService extends IWindowManager.Stub
    public int getDockedStackSide() {
    public int getDockedStackSide() {
        synchronized (mWindowMap) {
        synchronized (mWindowMap) {
            final TaskStack dockedStack = getDefaultDisplayContentLocked()
            final TaskStack dockedStack = getDefaultDisplayContentLocked()
                    .getSplitScreenPrimaryStackStackIgnoringVisibility();
                    .getSplitScreenPrimaryStackIgnoringVisibility();
            return dockedStack == null ? DOCKED_INVALID : dockedStack.getDockSide();
            return dockedStack == null ? DOCKED_INVALID : dockedStack.getDockSide();
        }
        }
    }
    }
Loading