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

Commit c06b7551 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "Rename layoutLetterbox() following existing conventions" into main

parents 122310aa e6ff03f5
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -1846,20 +1846,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mLetterboxUiController.onMovedToDisplay(mDisplayContent.getDisplayId());
    }

    void layoutLetterbox(WindowState winHint) {
        mLetterboxUiController.layoutLetterbox(winHint);
    void layoutLetterboxIfNeeded(WindowState winHint) {
        mLetterboxUiController.layoutLetterboxIfNeeded(winHint);
    }

    boolean hasWallpaperBackgroundForLetterbox() {
        return mLetterboxUiController.hasWallpaperBackgroundForLetterbox();
    }

    void updateLetterboxSurface(WindowState winHint, Transaction t) {
        mLetterboxUiController.updateLetterboxSurface(winHint, t);
    void updateLetterboxSurfaceIfNeeded(WindowState winHint, Transaction t) {
        mLetterboxUiController.updateLetterboxSurfaceIfNeeded(winHint, t);
    }

    void updateLetterboxSurface(WindowState winHint) {
        mLetterboxUiController.updateLetterboxSurface(winHint);
    void updateLetterboxSurfaceIfNeeded(WindowState winHint) {
        mLetterboxUiController.updateLetterboxSurfaceIfNeeded(winHint);
    }

    /** Gets the letterbox insets. The insets will be empty if there is no letterbox. */
@@ -4546,7 +4546,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
        super.removeChild(child);
        checkKeyguardFlagsChanged();
        updateLetterboxSurface(child);
        updateLetterboxSurfaceIfNeeded(child);
    }

    void setAppLayoutChanges(int changes, String reason) {
@@ -6036,7 +6036,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (destroyedSomething) {
            final DisplayContent dc = getDisplayContent();
            dc.assignWindowLayers(true /*setLayoutNeeded*/);
            updateLetterboxSurface(null);
            updateLetterboxSurfaceIfNeeded(null);
        }
    }

@@ -7688,7 +7688,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }

        if (mNeedsLetterboxedAnimation) {
            updateLetterboxSurface(findMainWindow(), t);
            updateLetterboxSurfaceIfNeeded(findMainWindow(), t);
            mNeedsAnimationBoundsLayer = true;
        }

@@ -7856,7 +7856,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mNeedsAnimationBoundsLayer = false;
        if (mNeedsLetterboxedAnimation) {
            mNeedsLetterboxedAnimation = false;
            updateLetterboxSurface(findMainWindow(), t);
            updateLetterboxSurfaceIfNeeded(findMainWindow(), t);
        }

        if (mAnimatingActivityRegistry != null) {
+1 −1
Original line number Diff line number Diff line
@@ -1127,7 +1127,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

        final ActivityRecord activity = w.mActivityRecord;
        if (activity != null && activity.isVisibleRequested()) {
            activity.updateLetterboxSurface(w);
            activity.updateLetterboxSurfaceIfNeeded(w);
            final boolean updateAllDrawn = activity.updateDrawnWindowStates(w);
            if (updateAllDrawn && !mTmpUpdateAllDrawn.contains(activity)) {
                mTmpUpdateAllDrawn.add(activity);
+5 −5
Original line number Diff line number Diff line
@@ -924,21 +924,21 @@ final class LetterboxUiController {
        return mLetterbox == null || mLetterbox.notIntersectsOrFullyContains(rect);
    }

    void updateLetterboxSurface(WindowState winHint) {
        updateLetterboxSurface(winHint, mActivityRecord.getSyncTransaction());
    void updateLetterboxSurfaceIfNeeded(WindowState winHint) {
        updateLetterboxSurfaceIfNeeded(winHint, mActivityRecord.getSyncTransaction());
    }

    void updateLetterboxSurface(WindowState winHint, Transaction t) {
    void updateLetterboxSurfaceIfNeeded(WindowState winHint, Transaction t) {
        if (shouldNotLayoutLetterbox(winHint)) {
            return;
        }
        layoutLetterbox(winHint);
        layoutLetterboxIfNeeded(winHint);
        if (mLetterbox != null && mLetterbox.needsApplySurfaceChanges()) {
            mLetterbox.applySurfaceChanges(t);
        }
    }

    void layoutLetterbox(WindowState w) {
    void layoutLetterboxIfNeeded(WindowState w) {
        if (shouldNotLayoutLetterbox(w)) {
            return;
        }
+1 −1
Original line number Diff line number Diff line
@@ -1332,7 +1332,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        updateSourceFrame(windowFrames.mFrame);

        if (mActivityRecord != null && !mIsChildWindow) {
            mActivityRecord.layoutLetterbox(this);
            mActivityRecord.layoutLetterboxIfNeeded(this);
        }
        mSurfacePlacementNeeded = true;
        mHaveFrame = true;