From 6ea302dda1459545303ddd153df663fcfa1c16bb Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 17 Oct 2023 18:33:52 +0000 Subject: Fix issue with WMShell help commands not printing Bug: 305873102 Test: dumpsys activity service SystemUIService WMShell help Change-Id: I3c97201f70a6b6fed2240ed865b510d4fa4c3dea --- packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java index 897c4da0fae2..1e801aeb5a29 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java @@ -33,6 +33,7 @@ import android.content.res.Configuration; import android.graphics.Rect; import android.inputmethodservice.InputMethodService; import android.os.IBinder; +import android.util.Log; import android.view.Display; import android.view.KeyEvent; @@ -66,6 +67,7 @@ import com.android.wm.shell.splitscreen.SplitScreen; import com.android.wm.shell.sysui.ShellInterface; import java.io.PrintWriter; +import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.concurrent.Executor; @@ -371,6 +373,13 @@ public final class WMShell implements @Override public void dump(PrintWriter pw, String[] args) { + Log.d(TAG, "Dumping with args: " + String.join(", ", args)); + + // Strip out the SysUI "dependency" arg before sending to WMShell + if (args[0].equals("dependency")) { + args = Arrays.copyOfRange(args, 1, args.length); + } + // Handle commands if provided if (mShell.handleCommand(args, pw)) { return; -- cgit v1.2.3-59-g8ed1b