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

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

Merge "Switch WindowState to get display content from its window token"

parents 61189b08 360a8bce
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -1184,16 +1184,16 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        }
        }
    }
    }


    int rebuildWindowListUnchecked(DisplayContent dc, int addIndex) {
    int rebuildWindowListUnchecked(int addIndex) {
        return super.rebuildWindowList(dc, addIndex);
        return super.rebuildWindowList(addIndex);
    }
    }


    @Override
    @Override
    int rebuildWindowList(DisplayContent dc, int addIndex) {
    int rebuildWindowList(int addIndex) {
        if (mIsExiting && !waitingForReplacement()) {
        if (mIsExiting && !waitingForReplacement()) {
            return addIndex;
            return addIndex;
        }
        }
        return rebuildWindowListUnchecked(dc, addIndex);
        return rebuildWindowListUnchecked(addIndex);
    }
    }


    @Override
    @Override
+2 −2
Original line number Original line Diff line number Diff line
@@ -1122,13 +1122,13 @@ class DisplayContent extends WindowContainer<TaskStack> {
            AppTokenList exitingAppTokens = mChildren.get(stackNdx).mExitingAppTokens;
            AppTokenList exitingAppTokens = mChildren.get(stackNdx).mExitingAppTokens;
            int NT = exitingAppTokens.size();
            int NT = exitingAppTokens.size();
            for (int j = 0; j < NT; j++) {
            for (int j = 0; j < NT; j++) {
                i = exitingAppTokens.get(j).rebuildWindowListUnchecked(this, i);
                i = exitingAppTokens.get(j).rebuildWindowListUnchecked(i);
            }
            }
        }
        }


        // And add in the still active app tokens in Z order.
        // And add in the still active app tokens in Z order.
        for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) {
        for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) {
            i = mChildren.get(stackNdx).rebuildWindowList(this, i);
            i = mChildren.get(stackNdx).rebuildWindowList(i);
        }
        }


        i -= lastBelow;
        i -= lastBelow;
+2 −3
Original line number Original line Diff line number Diff line
@@ -483,16 +483,15 @@ class WindowContainer<E extends WindowContainer> implements Comparable<WindowCon


    /**
    /**
     * Rebuilds the WindowList for the input display content.
     * Rebuilds the WindowList for the input display content.
     * @param dc The display content to rebuild the window list for.
     * @param addIndex The index in the window list to add the next entry to.
     * @param addIndex The index in the window list to add the next entry to.
     * @return The next index in the window list to.
     * @return The next index in the window list to.
     */
     */
    // TODO: Hoping we can get rid of WindowList so this method wouldn't be needed.
    // TODO: Hoping we can get rid of WindowList so this method wouldn't be needed.
    int rebuildWindowList(DisplayContent dc, int addIndex) {
    int rebuildWindowList(int addIndex) {
        final int count = mChildren.size();
        final int count = mChildren.size();
        for (int i = 0; i < count; i++) {
        for (int i = 0; i < count; i++) {
            final WindowContainer wc = mChildren.get(i);
            final WindowContainer wc = mChildren.get(i);
            addIndex = wc.rebuildWindowList(dc, addIndex);
            addIndex = wc.rebuildWindowList(addIndex);
        }
        }
        return addIndex;
        return addIndex;
    }
    }
