Loading core/java/android/window/DesktopModeFlags.java +5 −0 Original line number Diff line number Diff line Loading @@ -104,9 +104,12 @@ public enum DesktopModeFlags { ENABLE_MODALS_FULLSCREEN_WITH_PERMISSIONS(Flags::enableModalsFullscreenWithPermission, false), ENABLE_OPAQUE_BACKGROUND_FOR_TRANSPARENT_WINDOWS( Flags::enableOpaqueBackgroundForTransparentWindows, false), ENABLE_QUICKSWITCH_DESKTOP_SPLIT_BUGFIX(Flags::enableQuickswitchDesktopSplitBugfix, true), ENABLE_RESIZING_METRICS(Flags::enableResizingMetrics, true), ENABLE_RESTORE_TO_PREVIOUS_SIZE_FROM_DESKTOP_IMMERSIVE( Flags::enableRestoreToPreviousSizeFromDesktopImmersive, true), ENABLE_START_LAUNCH_TRANSITION_FROM_TASKBAR_BUGFIX( Flags::enableStartLaunchTransitionFromTaskbarBugfix, true), ENABLE_TASKBAR_OVERFLOW(Flags::enableTaskbarOverflow, false), ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS(Flags::enableTaskResizingKeyboardShortcuts, true), ENABLE_TASK_STACK_OBSERVER_IN_SHELL(Flags::enableTaskStackObserverInShell, true), Loading @@ -120,6 +123,8 @@ public enum DesktopModeFlags { ENABLE_WINDOWING_TRANSITION_HANDLERS_OBSERVERS( Flags::enableWindowingTransitionHandlersObservers, false), EXCLUDE_CAPTION_FROM_APP_BOUNDS(Flags::excludeCaptionFromAppBounds, false), IGNORE_ASPECT_RATIO_RESTRICTIONS_FOR_RESIZEABLE_FREEFORM_ACTIVITIES( Flags::ignoreAspectRatioRestrictionsForResizeableFreeformActivities, true), INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC( Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true) // go/keep-sorted end Loading services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -36,8 +36,7 @@ import android.app.WindowConfiguration; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Rect; import com.android.window.flags.Flags; import android.window.DesktopModeFlags; /** * Encapsulate app compat policy logic related to aspect ratio. Loading Loading @@ -298,7 +297,8 @@ class AppCompatAspectRatioPolicy { // Camera compat mode is an exception to this, where the activity is letterboxed // to an aspect ratio commonly found on phones, e.g. 16:9, to avoid issues like // stretching of the camera preview. || (Flags.ignoreAspectRatioRestrictionsForResizeableFreeformActivities() || (DesktopModeFlags .IGNORE_ASPECT_RATIO_RESTRICTIONS_FOR_RESIZEABLE_FREEFORM_ACTIVITIES.isTrue() && task.getWindowingMode() == WINDOWING_MODE_FREEFORM && !mActivityRecord.shouldCreateAppCompatDisplayInsets() && !AppCompatCameraPolicy.shouldCameraCompatControlAspectRatio( Loading Loading
core/java/android/window/DesktopModeFlags.java +5 −0 Original line number Diff line number Diff line Loading @@ -104,9 +104,12 @@ public enum DesktopModeFlags { ENABLE_MODALS_FULLSCREEN_WITH_PERMISSIONS(Flags::enableModalsFullscreenWithPermission, false), ENABLE_OPAQUE_BACKGROUND_FOR_TRANSPARENT_WINDOWS( Flags::enableOpaqueBackgroundForTransparentWindows, false), ENABLE_QUICKSWITCH_DESKTOP_SPLIT_BUGFIX(Flags::enableQuickswitchDesktopSplitBugfix, true), ENABLE_RESIZING_METRICS(Flags::enableResizingMetrics, true), ENABLE_RESTORE_TO_PREVIOUS_SIZE_FROM_DESKTOP_IMMERSIVE( Flags::enableRestoreToPreviousSizeFromDesktopImmersive, true), ENABLE_START_LAUNCH_TRANSITION_FROM_TASKBAR_BUGFIX( Flags::enableStartLaunchTransitionFromTaskbarBugfix, true), ENABLE_TASKBAR_OVERFLOW(Flags::enableTaskbarOverflow, false), ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS(Flags::enableTaskResizingKeyboardShortcuts, true), ENABLE_TASK_STACK_OBSERVER_IN_SHELL(Flags::enableTaskStackObserverInShell, true), Loading @@ -120,6 +123,8 @@ public enum DesktopModeFlags { ENABLE_WINDOWING_TRANSITION_HANDLERS_OBSERVERS( Flags::enableWindowingTransitionHandlersObservers, false), EXCLUDE_CAPTION_FROM_APP_BOUNDS(Flags::excludeCaptionFromAppBounds, false), IGNORE_ASPECT_RATIO_RESTRICTIONS_FOR_RESIZEABLE_FREEFORM_ACTIVITIES( Flags::ignoreAspectRatioRestrictionsForResizeableFreeformActivities, true), INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC( Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true) // go/keep-sorted end Loading
services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -36,8 +36,7 @@ import android.app.WindowConfiguration; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Rect; import com.android.window.flags.Flags; import android.window.DesktopModeFlags; /** * Encapsulate app compat policy logic related to aspect ratio. Loading Loading @@ -298,7 +297,8 @@ class AppCompatAspectRatioPolicy { // Camera compat mode is an exception to this, where the activity is letterboxed // to an aspect ratio commonly found on phones, e.g. 16:9, to avoid issues like // stretching of the camera preview. || (Flags.ignoreAspectRatioRestrictionsForResizeableFreeformActivities() || (DesktopModeFlags .IGNORE_ASPECT_RATIO_RESTRICTIONS_FOR_RESIZEABLE_FREEFORM_ACTIVITIES.isTrue() && task.getWindowingMode() == WINDOWING_MODE_FREEFORM && !mActivityRecord.shouldCreateAppCompatDisplayInsets() && !AppCompatCameraPolicy.shouldCameraCompatControlAspectRatio( Loading