diff options
author | Yohei Yukawa <yukawa@google.com> | 2015-06-03 23:56:12 -0700 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2015-06-04 00:13:50 -0700 |
commit | d724886cc13990ebcf55134455ef0fa223054ae8 (patch) | |
tree | 458ea6889298c5319681b4864a9b951d5384a5ee /core/java/com | |
parent | 90bf7084bf4f681383bf3329b0935de55330e782 (diff) | |
download | frameworks_base-d724886cc13990ebcf55134455ef0fa223054ae8.zip frameworks_base-d724886cc13990ebcf55134455ef0fa223054ae8.tar.gz frameworks_base-d724886cc13990ebcf55134455ef0fa223054ae8.tar.bz2 |
Include InputMethodSubtypeSwitchingController in state dump.
In order to diagnose IME issues in multi-user / multi-profile
environment, internal state of
InputMethodSubtypeSwitchingController needs to be included in
the bugreport.
Bug: 19340792
Bug: 19587437
Bug: 21612582
Change-Id: I34aca2c1a4330ec08b5e40441e631809a8bb844e
Diffstat (limited to 'core/java/com')
-rw-r--r-- | core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java index ce94727..e607a3f 100644 --- a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java +++ b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.pm.PackageManager; import android.text.TextUtils; import android.util.Log; +import android.util.Printer; import android.util.Slog; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodSubtype; @@ -314,6 +315,15 @@ public class InputMethodSubtypeSwitchingController { } return null; } + + protected void dump(final Printer pw, final String prefix) { + final int N = mImeSubtypeList.size(); + for (int i = 0; i < N; ++i) { + final int rank = i; + final ImeSubtypeListItem item = mImeSubtypeList.get(i); + pw.println(prefix + "rank=" + rank + " item=" + item); + } + } } private static class DynamicRotationList { @@ -388,6 +398,14 @@ public class InputMethodSubtypeSwitchingController { } return null; } + + protected void dump(final Printer pw, final String prefix) { + for (int i = 0; i < mUsageHistoryOfSubtypeListItemIndex.length; ++i) { + final int rank = mUsageHistoryOfSubtypeListItemIndex[i]; + final ImeSubtypeListItem item = mImeSubtypeList.get(i); + pw.println(prefix + "rank=" + rank + " item=" + item); + } + } } @VisibleForTesting @@ -478,6 +496,13 @@ public class InputMethodSubtypeSwitchingController { } return result; } + + protected void dump(final Printer pw) { + pw.println(" mSwitchingAwareRotationList:"); + mSwitchingAwareRotationList.dump(pw, " "); + pw.println(" mSwitchingUnawareRotationList:"); + mSwitchingUnawareRotationList.dump(pw, " "); + } } private final InputMethodSettings mSettings; @@ -526,4 +551,12 @@ public class InputMethodSubtypeSwitchingController { return mSubtypeList.getSortedInputMethodAndSubtypeList( showSubtypes, includingAuxiliarySubtypes, isScreenLocked); } + + public void dump(final Printer pw) { + if (mController != null) { + mController.dump(pw); + } else { + pw.println(" mController=null"); + } + } } |