am cc71518a: Merge "Include InputMethodSubtypeSwitchingController in state dump." into mnc-dev

* commit 'cc71518aef42089a5ff5367b8d54c18c01329e13':
  Include InputMethodSubtypeSwitchingController in state dump.
This commit is contained in:
Yohei Yukawa
2015-06-04 09:48:09 +00:00
committed by Android Git Automerger
2 changed files with 35 additions and 0 deletions

View File

@@ -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");
}
}
}

View File

@@ -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(" ");