Loading services/core/java/com/android/server/wm/ActivityRecord.java +12 −16 Original line number Diff line number Diff line Loading @@ -1811,12 +1811,11 @@ final class ActivityRecord extends WindowToken { } } mAppCompatController.getAppCompatLetterboxPolicy() .onMovedToDisplay(mDisplayContent.getDisplayId()); mAppCompatController.getLetterboxPolicy().onMovedToDisplay(mDisplayContent.getDisplayId()); } void layoutLetterboxIfNeeded(WindowState winHint) { mAppCompatController.getAppCompatLetterboxPolicy().start(winHint); mAppCompatController.getLetterboxPolicy().start(winHint); } boolean hasWallpaperBackgroundForLetterbox() { Loading @@ -1824,22 +1823,22 @@ final class ActivityRecord extends WindowToken { } void updateLetterboxSurfaceIfNeeded(WindowState winHint, Transaction t) { mAppCompatController.getAppCompatLetterboxPolicy() mAppCompatController.getLetterboxPolicy() .updateLetterboxSurfaceIfNeeded(winHint, t, getPendingTransaction()); } void updateLetterboxSurfaceIfNeeded(WindowState winHint) { mAppCompatController.getAppCompatLetterboxPolicy().updateLetterboxSurfaceIfNeeded(winHint); mAppCompatController.getLetterboxPolicy().updateLetterboxSurfaceIfNeeded(winHint); } /** Gets the letterbox insets. The insets will be empty if there is no letterbox. */ Rect getLetterboxInsets() { return mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxInsets(); return mAppCompatController.getLetterboxPolicy().getLetterboxInsets(); } /** Gets the inner bounds of letterbox. The bounds will be empty if there is no letterbox. */ void getLetterboxInnerBounds(Rect outBounds) { mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxInnerBounds(outBounds); mAppCompatController.getLetterboxPolicy().getLetterboxInnerBounds(outBounds); } /** Loading @@ -1847,8 +1846,7 @@ final class ActivityRecord extends WindowToken { * when the current activity is displayed. */ boolean isFullyTransparentBarAllowed(Rect rect) { return mAppCompatController.getAppCompatLetterboxPolicy() .isFullyTransparentBarAllowed(rect); return mAppCompatController.getLetterboxPolicy().isFullyTransparentBarAllowed(rect); } private static class Token extends Binder { Loading Loading @@ -2820,8 +2818,7 @@ final class ActivityRecord extends WindowToken { } void removeStartingWindow() { final AppCompatLetterboxPolicy letterboxPolicy = mAppCompatController .getAppCompatLetterboxPolicy(); final AppCompatLetterboxPolicy letterboxPolicy = mAppCompatController.getLetterboxPolicy(); boolean prevEligibleForLetterboxEducation = letterboxPolicy.isEligibleForLetterboxEducation(); Loading Loading @@ -4448,7 +4445,7 @@ final class ActivityRecord extends WindowToken { mTaskSupervisor.getActivityMetricsLogger().notifyActivityRemoved(this); mTaskSupervisor.mStoppingActivities.remove(this); mAppCompatController.getAppCompatLetterboxPolicy().stop(); mAppCompatController.getLetterboxPolicy().stop(); mAppCompatController.getTransparentPolicy().stop(); // Defer removal of this activity when either a child is animating, or app transition is on Loading Loading @@ -7710,7 +7707,7 @@ final class ActivityRecord extends WindowToken { t.setLayer(mAnimationBoundsLayer, getLastLayer()); if (mNeedsLetterboxedAnimation) { final int cornerRadius = mAppCompatController.getAppCompatLetterboxPolicy() final int cornerRadius = mAppCompatController.getLetterboxPolicy() .getRoundedCornersRadius(findMainWindow()); final Rect letterboxInnerBounds = new Rect(); Loading Loading @@ -8296,8 +8293,7 @@ final class ActivityRecord extends WindowToken { final AppCompatAspectRatioPolicy aspectRatioPolicy = mAppCompatController.getAspectRatioPolicy(); aspectRatioPolicy.reset(); mAppCompatController.getAppCompatLetterboxPolicy() .resetFixedOrientationLetterboxEligibility(); mAppCompatController.getLetterboxPolicy().resetFixedOrientationLetterboxEligibility(); mResolveConfigHint.resolveTmpOverrides(mDisplayContent, newParentConfiguration, isFixedRotationTransforming()); Loading Loading @@ -8738,7 +8734,7 @@ final class ActivityRecord extends WindowToken { // make it fit the available bounds by scaling down its bounds. final int forcedOrientation = getRequestedConfigurationOrientation(); final boolean isEligibleForFixedOrientationLetterbox = mAppCompatController .getAppCompatLetterboxPolicy() .getLetterboxPolicy() .resolveFixedOrientationLetterboxEligibility(forcedOrientation, parentOrientation); if (!isEligibleForFixedOrientationLetterbox && (forcedOrientation == ORIENTATION_UNDEFINED Loading services/core/java/com/android/server/wm/AppCompatController.java +5 −5 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class AppCompatController { @NonNull private final AppCompatDeviceStateQuery mDeviceStateQuery; @NonNull private final AppCompatLetterboxPolicy mAppCompatLetterboxPolicy; private final AppCompatLetterboxPolicy mLetterboxPolicy; @NonNull private final AppCompatSizeCompatModePolicy mSizeCompatModePolicy; Loading @@ -60,7 +60,7 @@ class AppCompatController { mTransparentPolicy, mAppCompatOverrides); mReachabilityPolicy = new AppCompatReachabilityPolicy(activityRecord, wmService.mAppCompatConfiguration); mAppCompatLetterboxPolicy = new AppCompatLetterboxPolicy(activityRecord, mLetterboxPolicy = new AppCompatLetterboxPolicy(activityRecord, wmService.mAppCompatConfiguration); mDesktopAspectRatioPolicy = new DesktopAppCompatAspectRatioPolicy(activityRecord, mAppCompatOverrides, mTransparentPolicy, wmService.mAppCompatConfiguration); Loading Loading @@ -114,8 +114,8 @@ class AppCompatController { } @NonNull AppCompatLetterboxPolicy getAppCompatLetterboxPolicy() { return mAppCompatLetterboxPolicy; AppCompatLetterboxPolicy getLetterboxPolicy() { return mLetterboxPolicy; } @NonNull Loading Loading @@ -145,7 +145,7 @@ class AppCompatController { void dump(@NonNull PrintWriter pw, @NonNull String prefix) { getTransparentPolicy().dump(pw, prefix); getAppCompatLetterboxPolicy().dump(pw, prefix); getLetterboxPolicy().dump(pw, prefix); getSizeCompatModePolicy().dump(pw, prefix); } Loading services/core/java/com/android/server/wm/AppCompatLetterboxUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxPosition(@NonNull ActivityRecord activity, @NonNull Point outLetterboxPosition) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outLetterboxPosition.set(0, 0); return; } Loading @@ -54,7 +54,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxOuterBounds(@NonNull ActivityRecord activity, @NonNull Rect outOuterBounds) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outOuterBounds.setEmpty(); return; } Loading Loading @@ -82,7 +82,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxInnerBounds(@NonNull ActivityRecord activity, @NonNull WindowState window, @NonNull Rect outInnerBounds) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outInnerBounds.setEmpty(); return; } Loading services/core/java/com/android/server/wm/AppCompatUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ final class AppCompatUtils { } // Whether the direct top activity is eligible for letterbox education. appCompatTaskInfo.setEligibleForLetterboxEducation(isTopActivityResumed && top.mAppCompatController.getAppCompatLetterboxPolicy() && top.mAppCompatController.getLetterboxPolicy() .isEligibleForLetterboxEducation()); appCompatTaskInfo.setLetterboxEducationEnabled( top.mAppCompatController.getLetterboxOverrides() Loading services/core/java/com/android/server/wm/DisplayPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1580,7 +1580,7 @@ public class DisplayPolicy { final ActivityRecord currentActivity = win.getActivityRecord(); if (currentActivity != null) { final LetterboxDetails currentLetterboxDetails = currentActivity .mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxDetails(); .mAppCompatController.getLetterboxPolicy().getLetterboxDetails(); if (currentLetterboxDetails != null) { mLetterboxDetails.add(currentLetterboxDetails); } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +12 −16 Original line number Diff line number Diff line Loading @@ -1811,12 +1811,11 @@ final class ActivityRecord extends WindowToken { } } mAppCompatController.getAppCompatLetterboxPolicy() .onMovedToDisplay(mDisplayContent.getDisplayId()); mAppCompatController.getLetterboxPolicy().onMovedToDisplay(mDisplayContent.getDisplayId()); } void layoutLetterboxIfNeeded(WindowState winHint) { mAppCompatController.getAppCompatLetterboxPolicy().start(winHint); mAppCompatController.getLetterboxPolicy().start(winHint); } boolean hasWallpaperBackgroundForLetterbox() { Loading @@ -1824,22 +1823,22 @@ final class ActivityRecord extends WindowToken { } void updateLetterboxSurfaceIfNeeded(WindowState winHint, Transaction t) { mAppCompatController.getAppCompatLetterboxPolicy() mAppCompatController.getLetterboxPolicy() .updateLetterboxSurfaceIfNeeded(winHint, t, getPendingTransaction()); } void updateLetterboxSurfaceIfNeeded(WindowState winHint) { mAppCompatController.getAppCompatLetterboxPolicy().updateLetterboxSurfaceIfNeeded(winHint); mAppCompatController.getLetterboxPolicy().updateLetterboxSurfaceIfNeeded(winHint); } /** Gets the letterbox insets. The insets will be empty if there is no letterbox. */ Rect getLetterboxInsets() { return mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxInsets(); return mAppCompatController.getLetterboxPolicy().getLetterboxInsets(); } /** Gets the inner bounds of letterbox. The bounds will be empty if there is no letterbox. */ void getLetterboxInnerBounds(Rect outBounds) { mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxInnerBounds(outBounds); mAppCompatController.getLetterboxPolicy().getLetterboxInnerBounds(outBounds); } /** Loading @@ -1847,8 +1846,7 @@ final class ActivityRecord extends WindowToken { * when the current activity is displayed. */ boolean isFullyTransparentBarAllowed(Rect rect) { return mAppCompatController.getAppCompatLetterboxPolicy() .isFullyTransparentBarAllowed(rect); return mAppCompatController.getLetterboxPolicy().isFullyTransparentBarAllowed(rect); } private static class Token extends Binder { Loading Loading @@ -2820,8 +2818,7 @@ final class ActivityRecord extends WindowToken { } void removeStartingWindow() { final AppCompatLetterboxPolicy letterboxPolicy = mAppCompatController .getAppCompatLetterboxPolicy(); final AppCompatLetterboxPolicy letterboxPolicy = mAppCompatController.getLetterboxPolicy(); boolean prevEligibleForLetterboxEducation = letterboxPolicy.isEligibleForLetterboxEducation(); Loading Loading @@ -4448,7 +4445,7 @@ final class ActivityRecord extends WindowToken { mTaskSupervisor.getActivityMetricsLogger().notifyActivityRemoved(this); mTaskSupervisor.mStoppingActivities.remove(this); mAppCompatController.getAppCompatLetterboxPolicy().stop(); mAppCompatController.getLetterboxPolicy().stop(); mAppCompatController.getTransparentPolicy().stop(); // Defer removal of this activity when either a child is animating, or app transition is on Loading Loading @@ -7710,7 +7707,7 @@ final class ActivityRecord extends WindowToken { t.setLayer(mAnimationBoundsLayer, getLastLayer()); if (mNeedsLetterboxedAnimation) { final int cornerRadius = mAppCompatController.getAppCompatLetterboxPolicy() final int cornerRadius = mAppCompatController.getLetterboxPolicy() .getRoundedCornersRadius(findMainWindow()); final Rect letterboxInnerBounds = new Rect(); Loading Loading @@ -8296,8 +8293,7 @@ final class ActivityRecord extends WindowToken { final AppCompatAspectRatioPolicy aspectRatioPolicy = mAppCompatController.getAspectRatioPolicy(); aspectRatioPolicy.reset(); mAppCompatController.getAppCompatLetterboxPolicy() .resetFixedOrientationLetterboxEligibility(); mAppCompatController.getLetterboxPolicy().resetFixedOrientationLetterboxEligibility(); mResolveConfigHint.resolveTmpOverrides(mDisplayContent, newParentConfiguration, isFixedRotationTransforming()); Loading Loading @@ -8738,7 +8734,7 @@ final class ActivityRecord extends WindowToken { // make it fit the available bounds by scaling down its bounds. final int forcedOrientation = getRequestedConfigurationOrientation(); final boolean isEligibleForFixedOrientationLetterbox = mAppCompatController .getAppCompatLetterboxPolicy() .getLetterboxPolicy() .resolveFixedOrientationLetterboxEligibility(forcedOrientation, parentOrientation); if (!isEligibleForFixedOrientationLetterbox && (forcedOrientation == ORIENTATION_UNDEFINED Loading
services/core/java/com/android/server/wm/AppCompatController.java +5 −5 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class AppCompatController { @NonNull private final AppCompatDeviceStateQuery mDeviceStateQuery; @NonNull private final AppCompatLetterboxPolicy mAppCompatLetterboxPolicy; private final AppCompatLetterboxPolicy mLetterboxPolicy; @NonNull private final AppCompatSizeCompatModePolicy mSizeCompatModePolicy; Loading @@ -60,7 +60,7 @@ class AppCompatController { mTransparentPolicy, mAppCompatOverrides); mReachabilityPolicy = new AppCompatReachabilityPolicy(activityRecord, wmService.mAppCompatConfiguration); mAppCompatLetterboxPolicy = new AppCompatLetterboxPolicy(activityRecord, mLetterboxPolicy = new AppCompatLetterboxPolicy(activityRecord, wmService.mAppCompatConfiguration); mDesktopAspectRatioPolicy = new DesktopAppCompatAspectRatioPolicy(activityRecord, mAppCompatOverrides, mTransparentPolicy, wmService.mAppCompatConfiguration); Loading Loading @@ -114,8 +114,8 @@ class AppCompatController { } @NonNull AppCompatLetterboxPolicy getAppCompatLetterboxPolicy() { return mAppCompatLetterboxPolicy; AppCompatLetterboxPolicy getLetterboxPolicy() { return mLetterboxPolicy; } @NonNull Loading Loading @@ -145,7 +145,7 @@ class AppCompatController { void dump(@NonNull PrintWriter pw, @NonNull String prefix) { getTransparentPolicy().dump(pw, prefix); getAppCompatLetterboxPolicy().dump(pw, prefix); getLetterboxPolicy().dump(pw, prefix); getSizeCompatModePolicy().dump(pw, prefix); } Loading
services/core/java/com/android/server/wm/AppCompatLetterboxUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxPosition(@NonNull ActivityRecord activity, @NonNull Point outLetterboxPosition) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outLetterboxPosition.set(0, 0); return; } Loading @@ -54,7 +54,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxOuterBounds(@NonNull ActivityRecord activity, @NonNull Rect outOuterBounds) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outOuterBounds.setEmpty(); return; } Loading Loading @@ -82,7 +82,7 @@ class AppCompatLetterboxUtils { */ static void calculateLetterboxInnerBounds(@NonNull ActivityRecord activity, @NonNull WindowState window, @NonNull Rect outInnerBounds) { if (!activity.mAppCompatController.getAppCompatLetterboxPolicy().isRunning()) { if (!activity.mAppCompatController.getLetterboxPolicy().isRunning()) { outInnerBounds.setEmpty(); return; } Loading
services/core/java/com/android/server/wm/AppCompatUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ final class AppCompatUtils { } // Whether the direct top activity is eligible for letterbox education. appCompatTaskInfo.setEligibleForLetterboxEducation(isTopActivityResumed && top.mAppCompatController.getAppCompatLetterboxPolicy() && top.mAppCompatController.getLetterboxPolicy() .isEligibleForLetterboxEducation()); appCompatTaskInfo.setLetterboxEducationEnabled( top.mAppCompatController.getLetterboxOverrides() Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1580,7 +1580,7 @@ public class DisplayPolicy { final ActivityRecord currentActivity = win.getActivityRecord(); if (currentActivity != null) { final LetterboxDetails currentLetterboxDetails = currentActivity .mAppCompatController.getAppCompatLetterboxPolicy().getLetterboxDetails(); .mAppCompatController.getLetterboxPolicy().getLetterboxDetails(); if (currentLetterboxDetails != null) { mLetterboxDetails.add(currentLetterboxDetails); } Loading