Loading services/core/java/com/android/server/wm/LetterboxConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ final class LetterboxConfiguration { * Overrides corners raidus for activities presented in the letterbox mode. If given value < 0, * both it and a value of {@link * com.android.internal.R.integer.config_letterboxActivityCornersRadius} will be ignored and * and corners of the activity won't be rounded. * corners of the activity won't be rounded. */ void setLetterboxActivityCornersRadius(int cornersRadius) { mLetterboxActivityCornersRadius = cornersRadius; Loading services/core/java/com/android/server/wm/LetterboxUiController.java +8 −3 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ final class LetterboxUiController { if (mLetterbox == null) { mLetterbox = new Letterbox(() -> mActivityRecord.makeChildSurface(null), mActivityRecord.mWmService.mTransactionFactory, mLetterboxConfiguration::isLetterboxActivityCornersRounded, this::shouldLetterboxHaveRoundedCorners, this::getLetterboxBackgroundColor, this::hasWallpaperBackgroudForLetterbox, this::getLetterboxWallpaperBlurRadius, Loading @@ -175,6 +175,13 @@ final class LetterboxUiController { } } private boolean shouldLetterboxHaveRoundedCorners() { // TODO(b/214030873): remove once background is drawn for transparent activities // Letterbox shouldn't have rounded corners if the activity is transparent return mLetterboxConfiguration.isLetterboxActivityCornersRounded() && mActivityRecord.fillsParent(); } float getHorizontalPositionMultiplier(Configuration parentConfiguration) { // Don't check resolved configuration because it may not be updated yet during // configuration change. Loading Loading @@ -257,8 +264,6 @@ final class LetterboxUiController { @VisibleForTesting boolean shouldShowLetterboxUi(WindowState mainWindow) { return isSurfaceReadyAndVisible(mainWindow) && mainWindow.areAppWindowBoundsLetterboxed() // Check that an activity isn't transparent. && mActivityRecord.fillsParent() // Check for FLAG_SHOW_WALLPAPER explicitly instead of using // WindowContainer#showWallpaper because the later will return true when this // activity is using blurred wallpaper for letterbox backgroud. Loading Loading
services/core/java/com/android/server/wm/LetterboxConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ final class LetterboxConfiguration { * Overrides corners raidus for activities presented in the letterbox mode. If given value < 0, * both it and a value of {@link * com.android.internal.R.integer.config_letterboxActivityCornersRadius} will be ignored and * and corners of the activity won't be rounded. * corners of the activity won't be rounded. */ void setLetterboxActivityCornersRadius(int cornersRadius) { mLetterboxActivityCornersRadius = cornersRadius; Loading
services/core/java/com/android/server/wm/LetterboxUiController.java +8 −3 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ final class LetterboxUiController { if (mLetterbox == null) { mLetterbox = new Letterbox(() -> mActivityRecord.makeChildSurface(null), mActivityRecord.mWmService.mTransactionFactory, mLetterboxConfiguration::isLetterboxActivityCornersRounded, this::shouldLetterboxHaveRoundedCorners, this::getLetterboxBackgroundColor, this::hasWallpaperBackgroudForLetterbox, this::getLetterboxWallpaperBlurRadius, Loading @@ -175,6 +175,13 @@ final class LetterboxUiController { } } private boolean shouldLetterboxHaveRoundedCorners() { // TODO(b/214030873): remove once background is drawn for transparent activities // Letterbox shouldn't have rounded corners if the activity is transparent return mLetterboxConfiguration.isLetterboxActivityCornersRounded() && mActivityRecord.fillsParent(); } float getHorizontalPositionMultiplier(Configuration parentConfiguration) { // Don't check resolved configuration because it may not be updated yet during // configuration change. Loading Loading @@ -257,8 +264,6 @@ final class LetterboxUiController { @VisibleForTesting boolean shouldShowLetterboxUi(WindowState mainWindow) { return isSurfaceReadyAndVisible(mainWindow) && mainWindow.areAppWindowBoundsLetterboxed() // Check that an activity isn't transparent. && mActivityRecord.fillsParent() // Check for FLAG_SHOW_WALLPAPER explicitly instead of using // WindowContainer#showWallpaper because the later will return true when this // activity is using blurred wallpaper for letterbox backgroud. Loading