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

Commit bca03797 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adding permission check for dumping visible windows" into rvc-dev am:...

Merge "Adding permission check for dumping visible windows" into rvc-dev am: 10bee631 am: acfb372f am: c171518f

Change-Id: I1f2b1e195696f9163923f1045d9c15608dfe9bd8
parents cbb8f44f c171518f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -351,6 +351,11 @@ public class WindowManagerShellCommand extends ShellCommand {
    }

    private int runDumpVisibleWindowViews(PrintWriter pw) {
        if (!mInternal.checkCallingPermission(android.Manifest.permission.DUMP,
                "runDumpVisibleWindowViews()")) {
            throw new SecurityException("Requires DUMP permission");
        }

        try (ZipOutputStream out = new ZipOutputStream(getRawOutputStream())) {
            ArrayList<Pair<String, ByteTransferPipe>> requestList = new ArrayList<>();
            synchronized (mInternal.mGlobalLock) {