Loading services/core/java/com/android/server/wm/Transition.java +20 −7 Original line number Diff line number Diff line Loading @@ -1731,13 +1731,26 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } if (activityRecord != null || (taskFragment != null && taskFragment.isEmbedded())) { // Set background color to Task theme color for activity and embedded TaskFragment // in case we want to show background during the animation. final int backgroundColor; final TaskFragment organizedTf = activityRecord != null ? activityRecord.getOrganizedTaskFragment() : taskFragment.getOrganizedTaskFragment(); if (organizedTf != null && organizedTf.getAnimationParams() .getAnimationBackgroundColor() != 0) { // This window is embedded and has an animation background color set on the // TaskFragment. Pass this color with this window, so the handler can use it as // the animation background color if needed, backgroundColor = organizedTf.getAnimationParams() .getAnimationBackgroundColor(); } else { // Set background color to Task theme color for activity and embedded // TaskFragment in case we want to show background during the animation. final Task parentTask = activityRecord != null ? activityRecord.getTask() : taskFragment.getTask(); final int backgroundColor = ColorUtils.setAlphaComponent( backgroundColor = ColorUtils.setAlphaComponent( parentTask.getTaskDescription().getBackgroundColor(), 255); } change.setBackgroundColor(backgroundColor); } Loading services/core/java/com/android/server/wm/WindowContainer.java +20 −8 Original line number Diff line number Diff line Loading @@ -3144,6 +3144,17 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< // If available use the background color provided through getBackgroundColor // which if set originates from a call to overridePendingAppTransition. backgroundColorForTransition = adapter.getBackgroundColor(); } else { final TaskFragment organizedTf = activityRecord != null ? activityRecord.getOrganizedTaskFragment() : taskFragment.getOrganizedTaskFragment(); if (organizedTf != null && organizedTf.getAnimationParams() .getAnimationBackgroundColor() != 0) { // This window is embedded and has an animation background color set on the // TaskFragment. Pass this color with this window, so the handler can use it // as the animation background color if needed, backgroundColorForTransition = organizedTf.getAnimationParams() .getAnimationBackgroundColor(); } else { // Otherwise default to the window's background color if provided through // the theme as the background color for the animation - the top most window Loading @@ -3154,6 +3165,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< backgroundColorForTransition = ColorUtils.setAlphaComponent( parentTask.getTaskDescription().getBackgroundColor(), 255); } } animationRunnerBuilder.setTaskBackgroundColor(backgroundColorForTransition); } Loading Loading
services/core/java/com/android/server/wm/Transition.java +20 −7 Original line number Diff line number Diff line Loading @@ -1731,13 +1731,26 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } if (activityRecord != null || (taskFragment != null && taskFragment.isEmbedded())) { // Set background color to Task theme color for activity and embedded TaskFragment // in case we want to show background during the animation. final int backgroundColor; final TaskFragment organizedTf = activityRecord != null ? activityRecord.getOrganizedTaskFragment() : taskFragment.getOrganizedTaskFragment(); if (organizedTf != null && organizedTf.getAnimationParams() .getAnimationBackgroundColor() != 0) { // This window is embedded and has an animation background color set on the // TaskFragment. Pass this color with this window, so the handler can use it as // the animation background color if needed, backgroundColor = organizedTf.getAnimationParams() .getAnimationBackgroundColor(); } else { // Set background color to Task theme color for activity and embedded // TaskFragment in case we want to show background during the animation. final Task parentTask = activityRecord != null ? activityRecord.getTask() : taskFragment.getTask(); final int backgroundColor = ColorUtils.setAlphaComponent( backgroundColor = ColorUtils.setAlphaComponent( parentTask.getTaskDescription().getBackgroundColor(), 255); } change.setBackgroundColor(backgroundColor); } Loading
services/core/java/com/android/server/wm/WindowContainer.java +20 −8 Original line number Diff line number Diff line Loading @@ -3144,6 +3144,17 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< // If available use the background color provided through getBackgroundColor // which if set originates from a call to overridePendingAppTransition. backgroundColorForTransition = adapter.getBackgroundColor(); } else { final TaskFragment organizedTf = activityRecord != null ? activityRecord.getOrganizedTaskFragment() : taskFragment.getOrganizedTaskFragment(); if (organizedTf != null && organizedTf.getAnimationParams() .getAnimationBackgroundColor() != 0) { // This window is embedded and has an animation background color set on the // TaskFragment. Pass this color with this window, so the handler can use it // as the animation background color if needed, backgroundColorForTransition = organizedTf.getAnimationParams() .getAnimationBackgroundColor(); } else { // Otherwise default to the window's background color if provided through // the theme as the background color for the animation - the top most window Loading @@ -3154,6 +3165,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< backgroundColorForTransition = ColorUtils.setAlphaComponent( parentTask.getTaskDescription().getBackgroundColor(), 255); } } animationRunnerBuilder.setTaskBackgroundColor(backgroundColorForTransition); } Loading