Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +4 −8 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.shared.desktopmode; import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED; import static com.android.server.display.feature.flags.Flags.enableDisplayContentModeManagement; import static com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper.enableBubbleToFullscreen; import android.annotation.NonNull; Loading Loading @@ -165,16 +164,13 @@ public class DesktopModeStatus { } // TODO (b/395014779): Change this to use WM API if ((display.getType() == Display.TYPE_EXTERNAL || display.getType() == Display.TYPE_OVERLAY) && enableDisplayContentModeManagement()) { if (!DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue()) { return false; } final WindowManager wm = context.getSystemService(WindowManager.class); return wm != null && wm.isEligibleForDesktopMode(display.getDisplayId()); } return false; } /** * Returns whether the multiple desktops feature is enabled for this device (both backend and * frontend implementations). Loading libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopStateImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ class DesktopStateImpl(context: Context) : DesktopState { if (!canEnterDesktopMode) return false if (!enforceDeviceRestrictions) return true if (display.type == Display.TYPE_INTERNAL) return canInternalDisplayHostDesktops if (!DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue) return false return windowManager?.isEligibleForDesktopMode(display.displayId) ?: false } Loading Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +4 −8 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.wm.shell.shared.desktopmode; import static android.hardware.display.DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED; import static com.android.server.display.feature.flags.Flags.enableDisplayContentModeManagement; import static com.android.wm.shell.shared.bubbles.BubbleAnythingFlagHelper.enableBubbleToFullscreen; import android.annotation.NonNull; Loading Loading @@ -165,16 +164,13 @@ public class DesktopModeStatus { } // TODO (b/395014779): Change this to use WM API if ((display.getType() == Display.TYPE_EXTERNAL || display.getType() == Display.TYPE_OVERLAY) && enableDisplayContentModeManagement()) { if (!DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue()) { return false; } final WindowManager wm = context.getSystemService(WindowManager.class); return wm != null && wm.isEligibleForDesktopMode(display.getDisplayId()); } return false; } /** * Returns whether the multiple desktops feature is enabled for this device (both backend and * frontend implementations). Loading
libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopStateImpl.kt +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ class DesktopStateImpl(context: Context) : DesktopState { if (!canEnterDesktopMode) return false if (!enforceDeviceRestrictions) return true if (display.type == Display.TYPE_INTERNAL) return canInternalDisplayHostDesktops if (!DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue) return false return windowManager?.isEligibleForDesktopMode(display.displayId) ?: false } Loading