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

Commit e4be4a71 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: Ia9f1dac540deeb5e0afe77bd3c70a64605a1a828
parents a1a96def 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);