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

Commit 882430e1 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Improve IME dump formatting and spacing

Fixes some small inconsistencies in the spacing and formatting in some
portions of the IME dump.

Test: adb shell dumpsys input_method | less
Bug: 297200876
Change-Id: I4e8eb174a957c273d57f58b8f1db12a672442a44
parent 8450f5c4
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -259,19 +259,16 @@ public final class ImeTrackerService extends IImeTracker.Stub {
                    .withZone(ZoneId.systemDefault());

            pw.print(prefix);
            pw.println("ImeTrackerService#History.mLiveEntries: "
                    + mLiveEntries.size() + " elements");
            pw.println("mLiveEntries: " + mLiveEntries.size() + " elements");

            for (final var entry: mLiveEntries.values()) {
                dumpEntry(entry, pw, prefix, formatter);
                dumpEntry(entry, pw, prefix + "  ", formatter);
            }

            pw.print(prefix);
            pw.println("ImeTrackerService#History.mEntries: "
                    + mEntries.size() + " elements");
            pw.println("mEntries: " + mEntries.size() + " elements");

            for (final var entry: mEntries) {
                dumpEntry(entry, pw, prefix, formatter);
                dumpEntry(entry, pw, prefix + "  ", formatter);
            }
        }

+4 −4
Original line number Diff line number Diff line
@@ -588,12 +588,12 @@ public final class ImeVisibilityStateComputer {
        proto.write(INPUT_SHOWN, mInputShown);
    }

    void dump(PrintWriter pw) {
    void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
        final Printer p = new PrintWriterPrinter(pw);
        p.println(" mRequestedShowExplicitly=" + mRequestedShowExplicitly
        p.println(prefix + "mRequestedShowExplicitly=" + mRequestedShowExplicitly
                + " mShowForced=" + mShowForced);
        p.println("  mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
        p.println("  mInputShown=" + mInputShown);
        p.println(prefix + "mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
        p.println(prefix + "mInputShown=" + mInputShown);
    }

    /**
+30 −30
Original line number Diff line number Diff line
@@ -358,12 +358,12 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub

        @Override
        public String toString() {
            return "SessionState{uid " + mClient.mUid + " pid " + mClient.mPid
                    + " method " + Integer.toHexString(
            return "SessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
                    + " method=" + Integer.toHexString(
                    IInputMethodInvoker.getBinderIdentityHashCode(mMethod))
                    + " session " + Integer.toHexString(
                    + " session=" + Integer.toHexString(
                    System.identityHashCode(mSession))
                    + " channel " + mChannel
                    + " channel=" + mChannel
                    + "}";
        }

@@ -388,9 +388,9 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub

        @Override
        public String toString() {
            return "AccessibilitySessionState{uid " + mClient.mUid + " pid " + mClient.mPid
                    + " id " + Integer.toHexString(mId)
                    + " session " + Integer.toHexString(
            return "AccessibilitySessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
                    + " id=" + Integer.toHexString(mId)
                    + " session=" + Integer.toHexString(
                    System.identityHashCode(mSession))
                    + "}";
        }
@@ -884,7 +884,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                    continue;
                }
                pw.print(prefix);
                pw.println("SoftInputShowHideHistory #" + entry.mSequenceNumber + ":");
                pw.println("SoftInputShowHide #" + entry.mSequenceNumber + ":");

                pw.print(prefix);
                pw.println("  time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
@@ -5946,11 +5946,11 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                p.println("  InputMethod #" + i + ":");
                info.dump(p, "    ");
            }
            p.println("  Clients:");
            p.println("  ClientStates:");
            final int numClients = mClients.size();
            for (int i = 0; i < numClients; ++i) {
                final ClientState ci = mClients.valueAt(i);
                p.println("  Client " + ci + ":");
                p.println("  " + ci + ":");
                p.println("    client=" + ci.mClient);
                p.println("    fallbackInputConnection=" + ci.mFallbackInputConnection);
                p.println("    sessionRequested=" + ci.mSessionRequested);
@@ -5977,7 +5977,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
            method = getCurMethodLocked();
            p.println("  mCurMethod=" + getCurMethodLocked());
            p.println("  mEnabledSession=" + mEnabledSession);
            mVisibilityStateComputer.dump(pw);
            mVisibilityStateComputer.dump(pw, "  ");
            p.println("  mInFullscreenMode=" + mInFullscreenMode);
            p.println("  mSystemReady=" + mSystemReady + " mInteractive=" + mIsInteractive);
            p.println("  ENABLE_HIDE_IME_CAPTION_BAR="
+4 −4

File changed.

Contains only whitespace changes.