Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ea302dd authored by Winson Chung's avatar Winson Chung
Browse files

Fix issue with WMShell help commands not printing

Bug: 305873102
Test: dumpsys activity service SystemUIService WMShell help
Change-Id: I3c97201f70a6b6fed2240ed865b510d4fa4c3dea
parent 52d4cfa2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;