diff options
author | Ming-Shin Lu <lumark@google.com> | 2020-04-15 23:49:40 +0800 |
---|---|---|
committer | Ming-Shin Lu <lumark@google.com> | 2020-04-15 23:49:40 +0800 |
commit | a0605a6bfdf411ead28c4c00eac28f773721c6ff (patch) | |
tree | 539d8dd9d1987aa5a6c2c96de49fdd16d0289f1c | |
parent | edb826c298b525a3a13678db27e8e25c6c579a6d (diff) |
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
-rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index e6cb37185d71..b949d6bcf2e2 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -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)) |