Loading core/java/android/window/DesktopExperienceFlags.java +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,9 @@ public enum DesktopExperienceFlags { Flags.FLAG_FORCE_CLOSE_TOP_TRANSPARENT_FULLSCREEN_TASK), FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH(Flags::formFactorBasedDesktopFirstSwitch, true, Flags.FLAG_FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH), PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH( Flags::preserveRecentsTaskConfigurationOnRelaunch, false, Flags.FLAG_PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH), REPARENT_WINDOW_TOKEN_API(Flags::reparentWindowTokenApi, true, Flags.FLAG_REPARENT_WINDOW_TOKEN_API), RESPECT_FULLSCREEN_ACTIVITY_OPTION_IN_DESKTOP_LAUNCH_PARAMS( Loading core/java/android/window/DesktopModeFlags.java +0 −2 Original line number Diff line number Diff line Loading @@ -143,8 +143,6 @@ public enum DesktopModeFlags { Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true), INHERIT_TASK_BOUNDS_FOR_TRAMPOLINE_TASK_LAUNCHES( Flags::inheritTaskBoundsForTrampolineTaskLaunches, true), PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH( Flags::preserveRecentsTaskConfigurationOnRelaunch, false), SKIP_DECOR_VIEW_RELAYOUT_WHEN_CLOSING_BUGFIX( Flags::skipDecorViewRelayoutWhenClosingBugfix, true), // go/keep-sorted end Loading services/core/java/com/android/server/wm/DesktopAppCompatAspectRatioPolicy.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.annotation.NonNull; import android.app.WindowConfiguration; import android.content.pm.ActivityInfo; import android.graphics.Rect; import android.window.DesktopModeFlags; import android.window.DesktopExperienceFlags; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -71,7 +71,7 @@ public class DesktopAppCompatAspectRatioPolicy { * launched in. Takes into account any min or max aspect ratio constraints. */ float calculateAspectRatio(@NonNull Task task, boolean hasOrientationMismatch) { if (DesktopModeFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() if (DesktopExperienceFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() && task.inRecents && task.topRunningActivity() != null) { final ActivityRecord top = task.topRunningActivity(); // If activity eligible for SCM, use original aspect ratio. Loading services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java +2 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.os.SystemProperties; import android.util.Size; import android.view.Display; import android.view.Gravity; import android.window.DesktopExperienceFlags; import android.window.DesktopModeFlags; import java.util.function.Consumer; Loading Loading @@ -243,7 +244,7 @@ public final class DesktopModeBoundsCalculator { private static @Configuration.Orientation int getActivityConfigurationOrientation( @NonNull ActivityRecord activity, @NonNull Task task, @Configuration.Orientation int stableBoundsOrientation) { if (DesktopModeFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() if (DesktopExperienceFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() && task.inRecents && task.topRunningActivity() != null) { // If task in resents with running activity, inherit existing activity orientation. final WindowConfiguration windowConfiguration = Loading Loading
core/java/android/window/DesktopExperienceFlags.java +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,9 @@ public enum DesktopExperienceFlags { Flags.FLAG_FORCE_CLOSE_TOP_TRANSPARENT_FULLSCREEN_TASK), FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH(Flags::formFactorBasedDesktopFirstSwitch, true, Flags.FLAG_FORM_FACTOR_BASED_DESKTOP_FIRST_SWITCH), PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH( Flags::preserveRecentsTaskConfigurationOnRelaunch, false, Flags.FLAG_PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH), REPARENT_WINDOW_TOKEN_API(Flags::reparentWindowTokenApi, true, Flags.FLAG_REPARENT_WINDOW_TOKEN_API), RESPECT_FULLSCREEN_ACTIVITY_OPTION_IN_DESKTOP_LAUNCH_PARAMS( Loading
core/java/android/window/DesktopModeFlags.java +0 −2 Original line number Diff line number Diff line Loading @@ -143,8 +143,6 @@ public enum DesktopModeFlags { Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true), INHERIT_TASK_BOUNDS_FOR_TRAMPOLINE_TASK_LAUNCHES( Flags::inheritTaskBoundsForTrampolineTaskLaunches, true), PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH( Flags::preserveRecentsTaskConfigurationOnRelaunch, false), SKIP_DECOR_VIEW_RELAYOUT_WHEN_CLOSING_BUGFIX( Flags::skipDecorViewRelayoutWhenClosingBugfix, true), // go/keep-sorted end Loading
services/core/java/com/android/server/wm/DesktopAppCompatAspectRatioPolicy.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ import android.annotation.NonNull; import android.app.WindowConfiguration; import android.content.pm.ActivityInfo; import android.graphics.Rect; import android.window.DesktopModeFlags; import android.window.DesktopExperienceFlags; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -71,7 +71,7 @@ public class DesktopAppCompatAspectRatioPolicy { * launched in. Takes into account any min or max aspect ratio constraints. */ float calculateAspectRatio(@NonNull Task task, boolean hasOrientationMismatch) { if (DesktopModeFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() if (DesktopExperienceFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() && task.inRecents && task.topRunningActivity() != null) { final ActivityRecord top = task.topRunningActivity(); // If activity eligible for SCM, use original aspect ratio. Loading
services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java +2 −1 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.os.SystemProperties; import android.util.Size; import android.view.Display; import android.view.Gravity; import android.window.DesktopExperienceFlags; import android.window.DesktopModeFlags; import java.util.function.Consumer; Loading Loading @@ -243,7 +244,7 @@ public final class DesktopModeBoundsCalculator { private static @Configuration.Orientation int getActivityConfigurationOrientation( @NonNull ActivityRecord activity, @NonNull Task task, @Configuration.Orientation int stableBoundsOrientation) { if (DesktopModeFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() if (DesktopExperienceFlags.PRESERVE_RECENTS_TASK_CONFIGURATION_ON_RELAUNCH.isTrue() && task.inRecents && task.topRunningActivity() != null) { // If task in resents with running activity, inherit existing activity orientation. final WindowConfiguration windowConfiguration = Loading