diff options
author | 2024-02-19 11:57:06 +0000 | |
---|---|---|
committer | 2024-02-19 11:57:06 +0000 | |
commit | c06b75516cadfcae0942911a43ecbe27110c700c (patch) | |
tree | 5a60f06066c86418bae831cf74676bdeee5d235c | |
parent | 122310aaac16278476c0fa3337219b7793bcda14 (diff) | |
parent | e6ff03f513937e0e175332a72529ed10546fa016 (diff) |
Merge "Rename layoutLetterbox() following existing conventions" into main
4 files changed, 17 insertions, 17 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index c36df8da77ae..f15003966d32 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -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) { diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index e7431723789d..d3acd716aed3 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -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); diff --git a/services/core/java/com/android/server/wm/LetterboxUiController.java b/services/core/java/com/android/server/wm/LetterboxUiController.java index edf9da1e0bf5..52435274865a 100644 --- a/services/core/java/com/android/server/wm/LetterboxUiController.java +++ b/services/core/java/com/android/server/wm/LetterboxUiController.java @@ -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; } diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 6e993b340352..b8f1d156ec1d 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -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; |