Dump settings.

Bug: 10315296
Change-Id: Ieb020a23886514b3ba97611d8a6001f32b322f63
main
Jean Chalard 2014-02-12 22:53:15 +09:00
parent 5a885e85c2
commit 367a35d377
3 changed files with 108 additions and 7 deletions

View File

@ -1731,13 +1731,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
p.println(" Keyboard mode = " + keyboardMode);
final SettingsValues settingsValues = mSettings.getCurrent();
p.println(" mIsSuggestionsRequested = " + settingsValues.isSuggestionsRequested());
p.println(" mCorrectionEnabled=" + settingsValues.mCorrectionEnabled);
p.println(" isComposingWord=" + mInputLogic.mWordComposer.isComposingWord());
p.println(" mSoundOn=" + settingsValues.mSoundOn);
p.println(" mVibrateOn=" + settingsValues.mVibrateOn);
p.println(" mKeyPreviewPopupOn=" + settingsValues.mKeyPreviewPopupOn);
p.println(" inputAttributes=" + settingsValues.mInputAttributes);
p.println(settingsValues.dump());
// TODO: Dump all settings values
}
}

View File

@ -329,4 +329,86 @@ public final class SettingsValues {
}
return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, true);
}
public String dump() {
final StringBuilder sb = new StringBuilder("Current settings :");
sb.append("\n mSpacingAndPunctuations = ");
sb.append("" + mSpacingAndPunctuations.dump());
sb.append("\n mDelayUpdateOldSuggestions = ");
sb.append("" + mDelayUpdateOldSuggestions);
sb.append("\n mAutoCap = ");
sb.append("" + mAutoCap);
sb.append("\n mVibrateOn = ");
sb.append("" + mVibrateOn);
sb.append("\n mSoundOn = ");
sb.append("" + mSoundOn);
sb.append("\n mKeyPreviewPopupOn = ");
sb.append("" + mKeyPreviewPopupOn);
sb.append("\n mShowsVoiceInputKey = ");
sb.append("" + mShowsVoiceInputKey);
sb.append("\n mIncludesOtherImesInLanguageSwitchList = ");
sb.append("" + mIncludesOtherImesInLanguageSwitchList);
sb.append("\n mShowsLanguageSwitchKey = ");
sb.append("" + mShowsLanguageSwitchKey);
sb.append("\n mUseContactsDict = ");
sb.append("" + mUseContactsDict);
sb.append("\n mUsePersonalizedDicts = ");
sb.append("" + mUsePersonalizedDicts);
sb.append("\n mUseDoubleSpacePeriod = ");
sb.append("" + mUseDoubleSpacePeriod);
sb.append("\n mBlockPotentiallyOffensive = ");
sb.append("" + mBlockPotentiallyOffensive);
sb.append("\n mBigramPredictionEnabled = ");
sb.append("" + mBigramPredictionEnabled);
sb.append("\n mGestureInputEnabled = ");
sb.append("" + mGestureInputEnabled);
sb.append("\n mGestureTrailEnabled = ");
sb.append("" + mGestureTrailEnabled);
sb.append("\n mGestureFloatingPreviewTextEnabled = ");
sb.append("" + mGestureFloatingPreviewTextEnabled);
sb.append("\n mSlidingKeyInputPreviewEnabled = ");
sb.append("" + mSlidingKeyInputPreviewEnabled);
sb.append("\n mPhraseGestureEnabled = ");
sb.append("" + mPhraseGestureEnabled);
sb.append("\n mKeyLongpressTimeout = ");
sb.append("" + mKeyLongpressTimeout);
sb.append("\n mLocale = ");
sb.append("" + mLocale);
sb.append("\n mInputAttributes = ");
sb.append("" + mInputAttributes);
sb.append("\n mKeypressVibrationDuration = ");
sb.append("" + mKeypressVibrationDuration);
sb.append("\n mKeypressSoundVolume = ");
sb.append("" + mKeypressSoundVolume);
sb.append("\n mKeyPreviewPopupDismissDelay = ");
sb.append("" + mKeyPreviewPopupDismissDelay);
sb.append("\n mAutoCorrectEnabled = ");
sb.append("" + mAutoCorrectEnabled);
sb.append("\n mAutoCorrectionThreshold = ");
sb.append("" + mAutoCorrectionThreshold);
sb.append("\n mCorrectionEnabled = ");
sb.append("" + mCorrectionEnabled);
sb.append("\n mSuggestionVisibility = ");
sb.append("" + mSuggestionVisibility);
sb.append("\n mUseOnlyPersonalizationDictionaryForDebug = ");
sb.append("" + mUseOnlyPersonalizationDictionaryForDebug);
sb.append("\n mDisplayOrientation = ");
sb.append("" + mDisplayOrientation);
sb.append("\n mAppWorkarounds = ");
final AppWorkaroundsUtils awu = mAppWorkarounds.get(null, 0);
sb.append("" + (null == awu ? "null" : awu.toString()));
sb.append("\n mAdditionalFeaturesSettingValues = ");
sb.append("" + Arrays.toString(mAdditionalFeaturesSettingValues));
sb.append("\n mIsInternal = ");
sb.append("" + mIsInternal);
sb.append("\n mKeyPreviewShowUpDuration = ");
sb.append("" + mKeyPreviewShowUpDuration);
sb.append("\n mKeyPreviewDismissDuration = ");
sb.append("" + mKeyPreviewDismissDuration);
sb.append("\n mKeyPreviewShowUpStartScale = ");
sb.append("" + mKeyPreviewShowUpStartScale);
sb.append("\n mKeyPreviewDismissEndScale = ");
sb.append("" + mKeyPreviewDismissEndScale);
return sb.toString();
}
}

View File

@ -115,4 +115,29 @@ public final class SpacingAndPunctuations {
public boolean isSentenceSeparator(final int code) {
return code == mSentenceSeparator;
}
public String dump() {
final StringBuilder sb = new StringBuilder();
sb.append("mSortedSymbolsPrecededBySpace = ");
sb.append("" + Arrays.toString(mSortedSymbolsPrecededBySpace));
sb.append("\n mSortedSymbolsFollowedBySpace = ");
sb.append("" + Arrays.toString(mSortedSymbolsFollowedBySpace));
sb.append("\n mSortedWordConnectors = ");
sb.append("" + Arrays.toString(mSortedWordConnectors));
sb.append("\n mSortedWordSeparators = ");
sb.append("" + Arrays.toString(mSortedWordSeparators));
sb.append("\n mSuggestPuncList = ");
sb.append("" + mSuggestPuncList);
sb.append("\n mSentenceSeparator = ");
sb.append("" + mSentenceSeparator);
sb.append("\n mSentenceSeparatorAndSpace = ");
sb.append("" + mSentenceSeparatorAndSpace);
sb.append("\n mCurrentLanguageHasSpaces = ");
sb.append("" + mCurrentLanguageHasSpaces);
sb.append("\n mUsesAmericanTypography = ");
sb.append("" + mUsesAmericanTypography);
sb.append("\n mUsesGermanRules = ");
sb.append("" + mUsesGermanRules);
return sb.toString();
}
}