diff options
| author | 2015-06-04 08:06:08 +0000 | |
|---|---|---|
| committer | 2015-06-04 08:06:10 +0000 | |
| commit | cc71518aef42089a5ff5367b8d54c18c01329e13 (patch) | |
| tree | 472932a8e5a4c2da790512b4de0722bc350ca872 | |
| parent | 1d283bf269fd51652fa26fcba28c1c407e54f58a (diff) | |
| parent | d724886cc13990ebcf55134455ef0fa223054ae8 (diff) | |
Merge "Include InputMethodSubtypeSwitchingController in state dump." into mnc-dev
| -rw-r--r-- | core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java | 33 | ||||
| -rw-r--r-- | services/core/java/com/android/server/InputMethodManagerService.java | 2 |
2 files changed, 35 insertions, 0 deletions
diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java index ce94727cd9f5..e607a3ff9ad0 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"); + } + } } diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java index e0992977155e..0513d8b86d38 100644 --- a/services/core/java/com/android/server/InputMethodManagerService.java +++ b/services/core/java/com/android/server/InputMethodManagerService.java @@ -3713,6 +3713,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub p.println(" mCurUserActionNotificationSequenceNumber=" + mCurUserActionNotificationSequenceNumber); p.println(" mSystemReady=" + mSystemReady + " mInteractive=" + mScreenOn); + p.println(" mSwitchingController:"); + mSwitchingController.dump(p); } p.println(" "); |