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

Commit 63ae7894 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android Build Coastguard Worker
Browse files

Check dump permissions before dumping --high-priority

Bug: 383328827
Test: new cts test
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c617d697cdbef000cb416aefc08fc4a3cda4afa1)
Merged-In: Ie4b4e0001430924674b08eabf28c656a46527727
Change-Id: Ie4b4e0001430924674b08eabf28c656a46527727
parent 0f3c01c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7201,12 +7201,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;