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

Commit a966b99c authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Support prefix in SubtypeSwitchingController#dump()

Before making InputMethodSubtypeSwitchingController multi-user aware,
this CL enables prefix support into

  InputMethodSubtypeSwitchingController#dump()

in case we need to adjust the indentation level when each user starts
having its own InputMethodSubtypeSwitchingController instance.

For now there must be no observable behavior change.

Bug: 305849394
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I11b34a99d18a1f4ba65498b2fb1d6acce51ee369
parent 25baebe5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6109,7 +6109,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            p.println("  mStylusIds=" + (mStylusIds != null
                    ? Arrays.toString(mStylusIds.toArray()) : ""));
            p.println("  mSwitchingController:");
            mSwitchingController.dump(p);
            mSwitchingController.dump(p, "    ");

            p.println("  mStartInputHistory:");
            mStartInputHistory.dump(pw, "    ");
+8 −8
Original line number Diff line number Diff line
@@ -465,11 +465,11 @@ final class InputMethodSubtypeSwitchingController {
            return result;
        }

        protected void dump(final Printer pw) {
            pw.println("    mSwitchingAwareRotationList:");
            mSwitchingAwareRotationList.dump(pw, "      ");
            pw.println("    mSwitchingUnawareRotationList:");
            mSwitchingUnawareRotationList.dump(pw, "      ");
        protected void dump(@NonNull Printer pw, @NonNull String prefix) {
            pw.println(prefix + "mSwitchingAwareRotationList:");
            mSwitchingAwareRotationList.dump(pw, prefix + "  ");
            pw.println(prefix + "mSwitchingUnawareRotationList:");
            mSwitchingUnawareRotationList.dump(pw, prefix + "  ");
        }
    }

@@ -529,11 +529,11 @@ final class InputMethodSubtypeSwitchingController {
        return mController.getNextInputMethod(onlyCurrentIme, imi, subtype);
    }

    public void dump(final Printer pw) {
    public void dump(@NonNull Printer pw, @NonNull String prefix) {
        if (mController != null) {
            mController.dump(pw);
            mController.dump(pw, prefix);
        } else {
            pw.println("    mController=null");
            pw.println(prefix + "mController=null");
        }
    }
}