diff options
author | 2024-08-14 14:33:12 +0000 | |
---|---|---|
committer | 2024-08-14 14:33:12 +0000 | |
commit | 3a30eff586c57252ce68e3b09f6e08d50ac7c90c (patch) | |
tree | eecd20b4e61b8a83fbc33f0d7b01643295b92303 | |
parent | 174af3f61de586523c7b7a430f4dcf17b156c809 (diff) | |
parent | 8b984a261f5588319c5c30b1fb95bf0b418259da (diff) |
Merge "Print max-task-limit flags in DesktopTasksController dumpsys." into main
2 files changed, 18 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java index 282385a16b5f..341ca0eb6bed 100644 --- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java +++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeStatus.java @@ -24,6 +24,8 @@ import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.window.flags.Flags; +import java.io.PrintWriter; + /** * Constants for desktop mode feature */ @@ -203,4 +205,19 @@ public class DesktopModeStatus { private static boolean isDeviceEligibleForDesktopMode(@NonNull Context context) { return !enforceDeviceRestrictions() || isDesktopModeSupported(context); } + + /** Dumps DesktopModeStatus flags and configs. */ + public static void dump(PrintWriter pw, String prefix, Context context) { + String innerPrefix = prefix + " "; + pw.print(prefix); pw.println(TAG); + pw.print(innerPrefix); pw.print("maxTaskLimit="); pw.println(getMaxTaskLimit(context)); + + pw.print(innerPrefix); pw.print("maxTaskLimit config override="); + pw.println(context.getResources().getInteger( + R.integer.config_maxDesktopWindowingActiveTasks)); + + SystemProperties.Handle maxTaskLimitHandle = SystemProperties.find(MAX_TASK_LIMIT_SYS_PROP); + pw.print(innerPrefix); pw.print("maxTaskLimit sysprop="); + pw.println(maxTaskLimitHandle == null ? "null" : maxTaskLimitHandle.getInt(/* def= */ -1)); + } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt index ecbb1ffff8b7..456d92ae2396 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt @@ -1528,6 +1528,7 @@ class DesktopTasksController( private fun dump(pw: PrintWriter, prefix: String) { val innerPrefix = "$prefix " pw.println("${prefix}DesktopTasksController") + DesktopModeStatus.dump(pw, innerPrefix, context) taskRepository.dump(pw, innerPrefix) } |