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

Commit 61b009e0 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Don't crop home activity windows to stack bounds.

We crop windows to their stack bounds when the docked stack
exists. We don't want to do this for the home activity since
the docked stack isn't visible when the home activity is visible.

Change-Id: Ibb3157dabbb6c979358ddc2098a01c6ddf6540e8
parent 3b265801
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -98,11 +98,12 @@ interface IWindowManager
     * @param taskBounds Bounds to use when creating a new Task with the input task Id if
     *                   the task doesn't exist yet.
     * @param configuration Configuration that is being used with this task.
     * @param cropWindowsToStack True if the app windows should be cropped to the stack bounds.
     */
    void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId,
            int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId,
            int configChanges, boolean voiceInteraction, boolean launchTaskBehind,
            in Rect taskBounds, in Configuration configuration);
            in Rect taskBounds, in Configuration configuration, boolean cropWindowsToStack);
    /**
     *
     * @param token The token we are adding to the input task Id.
+1 −1
Original line number Diff line number Diff line
@@ -4606,7 +4606,7 @@ final class ActivityStack {
                r.task.taskId, mStackId, r.info.screenOrientation, r.fullscreen,
                (r.info.flags & ActivityInfo.FLAG_SHOW_FOR_ALL_USERS) != 0, r.userId,
                r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind,
                bounds, task.mOverrideConfig);
                bounds, task.mOverrideConfig, !r.isHomeActivity());
        r.taskConfigOverride = task.mOverrideConfig;
    }

+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ class AppWindowToken extends WindowToken {
    boolean mLaunchTaskBehind;
    boolean mEnteringAnimation;

    // True if the windows associated with this token should be cropped to their stack bounds.
    boolean mCropWindowsToStack;

    // This application will have its window replaced due to relaunch. This allows window manager
    // to differentiate between simple removal of a window and replacement. In the latter case it
    // will preserve the old window until the new one is drawn.
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ class DragState {
                continue;
            }

            child.getStackBounds(mTmpRect, !BOUNDS_FOR_TOUCH);
            child.getVisibleBounds(mTmpRect, !BOUNDS_FOR_TOUCH);
            if (!mTmpRect.contains(x, y)) {
                // outside of this window's activity stack == don't tell about drags
                continue;
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
        if (modal && child.mAppToken != null) {
            // Limit the outer touch to the activity stack region.
            flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
            child.getStackBounds(mTmpRect, BOUNDS_FOR_TOUCH);
            child.getVisibleBounds(mTmpRect, BOUNDS_FOR_TOUCH);
            inputWindowHandle.touchableRegion.set(mTmpRect);
        } else {
            // Not modal or full screen modal
Loading