+4 −3
Original line number Original line Diff line number Diff line
@@ -1257,7 +1257,8 @@ public class WindowManagerService extends IWindowManager.Stub
            // excercise to find the appropriate input method target (used for animations
            // excercise to find the appropriate input method target (used for animations
            // and dialog adjustments), but for purposes of Z ordering we simply wish to
            // and dialog adjustments), but for purposes of Z ordering we simply wish to
            // place it above the docked divider. Unless it is already above the divider.
            // place it above the docked divider. Unless it is already above the divider.
            WindowState dockedDivider = w.mDisplayContent.mDividerControllerLocked.getWindow();
            final WindowState dockedDivider =
                    w.getDisplayContent().mDividerControllerLocked.getWindow();
            if (dockedDivider != null && dockedDivider.isVisibleLw()) {
            if (dockedDivider != null && dockedDivider.isVisibleLw()) {
                int dividerIndex = windows.indexOf(dockedDivider);
                int dividerIndex = windows.indexOf(dockedDivider);
                if (dividerIndex > 0 && dividerIndex > i) {
                if (dividerIndex > 0 && dividerIndex > i) {
@@ -1275,7 +1276,7 @@ public class WindowManagerService extends IWindowManager.Stub
        return -1;
        return -1;
    }
    }


    void addInputMethodWindowToListLocked(WindowState win) {
    private void addInputMethodWindowToListLocked(WindowState win) {
        int pos = findDesiredInputMethodWindowIndexLocked(true);
        int pos = findDesiredInputMethodWindowIndexLocked(true);
        if (pos >= 0) {
        if (pos >= 0) {
            if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
            if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(
@@ -1654,7 +1655,7 @@ public class WindowManagerService extends IWindowManager.Stub
            }
            }


            WindowState win = new WindowState(this, session, client, token, parentWindow,
            WindowState win = new WindowState(this, session, client, token, parentWindow,
                    appOp[0], seq, attrs, viewVisibility, displayContent, session.mUid);
                    appOp[0], seq, attrs, viewVisibility, session.mUid);
            if (win.mDeathRecipient == null) {
            if (win.mDeathRecipient == null) {
                // Client has apparently died, so there is no reason to
                // Client has apparently died, so there is no reason to
                // continue.
                // continue.
+52 −69
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE;
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW;
import static android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON;
import static android.view.WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON;
import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND;
import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND;
import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD;
@@ -468,10 +469,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP


    boolean mHasSurface = false;
    boolean mHasSurface = false;


    private boolean mNotOnAppsDisplay = false;
    // TODO: Get this from WindowToken? Done in ag/1522894
    DisplayContent  mDisplayContent;

    /** When true this window can be displayed on screens owther than mOwnerUid's */
    /** When true this window can be displayed on screens owther than mOwnerUid's */
    private boolean mShowToOwnerOnly;
    private boolean mShowToOwnerOnly;


@@ -564,7 +561,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP


    WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
    WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
           WindowState parentWindow, int appOp, int seq, WindowManager.LayoutParams a,
           WindowState parentWindow, int appOp, int seq, WindowManager.LayoutParams a,
           int viewVisibility, final DisplayContent displayContent, int ownerId) {
           int viewVisibility, int ownerId) {
        mService = service;
        mService = service;
        mSession = s;
        mSession = s;
        mClient = c;
        mClient = c;
@@ -588,7 +585,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        };
        };
        mAttrs.copyFrom(a);
        mAttrs.copyFrom(a);
        mViewVisibility = viewVisibility;
        mViewVisibility = viewVisibility;
        mDisplayContent = displayContent;
        mPolicy = mService.mPolicy;
        mPolicy = mService.mPolicy;
        mContext = mService.mContext;
        mContext = mService.mContext;
        DeathRecipient deathRecipient = new DeathRecipient();
        DeathRecipient deathRecipient = new DeathRecipient();
@@ -644,16 +640,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
        }
        mIsFloatingLayer = mIsImWindow || mIsWallpaper;
        mIsFloatingLayer = mIsImWindow || mIsWallpaper;


        if (mAppToken != null) {
        if (mAppToken != null && mAppToken.showForAllUsers) {
            final DisplayContent appDisplay = getDisplayContent();
            // Windows for apps that can show for all users should also show when the device is
            mNotOnAppsDisplay = displayContent != appDisplay;
            // locked.

            if (mAppToken.showForAllUsers) {
                // Windows for apps that can show for all users should also show when the
                // device is locked.
            mAttrs.flags |= FLAG_SHOW_WHEN_LOCKED;
            mAttrs.flags |= FLAG_SHOW_WHEN_LOCKED;
        }
        }
        }


        mWinAnimator = new WindowStateAnimator(this);
        mWinAnimator = new WindowStateAnimator(this);
        mWinAnimator.mAlpha = a.alpha;
        mWinAnimator.mAlpha = a.alpha;
@@ -667,7 +658,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        mLayer = 0;
        mLayer = 0;
        mInputWindowHandle = new InputWindowHandle(
        mInputWindowHandle = new InputWindowHandle(
                mAppToken != null ? mAppToken.mInputApplicationHandle : null, this,
                mAppToken != null ? mAppToken.mInputApplicationHandle : null, this,
                displayContent.getDisplayId());
                getDisplayContent().getDisplayId());
    }
    }


    void attach() {
    void attach() {
@@ -715,6 +706,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        final Task task = getTask();
        final Task task = getTask();
        final boolean fullscreenTask = !isInMultiWindowMode();
        final boolean fullscreenTask = !isInMultiWindowMode();
        final boolean windowsAreFloating = task != null && task.isFloating();
        final boolean windowsAreFloating = task != null && task.isFloating();
        final DisplayContent dc = getDisplayContent();


        // If the task has temp inset bounds set, we have to make sure all its windows uses
        // If the task has temp inset bounds set, we have to make sure all its windows uses
        // the temp inset frame. Otherwise different display frames get applied to the main
        // the temp inset frame. Otherwise different display frames get applied to the main
@@ -780,8 +772,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            layoutXDiff = !mInsetFrame.isEmpty() ? mInsetFrame.left - mContainingFrame.left : 0;
            layoutXDiff = !mInsetFrame.isEmpty() ? mInsetFrame.left - mContainingFrame.left : 0;
            layoutYDiff = !mInsetFrame.isEmpty() ? mInsetFrame.top - mContainingFrame.top : 0;
            layoutYDiff = !mInsetFrame.isEmpty() ? mInsetFrame.top - mContainingFrame.top : 0;
            layoutContainingFrame = !mInsetFrame.isEmpty() ? mInsetFrame : mContainingFrame;
            layoutContainingFrame = !mInsetFrame.isEmpty() ? mInsetFrame : mContainingFrame;
            mTmpRect.set(0, 0, mDisplayContent.getDisplayInfo().logicalWidth,
            mTmpRect.set(0, 0, dc.getDisplayInfo().logicalWidth, dc.getDisplayInfo().logicalHeight);
                    mDisplayContent.getDisplayInfo().logicalHeight);
            subtractInsets(mDisplayFrame, layoutContainingFrame, df, mTmpRect);
            subtractInsets(mDisplayFrame, layoutContainingFrame, df, mTmpRect);
            if (!layoutInParentFrame()) {
            if (!layoutInParentFrame()) {
                subtractInsets(mContainingFrame, layoutContainingFrame, pf, mTmpRect);
                subtractInsets(mContainingFrame, layoutContainingFrame, pf, mTmpRect);
@@ -853,7 +844,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            mVisibleFrame.set(mContentFrame);
            mVisibleFrame.set(mContentFrame);
            mStableFrame.set(mContentFrame);
            mStableFrame.set(mContentFrame);
        } else if (mAttrs.type == TYPE_DOCK_DIVIDER) {
        } else if (mAttrs.type == TYPE_DOCK_DIVIDER) {
            mDisplayContent.getDockedDividerController().positionDockedStackedDivider(mFrame);
            dc.getDockedDividerController().positionDockedStackedDivider(mFrame);
            mContentFrame.set(mFrame);
            mContentFrame.set(mFrame);
            if (!mFrame.equals(mLastFrame)) {
            if (!mFrame.equals(mLastFrame)) {
                mMovedByResize = true;
                mMovedByResize = true;
@@ -1188,20 +1179,16 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
        }
    }
    }


    public DisplayContent getDisplayContent() {
    DisplayContent getDisplayContent() {
        if (mAppToken == null || mNotOnAppsDisplay) {
        return mToken.getDisplayContent();
            return mDisplayContent;
        }
        final TaskStack stack = getStack();
        return stack == null ? mDisplayContent : stack.getDisplayContent();
    }
    }


    public DisplayInfo getDisplayInfo() {
    DisplayInfo getDisplayInfo() {
        final DisplayContent displayContent = getDisplayContent();
        final DisplayContent displayContent = getDisplayContent();
        return displayContent != null ? displayContent.getDisplayInfo() : null;
        return displayContent != null ? displayContent.getDisplayInfo() : null;
    }
    }


    public int getDisplayId() {
    int getDisplayId() {
        final DisplayContent displayContent = getDisplayContent();
        final DisplayContent displayContent = getDisplayContent();
        if (displayContent == null) {
        if (displayContent == null) {
            return -1;
            return -1;
@@ -1222,8 +1209,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
        }
        // Some system windows (e.g. "Power off" dialog) don't have a task, but we would still
        // Some system windows (e.g. "Power off" dialog) don't have a task, but we would still
        // associate them with some stack to enable dimming.
        // associate them with some stack to enable dimming.
        return mAttrs.type >= WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW
        final DisplayContent dc = getDisplayContent();
                && mDisplayContent != null ? mDisplayContent.getHomeStack() : null;
        return mAttrs.type >= FIRST_SYSTEM_WINDOW && dc != null ? dc.getHomeStack() : null;
    }
    }


    /**
    /**
@@ -2001,12 +1988,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    }
    }


    void scheduleAnimationIfDimming() {
    void scheduleAnimationIfDimming() {
        if (mDisplayContent == null) {
        final DisplayContent dc = getDisplayContent();
        if (dc == null) {
            return;
            return;
        }
        }
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        if (dimLayerUser != null && mDisplayContent.mDimLayerController.isDimming(
        if (dimLayerUser != null && dc.mDimLayerController.isDimming(dimLayerUser, mWinAnimator)) {
                dimLayerUser, mWinAnimator)) {
            // Force an animation pass just to update the mDimLayer layer.
            // Force an animation pass just to update the mDimLayer layer.
            mService.scheduleAnimationLocked();
            mService.scheduleAnimationLocked();
        }
        }
@@ -2119,16 +2106,17 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            return;
            return;
        }
        }


        final DisplayContent dc = getDisplayContent();
        if (!mAnimatingExit && mAppDied) {
        if (!mAnimatingExit && mAppDied) {
            // If app died visible, apply a dim over the window to indicate that it's inactive
            // If app died visible, apply a dim over the window to indicate that it's inactive
            mDisplayContent.mDimLayerController.applyDimAbove(getDimLayerUser(), mWinAnimator);
            dc.mDimLayerController.applyDimAbove(getDimLayerUser(), mWinAnimator);
        } else if ((mAttrs.flags & FLAG_DIM_BEHIND) != 0
        } else if ((mAttrs.flags & FLAG_DIM_BEHIND) != 0
                && mDisplayContent != null && !mAnimatingExit && isVisibleUnchecked()) {
                && dc != null && !mAnimatingExit && isVisibleUnchecked()) {
            mDisplayContent.mDimLayerController.applyDimBehind(getDimLayerUser(), mWinAnimator);
            dc.mDimLayerController.applyDimBehind(getDimLayerUser(), mWinAnimator);
        }
        }
    }
    }


    DimLayer.DimLayerUser getDimLayerUser() {
    private DimLayer.DimLayerUser getDimLayerUser() {
        Task task = getTask();
        Task task = getTask();
        if (task != null) {
        if (task != null) {
            return task;
            return task;
@@ -2187,8 +2175,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    }
    }


    void setDisplayLayoutNeeded() {
    void setDisplayLayoutNeeded() {
        if (mDisplayContent != null) {
        final DisplayContent dc = getDisplayContent();
            mDisplayContent.setLayoutNeeded();
        if (dc != null) {
            dc.setLayoutNeeded();
        }
        }
    }
    }


@@ -2909,18 +2898,19 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    @Override
    @Override
    public boolean isDimming() {
    public boolean isDimming() {
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        return dimLayerUser != null && mDisplayContent != null &&
        final DisplayContent dc = getDisplayContent();
                mDisplayContent.mDimLayerController.isDimming(dimLayerUser, mWinAnimator);
        return dimLayerUser != null && dc != null
                && dc.mDimLayerController.isDimming(dimLayerUser, mWinAnimator);
    }
    }


    public void setShowToOwnerOnlyLocked(boolean showToOwnerOnly) {
    void setShowToOwnerOnlyLocked(boolean showToOwnerOnly) {
        mShowToOwnerOnly = showToOwnerOnly;
        mShowToOwnerOnly = showToOwnerOnly;
    }
    }


    boolean isHiddenFromUserLocked() {
    boolean isHiddenFromUserLocked() {
        // Child windows are evaluated based on their parent window.
        // Child windows are evaluated based on their parent window.
        final WindowState win = getTopParentWindow();
        final WindowState win = getTopParentWindow();
        if (win.mAttrs.type < WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW
        if (win.mAttrs.type < FIRST_SYSTEM_WINDOW
                && win.mAppToken != null && win.mAppToken.showForAllUsers) {
                && win.mAppToken != null && win.mAppToken.showForAllUsers) {


            // All window frames that are fullscreen extend above status bar, but some don't extend
            // All window frames that are fullscreen extend above status bar, but some don't extend
@@ -3215,7 +3205,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * @return Whether we reported "resize while not drag resizing" to the application.
     * @return Whether we reported "resize while not drag resizing" to the application.
     * @see #isResizedWhileNotDragResizing()
     * @see #isResizedWhileNotDragResizing()
     */
     */
    boolean isResizedWhileNotDragResizingReported() {
    private boolean isResizedWhileNotDragResizingReported() {
        return mResizedWhileNotDragResizingReported;
        return mResizedWhileNotDragResizingReported;
    }
    }


@@ -3223,7 +3213,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return mResizeMode;
        return mResizeMode;
    }
    }


    boolean computeDragResizing() {
    private boolean computeDragResizing() {
        final Task task = getTask();
        final Task task = getTask();
        if (task == null) {
        if (task == null) {
            return false;
            return false;
@@ -3241,7 +3231,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        // and the bounds we clip this window to might be different. In order to avoid holes, we
        // and the bounds we clip this window to might be different. In order to avoid holes, we
        // simulate that we are still resizing so the app fills the hole with the resizing
        // simulate that we are still resizing so the app fills the hole with the resizing
        // background.
        // background.
        return (mDisplayContent.mDividerControllerLocked.isResizing()
        return (getDisplayContent().mDividerControllerLocked.isResizing()
                        || mAppToken != null && !mAppToken.mFrozenBounds.isEmpty()) &&
                        || mAppToken != null && !mAppToken.mFrozenBounds.isEmpty()) &&
                !task.inFreeformWorkspace() && !isGoneForLayoutLw();
                !task.inFreeformWorkspace() && !isGoneForLayoutLw();


@@ -3257,7 +3247,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (task != null && task.isDragResizing()) {
        if (task != null && task.isDragResizing()) {
            mResizeMode = task.getDragResizeMode();
            mResizeMode = task.getDragResizeMode();
        } else {
        } else {
            mResizeMode = mDragResizing && mDisplayContent.mDividerControllerLocked.isResizing()
            mResizeMode = mDragResizing && getDisplayContent().mDividerControllerLocked.isResizing()
                    ? DRAG_RESIZE_MODE_DOCKED_DIVIDER
                    ? DRAG_RESIZE_MODE_DOCKED_DIVIDER
                    : DRAG_RESIZE_MODE_FREEFORM;
                    : DRAG_RESIZE_MODE_FREEFORM;
        }
        }
@@ -3277,9 +3267,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                if (stack != null) {
                if (stack != null) {
                    pw.print(" stackId="); pw.print(stack.mStackId);
                    pw.print(" stackId="); pw.print(stack.mStackId);
                }
                }
                if (mNotOnAppsDisplay) {
                    pw.print(" mNotOnAppsDisplay="); pw.print(mNotOnAppsDisplay);
                }
                pw.print(" mSession="); pw.print(mSession);
                pw.print(" mSession="); pw.print(mSession);
                pw.print(" mClient="); pw.println(mClient.asBinder());
                pw.print(" mClient="); pw.println(mClient.asBinder());
        pw.print(prefix); pw.print("mOwnerUid="); pw.print(mOwnerUid);
        pw.print(prefix); pw.print("mOwnerUid="); pw.print(mOwnerUid);
@@ -3665,9 +3652,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    }
    }


    void requestUpdateWallpaperIfNeeded() {
    void requestUpdateWallpaperIfNeeded() {
        if (mDisplayContent != null && (mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0) {
        final DisplayContent dc = getDisplayContent();
            mDisplayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
        if (dc != null && (mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0) {
            mDisplayContent.setLayoutNeeded();
            dc.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
            dc.setLayoutNeeded();
            mService.mWindowPlacerLocked.requestTraversal();
            mService.mWindowPlacerLocked.requestTraversal();
        }
        }


@@ -3693,12 +3681,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return winY;
        return winY;
    }
    }


    void transferDimToReplacement() {
    private void transferDimToReplacement() {
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        final DimLayer.DimLayerUser dimLayerUser = getDimLayerUser();
        if (dimLayerUser != null && mDisplayContent != null) {
        final DisplayContent dc = getDisplayContent();
            mDisplayContent.mDimLayerController.applyDim(dimLayerUser,
        if (dimLayerUser != null && dc != null) {
                    mReplacementWindow.mWinAnimator,
            dc.mDimLayerController.applyDim(dimLayerUser,
                    (mAttrs.flags & FLAG_DIM_BEHIND) != 0 ? true : false);
                    mReplacementWindow.mWinAnimator, (mAttrs.flags & FLAG_DIM_BEHIND) != 0);
        }
        }
    }
    }


@@ -3796,13 +3784,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        }
        }


        if (mAttrs.type == TYPE_INPUT_METHOD) {
        if (mAttrs.type == TYPE_INPUT_METHOD) {
            mDisplayContent.mDividerControllerLocked.resetImeHideRequested();
            getDisplayContent().mDividerControllerLocked.resetImeHideRequested();
        }
        }


        return true;
        return true;
    }
    }


    void logPerformShow(String prefix) {
    private void logPerformShow(String prefix) {
        if (DEBUG_VISIBILITY
        if (DEBUG_VISIBILITY
                || (DEBUG_STARTING_WINDOW && mAttrs.type == TYPE_APPLICATION_STARTING)) {
                || (DEBUG_STARTING_WINDOW && mAttrs.type == TYPE_APPLICATION_STARTING)) {
            Slog.v(TAG, prefix + this
            Slog.v(TAG, prefix + this
@@ -3812,11 +3800,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                    + " during animation: policyVis=" + mPolicyVisibility
                    + " during animation: policyVis=" + mPolicyVisibility
                    + " parentHidden=" + isParentWindowHidden()
                    + " parentHidden=" + isParentWindowHidden()
                    + " tok.hiddenRequested="
                    + " tok.hiddenRequested="
                    + (mAppToken != null ? mAppToken.hiddenRequested : false)
                    + (mAppToken != null && mAppToken.hiddenRequested)
                    + " tok.hidden=" + (mAppToken != null ? mAppToken.hidden : false)
                    + " tok.hidden=" + (mAppToken != null && mAppToken.hidden)
                    + " animating=" + mWinAnimator.mAnimating
                    + " animating=" + mWinAnimator.mAnimating
                    + " tok animating="
                    + " tok animating="
                    + (mWinAnimator.mAppAnimator != null ? mWinAnimator.mAppAnimator.animating : false)
                    + (mWinAnimator.mAppAnimator != null && mWinAnimator.mAppAnimator.animating)
                    + " Callers=" + Debug.getCallers(4));
                    + " Callers=" + Debug.getCallers(4));
        }
        }
    }
    }
@@ -3874,14 +3862,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    }
    }


    @Override
    @Override
    int rebuildWindowList(DisplayContent dc, int addIndex) {
    int rebuildWindowList(int addIndex) {
        final DisplayContent winDisplayContent = getDisplayContent();
        if (winDisplayContent == dc || winDisplayContent == null) {
            mDisplayContent = dc;
        return reAddWindow(addIndex);
        return reAddWindow(addIndex);
    }
    }
        return addIndex;
    }


    // TODO: come-up with a better name for this method that represents what it does.
    // TODO: come-up with a better name for this method that represents what it does.
    // Or, it is probably not going to matter anyways if we are successful in getting rid of
    // Or, it is probably not going to matter anyways if we are successful in getting rid of
Loading