Loading core/java/android/window/DesktopModeFlags.java +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public enum DesktopModeFlags { ENABLE_WINDOWING_SCALED_RESIZING(Flags::enableWindowingScaledResizing, true), ENABLE_WINDOWING_TRANSITION_HANDLERS_OBSERVERS( Flags::enableWindowingTransitionHandlersObservers, false), EXCLUDE_CAPTION_FROM_APP_BOUNDS(Flags::excludeCaptionFromAppBounds, false), INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC( Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true) // go/keep-sorted end Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt +1 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.pm.ActivityInfo.OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGUR import android.content.pm.ActivityInfo.OVERRIDE_EXCLUDE_CAPTION_INSETS_FROM_APP_BOUNDS import android.window.DesktopModeFlags import com.android.internal.R import com.android.window.flags.Flags /** * Class to decide whether to apply app compat policies in desktop mode. Loading Loading @@ -64,7 +63,7 @@ class DesktopModeCompatPolicy(private val context: Context) { * is enabled. */ fun shouldExcludeCaptionFromAppBounds(taskInfo: TaskInfo): Boolean = Flags.excludeCaptionFromAppBounds() DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue && isAnyForceConsumptionFlagsEnabled() && taskInfo.topActivityInfo?.let { isInsetsCoupledWithConfiguration(it) && (!taskInfo.isResizeable || it.isChangeEnabled( Loading services/core/java/com/android/server/wm/AppCompatLetterboxPolicy.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package com.android.server.wm; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.content.res.Configuration.ORIENTATION_UNDEFINED; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.window.DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS; import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER; import static com.android.server.wm.AppCompatConfiguration.letterboxBackgroundTypeToString; Loading Loading @@ -311,7 +312,7 @@ class AppCompatLetterboxPolicy { } private boolean isFreeformActivityMatchParentAppBoundsHeight() { if (!Flags.excludeCaptionFromAppBounds()) { if (!EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue()) { return false; } final Task task = mActivityRecord.getTask(); Loading services/core/java/com/android/server/wm/AppCompatSandboxingPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.server.wm; import static android.window.DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS; import static com.android.server.wm.AppCompatUtils.isInDesktopMode; import android.annotation.NonNull; Loading @@ -22,8 +24,6 @@ import android.app.WindowConfiguration.WindowingMode; import android.content.res.Configuration; import android.graphics.Rect; import com.android.window.flags.Flags; /** * Encapsulate logic related to sandboxing for app compatibility. */ Loading @@ -48,7 +48,7 @@ class AppCompatSandboxingPolicy { */ void sandboxBoundsIfNeeded(@NonNull Configuration resolvedConfig, @WindowingMode int windowingMode) { if (!Flags.excludeCaptionFromAppBounds()) { if (!EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue()) { return; } Loading Loading
core/java/android/window/DesktopModeFlags.java +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public enum DesktopModeFlags { ENABLE_WINDOWING_SCALED_RESIZING(Flags::enableWindowingScaledResizing, true), ENABLE_WINDOWING_TRANSITION_HANDLERS_OBSERVERS( Flags::enableWindowingTransitionHandlersObservers, false), EXCLUDE_CAPTION_FROM_APP_BOUNDS(Flags::excludeCaptionFromAppBounds, false), INCLUDE_TOP_TRANSPARENT_FULLSCREEN_TASK_IN_DESKTOP_HEURISTIC( Flags::includeTopTransparentFullscreenTaskInDesktopHeuristic, true) // go/keep-sorted end Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeCompatPolicy.kt +1 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.content.pm.ActivityInfo.OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGUR import android.content.pm.ActivityInfo.OVERRIDE_EXCLUDE_CAPTION_INSETS_FROM_APP_BOUNDS import android.window.DesktopModeFlags import com.android.internal.R import com.android.window.flags.Flags /** * Class to decide whether to apply app compat policies in desktop mode. Loading Loading @@ -64,7 +63,7 @@ class DesktopModeCompatPolicy(private val context: Context) { * is enabled. */ fun shouldExcludeCaptionFromAppBounds(taskInfo: TaskInfo): Boolean = Flags.excludeCaptionFromAppBounds() DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue && isAnyForceConsumptionFlagsEnabled() && taskInfo.topActivityInfo?.let { isInsetsCoupledWithConfiguration(it) && (!taskInfo.isResizeable || it.isChangeEnabled( Loading
services/core/java/com/android/server/wm/AppCompatLetterboxPolicy.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package com.android.server.wm; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.content.res.Configuration.ORIENTATION_UNDEFINED; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.window.DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS; import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER; import static com.android.server.wm.AppCompatConfiguration.letterboxBackgroundTypeToString; Loading Loading @@ -311,7 +312,7 @@ class AppCompatLetterboxPolicy { } private boolean isFreeformActivityMatchParentAppBoundsHeight() { if (!Flags.excludeCaptionFromAppBounds()) { if (!EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue()) { return false; } final Task task = mActivityRecord.getTask(); Loading
services/core/java/com/android/server/wm/AppCompatSandboxingPolicy.java +3 −3 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ package com.android.server.wm; import static android.window.DesktopModeFlags.EXCLUDE_CAPTION_FROM_APP_BOUNDS; import static com.android.server.wm.AppCompatUtils.isInDesktopMode; import android.annotation.NonNull; Loading @@ -22,8 +24,6 @@ import android.app.WindowConfiguration.WindowingMode; import android.content.res.Configuration; import android.graphics.Rect; import com.android.window.flags.Flags; /** * Encapsulate logic related to sandboxing for app compatibility. */ Loading @@ -48,7 +48,7 @@ class AppCompatSandboxingPolicy { */ void sandboxBoundsIfNeeded(@NonNull Configuration resolvedConfig, @WindowingMode int windowingMode) { if (!Flags.excludeCaptionFromAppBounds()) { if (!EXCLUDE_CAPTION_FROM_APP_BOUNDS.isTrue()) { return; } Loading