Merge "Include InputMethodSubtypeSwitchingController in state dump." into mnc-dev
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.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 @@
}
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 @@
}
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 @@
}
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 @@
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 e099297..0513d8b 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -3713,6 +3713,8 @@
p.println(" mCurUserActionNotificationSequenceNumber="
+ mCurUserActionNotificationSequenceNumber);
p.println(" mSystemReady=" + mSystemReady + " mInteractive=" + mScreenOn);
+ p.println(" mSwitchingController:");
+ mSwitchingController.dump(p);
}
p.println(" ");