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

Commit a0605a6b authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Fix SoftInputShowHideHistory entry seq number representation

The sequence number will be reset from 0 when calling dumpsys input_method.
This increasing number should be stored into history Entry.

Fix: 154115116
Test: Use `adb shell dumpsys input_method` command multple times,
      Observe if the sequence number of SoftInputShowHidHistory entry
      is increasing.
Change-Id: Ic8c3afd8eb6748012edc860156c9f9aa78e2d4a6
parent edb826c2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -784,6 +784,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        private static final AtomicInteger sSequenceNumber = new AtomicInteger(0);

        private static final class Entry {
            final int mSequenceNumber = sSequenceNumber.getAndIncrement();
            final ClientState mClientState;
            @SoftInputModeFlags
            final int mFocusedWindowSoftInputMode;
@@ -831,7 +832,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                    continue;
                }
                pw.print(prefix);
                pw.println("SoftInputShowHideHistory #" + sSequenceNumber.getAndIncrement() + ":");
                pw.println("SoftInputShowHideHistory #" + entry.mSequenceNumber + ":");

                pw.print(prefix);
                pw.println(" time=" + dataFormat.format(new Date(entry.mWallTime))