am cda8a42c: Merge "Add a sanity check"

* commit 'cda8a42cbe114b6f9e3b98d868ab19fe673d3d09':
  Add a sanity check
main
Jean Chalard 2012-01-11 21:49:01 -08:00 committed by Android Git Automerger
commit 04184c8098
1 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,14 @@ public class SettingsValues {
mDelayUpdateOldSuggestions = res.getInteger(R.integer.config_delay_update_old_suggestions); mDelayUpdateOldSuggestions = res.getInteger(R.integer.config_delay_update_old_suggestions);
mMagicSpaceStrippers = res.getString(R.string.magic_space_stripping_symbols); mMagicSpaceStrippers = res.getString(R.string.magic_space_stripping_symbols);
mMagicSpaceSwappers = res.getString(R.string.magic_space_swapping_symbols); mMagicSpaceSwappers = res.getString(R.string.magic_space_swapping_symbols);
if (LatinImeLogger.sDBG) {
for (int i = 0; i < mMagicSpaceStrippers.length(); ++i) {
if (isMagicSpaceSwapper(mMagicSpaceStrippers.codePointAt(i))) {
throw new RuntimeException("Char code " + mMagicSpaceStrippers.codePointAt(i)
+ " is both a magic space swapper and stripper.");
}
}
}
mSuggestPuncs = res.getString(R.string.suggested_punctuations); mSuggestPuncs = res.getString(R.string.suggested_punctuations);
// TODO: it would be nice not to recreate this each time we change the configuration // TODO: it would be nice not to recreate this each time we change the configuration
mSuggestPuncList = createSuggestPuncList(mSuggestPuncs); mSuggestPuncList = createSuggestPuncList(mSuggestPuncs);