Loading libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationBackground.java +22 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS; import android.annotation.NonNull; import android.annotation.Nullable; import android.graphics.Color; import android.graphics.Rect; import android.view.SurfaceControl; Loading Loading @@ -59,6 +60,23 @@ public class BackAnimationBackground { */ public void ensureBackground(Rect startRect, int color, @NonNull SurfaceControl.Transaction transaction, int statusbarHeight) { ensureBackground(startRect, color, transaction, statusbarHeight, null /* cropBounds */, 0 /* cornerRadius */); } /** * Ensures the back animation background color layer is present. * * @param startRect The start bounds of the closing target. * @param color The background color. * @param transaction The animation transaction. * @param statusbarHeight The height of the statusbar (in px). * @param cropBounds The crop bounds of the surface, set to non-empty to show wallpaper. * @param cornerRadius The radius of corner, only work when cropBounds is not empty. */ public void ensureBackground(Rect startRect, int color, @NonNull SurfaceControl.Transaction transaction, int statusbarHeight, @Nullable Rect cropBounds, float cornerRadius) { if (mBackgroundSurface != null) { return; } Loading @@ -78,6 +96,10 @@ public class BackAnimationBackground { transaction.setColor(mBackgroundSurface, colorComponents) .setLayer(mBackgroundSurface, BACKGROUND_LAYER) .show(mBackgroundSurface); if (cropBounds != null && !cropBounds.isEmpty()) { transaction.setCrop(mBackgroundSurface, cropBounds) .setCornerRadius(mBackgroundSurface, cornerRadius); } mStartBounds = startRect; mIsRequestingStatusBarAppearance = false; mStatusbarHeight = statusbarHeight; Loading libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt +7 −4 Original line number Diff line number Diff line Loading @@ -192,7 +192,10 @@ abstract class CrossActivityBackAnimation( closingTarget!!.windowConfiguration.bounds, getBackgroundColor(), transaction, statusbarHeight statusbarHeight, if (closingTarget!!.windowConfiguration.tasksAreFloating()) closingTarget!!.localBounds else null, cornerRadius ) ensureScrimLayer() if (isLetterboxed && enteringHasSameLetterbox) { Loading services/core/java/com/android/server/wm/BackNavigationController.java +3 −1 Original line number Diff line number Diff line Loading @@ -283,8 +283,10 @@ class BackNavigationController { // keyguard locked and activities are unable to show when locked. backType = BackNavigationInfo.TYPE_CALLBACK; } } else if (currentTask.mAtmService.getLockTaskController().isTaskLocked(currentTask)) { } else if (currentTask.mAtmService.getLockTaskController().isTaskLocked(currentTask) || currentTask.getWindowConfiguration().tasksAreFloating()) { // Do not predict if current task is in task locked. // Also, it is unable to play cross task animation for floating task. backType = BackNavigationInfo.TYPE_CALLBACK; } else { // Check back-to-home or cross-task Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationBackground.java +22 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS; import android.annotation.NonNull; import android.annotation.Nullable; import android.graphics.Color; import android.graphics.Rect; import android.view.SurfaceControl; Loading Loading @@ -59,6 +60,23 @@ public class BackAnimationBackground { */ public void ensureBackground(Rect startRect, int color, @NonNull SurfaceControl.Transaction transaction, int statusbarHeight) { ensureBackground(startRect, color, transaction, statusbarHeight, null /* cropBounds */, 0 /* cornerRadius */); } /** * Ensures the back animation background color layer is present. * * @param startRect The start bounds of the closing target. * @param color The background color. * @param transaction The animation transaction. * @param statusbarHeight The height of the statusbar (in px). * @param cropBounds The crop bounds of the surface, set to non-empty to show wallpaper. * @param cornerRadius The radius of corner, only work when cropBounds is not empty. */ public void ensureBackground(Rect startRect, int color, @NonNull SurfaceControl.Transaction transaction, int statusbarHeight, @Nullable Rect cropBounds, float cornerRadius) { if (mBackgroundSurface != null) { return; } Loading @@ -78,6 +96,10 @@ public class BackAnimationBackground { transaction.setColor(mBackgroundSurface, colorComponents) .setLayer(mBackgroundSurface, BACKGROUND_LAYER) .show(mBackgroundSurface); if (cropBounds != null && !cropBounds.isEmpty()) { transaction.setCrop(mBackgroundSurface, cropBounds) .setCornerRadius(mBackgroundSurface, cornerRadius); } mStartBounds = startRect; mIsRequestingStatusBarAppearance = false; mStatusbarHeight = statusbarHeight; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt +7 −4 Original line number Diff line number Diff line Loading @@ -192,7 +192,10 @@ abstract class CrossActivityBackAnimation( closingTarget!!.windowConfiguration.bounds, getBackgroundColor(), transaction, statusbarHeight statusbarHeight, if (closingTarget!!.windowConfiguration.tasksAreFloating()) closingTarget!!.localBounds else null, cornerRadius ) ensureScrimLayer() if (isLetterboxed && enteringHasSameLetterbox) { Loading
services/core/java/com/android/server/wm/BackNavigationController.java +3 −1 Original line number Diff line number Diff line Loading @@ -283,8 +283,10 @@ class BackNavigationController { // keyguard locked and activities are unable to show when locked. backType = BackNavigationInfo.TYPE_CALLBACK; } } else if (currentTask.mAtmService.getLockTaskController().isTaskLocked(currentTask)) { } else if (currentTask.mAtmService.getLockTaskController().isTaskLocked(currentTask) || currentTask.getWindowConfiguration().tasksAreFloating()) { // Do not predict if current task is in task locked. // Also, it is unable to play cross task animation for floating task. backType = BackNavigationInfo.TYPE_CALLBACK; } else { // Check back-to-home or cross-task Loading