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

Commit ee291a5f authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Check dump permissions before dumping --high-priority

Bug: 383328827
Change-Id: Ie4b4e0001430924674b08eabf28c656a46527727
Test: new cts test
Flag: EXEMPT bug fix
parent bfbc20d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7254,12 +7254,12 @@ public class WindowManagerService extends IWindowManager.Stub

    @Override
    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
        PriorityDump.dump(mPriorityDumper, fd, pw, args);
    }

    @NeverCompile // Avoid size overhead of debugging code.
    private void doDump(FileDescriptor fd, PrintWriter pw, String[] args, boolean useProto) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
        boolean dumpAll = false;

        int opti = 0;