am ec183b50: am fb658d6c: Fix possible ArrayIndexOutOfBoundsException

* commit 'ec183b50ff1b44390a44ec94f8910373f7dbf985':
  Fix possible ArrayIndexOutOfBoundsException
main
Tadashi G. Takaoka 2013-03-27 21:59:39 -07:00 committed by Android Git Automerger
commit 71fb8af7c5
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ public final class SubtypeLocale {
final String[] keyboardLayoutSetMap = res.getStringArray(
R.array.locale_and_extra_value_to_keyboard_layout_set_map);
for (int i = 0; i < keyboardLayoutSetMap.length; i += 2) {
for (int i = 0; i + 1 < keyboardLayoutSetMap.length; i += 2) {
final String key = keyboardLayoutSetMap[i];
final String keyboardLayoutSet = keyboardLayoutSetMap[i + 1];
sLocaleAndExtraValueToKeyboardLayoutSetMap.put(key, keyboardLayoutSet);