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

Commit 73e022c0 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove some unused methods and fields in wm

Bug: 163976519
Test: CtsWindowManagerDeviceTestCases
Change-Id: I13bdd1f7a6a04410b8b47fe7befaf2fd220aed71
parent ed35afbc
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -743,9 +743,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    /** Set of activities in foreground size compat mode. */
    private Set<ActivityRecord> mActiveSizeCompatActivities = new ArraySet<>();

    // Used in updating the display size
    private Point mTmpDisplaySize = new Point();

    // Used in updating override configurations
    private final Configuration mTempConfig = new Configuration();

@@ -4797,25 +4794,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }, false /* traverseTopToBottom */);
    }

    /**
     * Starts the Keyguard exit animation on all windows that don't belong to an app token.
     */
    void startKeyguardExitOnNonAppWindows(boolean onWallpaper, boolean goingToShade,
            boolean subtle) {
        final WindowManagerPolicy policy = mWmService.mPolicy;
        forAllWindows(w -> {
            if (w.mActivityRecord == null && w.canBeHiddenByKeyguard()
                    && w.wouldBeVisibleIfPolicyIgnored() && !w.isVisible()) {
                w.startAnimation(policy.createHiddenByKeyguardExit(
                        onWallpaper, goingToShade, subtle));
            }
        }, true /* traverseTopToBottom */);
        for (int i = mShellRoots.size() - 1; i >= 0; --i) {
            mShellRoots.valueAt(i).startAnimation(policy.createHiddenByKeyguardExit(
                    onWallpaper, goingToShade, subtle));
        }
    }

    /** @return {@code true} if there is window to wait before enabling the screen. */
    boolean shouldWaitForSystemDecorWindowsOnBoot() {
        if (!isDefaultDisplay && !supportsSystemDecorations()) {
+0 −4
Original line number Diff line number Diff line
@@ -258,10 +258,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
     */
    final SparseArray<SleepToken> mSleepTokens = new SparseArray<>();

    // The default minimal size that will be used if the activity doesn't specify its minimal size.
    // It will be calculated when the default display gets added.
    int mDefaultMinSizeOfResizeableTaskDp = -1;

    // Whether tasks have moved and we need to rank the tasks before next OOM scoring
    private boolean mTaskLayersChanged = true;
    private int mTmpTaskLayerRank;
+0 −5
Original line number Diff line number Diff line
@@ -3543,11 +3543,6 @@ class Task extends TaskFragment {
                ? null : new PictureInPictureParams(top.pictureInPictureArgs);
    }

    private boolean shouldDockBigOverlays() {
        final ActivityRecord topMostActivity = getTopMostActivity();
        return topMostActivity != null && topMostActivity.shouldDockBigOverlays;
    }

    Rect getDisplayCutoutInsets() {
        if (mDisplayContent == null || getDisplayInfo().displayCutout == null) return null;
        final WindowState w = getTopVisibleAppMainWindow();
+0 −7
Original line number Diff line number Diff line
@@ -1135,13 +1135,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        return parent != null && parent.isAttached();
    }

    void setWaitingForDrawnIfResizingChanged() {
        for (int i = mChildren.size() - 1; i >= 0; --i) {
            final WindowContainer wc = mChildren.get(i);
            wc.setWaitingForDrawnIfResizingChanged();
        }
    }

    void onResize() {
        if (mControllableInsetProvider != null) {
            mControllableInsetProvider.onWindowContainerBoundsChanged();
+0 −35
Original line number Diff line number Diff line
@@ -1716,29 +1716,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                && dc != null ? dc.getDefaultTaskDisplayArea().getRootHomeTask() : null;
    }

    /**
     * This is a form of rectangle "difference". It cut off each dimension of rect by the amount
     * that toRemove is "pushing into" it from the outside. Any dimension that fully contains
     * toRemove won't change.
     */
    private void cutRect(Rect rect, Rect toRemove) {
        if (toRemove.isEmpty()) return;
        if (toRemove.top < rect.bottom && toRemove.bottom > rect.top) {
            if (toRemove.right >= rect.right && toRemove.left >= rect.left) {
                rect.right = toRemove.left;
            } else if (toRemove.left <= rect.left && toRemove.right <= rect.right) {
                rect.left = toRemove.right;
            }
        }
        if (toRemove.left < rect.right && toRemove.right > rect.left) {
            if (toRemove.bottom >= rect.bottom && toRemove.top >= rect.top) {
                rect.bottom = toRemove.top;
            } else if (toRemove.top <= rect.top && toRemove.bottom <= rect.bottom) {
                rect.top = toRemove.bottom;
            }
        }
    }

    /**
     * Retrieves the visible bounds of the window.
     * @param bounds The rect which gets the bounds.
@@ -3965,14 +3942,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return mDragResizing != computeDragResizing();
    }

    @Override
    void setWaitingForDrawnIfResizingChanged() {
        if (isDragResizeChanged()) {
            mWmService.mRoot.mWaitingForDrawn.add(this);
        }
        super.setWaitingForDrawnIfResizingChanged();
    }

    /**
     * Resets the state whether we reported a drag resize change to the app.
     */
@@ -5524,10 +5493,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        outRegion.translate(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top);
    }

    boolean hasTapExcludeRegion() {
        return !mTapExcludeRegion.isEmpty();
    }

    boolean isImeLayeringTarget() {
        return getDisplayContent().getImeTarget(IME_TARGET_LAYERING) == this;
    }
Loading