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

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

Merge "Fix permission check bypass in IMMS#dump()" into sc-dev am: d48e28a9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13501285

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I486d86545e8bcb1f3cda1f636917c7b84c5a2abb
parents 4e4d015b d48e28a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5227,6 +5227,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub

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

        boolean asProto = false;
        for (int argIndex = 0; argIndex < args.length; argIndex++) {
            if (args[argIndex].equals(PROTO_ARG)) {
@@ -5249,8 +5251,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    }

    private void doDump(FileDescriptor fd, PrintWriter pw, String[] args, boolean useProto) {
        if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;

        if (useProto) {
            final ProtoOutputStream proto = new ProtoOutputStream(fd);
            dumpDebug(proto, InputMethodManagerServiceTraceProto.INPUT_METHOD_MANAGER_SERVICE);