aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/AndroidManifest.xml6
-rw-r--r--java/res/color/emoji_tab_label_color_holo.xml (renamed from java/res/color/emoji_tab_label_color_ics.xml)8
-rw-r--r--java/res/color/key_text_color_holo.xml (renamed from java/res/color/key_text_color_ics.xml)22
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_active_ics.9.pngbin0 -> 462 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_active_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_dark_active_holo.9.png)bin463 -> 463 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_ics.9.pngbin0 -> 587 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png)bin639 -> 639 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_ics.9.pngbin0 -> 553 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png)bin537 -> 537 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_ics.9.pngbin0 -> 668 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png)bin655 -> 655 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_ics.9.pngbin0 -> 707 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png)bin670 -> 670 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_light_pressed_ics.9.pngbin0 -> 547 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_light_pressed_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png)bin517 -> 517 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_normal.9.pngbin1134 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_normal_off.9.pngbin1243 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_normal_on.9.pngbin1307 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_popup_selected_ics.9.pngbin0 -> 282 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_popup_selected_klp.9.png (renamed from java/res/drawable-hdpi/btn_keyboard_key_popup_selected_holo.9.png)bin272 -> 272 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_pressed.9.pngbin1088 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_pressed_off.9.pngbin1233 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/btn_keyboard_key_pressed_on.9.pngbin1271 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/ic_launcher_keyboard.pngbin0 -> 8523 bytes
-rw-r--r--java/res/drawable-hdpi/ic_subtype_mic_dark.pngbin1005 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.pngbin2138 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_background_ics.9.pngbin0 -> 2080 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_background_klp.9.pngbin0 -> 2147 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_left_background_ics.9.pngbin0 -> 1990 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_left_background_klp.9.png (renamed from java/res/drawable-hdpi/keyboard_key_feedback_left_background_holo.9.png)bin2105 -> 2105 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_ics.9.pngbin0 -> 2152 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_klp.9.png (renamed from java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_holo.9.png)bin2164 -> 2164 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_more_background_ics.9.pngbin0 -> 2256 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_more_background_klp.9.png (renamed from java/res/drawable-hdpi/keyboard_key_feedback_more_background_holo.9.png)bin2225 -> 2225 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_right_background_ics.9.pngbin0 -> 1993 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_right_background_klp.9.png (renamed from java/res/drawable-hdpi/keyboard_key_feedback_right_background_holo.9.png)bin2061 -> 2061 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_ics.9.pngbin0 -> 2163 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_klp.9.png (renamed from java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_holo.9.png)bin2133 -> 2133 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_popup_panel_background_holo.9.pngbin874 -> 0 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_popup_panel_background_ics.9.pngbin0 -> 856 bytes
-rw-r--r--java/res/drawable-hdpi/keyboard_popup_panel_background_klp.9.pngbin0 -> 871 bytes
-rw-r--r--java/res/drawable-hdpi/sym_keyboard_settings_holo_dark.pngbin787 -> 1542 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_active_ics.9.pngbin0 -> 345 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_active_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_dark_active_holo.9.png)bin355 -> 355 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_ics.9.pngbin0 -> 411 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png)bin453 -> 453 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_ics.9.pngbin0 -> 394 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png)bin380 -> 380 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_ics.9.pngbin0 -> 505 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png)bin468 -> 468 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_ics.9.pngbin0 -> 489 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png)bin458 -> 458 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_light_pressed_ics.9.pngbin0 -> 381 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_light_pressed_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png)bin368 -> 368 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_normal.9.pngbin991 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_normal_off.9.pngbin1083 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_normal_on.9.pngbin1151 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_popup_selected_ics.9.pngbin0 -> 236 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_popup_selected_klp.9.png (renamed from java/res/drawable-mdpi/btn_keyboard_key_popup_selected_holo.9.png)bin222 -> 222 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_pressed.9.pngbin956 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_pressed_off.9.pngbin1078 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/btn_keyboard_key_pressed_on.9.pngbin1119 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/ic_launcher_keyboard.pngbin0 -> 4772 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.pngbin1383 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_background_ics.9.pngbin0 -> 1313 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_background_klp.9.pngbin0 -> 1353 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_left_background_ics.9.pngbin0 -> 1297 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_left_background_klp.9.png (renamed from java/res/drawable-mdpi/keyboard_key_feedback_left_background_holo.9.png)bin1305 -> 1305 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_ics.9.pngbin0 -> 1437 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_klp.9.png (renamed from java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_holo.9.png)bin1425 -> 1425 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_more_background_ics.9.pngbin0 -> 1457 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_more_background_klp.9.png (renamed from java/res/drawable-mdpi/keyboard_key_feedback_more_background_holo.9.png)bin1454 -> 1454 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_right_background_ics.9.pngbin0 -> 1288 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_right_background_klp.9.png (renamed from java/res/drawable-mdpi/keyboard_key_feedback_right_background_holo.9.png)bin1314 -> 1314 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_ics.9.pngbin0 -> 1423 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_klp.9.png (renamed from java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_holo.9.png)bin1427 -> 1427 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_popup_panel_background_holo.9.pngbin590 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_popup_panel_background_ics.9.pngbin0 -> 571 bytes
-rw-r--r--java/res/drawable-mdpi/keyboard_popup_panel_background_klp.9.pngbin0 -> 589 bytes
-rw-r--r--java/res/drawable-mdpi/sym_keyboard_label_mic_holo_dark.pngbin498 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/sym_keyboard_mic_holo_light.pngbin525 -> 0 bytes
-rw-r--r--java/res/drawable-mdpi/sym_keyboard_settings_holo_dark.pngbin585 -> 1051 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_active_ics.9.pngbin0 -> 601 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_active_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_dark_active_holo.9.png)bin589 -> 589 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_ics.9.pngbin0 -> 745 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png)bin787 -> 787 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_ics.9.pngbin0 -> 737 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png)bin657 -> 657 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_ics.9.pngbin0 -> 953 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png)bin848 -> 848 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_ics.9.pngbin0 -> 945 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png)bin867 -> 867 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_ics.9.pngbin0 -> 668 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png)bin634 -> 634 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_normal.9.pngbin1172 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.pngbin1278 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.pngbin1345 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_ics.9.pngbin0 -> 351 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_klp.9.png (renamed from java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_holo.9.png)bin323 -> 323 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_pressed.9.pngbin1131 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.pngbin1273 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.pngbin1312 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/ic_launcher_keyboard.pngbin0 -> 13098 bytes
-rw-r--r--java/res/drawable-xhdpi/ic_subtype_mic_dark.pngbin1259 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_background_holo.9.pngbin3326 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_background_ics.9.pngbin0 -> 2916 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_background_klp.9.pngbin0 -> 3316 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_left_background_ics.9.pngbin0 -> 2873 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_left_background_klp.9.png (renamed from java/res/drawable-xhdpi/keyboard_key_feedback_left_background_holo.9.png)bin3169 -> 3169 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_ics.9.pngbin0 -> 3176 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_klp.9.png (renamed from java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_holo.9.png)bin3374 -> 3374 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_more_background_ics.9.pngbin0 -> 3184 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_more_background_klp.9.png (renamed from java/res/drawable-xhdpi/keyboard_key_feedback_more_background_holo.9.png)bin3525 -> 3525 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_right_background_ics.9.pngbin0 -> 2818 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_right_background_klp.9.png (renamed from java/res/drawable-xhdpi/keyboard_key_feedback_right_background_holo.9.png)bin3218 -> 3218 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_ics.9.pngbin0 -> 3102 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_klp.9.png (renamed from java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_holo.9.png)bin3424 -> 3424 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_popup_panel_background_holo.9.pngbin1249 -> 0 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_popup_panel_background_ics.9.pngbin0 -> 1178 bytes
-rw-r--r--java/res/drawable-xhdpi/keyboard_popup_panel_background_klp.9.pngbin0 -> 1246 bytes
-rw-r--r--java/res/drawable-xhdpi/sym_keyboard_settings_holo_dark.pngbin1062 -> 2136 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_ics.9.pngbin0 -> 1805 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_holo.9.png)bin1718 -> 1718 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_ics.9.pngbin0 -> 2039 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_holo.9.png)bin1998 -> 1998 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_ics.9.pngbin0 -> 1863 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_holo.9.png)bin1861 -> 1861 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_ics.9.pngbin0 -> 2196 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png)bin2073 -> 2073 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_ics.9.pngbin0 -> 2210 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png)bin2091 -> 2091 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_ics.9.pngbin0 -> 1840 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_holo.9.png)bin1799 -> 1799 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_ics.9.pngbin0 -> 1293 bytes
-rw-r--r--java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_klp.9.png (renamed from java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_holo.9.png)bin1261 -> 1261 bytes
-rw-r--r--java/res/drawable-xxhdpi/ic_launcher_keyboard.pngbin0 -> 25067 bytes
-rw-r--r--java/res/drawable-xxhdpi/ic_subtype_mic_dark.pngbin1846 -> 0 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_background_holo.9.pngbin7452 -> 0 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_background_ics.9.pngbin0 -> 5212 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_background_klp.9.pngbin0 -> 5251 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_ics.9.pngbin0 -> 4941 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_klp.9.png (renamed from java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_holo.9.png)bin7089 -> 7089 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_ics.9.pngbin0 -> 5188 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_klp.9.png (renamed from java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_holo.9.png)bin7197 -> 7197 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_ics.9.pngbin0 -> 5373 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_klp.9.png (renamed from java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_holo.9.png)bin5450 -> 5450 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_ics.9.pngbin0 -> 4964 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_klp.9.png (renamed from java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_holo.9.png)bin7023 -> 7023 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_ics.9.pngbin0 -> 5118 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_klp.9.png (renamed from java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_holo.9.png)bin7153 -> 7153 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_popup_panel_background_holo.9.pngbin2722 -> 0 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_popup_panel_background_ics.9.pngbin0 -> 2712 bytes
-rw-r--r--java/res/drawable-xxhdpi/keyboard_popup_panel_background_klp.9.pngbin0 -> 2732 bytes
-rw-r--r--java/res/drawable-xxhdpi/sym_keyboard_settings_holo_dark.pngbin1455 -> 2825 bytes
-rw-r--r--java/res/drawable/btn_keyboard_key_functional_ics.xml2
-rw-r--r--java/res/drawable/btn_keyboard_key_functional_klp.xml22
-rw-r--r--java/res/drawable/btn_keyboard_key_ics.xml16
-rw-r--r--java/res/drawable/btn_keyboard_key_klp.xml48
-rw-r--r--java/res/drawable/btn_keyboard_key_popup_ics.xml4
-rw-r--r--java/res/drawable/btn_keyboard_key_popup_klp.xml21
-rw-r--r--java/res/drawable/btn_keyboard_spacebar_gb.xml21
-rw-r--r--java/res/drawable/btn_keyboard_spacebar_ics.xml21
-rw-r--r--java/res/drawable/btn_keyboard_spacebar_klp.xml21
-rw-r--r--java/res/drawable/btn_suggestion_ics.xml4
-rw-r--r--java/res/drawable/btn_suggestion_klp.xml (renamed from java/res/layout/key_preview_ics.xml)16
-rw-r--r--java/res/drawable/keyboard_key_feedback_ics.xml14
-rw-r--r--java/res/drawable/keyboard_key_feedback_klp.xml36
-rw-r--r--java/res/layout/emoji_keyboard_page.xml17
-rw-r--r--java/res/layout/emoji_palettes_view.xml4
-rw-r--r--java/res/layout/hint_add_to_dictionary.xml2
-rw-r--r--java/res/layout/input_view.xml6
-rw-r--r--java/res/layout/key_preview.xml (renamed from java/res/layout/key_preview_gb.xml)4
-rw-r--r--java/res/layout/more_keys_keyboard.xml4
-rw-r--r--java/res/layout/more_suggestions.xml9
-rw-r--r--java/res/layout/suggestion_word.xml8
-rw-r--r--java/res/layout/user_dictionary_add_word.xml2
-rw-r--r--java/res/layout/user_dictionary_add_word_fullscreen.xml4
-rw-r--r--java/res/mipmap-hdpi/ic_launcher_keyboard.pngbin7646 -> 0 bytes
-rw-r--r--java/res/mipmap-mdpi/ic_launcher_keyboard.pngbin4349 -> 0 bytes
-rw-r--r--java/res/mipmap-xhdpi/ic_launcher_keyboard.pngbin12231 -> 0 bytes
-rw-r--r--java/res/mipmap-xxhdpi/ic_launcher_keyboard.pngbin21221 -> 0 bytes
-rw-r--r--java/res/raw/main_de.dictbin1605727 -> 1605763 bytes
-rw-r--r--java/res/raw/setup_welcome_image.pngbin117980 -> 50389 bytes
-rw-r--r--java/res/raw/setup_welcome_video.mp4bin459085 -> 549513 bytes
-rw-r--r--java/res/values-af/strings-action-keys.xml (renamed from java/res/values-be/strings-appname.xml)11
-rw-r--r--java/res/values-af/strings.xml16
-rw-r--r--java/res/values-am/strings-action-keys.xml30
-rw-r--r--java/res/values-am/strings.xml18
-rw-r--r--java/res/values-ar/config-spacing-and-punctuations.xml (renamed from java/res/values-fa/donottranslate.xml)2
-rw-r--r--java/res/values-ar/strings-action-keys.xml30
-rw-r--r--java/res/values-ar/strings-appname.xml8
-rw-r--r--java/res/values-ar/strings.xml50
-rw-r--r--java/res/values-be-rBY/bools.xml (renamed from java/res/values-be/bools.xml)0
-rw-r--r--java/res/values-be-rBY/strings-action-keys.xml29
-rw-r--r--java/res/values-be/strings.xml260
-rw-r--r--java/res/values-bg/strings-action-keys.xml30
-rw-r--r--java/res/values-bg/strings.xml16
-rw-r--r--java/res/values-ca/strings-action-keys.xml (renamed from java/res/values-et/strings-appname.xml)11
-rw-r--r--java/res/values-ca/strings.xml16
-rw-r--r--java/res/values-cs/strings-action-keys.xml30
-rw-r--r--java/res/values-cs/strings.xml16
-rw-r--r--java/res/values-da/strings-action-keys.xml30
-rw-r--r--java/res/values-da/strings.xml34
-rw-r--r--java/res/values-de/strings-action-keys.xml30
-rw-r--r--java/res/values-de/strings.xml18
-rw-r--r--java/res/values-el/strings-action-keys.xml30
-rw-r--r--java/res/values-el/strings.xml16
-rw-r--r--java/res/values-en-rGB/strings-action-keys.xml30
-rw-r--r--java/res/values-en-rGB/strings.xml16
-rw-r--r--java/res/values-en-rIN/strings-action-keys.xml30
-rw-r--r--java/res/values-en-rIN/strings.xml16
-rw-r--r--java/res/values-es-rUS/strings-action-keys.xml (renamed from java/res/values-ms/strings-appname.xml)11
-rw-r--r--java/res/values-es-rUS/strings.xml16
-rw-r--r--java/res/values-es/strings-action-keys.xml30
-rw-r--r--java/res/values-es/strings.xml16
-rw-r--r--java/res/values-et-rEE/bools.xml (renamed from java/res/values-et/bools.xml)0
-rw-r--r--java/res/values-et-rEE/strings-action-keys.xml30
-rw-r--r--java/res/values-et-rEE/strings.xml16
-rw-r--r--java/res/values-et/strings.xml242
-rw-r--r--java/res/values-fa/config-spacing-and-punctuations.xml (renamed from java/res/values-iw/donottranslate.xml)2
-rw-r--r--java/res/values-fa/strings-action-keys.xml30
-rw-r--r--java/res/values-fa/strings-appname.xml8
-rw-r--r--java/res/values-fa/strings.xml44
-rw-r--r--java/res/values-fi/strings-action-keys.xml30
-rw-r--r--java/res/values-fi/strings.xml16
-rw-r--r--java/res/values-fr-rCA/config-spacing-and-punctuations.xml (renamed from java/res/values-fr-rCA/donottranslate.xml)8
-rw-r--r--java/res/values-fr-rCA/strings-action-keys.xml30
-rw-r--r--java/res/values-fr-rCA/strings.xml16
-rw-r--r--java/res/values-fr/config-spacing-and-punctuations.xml (renamed from java/res/values-fr/donottranslate.xml)8
-rw-r--r--java/res/values-fr/strings-action-keys.xml30
-rw-r--r--java/res/values-fr/strings.xml16
-rw-r--r--java/res/values-h1200dp-port/setup-dimens-large-tablet-port.xml1
-rw-r--r--java/res/values-h330dp-land/setup-dimens-large-phone-land.xml1
-rw-r--r--java/res/values-h520dp-land/setup-dimens-small-tablet-land.xml1
-rw-r--r--java/res/values-h540dp-port/setup-dimens-large-phone-port.xml1
-rw-r--r--java/res/values-h720dp-land/setup-dimens-large-tablet-land.xml1
-rw-r--r--java/res/values-h800dp-port/setup-dimens-small-tablet-port.xml1
-rw-r--r--java/res/values-hi/strings-action-keys.xml30
-rw-r--r--java/res/values-hi/strings.xml24
-rw-r--r--java/res/values-hr/strings-action-keys.xml30
-rw-r--r--java/res/values-hr/strings.xml16
-rw-r--r--java/res/values-hu/strings-action-keys.xml30
-rw-r--r--java/res/values-hu/strings.xml18
-rw-r--r--java/res/values-hy-rAM/config-spacing-and-punctuations.xml (renamed from java/res/values-hy/donottranslate.xml)6
-rw-r--r--java/res/values-hy-rAM/strings-action-keys.xml30
-rw-r--r--java/res/values-hy-rAM/strings.xml16
-rw-r--r--java/res/values-in/strings-action-keys.xml30
-rw-r--r--java/res/values-in/strings.xml16
-rw-r--r--java/res/values-is/strings-action-keys.xml31
-rw-r--r--java/res/values-is/strings.xml443
-rw-r--r--java/res/values-it/strings-action-keys.xml30
-rw-r--r--java/res/values-it/strings.xml16
-rw-r--r--java/res/values-iw/config-spacing-and-punctuations.xml (renamed from java/res/values-ar/donottranslate.xml)2
-rw-r--r--java/res/values-iw/strings-action-keys.xml30
-rw-r--r--java/res/values-iw/strings-appname.xml8
-rw-r--r--java/res/values-iw/strings.xml50
-rw-r--r--java/res/values-ja/strings-action-keys.xml30
-rw-r--r--java/res/values-ja/strings.xml18
-rw-r--r--java/res/values-ka-rGE/bools.xml (renamed from java/res/values-ka/bools.xml)0
-rw-r--r--java/res/values-ka-rGE/strings-action-keys.xml30
-rw-r--r--java/res/values-ka-rGE/strings.xml16
-rw-r--r--java/res/values-ka/strings.xml242
-rw-r--r--java/res/values-kk/strings-action-keys.xml29
-rw-r--r--java/res/values-kk/strings.xml237
-rw-r--r--java/res/values-km-rKH/config-spacing-and-punctuations.xml (renamed from java/res/values-km/donottranslate.xml)0
-rw-r--r--java/res/values-km-rKH/strings-action-keys.xml30
-rw-r--r--java/res/values-km-rKH/strings.xml18
-rw-r--r--java/res/values-ko/strings-action-keys.xml30
-rw-r--r--java/res/values-ko/strings.xml16
-rw-r--r--java/res/values-ky/strings-action-keys.xml31
-rw-r--r--java/res/values-ky/strings.xml21
-rw-r--r--java/res/values-land/config.xml61
-rw-r--r--java/res/values-land/dimens.xml83
-rw-r--r--java/res/values-land/setup-dimens-small-phone-land.xml1
-rw-r--r--java/res/values-lo-rLA/config-spacing-and-punctuations.xml (renamed from java/res/values-lo/donottranslate.xml)0
-rw-r--r--java/res/values-lo-rLA/strings-action-keys.xml30
-rw-r--r--java/res/values-lo-rLA/strings.xml16
-rw-r--r--java/res/values-lt/strings-action-keys.xml30
-rw-r--r--java/res/values-lt/strings.xml16
-rw-r--r--java/res/values-lv/strings-action-keys.xml30
-rw-r--r--java/res/values-lv/strings.xml16
-rw-r--r--java/res/values-mk/strings-action-keys.xml31
-rw-r--r--java/res/values-mk/strings.xml443
-rw-r--r--java/res/values-mn-rMN/strings-action-keys.xml30
-rw-r--r--java/res/values-mn-rMN/strings.xml16
-rw-r--r--java/res/values-mn/strings.xml242
-rw-r--r--java/res/values-ms-rMY/bools.xml (renamed from java/res/values-ms/bools.xml)0
-rw-r--r--java/res/values-ms-rMY/strings-action-keys.xml30
-rw-r--r--java/res/values-ms-rMY/strings.xml16
-rw-r--r--java/res/values-ms/strings.xml242
-rw-r--r--java/res/values-nb/strings-action-keys.xml30
-rw-r--r--java/res/values-nb/strings.xml18
-rw-r--r--java/res/values-nl/strings-action-keys.xml30
-rw-r--r--java/res/values-nl/strings.xml16
-rw-r--r--java/res/values-pl/strings-action-keys.xml30
-rw-r--r--java/res/values-pl/strings.xml16
-rw-r--r--java/res/values-port/setup-dimens-small-phone-port.xml1
-rw-r--r--java/res/values-pt-rPT/strings-action-keys.xml (renamed from java/res/values-mn/strings-appname.xml)11
-rw-r--r--java/res/values-pt-rPT/strings.xml16
-rw-r--r--java/res/values-pt/strings-action-keys.xml30
-rw-r--r--java/res/values-pt/strings.xml16
-rw-r--r--java/res/values-rm/strings-action-keys.xml32
-rw-r--r--java/res/values-rm/strings.xml22
-rw-r--r--java/res/values-ro/strings-action-keys.xml30
-rw-r--r--java/res/values-ro/strings.xml16
-rw-r--r--java/res/values-ru/strings-action-keys.xml30
-rw-r--r--java/res/values-ru/strings.xml16
-rw-r--r--java/res/values-sk/strings-action-keys.xml30
-rw-r--r--java/res/values-sk/strings.xml16
-rw-r--r--java/res/values-sl/strings-action-keys.xml30
-rw-r--r--java/res/values-sl/strings.xml16
-rw-r--r--java/res/values-sr/strings-action-keys.xml30
-rw-r--r--java/res/values-sr/strings.xml16
-rw-r--r--java/res/values-sv/strings-action-keys.xml30
-rw-r--r--java/res/values-sv/strings.xml16
-rw-r--r--java/res/values-sw/strings-action-keys.xml30
-rw-r--r--java/res/values-sw/strings.xml20
-rw-r--r--java/res/values-sw540dp-land/config.xml50
-rw-r--r--java/res/values-sw540dp-land/dimens.xml72
-rw-r--r--java/res/values-sw540dp/config-per-form-factor.xml32
-rw-r--r--java/res/values-sw540dp/config-screen-metrics.xml (renamed from java/res/values-hdpi/config.xml)11
-rw-r--r--java/res/values-sw540dp/config.xml89
-rw-r--r--java/res/values-sw540dp/dimens.xml98
-rw-r--r--java/res/values-sw540dp/touch-position-correction.xml2
-rw-r--r--java/res/values-sw600dp/config-per-form-factor.xml32
-rw-r--r--java/res/values-sw600dp/config-screen-metrics.xml29
-rw-r--r--java/res/values-sw768dp-land/config.xml50
-rw-r--r--java/res/values-sw768dp-land/dimens.xml73
-rw-r--r--java/res/values-sw768dp/config-per-form-factor.xml32
-rw-r--r--java/res/values-sw768dp/config-screen-metrics.xml29
-rw-r--r--java/res/values-sw768dp/config.xml94
-rw-r--r--java/res/values-sw768dp/dimens.xml98
-rw-r--r--java/res/values-th/config-spacing-and-punctuations.xml (renamed from java/res/values-th/donottranslate.xml)0
-rw-r--r--java/res/values-th/strings-action-keys.xml30
-rw-r--r--java/res/values-th/strings.xml16
-rw-r--r--java/res/values-tl/strings-action-keys.xml30
-rw-r--r--java/res/values-tl/strings.xml16
-rw-r--r--java/res/values-tr/strings-action-keys.xml30
-rw-r--r--java/res/values-tr/strings.xml16
-rw-r--r--java/res/values-uk/strings-action-keys.xml30
-rw-r--r--java/res/values-uk/strings.xml16
-rw-r--r--java/res/values-vi/strings-action-keys.xml30
-rw-r--r--java/res/values-vi/strings.xml16
-rw-r--r--java/res/values-zh-rCN/strings-action-keys.xml30
-rw-r--r--java/res/values-zh-rCN/strings.xml16
-rw-r--r--java/res/values-zh-rHK/strings-action-keys.xml30
-rw-r--r--java/res/values-zh-rHK/strings.xml20
-rw-r--r--java/res/values-zh-rTW/strings-action-keys.xml30
-rw-r--r--java/res/values-zh-rTW/strings.xml26
-rw-r--r--java/res/values-zu/strings-action-keys.xml30
-rw-r--r--java/res/values-zu/strings.xml16
-rw-r--r--java/res/values/attrs.xml41
-rw-r--r--java/res/values/colors.xml30
-rw-r--r--java/res/values/config-auto-correction-thresholds.xml57
-rw-r--r--java/res/values/config-common.xml142
-rw-r--r--java/res/values/config-dictionary-pack.xml30
-rw-r--r--java/res/values/config-per-form-factor.xml32
-rw-r--r--java/res/values/config-screen-metrics.xml29
-rw-r--r--java/res/values/config-spacing-and-punctuations.xml39
-rw-r--r--java/res/values/config-spellchecker-thresholds.xml25
-rw-r--r--java/res/values/config.xml179
-rw-r--r--java/res/values/dimens.xml132
-rw-r--r--java/res/values/donottranslate.xml72
-rw-r--r--java/res/values/keyboard-icons-holo.xml44
-rw-r--r--java/res/values/keypress-vibration-durations.xml2
-rw-r--r--java/res/values/strings-action-keys.xml36
-rw-r--r--java/res/values/strings.xml37
-rw-r--r--java/res/values/themes-common.xml80
-rw-r--r--java/res/values/themes-gb.xml34
-rw-r--r--java/res/values/themes-ics.xml98
-rw-r--r--java/res/values/themes-klp.xml125
-rw-r--r--java/res/values/touch-position-correction.xml2
-rw-r--r--java/res/xml-sw600dp-land/kbd_more_keys_keyboard_template.xml2
-rw-r--r--java/res/xml-sw600dp/kbd_more_keys_keyboard_template.xml2
-rw-r--r--java/res/xml-sw600dp/key_f1.xml23
-rw-r--r--java/res/xml-sw600dp/key_shortcut.xml8
-rw-r--r--java/res/xml-sw600dp/key_space_symbols.xml1
-rw-r--r--java/res/xml-sw600dp/key_styles_enter.xml191
-rw-r--r--java/res/xml-sw600dp/keys_comma_period.xml93
-rw-r--r--java/res/xml-sw600dp/keys_exclamation_question.xml6
-rw-r--r--java/res/xml-sw600dp/keys_pcqwerty4_right3.xml4
-rw-r--r--java/res/xml-sw600dp/rowkeys_pcqwerty1.xml2
-rw-r--r--java/res/xml-sw600dp/rows_hebrew.xml6
-rw-r--r--java/res/xml-sw600dp/rows_swiss.xml63
-rw-r--r--java/res/xml-sw600dp/rows_symbols.xml1
-rw-r--r--java/res/xml-sw600dp/rows_symbols_shift.xml3
-rw-r--r--java/res/xml/kbd_armenian_phonetic.xml6
-rw-r--r--java/res/xml/kbd_emoji_category1.xml4
-rw-r--r--java/res/xml/kbd_emoji_category2.xml4
-rw-r--r--java/res/xml/kbd_emoji_category3.xml4
-rw-r--r--java/res/xml/kbd_emoji_category4.xml4
-rw-r--r--java/res/xml/kbd_emoji_category5.xml4
-rw-r--r--java/res/xml/kbd_emoji_category6.xml4
-rw-r--r--java/res/xml/kbd_emoji_recents.xml6
-rw-r--r--java/res/xml/kbd_khmer.xml6
-rw-r--r--java/res/xml/kbd_lao.xml6
-rw-r--r--java/res/xml/kbd_more_keys_keyboard_template.xml2
-rw-r--r--java/res/xml/kbd_pcqwerty.xml6
-rw-r--r--java/res/xml/kbd_suggestions_pane_template.xml2
-rw-r--r--java/res/xml/kbd_swiss.xml26
-rw-r--r--java/res/xml/kbd_thai.xml6
-rw-r--r--java/res/xml/key_f1.xml12
-rw-r--r--java/res/xml/key_period.xml (renamed from java/res/xml/key_nepali_traditional_period.xml)22
-rw-r--r--java/res/xml/key_styles_common.xml31
-rw-r--r--java/res/xml/key_styles_enter.xml3
-rw-r--r--java/res/xml/key_symbols_period.xml47
-rw-r--r--java/res/xml/keyboard_layout_set_swiss.xml42
-rw-r--r--java/res/xml/keys_comma_period.xml87
-rw-r--r--java/res/xml/keys_comma_period_symbols.xml32
-rw-r--r--java/res/xml/keys_pcqwerty4_right3.xml4
-rw-r--r--java/res/xml/method.xml130
-rw-r--r--java/res/xml/prefs.xml7
-rw-r--r--java/res/xml/prefs_for_debug.xml7
-rw-r--r--java/res/xml/row_dvorak4.xml41
-rw-r--r--java/res/xml/row_pcqwerty5.xml2
-rw-r--r--java/res/xml/row_qwerty4.xml32
-rw-r--r--java/res/xml/row_symbols4.xml20
-rw-r--r--java/res/xml/row_symbols_shift4.xml6
-rw-r--r--java/res/xml/rowkeys_khmer1.xml1
-rw-r--r--java/res/xml/rowkeys_khmer2.xml11
-rw-r--r--java/res/xml/rowkeys_khmer3.xml2
-rw-r--r--java/res/xml/rowkeys_khmer4.xml4
-rw-r--r--java/res/xml/rowkeys_pcqwerty1.xml2
-rw-r--r--java/res/xml/rowkeys_pcqwerty1_shift.xml2
-rw-r--r--java/res/xml/rowkeys_swiss1.xml29
-rw-r--r--java/res/xml/rowkeys_swiss2.xml32
-rw-r--r--java/res/xml/rowkeys_symbols3.xml4
-rw-r--r--java/res/xml/rows_swiss.xml57
-rw-r--r--java/res/xml/rows_symbols_shift.xml3
-rw-r--r--java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiCategoryPageIndicatorView.java8
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java234
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java24
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyDetector.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardId.java34
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java42
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java77
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java58
-rw-r--r--java/src/com/android/inputmethod/keyboard/MainKeyboardView.java714
-rw-r--r--java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java6
-rw-r--r--java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java10
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java382
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/CustomViewPager.java47
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/DrawingHandler.java77
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/DynamicGridKeyboard.java58
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/EmojiLayoutParams.java (renamed from java/src/com/android/inputmethod/keyboard/EmojiLayoutParams.java)30
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java (renamed from java/src/com/android/inputmethod/keyboard/internal/ScrollKeyboardView.java)66
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/GestureTrailsPreview.java14
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java13
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java4
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java6
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java25
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java1
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java3
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java1306
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java27
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java6
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/ScrollViewWithNotifier.java66
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/TimerHandler.java206
-rw-r--r--java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java16
-rw-r--r--java/src/com/android/inputmethod/latin/AssetFileAddress.java10
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionary.java139
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java26
-rw-r--r--java/src/com/android/inputmethod/latin/Constants.java30
-rw-r--r--java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java14
-rw-r--r--java/src/com/android/inputmethod/latin/Dictionary.java7
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryFactory.java50
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryWriter.java26
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java461
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableDictionary.java894
-rw-r--r--java/src/com/android/inputmethod/latin/InputAttributes.java6
-rw-r--r--java/src/com/android/inputmethod/latin/LastComposedWord.java6
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java477
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java224
-rw-r--r--java/src/com/android/inputmethod/latin/SubtypeSwitcher.java63
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java31
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java14
-rw-r--r--java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java5
-rw-r--r--java/src/com/android/inputmethod/latin/UserBinaryDictionary.java12
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java39
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java47
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java102
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java60
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java86
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/DictDecoder.java11
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/DynamicBinaryDictIOUtils.java39
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java165
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java147
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/SparseTableContentReader.java120
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/SparseTableContentUpdater.java123
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/SparseTableContentWriter.java93
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver3DictEncoder.java6
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java336
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java191
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictUpdater.java723
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java172
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/DynamicPersonalizationDictionaryWriter.java190
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java50
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionarySessionRegister.java8
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdateSession.java84
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java70
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/PersonalizationPredictionDictionary.java37
-rw-r--r--java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java23
-rw-r--r--java/src/com/android/inputmethod/latin/settings/DebugSettings.java5
-rw-r--r--java/src/com/android/inputmethod/latin/settings/Settings.java78
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsFragment.java98
-rw-r--r--java/src/com/android/inputmethod/latin/settings/SettingsValues.java33
-rw-r--r--java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java10
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java2
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/DictionaryPool.java1
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java5
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java2
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java46
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java2
-rw-r--r--java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java79
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java18
-rw-r--r--java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java12
-rw-r--r--java/src/com/android/inputmethod/latin/utils/FileUtils.java33
-rw-r--r--java/src/com/android/inputmethod/latin/utils/JsonUtils.java103
-rw-r--r--java/src/com/android/inputmethod/latin/utils/LatinImeLoggerUtils.java2
-rw-r--r--java/src/com/android/inputmethod/latin/utils/LeakGuardHandlerWrapper.java (renamed from java/src/com/android/inputmethod/latin/utils/StaticInnerHandlerWrapper.java)20
-rw-r--r--java/src/com/android/inputmethod/latin/utils/LocaleUtils.java47
-rw-r--r--java/src/com/android/inputmethod/latin/utils/ResourceUtils.java8
-rw-r--r--java/src/com/android/inputmethod/latin/utils/StringUtils.java110
-rw-r--r--java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java4
-rw-r--r--java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java36
-rw-r--r--java/src/com/android/inputmethod/latin/utils/UnigramProperty.java82
-rw-r--r--java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java12
-rw-r--r--java/src/com/android/inputmethod/latin/utils/UserHistoryForgettingCurveUtils.java9
-rw-r--r--java/src/com/android/inputmethod/research/ResearchLogger.java69
531 files changed, 10695 insertions, 8167 deletions
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index 031d62e0c..0d80c037b 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -18,7 +18,7 @@
coreApp="true"
package="com.android.inputmethod.latin">
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
+ <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
@@ -32,7 +32,7 @@
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
<application android:label="@string/english_ime_name"
- android:icon="@mipmap/ic_launcher_keyboard"
+ android:icon="@drawable/ic_launcher_keyboard"
android:killAfterRestore="false"
android:supportsRtl="true">
@@ -57,7 +57,7 @@
<activity android:name=".setup.SetupActivity"
android:label="@string/english_ime_name"
- android:icon="@mipmap/ic_launcher_keyboard"
+ android:icon="@drawable/ic_launcher_keyboard"
android:launchMode="singleTask"
android:noHistory="true">
<intent-filter>
diff --git a/java/res/color/emoji_tab_label_color_ics.xml b/java/res/color/emoji_tab_label_color_holo.xml
index 36e1d3020..373e9314b 100644
--- a/java/res/color/emoji_tab_label_color_ics.xml
+++ b/java/res/color/emoji_tab_label_color_holo.xml
@@ -21,13 +21,13 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
- android:color="@color/key_text_color_ics" />
+ android:color="@color/key_text_color_holo" />
<item
android:state_pressed="true"
- android:color="@color/key_text_color_ics" />
+ android:color="@color/key_text_color_holo" />
<item
android:state_selected="true"
- android:color="@color/key_text_color_ics" />
+ android:color="@color/key_text_color_holo" />
<item
- android:color="@color/key_text_inactivated_color_ics" />
+ android:color="@color/key_text_inactivated_color_holo" />
</selector>
diff --git a/java/res/color/key_text_color_ics.xml b/java/res/color/key_text_color_holo.xml
index c6f111ad2..d034a945f 100644
--- a/java/res/color/key_text_color_ics.xml
+++ b/java/res/color/key_text_color_holo.xml
@@ -17,32 +17,32 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Functional keys. -->
<item android:state_single="true" android:state_pressed="true"
- android:color="@color/key_text_color_functional_ics" />
+ android:color="@color/key_text_color_functional_holo" />
<item android:state_single="true"
- android:color="@color/key_text_color_functional_ics" />
+ android:color="@color/key_text_color_functional_holo" />
<!-- Action keys. -->
<item android:state_active="true" android:state_pressed="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<item android:state_active="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<item android:state_checkable="true" android:state_pressed="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<item android:state_checkable="true" android:state_checked="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<item android:state_checkable="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<!-- Empty background keys. -->
<item android:state_empty="true"
- android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
<!-- Normal keys. -->
<item android:state_pressed="true"
- android:color="@color/key_text_color_normal_ics" />
- <item android:color="@color/key_text_color_normal_ics" />
+ android:color="@color/key_text_color_normal_holo" />
+ <item android:color="@color/key_text_color_normal_holo" />
</selector>
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_active_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_active_ics.9.png
new file mode 100644
index 000000000..9aa8db60e
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_active_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_active_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_active_klp.9.png
index fa2cb8542..fa2cb8542 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_dark_active_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_active_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_ics.9.png
new file mode 100644
index 000000000..9f4587b4a
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_klp.9.png
index 814e40235..814e40235 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_ics.9.png
new file mode 100644
index 000000000..7ec33dd20
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_klp.9.png
index 90abe3940..90abe3940 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
new file mode 100644
index 000000000..655bc01b1
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
index 48eeb3f54..48eeb3f54 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
new file mode 100644
index 000000000..138e915d9
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
index 71e0683cd..71e0683cd 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_ics.9.png
new file mode 100644
index 000000000..5612c51a1
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_klp.9.png
index 6768241a7..6768241a7 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_normal.9.png b/java/res/drawable-hdpi/btn_keyboard_key_normal.9.png
deleted file mode 100644
index 3e25180f0..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_normal_off.9.png b/java/res/drawable-hdpi/btn_keyboard_key_normal_off.9.png
deleted file mode 100644
index bad360f77..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_normal_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_normal_on.9.png b/java/res/drawable-hdpi/btn_keyboard_key_normal_on.9.png
deleted file mode 100644
index 49f519860..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_normal_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_ics.9.png b/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_ics.9.png
new file mode 100644
index 000000000..c2e8b3779
--- /dev/null
+++ b/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_klp.9.png
index 10f8e97e4..10f8e97e4 100644
--- a/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_holo.9.png
+++ b/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_pressed.9.png b/java/res/drawable-hdpi/btn_keyboard_key_pressed.9.png
deleted file mode 100644
index e784eddf8..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_pressed_off.9.png b/java/res/drawable-hdpi/btn_keyboard_key_pressed_off.9.png
deleted file mode 100644
index a4731cf1a..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_pressed_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/btn_keyboard_key_pressed_on.9.png b/java/res/drawable-hdpi/btn_keyboard_key_pressed_on.9.png
deleted file mode 100644
index 03e163c9c..000000000
--- a/java/res/drawable-hdpi/btn_keyboard_key_pressed_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/ic_launcher_keyboard.png b/java/res/drawable-hdpi/ic_launcher_keyboard.png
new file mode 100644
index 000000000..7ae00ed3f
--- /dev/null
+++ b/java/res/drawable-hdpi/ic_launcher_keyboard.png
Binary files differ
diff --git a/java/res/drawable-hdpi/ic_subtype_mic_dark.png b/java/res/drawable-hdpi/ic_subtype_mic_dark.png
deleted file mode 100644
index eacbcd255..000000000
--- a/java/res/drawable-hdpi/ic_subtype_mic_dark.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.png
deleted file mode 100644
index 50ed568ff..000000000
--- a/java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_background_ics.9.png
new file mode 100644
index 000000000..28b406a5c
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_background_klp.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_background_klp.9.png
new file mode 100644
index 000000000..be394151a
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_left_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_left_background_ics.9.png
new file mode 100644
index 000000000..e42cd88dc
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_left_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_left_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_left_background_klp.9.png
index 9fa6d0003..9fa6d0003 100644
--- a/java/res/drawable-hdpi/keyboard_key_feedback_left_background_holo.9.png
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_left_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_ics.9.png
new file mode 100644
index 000000000..160344073
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_klp.9.png
index c73269b7e..c73269b7e 100644
--- a/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_holo.9.png
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_left_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_more_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_more_background_ics.9.png
new file mode 100644
index 000000000..a40d4277c
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_more_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_more_background_klp.9.png
index fffd4021e..fffd4021e 100644
--- a/java/res/drawable-hdpi/keyboard_key_feedback_more_background_holo.9.png
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_right_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_right_background_ics.9.png
new file mode 100644
index 000000000..1f6807376
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_right_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_right_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_right_background_klp.9.png
index 61c23c19b..61c23c19b 100644
--- a/java/res/drawable-hdpi/keyboard_key_feedback_right_background_holo.9.png
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_right_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_ics.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_ics.9.png
new file mode 100644
index 000000000..ec53593d9
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_klp.9.png
index 827d74363..827d74363 100644
--- a/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_holo.9.png
+++ b/java/res/drawable-hdpi/keyboard_key_feedback_right_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_popup_panel_background_holo.9.png b/java/res/drawable-hdpi/keyboard_popup_panel_background_holo.9.png
deleted file mode 100644
index dc2fc7dfc..000000000
--- a/java/res/drawable-hdpi/keyboard_popup_panel_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_popup_panel_background_ics.9.png b/java/res/drawable-hdpi/keyboard_popup_panel_background_ics.9.png
new file mode 100644
index 000000000..53d7b6fb3
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_popup_panel_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/keyboard_popup_panel_background_klp.9.png b/java/res/drawable-hdpi/keyboard_popup_panel_background_klp.9.png
new file mode 100644
index 000000000..f9dd3b8b1
--- /dev/null
+++ b/java/res/drawable-hdpi/keyboard_popup_panel_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-hdpi/sym_keyboard_settings_holo_dark.png b/java/res/drawable-hdpi/sym_keyboard_settings_holo_dark.png
index 5af09ad8c..2ea4a74a5 100644
--- a/java/res/drawable-hdpi/sym_keyboard_settings_holo_dark.png
+++ b/java/res/drawable-hdpi/sym_keyboard_settings_holo_dark.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_active_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_active_ics.9.png
new file mode 100644
index 000000000..e810c7789
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_active_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_active_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_active_klp.9.png
index 8e9a34957..8e9a34957 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_dark_active_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_active_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_ics.9.png
new file mode 100644
index 000000000..f3fc64114
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_klp.9.png
index b7b2dca43..b7b2dca43 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_ics.9.png
new file mode 100644
index 000000000..8f340d355
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_klp.9.png
index 4a92b80dd..4a92b80dd 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
new file mode 100644
index 000000000..53ea5f894
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
index 72125a065..72125a065 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
new file mode 100644
index 000000000..69c84e7ec
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
index 82413d4cc..82413d4cc 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_ics.9.png
new file mode 100644
index 000000000..c39dd4a94
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_klp.9.png
index 049385984..049385984 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_light_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_normal.9.png b/java/res/drawable-mdpi/btn_keyboard_key_normal.9.png
deleted file mode 100644
index 12bc97928..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_normal_off.9.png b/java/res/drawable-mdpi/btn_keyboard_key_normal_off.9.png
deleted file mode 100644
index 44bd414a1..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_normal_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_normal_on.9.png b/java/res/drawable-mdpi/btn_keyboard_key_normal_on.9.png
deleted file mode 100644
index 43fdf5b88..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_normal_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_ics.9.png b/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_ics.9.png
new file mode 100644
index 000000000..93a6e7921
--- /dev/null
+++ b/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_klp.9.png
index ee0aae28b..ee0aae28b 100644
--- a/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_holo.9.png
+++ b/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_pressed.9.png b/java/res/drawable-mdpi/btn_keyboard_key_pressed.9.png
deleted file mode 100644
index 1c1f3d711..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_pressed_off.9.png b/java/res/drawable-mdpi/btn_keyboard_key_pressed_off.9.png
deleted file mode 100644
index dacb675a9..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_pressed_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/btn_keyboard_key_pressed_on.9.png b/java/res/drawable-mdpi/btn_keyboard_key_pressed_on.9.png
deleted file mode 100644
index 3daa69f31..000000000
--- a/java/res/drawable-mdpi/btn_keyboard_key_pressed_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/ic_launcher_keyboard.png b/java/res/drawable-mdpi/ic_launcher_keyboard.png
new file mode 100644
index 000000000..cc73f3be1
--- /dev/null
+++ b/java/res/drawable-mdpi/ic_launcher_keyboard.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.png
deleted file mode 100644
index 564f5460c..000000000
--- a/java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_background_ics.9.png
new file mode 100644
index 000000000..7a9f640d1
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_background_klp.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_background_klp.9.png
new file mode 100644
index 000000000..625490b1f
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_left_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_left_background_ics.9.png
new file mode 100644
index 000000000..5b06f09bb
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_left_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_left_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_left_background_klp.9.png
index 427c87061..427c87061 100644
--- a/java/res/drawable-mdpi/keyboard_key_feedback_left_background_holo.9.png
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_left_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_ics.9.png
new file mode 100644
index 000000000..fd992d6f4
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_klp.9.png
index ea757296d..ea757296d 100644
--- a/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_holo.9.png
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_left_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_more_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_more_background_ics.9.png
new file mode 100644
index 000000000..128dcd6ad
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_more_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_more_background_klp.9.png
index 1911c429f..1911c429f 100644
--- a/java/res/drawable-mdpi/keyboard_key_feedback_more_background_holo.9.png
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_right_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_right_background_ics.9.png
new file mode 100644
index 000000000..0b08d1747
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_right_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_right_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_right_background_klp.9.png
index cdef116d2..cdef116d2 100644
--- a/java/res/drawable-mdpi/keyboard_key_feedback_right_background_holo.9.png
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_right_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_ics.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_ics.9.png
new file mode 100644
index 000000000..cf0b33c1d
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_klp.9.png
index dea5d076c..dea5d076c 100644
--- a/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_holo.9.png
+++ b/java/res/drawable-mdpi/keyboard_key_feedback_right_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_popup_panel_background_holo.9.png b/java/res/drawable-mdpi/keyboard_popup_panel_background_holo.9.png
deleted file mode 100644
index 441edc30b..000000000
--- a/java/res/drawable-mdpi/keyboard_popup_panel_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_popup_panel_background_ics.9.png b/java/res/drawable-mdpi/keyboard_popup_panel_background_ics.9.png
new file mode 100644
index 000000000..61988a8e1
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_popup_panel_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/keyboard_popup_panel_background_klp.9.png b/java/res/drawable-mdpi/keyboard_popup_panel_background_klp.9.png
new file mode 100644
index 000000000..896505518
--- /dev/null
+++ b/java/res/drawable-mdpi/keyboard_popup_panel_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-mdpi/sym_keyboard_label_mic_holo_dark.png b/java/res/drawable-mdpi/sym_keyboard_label_mic_holo_dark.png
deleted file mode 100644
index 537f39b02..000000000
--- a/java/res/drawable-mdpi/sym_keyboard_label_mic_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/sym_keyboard_mic_holo_light.png b/java/res/drawable-mdpi/sym_keyboard_mic_holo_light.png
deleted file mode 100644
index 84a63dc7f..000000000
--- a/java/res/drawable-mdpi/sym_keyboard_mic_holo_light.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-mdpi/sym_keyboard_settings_holo_dark.png b/java/res/drawable-mdpi/sym_keyboard_settings_holo_dark.png
index 36c8c9623..613f4dc88 100644
--- a/java/res/drawable-mdpi/sym_keyboard_settings_holo_dark.png
+++ b/java/res/drawable-mdpi/sym_keyboard_settings_holo_dark.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_ics.9.png
new file mode 100644
index 000000000..d990c0258
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_klp.9.png
index a2f6ac0e2..a2f6ac0e2 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_active_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_ics.9.png
new file mode 100644
index 000000000..ab8fb2e86
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_klp.9.png
index 20251a000..20251a000 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_ics.9.png
new file mode 100644
index 000000000..3871689ef
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_klp.9.png
index 84d173967..84d173967 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
new file mode 100644
index 000000000..912506368
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
index ee4490eac..ee4490eac 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
new file mode 100644
index 000000000..35ce67fdc
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
index e8124776c..e8124776c 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_ics.9.png
new file mode 100644
index 000000000..c23a4b225
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_klp.9.png
index f770962c3..f770962c3 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_light_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_normal.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_normal.9.png
deleted file mode 100644
index 026005d6f..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png
deleted file mode 100644
index 38c5f244b..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_normal_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png
deleted file mode 100644
index f1223e50e..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_normal_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_ics.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_ics.9.png
new file mode 100644
index 000000000..0c7bfdace
--- /dev/null
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_klp.9.png
index 891d00024..891d00024 100644
--- a/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_holo.9.png
+++ b/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png
deleted file mode 100644
index ec35db54d..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png
deleted file mode 100644
index bd30464d6..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_pressed_off.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png
deleted file mode 100644
index a3ff5d1bb..000000000
--- a/java/res/drawable-xhdpi/btn_keyboard_key_pressed_on.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/ic_launcher_keyboard.png b/java/res/drawable-xhdpi/ic_launcher_keyboard.png
new file mode 100644
index 000000000..f2ac50dfe
--- /dev/null
+++ b/java/res/drawable-xhdpi/ic_launcher_keyboard.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/ic_subtype_mic_dark.png b/java/res/drawable-xhdpi/ic_subtype_mic_dark.png
deleted file mode 100644
index 17581ba89..000000000
--- a/java/res/drawable-xhdpi/ic_subtype_mic_dark.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_background_holo.9.png
deleted file mode 100644
index e8c65f677..000000000
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_background_ics.9.png
new file mode 100644
index 000000000..d999127f2
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_background_klp.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_background_klp.9.png
new file mode 100644
index 000000000..c211d89c8
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_ics.9.png
new file mode 100644
index 000000000..c4d694136
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_klp.9.png
index 543bc763e..543bc763e 100644
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_holo.9.png
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_left_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_ics.9.png
new file mode 100644
index 000000000..5429c1785
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_klp.9.png
index ec42aadb6..ec42aadb6 100644
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_holo.9.png
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_left_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_ics.9.png
new file mode 100644
index 000000000..5135a0869
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_klp.9.png
index 319e9d7cf..319e9d7cf 100644
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_holo.9.png
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_ics.9.png
new file mode 100644
index 000000000..19a77a29f
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_klp.9.png
index 052032be7..052032be7 100644
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_holo.9.png
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_right_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_ics.9.png
new file mode 100644
index 000000000..ae2ffff8e
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_klp.9.png
index c7e9d1c9e..c7e9d1c9e 100644
--- a/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_holo.9.png
+++ b/java/res/drawable-xhdpi/keyboard_key_feedback_right_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_popup_panel_background_holo.9.png b/java/res/drawable-xhdpi/keyboard_popup_panel_background_holo.9.png
deleted file mode 100644
index dde1856e3..000000000
--- a/java/res/drawable-xhdpi/keyboard_popup_panel_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_popup_panel_background_ics.9.png b/java/res/drawable-xhdpi/keyboard_popup_panel_background_ics.9.png
new file mode 100644
index 000000000..1dee699f4
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_popup_panel_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/keyboard_popup_panel_background_klp.9.png b/java/res/drawable-xhdpi/keyboard_popup_panel_background_klp.9.png
new file mode 100644
index 000000000..36df715b6
--- /dev/null
+++ b/java/res/drawable-xhdpi/keyboard_popup_panel_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xhdpi/sym_keyboard_settings_holo_dark.png b/java/res/drawable-xhdpi/sym_keyboard_settings_holo_dark.png
index 99ee97dbf..15a97394e 100644
--- a/java/res/drawable-xhdpi/sym_keyboard_settings_holo_dark.png
+++ b/java/res/drawable-xhdpi/sym_keyboard_settings_holo_dark.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_ics.9.png
new file mode 100644
index 000000000..680421eaf
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_klp.9.png
index 17f0a7a58..17f0a7a58 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_active_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_ics.9.png
new file mode 100644
index 000000000..40f5011c0
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_klp.9.png
index 97f96258e..97f96258e 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_normal_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_ics.9.png
new file mode 100644
index 000000000..6ff6319d3
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_klp.9.png
index dfb16a76b..dfb16a76b 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
new file mode 100644
index 000000000..818ea70fd
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
index bf1d34686..bf1d34686 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_off_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
new file mode 100644
index 000000000..a476d2a9e
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
index 962277165..962277165 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_dark_pressed_on_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_ics.9.png
new file mode 100644
index 000000000..3c17c5eec
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_klp.9.png
index 17144b673..17144b673 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_light_pressed_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_ics.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_ics.9.png
new file mode 100644
index 000000000..6d2af5942
--- /dev/null
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_klp.9.png
index 0cbb2ec84..0cbb2ec84 100644
--- a/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_holo.9.png
+++ b/java/res/drawable-xxhdpi/btn_keyboard_key_popup_selected_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/ic_launcher_keyboard.png b/java/res/drawable-xxhdpi/ic_launcher_keyboard.png
new file mode 100644
index 000000000..df386e827
--- /dev/null
+++ b/java/res/drawable-xxhdpi/ic_launcher_keyboard.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/ic_subtype_mic_dark.png b/java/res/drawable-xxhdpi/ic_subtype_mic_dark.png
deleted file mode 100644
index 811103a56..000000000
--- a/java/res/drawable-xxhdpi/ic_subtype_mic_dark.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_background_holo.9.png
deleted file mode 100644
index 11eee94f3..000000000
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_background_ics.9.png
new file mode 100644
index 000000000..bd1ef3cd9
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_background_klp.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_background_klp.9.png
new file mode 100644
index 000000000..fd2f9e514
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_ics.9.png
new file mode 100644
index 000000000..65af4b569
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_klp.9.png
index 2079e0462..2079e0462 100644
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_holo.9.png
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_ics.9.png
new file mode 100644
index 000000000..ac6750dcb
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_klp.9.png
index c4178d9a8..c4178d9a8 100644
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_holo.9.png
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_left_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_ics.9.png
new file mode 100644
index 000000000..cea7c05f6
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_klp.9.png
index 121411a06..121411a06 100644
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_holo.9.png
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_ics.9.png
new file mode 100644
index 000000000..520fa7c6b
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_klp.9.png
index d3d8733fd..d3d8733fd 100644
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_holo.9.png
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_ics.9.png
new file mode 100644
index 000000000..eee221758
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_klp.9.png
index d7ec8bcb2..d7ec8bcb2 100644
--- a/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_holo.9.png
+++ b/java/res/drawable-xxhdpi/keyboard_key_feedback_right_more_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_popup_panel_background_holo.9.png b/java/res/drawable-xxhdpi/keyboard_popup_panel_background_holo.9.png
deleted file mode 100644
index ca576deaf..000000000
--- a/java/res/drawable-xxhdpi/keyboard_popup_panel_background_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_popup_panel_background_ics.9.png b/java/res/drawable-xxhdpi/keyboard_popup_panel_background_ics.9.png
new file mode 100644
index 000000000..721c24400
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_popup_panel_background_ics.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/keyboard_popup_panel_background_klp.9.png b/java/res/drawable-xxhdpi/keyboard_popup_panel_background_klp.9.png
new file mode 100644
index 000000000..91d5d7f90
--- /dev/null
+++ b/java/res/drawable-xxhdpi/keyboard_popup_panel_background_klp.9.png
Binary files differ
diff --git a/java/res/drawable-xxhdpi/sym_keyboard_settings_holo_dark.png b/java/res/drawable-xxhdpi/sym_keyboard_settings_holo_dark.png
index 7041bb6ce..bf643e1d8 100644
--- a/java/res/drawable-xxhdpi/sym_keyboard_settings_holo_dark.png
+++ b/java/res/drawable-xxhdpi/sym_keyboard_settings_holo_dark.png
Binary files differ
diff --git a/java/res/drawable/btn_keyboard_key_functional_ics.xml b/java/res/drawable/btn_keyboard_key_functional_ics.xml
index 5dcde5fa9..847ca72f4 100644
--- a/java/res/drawable/btn_keyboard_key_functional_ics.xml
+++ b/java/res/drawable/btn_keyboard_key_functional_ics.xml
@@ -17,6 +17,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Functional keys. -->
<item android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_dark_pressed_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_ics" />
<item android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
</selector>
diff --git a/java/res/drawable/btn_keyboard_key_functional_klp.xml b/java/res/drawable/btn_keyboard_key_functional_klp.xml
new file mode 100644
index 000000000..0e17ed234
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_functional_klp.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Functional keys. -->
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_klp" />
+ <item android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_key_ics.xml b/java/res/drawable/btn_keyboard_key_ics.xml
index 0c86e163e..259bb9ba5 100644
--- a/java/res/drawable/btn_keyboard_key_ics.xml
+++ b/java/res/drawable/btn_keyboard_key_ics.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,23 +17,23 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Functional keys. -->
<item android:state_single="true" android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_dark_pressed_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_ics" />
<item android:state_single="true"
android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
<!-- Action keys. -->
<item android:state_active="true" android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_dark_pressed_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_ics" />
<item android:state_active="true"
- android:drawable="@drawable/btn_keyboard_key_dark_active_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_active_ics" />
<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_dark_pressed_on_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_on_ics" />
<item android:state_checkable="true" android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_dark_pressed_off_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_off_ics" />
<item android:state_checkable="true" android:state_checked="true"
- android:drawable="@drawable/btn_keyboard_key_dark_normal_on_holo" />
+ android:drawable="@drawable/btn_keyboard_key_dark_normal_on_ics" />
<item android:state_checkable="true"
android:drawable="@drawable/btn_keyboard_key_dark_normal_off_holo" />
@@ -43,6 +43,6 @@
<!-- Normal keys. -->
<item android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_light_pressed_holo" />
+ android:drawable="@drawable/btn_keyboard_key_light_pressed_ics" />
<item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
</selector>
diff --git a/java/res/drawable/btn_keyboard_key_klp.xml b/java/res/drawable/btn_keyboard_key_klp.xml
new file mode 100644
index 000000000..16b5fa00b
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_klp.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Functional keys. -->
+ <item android:state_single="true" android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_klp" />
+ <item android:state_single="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_normal_holo" />
+
+ <!-- Action keys. -->
+ <item android:state_active="true" android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_klp" />
+ <item android:state_active="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_active_klp" />
+
+ <!-- Toggle keys. Use checkable/checked state. -->
+ <item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_on_klp" />
+ <item android:state_checkable="true" android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_pressed_off_klp" />
+ <item android:state_checkable="true" android:state_checked="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_normal_on_klp" />
+ <item android:state_checkable="true"
+ android:drawable="@drawable/btn_keyboard_key_dark_normal_off_holo" />
+
+ <!-- Empty background keys. -->
+ <item android:state_empty="true"
+ android:drawable="@drawable/transparent" />
+
+ <!-- Normal keys. -->
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_light_pressed_klp" />
+ <item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_key_popup_ics.xml b/java/res/drawable/btn_keyboard_key_popup_ics.xml
index b99679ba1..31b613176 100644
--- a/java/res/drawable/btn_keyboard_key_popup_ics.xml
+++ b/java/res/drawable/btn_keyboard_key_popup_ics.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,6 +16,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_popup_selected_holo" />
+ android:drawable="@drawable/btn_keyboard_key_popup_selected_ics" />
<item android:drawable="@drawable/transparent" />
</selector>
diff --git a/java/res/drawable/btn_keyboard_key_popup_klp.xml b/java/res/drawable/btn_keyboard_key_popup_klp.xml
new file mode 100644
index 000000000..62cbca8ae
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_popup_klp.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_popup_selected_klp" />
+ <item android:drawable="@drawable/transparent" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_spacebar_gb.xml b/java/res/drawable/btn_keyboard_spacebar_gb.xml
new file mode 100644
index 000000000..4d51f3c9c
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_spacebar_gb.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_light_pressed" />
+ <item android:drawable="@drawable/btn_keyboard_key_light_normal" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_spacebar_ics.xml b/java/res/drawable/btn_keyboard_spacebar_ics.xml
new file mode 100644
index 000000000..4530ea079
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_spacebar_ics.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_light_pressed_ics" />
+ <item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
+</selector>
diff --git a/java/res/drawable/btn_keyboard_spacebar_klp.xml b/java/res/drawable/btn_keyboard_spacebar_klp.xml
new file mode 100644
index 000000000..6b07a392f
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_spacebar_klp.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_light_pressed_klp" />
+ <item android:drawable="@drawable/btn_keyboard_key_light_normal_holo" />
+</selector>
diff --git a/java/res/drawable/btn_suggestion_ics.xml b/java/res/drawable/btn_suggestion_ics.xml
index e4257e327..8f528ee4b 100644
--- a/java/res/drawable/btn_suggestion_ics.xml
+++ b/java/res/drawable/btn_suggestion_ics.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -23,5 +23,5 @@
>
<item
android:state_pressed="true"
- android:drawable="@drawable/btn_keyboard_key_popup_selected_holo" />
+ android:drawable="@drawable/btn_keyboard_key_popup_selected_ics" />
</selector>
diff --git a/java/res/layout/key_preview_ics.xml b/java/res/drawable/btn_suggestion_klp.xml
index 222e8846c..471165bdf 100644
--- a/java/res/layout/key_preview_ics.xml
+++ b/java/res/drawable/btn_suggestion_klp.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2012, The Android Open Source Project
+** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -18,10 +18,10 @@
*/
-->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback_ics"
- android:minWidth="32dp"
- android:gravity="center"
-/>
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+>
+ <item
+ android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_popup_selected_klp" />
+</selector>
diff --git a/java/res/drawable/keyboard_key_feedback_ics.xml b/java/res/drawable/keyboard_key_feedback_ics.xml
index 3c8850e6c..b52a61fbf 100644
--- a/java/res/drawable/keyboard_key_feedback_ics.xml
+++ b/java/res/drawable/keyboard_key_feedback_ics.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
+<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,17 +20,17 @@
>
<!-- Left edge -->
<item latin:state_left_edge="true" latin:state_has_morekeys="true"
- android:drawable="@drawable/keyboard_key_feedback_left_more_background_holo" />
+ android:drawable="@drawable/keyboard_key_feedback_left_more_background_ics" />
<item latin:state_left_edge="true"
- android:drawable="@drawable/keyboard_key_feedback_left_background_holo" />
+ android:drawable="@drawable/keyboard_key_feedback_left_background_ics" />
<!-- Right edge -->
<item latin:state_right_edge="true" latin:state_has_morekeys="true"
- android:drawable="@drawable/keyboard_key_feedback_right_more_background_holo" />
+ android:drawable="@drawable/keyboard_key_feedback_right_more_background_ics" />
<item latin:state_right_edge="true"
- android:drawable="@drawable/keyboard_key_feedback_right_background_holo" />
+ android:drawable="@drawable/keyboard_key_feedback_right_background_ics" />
<item latin:state_has_morekeys="true"
- android:drawable="@drawable/keyboard_key_feedback_more_background_holo" />
- <item android:drawable="@drawable/keyboard_key_feedback_background_holo" />
+ android:drawable="@drawable/keyboard_key_feedback_more_background_ics" />
+ <item android:drawable="@drawable/keyboard_key_feedback_background_ics" />
</selector>
diff --git a/java/res/drawable/keyboard_key_feedback_klp.xml b/java/res/drawable/keyboard_key_feedback_klp.xml
new file mode 100644
index 000000000..a38655641
--- /dev/null
+++ b/java/res/drawable/keyboard_key_feedback_klp.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- Left edge -->
+ <item latin:state_left_edge="true" latin:state_has_morekeys="true"
+ android:drawable="@drawable/keyboard_key_feedback_left_more_background_klp" />
+ <item latin:state_left_edge="true"
+ android:drawable="@drawable/keyboard_key_feedback_left_background_klp" />
+
+ <!-- Right edge -->
+ <item latin:state_right_edge="true" latin:state_has_morekeys="true"
+ android:drawable="@drawable/keyboard_key_feedback_right_more_background_klp" />
+ <item latin:state_right_edge="true"
+ android:drawable="@drawable/keyboard_key_feedback_right_background_klp" />
+
+ <item latin:state_has_morekeys="true"
+ android:drawable="@drawable/keyboard_key_feedback_more_background_klp" />
+ <item android:drawable="@drawable/keyboard_key_feedback_background_klp" />
+</selector>
diff --git a/java/res/layout/emoji_keyboard_page.xml b/java/res/layout/emoji_keyboard_page.xml
index e0b752b32..9afad366a 100644
--- a/java/res/layout/emoji_keyboard_page.xml
+++ b/java/res/layout/emoji_keyboard_page.xml
@@ -18,16 +18,9 @@
*/
-->
-<com.android.inputmethod.keyboard.internal.ScrollViewWithNotifier
+<com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView
xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/emoji_keyboard_scroller"
- android:clipToPadding="false"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
->
- <com.android.inputmethod.keyboard.internal.ScrollKeyboardView
- android:id="@+id/emoji_keyboard_page"
- android:layoutDirection="ltr"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-</com.android.inputmethod.keyboard.internal.ScrollViewWithNotifier>
+ android:id="@+id/emoji_keyboard_page"
+ android:layoutDirection="ltr"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
diff --git a/java/res/layout/emoji_palettes_view.xml b/java/res/layout/emoji_palettes_view.xml
index 1c6da90ba..b25285967 100644
--- a/java/res/layout/emoji_palettes_view.xml
+++ b/java/res/layout/emoji_palettes_view.xml
@@ -29,7 +29,7 @@
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
- android:layout_height="@dimen/suggestions_strip_height"
+ android:layout_height="@dimen/config_suggestions_strip_height"
>
<TabHost
android:id="@+id/emoji_category_tabhost"
@@ -73,7 +73,7 @@
android:background="@color/emoji_key_background_color"
android:src="@drawable/sym_keyboard_delete_holo_dark" />
</LinearLayout>
- <android.support.v4.view.ViewPager
+ <com.android.inputmethod.keyboard.internal.CustomViewPager
android:id="@+id/emoji_keyboard_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
diff --git a/java/res/layout/hint_add_to_dictionary.xml b/java/res/layout/hint_add_to_dictionary.xml
index 68a9faf19..d42908260 100644
--- a/java/res/layout/hint_add_to_dictionary.xml
+++ b/java/res/layout/hint_add_to_dictionary.xml
@@ -23,7 +23,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:textSize="@dimen/suggestion_text_size"
+ android:textSize="@dimen/config_suggestion_text_size"
android:gravity="center"
android:paddingLeft="0dp"
android:paddingTop="0dp"
diff --git a/java/res/layout/input_view.xml b/java/res/layout/input_view.xml
index 1e7a3844e..ed387e5b2 100644
--- a/java/res/layout/input_view.xml
+++ b/java/res/layout/input_view.xml
@@ -41,10 +41,10 @@
android:id="@+id/suggestion_strip_view"
android:layoutDirection="ltr"
android:layout_width="match_parent"
- android:layout_height="@dimen/suggestions_strip_height"
+ android:layout_height="@dimen/config_suggestions_strip_height"
android:gravity="center_vertical"
- android:paddingRight="@dimen/suggestions_strip_padding"
- android:paddingLeft="@dimen/suggestions_strip_padding"
+ android:paddingRight="@dimen/config_suggestions_strip_horizontal_padding"
+ android:paddingLeft="@dimen/config_suggestions_strip_horizontal_padding"
style="?attr/suggestionStripViewStyle" />
<!-- To ensure that key preview popup is correctly placed when the current system locale is
diff --git a/java/res/layout/key_preview_gb.xml b/java/res/layout/key_preview.xml
index 2f2a321a3..16d4c72c3 100644
--- a/java/res/layout/key_preview_gb.xml
+++ b/java/res/layout/key_preview.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2010, The Android Open Source Project
+** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback_gb"
android:minWidth="32dp"
android:gravity="center"
+ style="?attr/keyPreviewTextViewStyle"
/>
diff --git a/java/res/layout/more_keys_keyboard.xml b/java/res/layout/more_keys_keyboard.xml
index 6637117e0..f3795afdc 100644
--- a/java/res/layout/more_keys_keyboard.xml
+++ b/java/res/layout/more_keys_keyboard.xml
@@ -22,11 +22,9 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- style="?attr/moreKeysKeyboardContainerStyle"
+ android:orientation="vertical"
>
<com.android.inputmethod.keyboard.MoreKeysKeyboardView
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:id="@+id/more_keys_keyboard_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
diff --git a/java/res/layout/more_suggestions.xml b/java/res/layout/more_suggestions.xml
index 8659f0761..0869992c9 100644
--- a/java/res/layout/more_suggestions.xml
+++ b/java/res/layout/more_suggestions.xml
@@ -22,16 +22,15 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- style="?attr/moreKeysKeyboardContainerStyle"
+ android:orientation="vertical"
>
<com.android.inputmethod.latin.suggestions.MoreSuggestionsView
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:id="@+id/more_suggestions_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- latin:keyLetterSize="@dimen/suggestion_text_size"
- latin:keyLabelSize="@dimen/suggestion_text_size"
- latin:keyHintLetterRatio="@fraction/more_suggestions_info_ratio"
+ latin:keyLetterSize="@dimen/config_suggestion_text_size"
+ latin:keyLabelSize="@dimen/config_suggestion_text_size"
+ latin:keyHintLetterRatio="@fraction/config_more_suggestions_info_ratio"
latin:keyHintLetterColor="@android:color/white" />
</LinearLayout>
diff --git a/java/res/layout/suggestion_word.xml b/java/res/layout/suggestion_word.xml
index c82a13c99..47d2bd864 100644
--- a/java/res/layout/suggestion_word.xml
+++ b/java/res/layout/suggestion_word.xml
@@ -24,12 +24,12 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:minWidth="@dimen/suggestion_min_width"
- android:textSize="@dimen/suggestion_text_size"
+ android:minWidth="@dimen/config_suggestion_min_width"
+ android:textSize="@dimen/config_suggestion_text_size"
android:gravity="center"
- android:paddingLeft="@dimen/suggestion_padding"
+ android:paddingLeft="@dimen/config_suggestion_text_horizontal_padding"
android:paddingTop="0dp"
- android:paddingRight="@dimen/suggestion_padding"
+ android:paddingRight="@dimen/config_suggestion_text_horizontal_padding"
android:paddingBottom="0dp"
android:hapticFeedbackEnabled="false"
android:focusable="false"
diff --git a/java/res/layout/user_dictionary_add_word.xml b/java/res/layout/user_dictionary_add_word.xml
index bbf9b1b5b..607f5c4a8 100644
--- a/java/res/layout/user_dictionary_add_word.xml
+++ b/java/res/layout/user_dictionary_add_word.xml
@@ -52,7 +52,7 @@
android:hint="@string/user_dict_settings_add_word_hint"
android:imeOptions="flagNoFullscreen"
android:inputType="textNoSuggestions"
- android:maxLength="@integer/user_dictionary_max_word_length" >
+ android:maxLength="@integer/config_user_dictionary_max_word_length" >
<requestFocus />
</EditText>
diff --git a/java/res/layout/user_dictionary_add_word_fullscreen.xml b/java/res/layout/user_dictionary_add_word_fullscreen.xml
index 219485b66..9bcb189b4 100644
--- a/java/res/layout/user_dictionary_add_word_fullscreen.xml
+++ b/java/res/layout/user_dictionary_add_word_fullscreen.xml
@@ -30,7 +30,7 @@
android:hint="@string/user_dict_settings_add_word_hint"
android:imeOptions="flagNoFullscreen"
android:inputType="textNoSuggestions"
- android:maxLength="@integer/user_dictionary_max_word_length" >
+ android:maxLength="@integer/config_user_dictionary_max_word_length" >
<requestFocus />
</EditText>
@@ -61,7 +61,7 @@
android:hint="@string/user_dict_settings_add_shortcut_hint"
android:imeOptions="flagNoFullscreen"
android:inputType="textNoSuggestions"
- android:maxLength="@integer/user_dictionary_max_word_length" />
+ android:maxLength="@integer/config_user_dictionary_max_word_length" />
<TextView
android:id="@+id/user_dictionary_add_locale_label"
diff --git a/java/res/mipmap-hdpi/ic_launcher_keyboard.png b/java/res/mipmap-hdpi/ic_launcher_keyboard.png
deleted file mode 100644
index 36b1ccae2..000000000
--- a/java/res/mipmap-hdpi/ic_launcher_keyboard.png
+++ /dev/null
Binary files differ
diff --git a/java/res/mipmap-mdpi/ic_launcher_keyboard.png b/java/res/mipmap-mdpi/ic_launcher_keyboard.png
deleted file mode 100644
index 67ef189ff..000000000
--- a/java/res/mipmap-mdpi/ic_launcher_keyboard.png
+++ /dev/null
Binary files differ
diff --git a/java/res/mipmap-xhdpi/ic_launcher_keyboard.png b/java/res/mipmap-xhdpi/ic_launcher_keyboard.png
deleted file mode 100644
index b33208332..000000000
--- a/java/res/mipmap-xhdpi/ic_launcher_keyboard.png
+++ /dev/null
Binary files differ
diff --git a/java/res/mipmap-xxhdpi/ic_launcher_keyboard.png b/java/res/mipmap-xxhdpi/ic_launcher_keyboard.png
deleted file mode 100644
index acc424fe2..000000000
--- a/java/res/mipmap-xxhdpi/ic_launcher_keyboard.png
+++ /dev/null
Binary files differ
diff --git a/java/res/raw/main_de.dict b/java/res/raw/main_de.dict
index 69796bbaa..c65698d7b 100644
--- a/java/res/raw/main_de.dict
+++ b/java/res/raw/main_de.dict
Binary files differ
diff --git a/java/res/raw/setup_welcome_image.png b/java/res/raw/setup_welcome_image.png
index 2445915b8..98e731331 100644
--- a/java/res/raw/setup_welcome_image.png
+++ b/java/res/raw/setup_welcome_image.png
Binary files differ
diff --git a/java/res/raw/setup_welcome_video.mp4 b/java/res/raw/setup_welcome_video.mp4
index 820852531..224bf250c 100644
--- a/java/res/raw/setup_welcome_video.mp4
+++ b/java/res/raw/setup_welcome_video.mp4
Binary files differ
diff --git a/java/res/values-be/strings-appname.xml b/java/res/values-af/strings-action-keys.xml
index 2f9593bdc..c5cd71ab7 100644
--- a/java/res/values-be/strings-appname.xml
+++ b/java/res/values-af/strings-action-keys.xml
@@ -20,8 +20,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"Клавіятура Android (AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"Iнструмент праверкi правапiсу для Android (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"Налады клавіятуры Android (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"Налады інструмента праверкі правапісу для Android (AOSP)"</string>
+ <string name="label_go_key" msgid="4033615332628671065">"Gaan"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Volg."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Vorige"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Klaar"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Stuur"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Laat wag"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Wag"</string>
</resources>
diff --git a/java/res/values-af/strings.xml b/java/res/values-af/strings.xml
index adf9e5bf5..9607ceb4c 100644
--- a/java/res/values-af/strings.xml
+++ b/java/res/values-af/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamiese sweefvoorskou"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Sien die voorgestelde woord tydens gebare"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Gestoor"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Gaan"</string>
- <string name="label_next_key" msgid="362972844525672568">"Volgende"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Vorige"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Klaar"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Stuur"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Laat wag"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Wag"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Koppel \'n kopstuk om te hoor hoe wagwoordsleutels hardop gesê word."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Huidige teks is %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Geen teks ingevoer nie"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"tyd"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Steminvoerinstellings"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Op hoofsleutelbord"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Op simbolesleutelbord"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Af"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofoon op hoofsleutelbord"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofoon op simbolesleutelbord"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Steminvoer is gedeaktiveer"</string>
<string name="configure_input_method" msgid="373356270290742459">"Stel invoermetodes op"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Invoertale"</string>
<string name="send_feedback" msgid="1780431884109392046">"Stuur terugvoer"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emosiekone"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Kleurskema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Wit"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blou"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Gepasmaakte invoerstyle"</string>
<string name="add_style" msgid="6163126614514489951">"Voeg styl by"</string>
<string name="add" msgid="8299699805688017798">"Voeg by"</string>
diff --git a/java/res/values-am/strings-action-keys.xml b/java/res/values-am/strings-action-keys.xml
new file mode 100644
index 000000000..1813a86d8
--- /dev/null
+++ b/java/res/values-am/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"ሂድ"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"ቀጣይ"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"ቀዳሚ"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"ተደርጓል"</string>
+ <string name="label_send_key" msgid="482252074224462163">"ላክ"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"ቆም በል"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"ጠብቅ"</string>
+</resources>
diff --git a/java/res/values-am/strings.xml b/java/res/values-am/strings.xml
index 9fa68f365..d131e340c 100644
--- a/java/res/values-am/strings.xml
+++ b/java/res/values-am/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"ተለዋዋጭ ተንሳፋፊ ቅድመ-እይታ"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ምልክት እየሰጡ ሳሉ በአስተያየት የተጠቆመው ቃል ይመልከቱ"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : ተቀምጧል"</string>
- <string name="label_go_key" msgid="1635148082137219148">"ሂድ"</string>
- <string name="label_next_key" msgid="362972844525672568">"በመቀጠል"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"ቀዳሚ"</string>
- <string name="label_done_key" msgid="2441578748772529288">"ተከናውኗል"</string>
- <string name="label_send_key" msgid="2815056534433717444">" ይላኩ"</string>
- <string name="label_pause_key" msgid="181098308428035340">"ላፍታ አቁም"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"ቆይ"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"የይለፍቃል ቁልፎች ጮክ በለው ሲነገሩ ለመስማት የጆሮ ማዳመጫ ሰካ::"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"የአሁኑ ፅሁፍ %s ነው"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"ምንም ፅሁፍ አልገባም"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ጊዜ"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"ዩ አር ኤል"</string>
<string name="voice_input" msgid="3583258583521397548">"የድምፅ ግቤት ቁልፍ"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"በዋናቁልፍ ሰሌዳ ላይ"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"በምልክቶች ቁልፍ ሰሌዳ ላይ"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"ውጪ"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"ድምፅ ማጉያ በዋናው ቁልፍሰሌዳው ላይ"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"የድምፅ ማጉያ ምልክትበቁልፍ ሰሌዳላይ"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"የድምፅ ግቤት ቦዝኗል"</string>
<string name="configure_input_method" msgid="373356270290742459">"ግቤት ሜተዶችን አዋቀር"</string>
<string name="language_selection_title" msgid="1651299598555326750">"ቋንቋዎች አግቤት"</string>
<string name="send_feedback" msgid="1780431884109392046">"ግብረ-መልስ ላክ"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"ፊደላት (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"ፊደላት (ፒሲ)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"ኢሞጂ"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"የቀለም ዘዴ"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"ነጭ"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"ሰማያዊ"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"የተበጁ የግቤት ስታይሎች"</string>
<string name="add_style" msgid="6163126614514489951">"ስታይል አክል"</string>
<string name="add" msgid="8299699805688017798">"አክል"</string>
@@ -161,7 +151,7 @@
<string name="save" msgid="7646738597196767214">"አስቀምጥ"</string>
<string name="subtype_locale" msgid="8576443440738143764">"ቋንቋ"</string>
<string name="keyboard_layout_set" msgid="4309233698194565609">"አቀማመጥ"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"የተበጀው የግብዓት ቅጥህን ከመጠቀምህ በፊት መንቃት አለበት። አሁን ማንቃት ትፈልጋለህ?"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"የተበጀው የእርስዎን ግብዓት ቅጥ ከመጠቀምዎ በፊት መንቃት አለበት። አሁን ማንቃት ይፈልጋሉ?"</string>
<string name="enable" msgid="5031294444630523247">"አንቃ"</string>
<string name="not_now" msgid="6172462888202790482">"አሁን አልፈልግም"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"ተመሳሳዩ የግብዓት ቅጥ አስቀድሞ አለ፦ <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
diff --git a/java/res/values-fa/donottranslate.xml b/java/res/values-ar/config-spacing-and-punctuations.xml
index 57de2538b..9e637e458 100644
--- a/java/res/values-fa/donottranslate.xml
+++ b/java/res/values-ar/config-spacing-and-punctuations.xml
@@ -21,5 +21,5 @@
<!-- The all letters need to be mirrored are found at
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
<!-- Symbols that are suggested between words -->
- <string name="suggested_punctuations">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
+ <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
diff --git a/java/res/values-ar/strings-action-keys.xml b/java/res/values-ar/strings-action-keys.xml
new file mode 100644
index 000000000..481b22f20
--- /dev/null
+++ b/java/res/values-ar/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"ذهاب"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"تالٍ"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"سابق"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"تم"</string>
+ <string name="label_send_key" msgid="482252074224462163">"إرسال"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"توقف"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"انتظر"</string>
+</resources>
diff --git a/java/res/values-ar/strings-appname.xml b/java/res/values-ar/strings-appname.xml
index d5176d022..35387cb86 100644
--- a/java/res/values-ar/strings-appname.xml
+++ b/java/res/values-ar/strings-appname.xml
@@ -20,8 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"لوحة مفاتيح Android ‏(AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"المدقق الإملائي في Android‏ (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"إعدادات لوحة مفاتيح Android‏ (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"إعدادات المدقق الإملائي في Android‏ (AOSP)"</string>
+ <string name="english_ime_name" msgid="5940510615957428904">"‏لوحة مفاتيح Android ‏(AOSP)"</string>
+ <string name="spell_checker_service_name" msgid="1254221805440242662">"‏المدقق الإملائي في Android‏ (AOSP)"</string>
+ <string name="english_ime_settings" msgid="5760361067176802794">"‏إعدادات لوحة مفاتيح Android‏ (AOSP)"</string>
+ <string name="android_spell_checker_settings" msgid="6123949487832861885">"‏إعدادات المدقق الإملائي في Android‏ (AOSP)"</string>
</resources>
diff --git a/java/res/values-ar/strings.xml b/java/res/values-ar/strings.xml
index 1d58832f4..226936b14 100644
--- a/java/res/values-ar/strings.xml
+++ b/java/res/values-ar/strings.xml
@@ -38,7 +38,7 @@
<string name="show_language_switch_key" msgid="5915478828318774384">"مفتاح تبديل اللغة"</string>
<string name="show_language_switch_key_summary" msgid="7343403647474265713">"يظهر عندما يتم تمكين لغات الإدخال متعددة"</string>
<string name="sliding_key_input_preview" msgid="6604262359510068370">"إظهار مؤشر التمرير"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"عرض تلميح مرئي أثناء التمرير من مفتاح Shift أو Symbol"</string>
+ <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"‏عرض تلميح مرئي أثناء التمرير من مفتاح Shift أو Symbol"</string>
<string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"تأخير إزالة النافذة المنبثقة الأساسية"</string>
<string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"بلا تأخير"</string>
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"افتراضي"</string>
@@ -74,22 +74,15 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"معاينة نصوص متحركة ديناميكية"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"مشاهدة الكلمة المقترحة أثناء الإيماءة"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : تم الحفظ"</string>
- <string name="label_go_key" msgid="1635148082137219148">"تنفيذ"</string>
- <string name="label_next_key" msgid="362972844525672568">"التالي"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"السابق"</string>
- <string name="label_done_key" msgid="2441578748772529288">"تم"</string>
- <string name="label_send_key" msgid="2815056534433717444">"إرسال"</string>
- <string name="label_pause_key" msgid="181098308428035340">"توقف مؤقت"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"انتظار"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"يمكنك توصيل سماعة رأس لسماع مفاتيح كلمة المرور منطوقة بصوت عالٍ."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"النص الحالي هو %s"</string>
+ <string name="spoken_current_text_is" msgid="2485723011272583845">"‏النص الحالي هو %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"لم يتم إدخال نص"</string>
<string name="spoken_auto_correct" msgid="8005997889020109763">"<xliff:g id="KEY">%1$s</xliff:g> لتصحيح <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g> إلى <xliff:g id="CORRECTED">%3$s</xliff:g>"</string>
<string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> للتصحيح التلقائي"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"رمز المفتاح %d"</string>
+ <string name="spoken_description_unknown" msgid="3197434010402179157">"‏رمز المفتاح %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"العالي"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift يعمل (انقر للتعطيل)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Caps lock يعمل (انقر للتعطيل)"</string>
+ <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"‏Shift يعمل (انقر للتعطيل)"</string>
+ <string name="spoken_description_caps_lock" msgid="3276478269526304432">"‏Caps lock يعمل (انقر للتعطيل)"</string>
<string name="spoken_description_delete" msgid="8740376944276199801">"حذف"</string>
<string name="spoken_description_to_symbol" msgid="5486340107500448969">"الرموز"</string>
<string name="spoken_description_to_alpha" msgid="23129338819771807">"أحرف"</string>
@@ -105,9 +98,9 @@
<string name="spoken_description_language_switch" msgid="5507091328222331316">"تبديل اللغة"</string>
<string name="spoken_description_action_next" msgid="8636078276664150324">"التالي"</string>
<string name="spoken_description_action_previous" msgid="800872415009336208">"السابق"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"تم تمكين Shift"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"تم تمكين Caps lock"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"تم تعطيل Shift"</string>
+ <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"‏تم تمكين Shift"</string>
+ <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"‏تم تمكين Caps lock"</string>
+ <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"‏تم تعطيل Shift"</string>
<string name="spoken_description_mode_symbol" msgid="7183343879909747642">"وضع الرموز"</string>
<string name="spoken_description_mode_alpha" msgid="3528307674390156956">"وضع الأحرف"</string>
<string name="spoken_description_mode_phone" msgid="6520207943132026264">"وضع الهاتف"</string>
@@ -122,14 +115,8 @@
<string name="keyboard_mode_phone" msgid="6851627527401433229">"الهاتف"</string>
<string name="keyboard_mode_text" msgid="6479436687899701619">"النص"</string>
<string name="keyboard_mode_time" msgid="4381856885582143277">"الوقت"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"عنوان URL"</string>
+ <string name="keyboard_mode_url" msgid="1519819835514911218">"‏عنوان URL"</string>
<string name="voice_input" msgid="3583258583521397548">"مفتاح الإدخال الصوتي"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"لوحة مفاتيح رئيسية"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"لوحة مفاتيح الرموز"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"إيقاف"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"ميكروفون على لوحة مفاتيح رئيسية"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"ميكروفون على لوحة مفاتيح الرموز"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"الإدخال الصوتي مُعطل"</string>
<string name="configure_input_method" msgid="373356270290742459">"تهيئة طرق الإدخال"</string>
<string name="language_selection_title" msgid="1651299598555326750">"لغات الإدخال"</string>
<string name="send_feedback" msgid="1780431884109392046">"إرسال تعليقات"</string>
@@ -147,13 +134,16 @@
<string name="subtype_with_layout_es_US" msgid="6261791057007890189">"الإسبانية (الأمريكية) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
<string name="subtype_nepali_traditional" msgid="9032247506728040447">"<xliff:g id="LANGUAGE">%s</xliff:g> (التقليدية)"</string>
<string name="subtype_no_language" msgid="7137390094240139495">"بدون لغة (أبجدية)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"الأبجدية (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"الأبجدية (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"الأبجدية (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"الأبجدية (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"الأبجدية (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"الأبجدية (PC)"</string>
+ <string name="subtype_no_language_qwerty" msgid="244337630616742604">"‏الأبجدية (QWERTY)"</string>
+ <string name="subtype_no_language_qwertz" msgid="443066912507547976">"‏الأبجدية (QWERTZ)"</string>
+ <string name="subtype_no_language_azerty" msgid="8144348527575640087">"‏الأبجدية (AZERTY)"</string>
+ <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"‏الأبجدية (Dvorak)"</string>
+ <string name="subtype_no_language_colemak" msgid="5837418400010302623">"‏الأبجدية (Colemak)"</string>
+ <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"‏الأبجدية (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"الرموز التعبيرية"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"النمط اللوني"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"أبيض"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"أزرق"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"أنماط الإدخال المخصصة"</string>
<string name="add_style" msgid="6163126614514489951">"إضافة نمط"</string>
<string name="add" msgid="8299699805688017798">"إضافة"</string>
@@ -217,9 +207,9 @@
<string name="install_dict" msgid="180852772562189365">"تثبيت"</string>
<string name="cancel_download_dict" msgid="7843340278507019303">"إلغاء"</string>
<string name="delete_dict" msgid="756853268088330054">"حذف"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"اللغة المحددة على جهازك الجوال تشتمل على قاموس متوفر.&lt;br/&gt; نوصي &lt;b&gt;بتنزيل&lt;/b&gt; قاموس <xliff:g id="LANGUAGE">%1$s</xliff:g> لتحسين تجربة الكتابة.&lt;br/&gt; &lt;br/&gt; قد يستغرق التنزيل دقيقة أو دقيقتين أكثر من المدة التي يستغرقها التنزيل عبر شبكة الجيل الثالث. قد تنطبق الرسوم إذا لم تكن مشتركًا في &lt;b&gt;خطة البيانات غير المحدودة&lt;/b&gt;.&lt;br/&gt; إذا لم تكن متأكدًا من خطة البيانات المتوفرة لديك، فنحن نوصي بالبحث عن اتصال Wi-Fi لبدء عملية التنزيل تلقائيًا.&lt;br/&gt; &lt;br/&gt; نصيحة: يمكنك تنزيل القواميس وإزالتها عن طريق الانتقال إلى &lt;b&gt;اللغة والإدخال&lt;/b&gt; في قائمة &lt;b&gt;إعدادات&lt;/b&gt; في جهازك الجوَّال."</string>
+ <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"‏اللغة المحددة على جهازك الجوال تشتمل على قاموس متوفر.&lt;br/&gt; نوصي &lt;b&gt;بتنزيل&lt;/b&gt; قاموس <xliff:g id="LANGUAGE">%1$s</xliff:g> لتحسين تجربة الكتابة.&lt;br/&gt; &lt;br/&gt; قد يستغرق التنزيل دقيقة أو دقيقتين أكثر من المدة التي يستغرقها التنزيل عبر شبكة الجيل الثالث. قد تنطبق الرسوم إذا لم تكن مشتركًا في &lt;b&gt;خطة البيانات غير المحدودة&lt;/b&gt;.&lt;br/&gt; إذا لم تكن متأكدًا من خطة البيانات المتوفرة لديك، فنحن نوصي بالبحث عن اتصال Wi-Fi لبدء عملية التنزيل تلقائيًا.&lt;br/&gt; &lt;br/&gt; نصيحة: يمكنك تنزيل القواميس وإزالتها عن طريق الانتقال إلى &lt;b&gt;اللغة والإدخال&lt;/b&gt; في قائمة &lt;b&gt;إعدادات&lt;/b&gt; في جهازك الجوَّال."</string>
<string name="download_over_metered" msgid="1643065851159409546">"التنزيل الآن (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g> ميغابايت)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"التنزيل عبر شبكة Wi-Fi"</string>
+ <string name="do_not_download_over_metered" msgid="2176209579313941583">"‏التنزيل عبر شبكة Wi-Fi"</string>
<string name="dict_available_notification_title" msgid="6514288591959117288">"هناك قاموس متوفر للغة <xliff:g id="LANGUAGE">%1$s</xliff:g>"</string>
<string name="dict_available_notification_description" msgid="1075194169443163487">"اضغط للمراجعة والتنزيل"</string>
<string name="toast_downloading_suggestions" msgid="1313027353588566660">"جارٍ التنزيل: ستتوفر اقتراحات للغة <xliff:g id="LANGUAGE">%1$s</xliff:g> بعد قليل."</string>
diff --git a/java/res/values-be/bools.xml b/java/res/values-be-rBY/bools.xml
index 840d20c21..840d20c21 100644
--- a/java/res/values-be/bools.xml
+++ b/java/res/values-be-rBY/bools.xml
diff --git a/java/res/values-be-rBY/strings-action-keys.xml b/java/res/values-be-rBY/strings-action-keys.xml
new file mode 100644
index 000000000..91416c8b7
--- /dev/null
+++ b/java/res/values-be-rBY/strings-action-keys.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Пачаць"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Далей"</string>
+ <string name="label_previous_key" msgid="1211868118071386787">"Назад"</string>
+ <string name="label_done_key" msgid="2441578748772529288">"Гатова"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Адправіць"</string>
+ <string name="label_pause_key" msgid="181098308428035340">"Паўза"</string>
+ <string name="label_wait_key" msgid="6402152600878093134">"Чакае"</string>
+</resources>
diff --git a/java/res/values-be/strings.xml b/java/res/values-be/strings.xml
deleted file mode 100644
index d9b970807..000000000
--- a/java/res/values-be/strings.xml
+++ /dev/null
@@ -1,260 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_input_options" msgid="3909945612939668554">"Параметры ўводу"</string>
- <string name="english_ime_research_log" msgid="8492602295696577851">"Каманды гiсторыя даследаванняў"</string>
- <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"Шукаць імёны кантактаў"</string>
- <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"Модуль праверкі правапісу выкарыстоўвае запісы са спісу кантактаў"</string>
- <string name="vibrate_on_keypress" msgid="5258079494276955460">"Вібрацыя пры націску клавіш"</string>
- <string name="sound_on_keypress" msgid="6093592297198243644">"Гук пры націску"</string>
- <string name="popup_on_keypress" msgid="123894815723512944">"Па націску на клавішы ўсплывае акно"</string>
- <string name="general_category" msgid="1859088467017573195">"Агульныя"</string>
- <string name="correction_category" msgid="2236750915056607613">"Выпраўленне тэксту"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"Набор жэстамі"</string>
- <string name="misc_category" msgid="6894192814868233453">"Іншыя параметры"</string>
- <string name="advanced_settings" msgid="362895144495591463">"Адмысловыя налады"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"Функцыi для спецыялістаў"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Перакл. да інш. спос. ув."</string>
- <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Кнопка пераключэння мовы звязана i з iншымi спосабамi ўводу"</string>
- <string name="show_language_switch_key" msgid="5915478828318774384">"Кнопка пераключэння мовы"</string>
- <string name="show_language_switch_key_summary" msgid="7343403647474265713">"Паказваць, калі ўключана некалькі моў ўводу"</string>
- <string name="sliding_key_input_preview" msgid="6604262359510068370">"Iндыкатар слайд-шоу"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Паказаць візуальны сігнал падчас слiзгання клавiш Shift або Symbol"</string>
- <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Затрым. скр. падк. клав."</string>
- <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Няма затрымкі"</string>
- <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Па змаўчанні"</string>
- <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g> мс"</string>
- <!-- no translation found for settings_system_default (6268225104743331821) -->
- <skip />
- <string name="use_contacts_dict" msgid="4435317977804180815">"Прапан. імёны кантактаў"</string>
- <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Выкарыстоўваць імёны са спісу кантактаў для прапаноў і выпраўл."</string>
- <string name="use_double_space_period" msgid="8781529969425082860">"Падвойны iнтэрвал"</string>
- <string name="use_double_space_period_summary" msgid="6532892187247952799">"Падвойнае нацiсканне на прабел ўстаўляе iнтэрвал з наступным прабелам"</string>
- <string name="auto_cap" msgid="1719746674854628252">"Аўтаматычна рабіць вялікія літары"</string>
- <string name="auto_cap_summary" msgid="7934452761022946874">"Пісаць з загалоўнай літары першае слова ў кожным сказе"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"Персанальны слоўнік"</string>
- <string name="configure_dictionaries_title" msgid="4238652338556902049">"Дадатковыя слоўнікі"</string>
- <string name="main_dictionary" msgid="4798763781818361168">"Асноўны слоўнік"</string>
- <string name="prefs_show_suggestions" msgid="8026799663445531637">"Паказаць прапановы на выпраўленне"</string>
- <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"Паказваць прапанаваныя словы падчас набору тэксту"</string>
- <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"Заўсёды паказваць"</string>
- <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"Паказаць у партрэтным рэжыме"</string>
- <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"Заўседы хаваць"</string>
- <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"Блакіраваць абразлівыя словы"</string>
- <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"Не прапануйце патэнцыяльна абразлівых слоў"</string>
- <string name="auto_correction" msgid="7630720885194996950">"Аўтавыпраўленне"</string>
- <string name="auto_correction_summary" msgid="5625751551134658006">"Прабелы і пунктуацыйныя знакі дазваляюць аўтаматычна выпраўляць памылкова ўведзеныя словы"</string>
- <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"Адключаны"</string>
- <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"Сціплы"</string>
- <!-- no translation found for auto_correction_threshold_mode_aggressive (7319007299148899623) -->
- <skip />
- <!-- no translation found for auto_correction_threshold_mode_very_aggressive (1853309024129480416) -->
- <skip />
- <string name="bigram_prediction" msgid="1084449187723948550">"Падказкi для наступнага слова"</string>
- <string name="bigram_prediction_summary" msgid="3896362682751109677">"Выкарыстоўваць папярэдняе слова, каб атрымлiваць падказкi"</string>
- <string name="gesture_input" msgid="826951152254563827">"Уключыць набор жэстамі"</string>
- <string name="gesture_input_summary" msgid="9180350639305731231">"Уводзьце слова, перасоўваючы палец па літарах"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"Паказаць след жэста"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Дынамічны плаваючы прагляд"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Праглядаць прапанаванае слова падчас жэсту"</string>
- <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Захаваныя"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Пачаць"</string>
- <string name="label_next_key" msgid="362972844525672568">"Далей"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Назад"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Гатова"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Адправіць"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Паўза"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Чакае"</string>
- <string name="spoken_use_headphones" msgid="896961781287283493">"Каб праслухаць паролi, падключыце гарнiтуру."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"Бягучы тэкст %s"</string>
- <string name="spoken_no_text_entered" msgid="7479685225597344496">"Тэкст не ўведзены"</string>
- <!-- no translation found for spoken_auto_correct (8005997889020109763) -->
- <skip />
- <!-- no translation found for spoken_auto_correct_obscured (6276420476908833791) -->
- <skip />
- <string name="spoken_description_unknown" msgid="3197434010402179157">"Клавішны код %d"</string>
- <string name="spoken_description_shift" msgid="244197883292549308">"Зрух"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift уключаны (націснiце, каб адключыць)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Caps Lock уключаны (націснiце, каб адключыць)"</string>
- <string name="spoken_description_delete" msgid="8740376944276199801">"Выдаліць"</string>
- <string name="spoken_description_to_symbol" msgid="5486340107500448969">"Сімвалы"</string>
- <string name="spoken_description_to_alpha" msgid="23129338819771807">"Літары"</string>
- <string name="spoken_description_to_numeric" msgid="591752092685161732">"Лічбы"</string>
- <string name="spoken_description_settings" msgid="4627462689603838099">"Налады"</string>
- <string name="spoken_description_tab" msgid="2667716002663482248">"Укладка"</string>
- <string name="spoken_description_space" msgid="2582521050049860859">"Прабел"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"Галасавы ўвод"</string>
- <string name="spoken_description_smiley" msgid="2256309826200113918">"Смайлік"</string>
- <string name="spoken_description_return" msgid="8178083177238315647">"Увод"</string>
- <string name="spoken_description_search" msgid="1247236163755920808">"Пошук"</string>
- <string name="spoken_description_dot" msgid="40711082435231673">"Кропка"</string>
- <string name="spoken_description_language_switch" msgid="5507091328222331316">"Пераключыць мову"</string>
- <string name="spoken_description_action_next" msgid="8636078276664150324">"Далей"</string>
- <string name="spoken_description_action_previous" msgid="800872415009336208">"Назад"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Shift уключаны"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Caps Lock уключаны"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Shift адключаны"</string>
- <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"Рэжым знакаў"</string>
- <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"Рэжым лiтар"</string>
- <string name="spoken_description_mode_phone" msgid="6520207943132026264">"Рэжым тэлефона"</string>
- <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"Рэжым тэлефонных знакаў"</string>
- <string name="announce_keyboard_hidden" msgid="8718927835531429807">"Клавіятура схавана"</string>
- <string name="announce_keyboard_mode" msgid="4729081055438508321">"Паказана клавiятура ў рэжыме \" <xliff:g id="MODE">%s</xliff:g>\""</string>
- <string name="keyboard_mode_date" msgid="3137520166817128102">"дата"</string>
- <string name="keyboard_mode_date_time" msgid="339593358488851072">"дата i час"</string>
- <string name="keyboard_mode_email" msgid="6216248078128294262">"электронная пошта"</string>
- <string name="keyboard_mode_im" msgid="1137405089766557048">"абмен паведамленнямі"</string>
- <string name="keyboard_mode_number" msgid="7991623440699957069">"нумар"</string>
- <string name="keyboard_mode_phone" msgid="6851627527401433229">"тэлефон"</string>
- <string name="keyboard_mode_text" msgid="6479436687899701619">"тэкст"</string>
- <string name="keyboard_mode_time" msgid="4381856885582143277">"час"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"Ключ галасавога ўводу"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"На асн. клавіятуры"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"На сімв. клавіятуры"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Адключана"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Мік. на асн. клав."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Мік. на сімв. клав."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Галасавы набор адкл."</string>
- <string name="configure_input_method" msgid="373356270290742459">"Налада метадаў уводу"</string>
- <string name="language_selection_title" msgid="1651299598555326750">"Мовы ўводу"</string>
- <string name="send_feedback" msgid="1780431884109392046">"Адправіць водгук"</string>
- <string name="select_language" msgid="3693815588777926848">"Мовы ўводу"</string>
- <string name="hint_add_to_dictionary" msgid="573678656946085380">"Дакраніцеся зноў, каб захаваць"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"Слоўнік даступны"</string>
- <string name="prefs_enable_log" msgid="6620424505072963557">"Уключыць зваротную сувязь з карыстальнікамі"</string>
- <string name="prefs_description_log" msgid="7525225584555429211">"Дапамажыце палепшыць гэты рэдактар ​​метаду ўводу, аўтаматычна адпраўляючы статыстыку выкарыстання і справаздачы аб збоях Google."</string>
- <string name="keyboard_layout" msgid="8451164783510487501">"Тэма клавіятуры"</string>
- <string name="subtype_en_GB" msgid="88170601942311355">"Англійская (ЗК)"</string>
- <string name="subtype_en_US" msgid="6160452336634534239">"Англійская (ЗША)"</string>
- <string name="subtype_es_US" msgid="5583145191430180200">"iспанская (ЗША)"</string>
- <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"Англійская (Вялікабрытанія) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"Англійская (ЗША) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"iспанская (ЗША) ( <xliff:g id="LAYOUT">%s</xliff:g> )"</string>
- <!-- no translation found for subtype_nepali_traditional (9032247506728040447) -->
- <skip />
- <!-- no translation found for subtype_no_language (7137390094240139495) -->
- <skip />
- <!-- no translation found for subtype_no_language_qwerty (244337630616742604) -->
- <skip />
- <!-- no translation found for subtype_no_language_qwertz (443066912507547976) -->
- <skip />
- <!-- no translation found for subtype_no_language_azerty (8144348527575640087) -->
- <skip />
- <!-- no translation found for subtype_no_language_dvorak (1564494667584718094) -->
- <skip />
- <!-- no translation found for subtype_no_language_colemak (5837418400010302623) -->
- <skip />
- <!-- no translation found for subtype_no_language_pcqwerty (5354918232046200018) -->
- <skip />
- <!-- no translation found for subtype_emoji (7483586578074549196) -->
- <skip />
- <string name="custom_input_styles_title" msgid="8429952441821251512">"Карыстальніцкія стылі ўводу"</string>
- <string name="add_style" msgid="6163126614514489951">"Дадаць стыль"</string>
- <string name="add" msgid="8299699805688017798">"Дадаць"</string>
- <string name="remove" msgid="4486081658752944606">"Выдаліць"</string>
- <string name="save" msgid="7646738597196767214">"Захаваць"</string>
- <string name="subtype_locale" msgid="8576443440738143764">"Мова"</string>
- <string name="keyboard_layout_set" msgid="4309233698194565609">"Раскладка"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Карыстальніцкі метад уводу павінен быць уключаны, перш чым пачаць выкарыстоўваць яго. Жадаеце ўключыць яго зараз?"</string>
- <string name="enable" msgid="5031294444630523247">"Уключыць"</string>
- <string name="not_now" msgid="6172462888202790482">"Не цяпер"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Такі метад уводу ўжо існуе: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
- <string name="prefs_usability_study_mode" msgid="1261130555134595254">"Рэжым даследвання выкарыстальнасці"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Затрымка доўгага націску клавішы"</string>
- <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Працягласць вібрацыі пры націску клавіш"</string>
- <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Гучнасць гуку пры націску клавіш"</string>
- <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Чытанне знешняга файла слоўніка"</string>
- <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"У папцы загрузак няма файлаў слоўніка"</string>
- <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"Вылучыце файл слоўніка для ўсталёўкі"</string>
- <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"Сапраўды ўсталяваць гэты файл на мове: <xliff:g id="LOCALE_NAME">%s</xliff:g>?"</string>
- <string name="error" msgid="8940763624668513648">"Была памылка"</string>
- <string name="button_default" msgid="3988017840431881491">"Па змаўчанні"</string>
- <string name="setup_welcome_title" msgid="6112821709832031715">"Вітаем у прыкладанні <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"з уводам жэстамі"</string>
- <string name="setup_start_action" msgid="8936036460897347708">"Пачаць"</string>
- <string name="setup_next_action" msgid="371821437915144603">"Далей"</string>
- <string name="setup_steps_title" msgid="6400373034871816182">"Наладка прыкладання <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step1_title" msgid="3147967630253462315">"Уключыць прыкладанне <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step1_instruction" msgid="2578631936624637241">"Праверце прыкладанне \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" на сваёй мове і параметры ўводу. Гэта дасць магчымасць дазволіць яму працаваць на вашай прыладзе."</string>
- <string name="setup_step1_finished_instruction" msgid="10761482004957994">"Прыкладанне <xliff:g id="APPLICATION_NAME">%s</xliff:g> ужо ўключана для вашай мовы і параметраў уводу, так што гэты крок зроблены. Пераходзім да наступнага!"</string>
- <string name="setup_step1_action" msgid="4366513534999901728">"Уключыць у наладах"</string>
- <string name="setup_step2_title" msgid="6860725447906690594">"Пераключыцца на прыкладанне <xliff:g id="APPLICATION_NAME">%s</xliff:g>."</string>
- <string name="setup_step2_instruction" msgid="9141481964870023336">"Выберыце \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" як актыўны метад уводу тэксту."</string>
- <string name="setup_step2_action" msgid="1660330307159824337">"Пераключэнне метадаў уводу"</string>
- <string name="setup_step3_title" msgid="3154757183631490281">"Усё гатова!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"Цяпер вы можаце ўводзіць ўсе свае любімыя прыкладанні з iмем <xliff:g id="APPLICATION_NAME">%s</xliff:g>."</string>
- <string name="setup_step3_action" msgid="600879797256942259">"Наладка дадатковых моў"</string>
- <string name="setup_finish_action" msgid="276559243409465389">"Гатова"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"Паказаць значок прыкладання"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Паказаць значок прыкладання ў панэлi запуску"</string>
- <string name="app_name" msgid="6320102637491234792">"Пастаўшчык слоўніка"</string>
- <string name="dictionary_provider_name" msgid="3027315045397363079">"Пастаўшчык слоўніка"</string>
- <string name="dictionary_service_name" msgid="6237472350693511448">"Слоўнік"</string>
- <string name="download_description" msgid="6014835283119198591">"Інфармацыя абнаўлення слоўніка"</string>
- <string name="dictionary_settings_title" msgid="8091417676045693313">"Дадатковыя слоўнікі"</string>
- <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Даступны слоўнік"</string>
- <string name="dictionary_settings_summary" msgid="5305694987799824349">"Налады для слоўнікаў"</string>
- <string name="user_dictionaries" msgid="3582332055892252845">"Карыстальніцкія слоўнікі"</string>
- <string name="default_user_dict_pref_name" msgid="1625055720489280530">"Карыстацкі слоўнік"</string>
- <string name="dictionary_available" msgid="4728975345815214218">"Даступны слоўнік"</string>
- <string name="dictionary_downloading" msgid="2982650524622620983">"Спампоўваецца зараз"</string>
- <string name="dictionary_installed" msgid="8081558343559342962">"Усталявана"</string>
- <string name="dictionary_disabled" msgid="8950383219564621762">"Усталявана, адключана"</string>
- <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"Праблема падключэння да слоўніка"</string>
- <string name="no_dictionaries_available" msgid="8039920716566132611">"Слоўнікаў няма"</string>
- <string name="check_for_updates_now" msgid="8087688440916388581">"Абнавіць"</string>
- <string name="last_update" msgid="730467549913588780">"Апошняе абнаўленне"</string>
- <string name="message_updating" msgid="4457761393932375219">"Праверка наяўнасці абнаўленняў"</string>
- <string name="message_loading" msgid="8689096636874758814">"Загрузка..."</string>
- <string name="main_dict_description" msgid="3072821352793492143">"Асноўны слоўнік"</string>
- <string name="cancel" msgid="6830980399865683324">"Адмяніць"</string>
- <string name="install_dict" msgid="180852772562189365">"Усталяваць"</string>
- <string name="cancel_download_dict" msgid="7843340278507019303">"Адмена"</string>
- <string name="delete_dict" msgid="756853268088330054">"Выдаліць"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"Для выбранай мовы на мабільнай прыладзе ёсць слоўнік.&lt;br/&gt; Мы рэкамендуем &lt;b&gt;спампаваць&lt;/b&gt; слоўнік для мовы \"<xliff:g id="LANGUAGE">%1$s</xliff:g>\" для паляпшэння зручнасці набору.&lt;br/&gt; &lt;br/&gt; Спампоўка можа заняць хвіліну або дзве ў 3G-сетках. Калі ў вас няма &lt;b&gt;безлімітнага тарыфнага плану перадачы дадзеных&lt;/b&gt;, могуць прымяняцца дадатковыя плацяжы&lt;br/&gt;. Калі вы не ведаеце дакладна, які ў вас тарыфны план, мы рэкамендуем знайсці падлучэнне да сеткі Wi-Fi, каб пачаць аўтаматычную спампоўку.&lt;br/&gt; &lt;br/&gt; Парада: можна спампоўваць і выдаляць слоўнікі, перайшоўшы ў раздзел &lt;b&gt;Мова і ўвод&lt;/b&gt; у меню &lt;b&gt;Налады&lt;/b&gt; вашай мабільнай прылады."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"Спампаваць зараз (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>МБ)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"Спампаваць праз Wi-Fi"</string>
- <string name="dict_available_notification_title" msgid="6514288591959117288">"Слоўнік для мовы \"<xliff:g id="LANGUAGE">%1$s</xliff:g>\""</string>
- <string name="dict_available_notification_description" msgid="1075194169443163487">"Нацiснiце, каб прагледзець i спампаваць"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Загрузка: прапановы для мовы \"<xliff:g id="LANGUAGE">%1$s</xliff:g>\" хутка з\'явяцца."</string>
- <string name="version_text" msgid="2715354215568469385">"Версія <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
- <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Дадаць"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Дадаць у слоўнік"</string>
- <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"Выраз"</string>
- <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"Дадатковыя параметры"</string>
- <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"Асн. параметры"</string>
- <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"OК"</string>
- <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"Слова:"</string>
- <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"Шлях хуткага доступу:"</string>
- <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"Мова:"</string>
- <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"Увядзіце слова"</string>
- <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"Дадатковы цэтлiк"</string>
- <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"Рэдагаваць слова"</string>
- <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"Рэдагаваць"</string>
- <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"Выдаліць"</string>
- <string name="user_dict_settings_empty_text" msgid="558499587532668203">"У вашым карыстальніцкім слоўніку няма ніводнага слова. Вы можаце дадаваць словы, дакранаючыся да кнопкі \"+\" у пункце меню \"Дадаць\"."</string>
- <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"Для ўсіх моў"</string>
- <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"Іншыя мовы..."</string>
- <string name="user_dict_settings_delete" msgid="110413335187193859">"Выдаліць"</string>
- <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
-</resources>
diff --git a/java/res/values-bg/strings-action-keys.xml b/java/res/values-bg/strings-action-keys.xml
new file mode 100644
index 000000000..13374a29c
--- /dev/null
+++ b/java/res/values-bg/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Старт"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Напред"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Назад"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Готово"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Изпр."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Пауза"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Изчакв."</string>
+</resources>
diff --git a/java/res/values-bg/strings.xml b/java/res/values-bg/strings.xml
index eecc0f0e0..604c8d97c 100644
--- a/java/res/values-bg/strings.xml
+++ b/java/res/values-bg/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамична плаваща визуализация"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Преглед на предложената дума при използване на жестове"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Запазено"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Старт"</string>
- <string name="label_next_key" msgid="362972844525672568">"Напред"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Пред."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Готово"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Изпращане"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Чака"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Включете слушалки, за да чуете клавишите за паролата на висок глас."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Текущият текст е %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Няма въведен текст"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"часа"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL адреси"</string>
<string name="voice_input" msgid="3583258583521397548">"Клавиш за гласово въвеждане"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"На осн. клавиатура"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"На клав. на симв."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Изкл."</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Микр. на осн. клав."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Микр. на клав. на симв."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Глас. въвежд. е деакт."</string>
<string name="configure_input_method" msgid="373356270290742459">"Конфигуриране на въвеждането"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Входни езици"</string>
<string name="send_feedback" msgid="1780431884109392046">"Изпращане на отзиви"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Латиница (Коулмак)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Латиница (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Емотикони"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Цветова схема"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Бяло"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Синьо"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Персон. стилове за въвежд."</string>
<string name="add_style" msgid="6163126614514489951">"+ стил"</string>
<string name="add" msgid="8299699805688017798">"Добавяне"</string>
diff --git a/java/res/values-et/strings-appname.xml b/java/res/values-ca/strings-action-keys.xml
index bbc13d293..9dcf219cc 100644
--- a/java/res/values-et/strings-appname.xml
+++ b/java/res/values-ca/strings-action-keys.xml
@@ -20,8 +20,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"Androidi klaviatuur (AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"Androidi õigekirjakontroll (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"Androidi klaviatuuri seaded (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"Androidi õigekirjakontrolli seaded (AOSP)"</string>
+ <string name="label_go_key" msgid="4033615332628671065">"Vés"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Seg."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Ant."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Fet"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Envia"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Atura"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Esp."</string>
</resources>
diff --git a/java/res/values-ca/strings.xml b/java/res/values-ca/strings.xml
index ad3c92e68..e4623da51 100644
--- a/java/res/values-ca/strings.xml
+++ b/java/res/values-ca/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Visualitz. prèvia dinàmica flotant"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Consulta la paraula suggerida mentre fas el gest"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: desada"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Vés"</string>
- <string name="label_next_key" msgid="362972844525672568">"Següent"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Ant."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Fet"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Envia"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Connecta un auricular per escoltar les claus de la contrasenya en veu alta."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"El text actual és %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"No s\'ha introduït cap text"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"hora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tecla d\'entrada de veu"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Al teclat principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Al teclat de símbols"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Desactivada"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micròfon al teclat principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micro en tecl. símb."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Entrada de veu desactivada"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configura mètodes d\'entrada"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomes"</string>
<string name="send_feedback" msgid="1780431884109392046">"Envia comentaris"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Combinació de colors"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Blanc"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blau"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Estils d\'entrada personalitzats"</string>
<string name="add_style" msgid="6163126614514489951">"Afeg. estil"</string>
<string name="add" msgid="8299699805688017798">"Afegeix"</string>
diff --git a/java/res/values-cs/strings-action-keys.xml b/java/res/values-cs/strings-action-keys.xml
new file mode 100644
index 000000000..e9545feca
--- /dev/null
+++ b/java/res/values-cs/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Jít"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Další"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Před."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Hot."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Odes."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauza"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Čekat"</string>
+</resources>
diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml
index 930d30595..4b883e35a 100644
--- a/java/res/values-cs/strings.xml
+++ b/java/res/values-cs/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamický plovoucí náhled"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Zobrazení navrhovaného slova při psaní gesty"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: Uloženo"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Přejít"</string>
- <string name="label_next_key" msgid="362972844525672568">"Další"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Před."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Hotovo"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Odeslat"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Čekat"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Chcete-li slyšet, které klávesy jste při zadávání hesla stiskli, připojte sluchátka."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Aktuální text je %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Není zadán žádný text"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"čas"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"adresy URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Klávesa hlasového vstupu"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Na hlavní klávesnici"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Na klávesnici se symboly"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Vypnuto"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon na hlavní klávesnici"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofon na klávesnici se symboly"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Hlasový vstup vypnut"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurace metod zadávání"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Vstupní jazyky"</string>
<string name="send_feedback" msgid="1780431884109392046">"Odeslat zpětnou vazbu"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Latinka (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Latinka (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emodži"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Barevné schéma"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Bílá"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Modrá"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Vlastní styl zadávání"</string>
<string name="add_style" msgid="6163126614514489951">"Přidat styl"</string>
<string name="add" msgid="8299699805688017798">"Přidat"</string>
diff --git a/java/res/values-da/strings-action-keys.xml b/java/res/values-da/strings-action-keys.xml
new file mode 100644
index 000000000..757dc00d4
--- /dev/null
+++ b/java/res/values-da/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Start"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Næste"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Forr."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Udfør"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Send"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Vent"</string>
+</resources>
diff --git a/java/res/values-da/strings.xml b/java/res/values-da/strings.xml
index cebe8d341..33ac25b45 100644
--- a/java/res/values-da/strings.xml
+++ b/java/res/values-da/strings.xml
@@ -29,10 +29,10 @@
<string name="popup_on_keypress" msgid="123894815723512944">"Pop op ved tastetryk"</string>
<string name="general_category" msgid="1859088467017573195">"Generelt"</string>
<string name="correction_category" msgid="2236750915056607613">"Tekstkorrigering"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"Skrivning med berøring"</string>
+ <string name="gesture_typing_category" msgid="497263612130532630">"Glidende indtastning"</string>
<string name="misc_category" msgid="6894192814868233453">"Andre valgmuligheder"</string>
<string name="advanced_settings" msgid="362895144495591463">"Avancerede indstillinger"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"Muligheder for eksperter"</string>
+ <string name="advanced_settings_summary" msgid="4487980456152830271">"Indstillinger for øvede"</string>
<string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Skift inputmetode"</string>
<string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Tasten til sprogskift gælder også for andre inputmetoder"</string>
<string name="show_language_switch_key" msgid="5915478828318774384">"Tast til sprogskift"</string>
@@ -68,19 +68,12 @@
<string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"Meget aggressiv"</string>
<string name="bigram_prediction" msgid="1084449187723948550">"Forslag til næste ord"</string>
<string name="bigram_prediction_summary" msgid="3896362682751109677">"Brug det forrige ord til at give forslag"</string>
- <string name="gesture_input" msgid="826951152254563827">"Aktivér skrivning med berøring"</string>
+ <string name="gesture_input" msgid="826951152254563827">"Aktivér glidende indtastning"</string>
<string name="gesture_input_summary" msgid="9180350639305731231">"Skriv et ord ved at glide mellem bogstaverne"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"Vis spor af berøring"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamisk flydende eks.visning"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Se det foreslåede ord, mens berøringer udføres"</string>
+ <string name="gesture_preview_trail" msgid="3802333369335722221">"Vis glidende trykspor"</string>
+ <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamiske ordeksempler"</string>
+ <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Se ordforslag ved glidende indtastning"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: Gemt"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Gå"</string>
- <string name="label_next_key" msgid="362972844525672568">"Næste"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Forr."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Udfør"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Send"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Vent"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Tilslut et headset for at høre indtastningen blive læst højt ved angivelse af adgangskode."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Nuværende tekst er %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Der er ingen indtastet tekst"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"klokkeslæt"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"Webadresse"</string>
<string name="voice_input" msgid="3583258583521397548">"Nøgle til stemmeinput"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"På hovedtastatur"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"På symboltastatur"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Fra"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mik. på hovedtastatur"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mik. på symboltastatur"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Stemmeinput deaktiveret"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurer inputmetoder"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Inputsprog"</string>
<string name="send_feedback" msgid="1780431884109392046">"Send feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Farver"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Hvid"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blå"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Tilpasset inputtypografi"</string>
<string name="add_style" msgid="6163126614514489951">"Tilføj typografi"</string>
<string name="add" msgid="8299699805688017798">"Tilføj"</string>
@@ -166,7 +156,7 @@
<string name="not_now" msgid="6172462888202790482">"Ikke nu"</string>
<string name="custom_input_style_already_exists" msgid="8008728952215449707">"Denne inputstil findes allerede: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
<string name="prefs_usability_study_mode" msgid="1261130555134595254">"Tilstand for brugsstudie"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"For sene lange tastetryk"</string>
+ <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Forsinket langt tastetryk"</string>
<string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Vibrationstid ved tastetryk"</string>
<string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Lydstyrke ved tastetryk"</string>
<string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Læs ekstern ordbogsfil"</string>
@@ -176,7 +166,7 @@
<string name="error" msgid="8940763624668513648">"Der opstod en fejl"</string>
<string name="button_default" msgid="3988017840431881491">"Standard"</string>
<string name="setup_welcome_title" msgid="6112821709832031715">"Velkommen til <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"med Berøringsinput"</string>
+ <string name="setup_welcome_additional_description" msgid="8150252008545768953">"med glidende indtastning"</string>
<string name="setup_start_action" msgid="8936036460897347708">"Kom godt i gang"</string>
<string name="setup_next_action" msgid="371821437915144603">"Næste trin"</string>
<string name="setup_steps_title" msgid="6400373034871816182">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> konfigureres"</string>
@@ -192,7 +182,7 @@
<string name="setup_step3_action" msgid="600879797256942259">"Konfigurer flere sprog"</string>
<string name="setup_finish_action" msgid="276559243409465389">"Afslut"</string>
<string name="show_setup_wizard_icon" msgid="5008028590593710830">"Vis appikon"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Vis appikon på applikationsliste"</string>
+ <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Vis appikon på applisten"</string>
<string name="app_name" msgid="6320102637491234792">"Dictionary Provider"</string>
<string name="dictionary_provider_name" msgid="3027315045397363079">"Dictionary Provider"</string>
<string name="dictionary_service_name" msgid="6237472350693511448">"Ordbogstjeneste"</string>
diff --git a/java/res/values-de/strings-action-keys.xml b/java/res/values-de/strings-action-keys.xml
new file mode 100644
index 000000000..95d3d7119
--- /dev/null
+++ b/java/res/values-de/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Los"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Weiter"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Zurück"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Fertig"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Senden"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Warten"</string>
+</resources>
diff --git a/java/res/values-de/strings.xml b/java/res/values-de/strings.xml
index 28d82aeec..563f4c277 100644
--- a/java/res/values-de/strings.xml
+++ b/java/res/values-de/strings.xml
@@ -74,17 +74,10 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dyn. unverankerter Vorschlag"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Vorgeschlagenes Wort bei Bewegung anzeigen"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: gespeichert"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Los"</string>
- <string name="label_next_key" msgid="362972844525672568">"Weiter"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Zurück"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Fertig"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Senden"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Warten"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Schließen Sie ein Headset an, um das Passwort gesprochen zu hören."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Aktueller Text lautet %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Kein Text eingegeben"</string>
- <string name="spoken_auto_correct" msgid="8005997889020109763">"Mit <xliff:g id="KEY">%1$s</xliff:g> wird <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g> in <xliff:g id="CORRECTED">%3$s</xliff:g> korrigiert."</string>
+ <string name="spoken_auto_correct" msgid="8005997889020109763">"Mit <xliff:g id="KEY">%1$s</xliff:g> wird <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g> zu <xliff:g id="CORRECTED">%3$s</xliff:g> korrigiert."</string>
<string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"Mit <xliff:g id="KEY">%1$s</xliff:g> erfolgt eine Autokorrektur."</string>
<string name="spoken_description_unknown" msgid="3197434010402179157">"Tastencode %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"Umschalttaste"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"Zeit"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Taste für Spracheingabe"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Auf Haupttastatur"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Auf Symboltastatur"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Aus"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikro auf Haupttastatur"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikro auf Symboltastatur"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Spracheingabe deaktiviert"</string>
<string name="configure_input_method" msgid="373356270290742459">"Eingabemethoden konfigurieren"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Eingabesprachen"</string>
<string name="send_feedback" msgid="1780431884109392046">"Feedback geben"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Lat. Alphabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Lat. Alphabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Farbschema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Weiß"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blau"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Benutzerdefinierte Eingabestile"</string>
<string name="add_style" msgid="6163126614514489951">"Stil hinzufügen"</string>
<string name="add" msgid="8299699805688017798">"Hinzufügen"</string>
diff --git a/java/res/values-el/strings-action-keys.xml b/java/res/values-el/strings-action-keys.xml
new file mode 100644
index 000000000..a4093e3dc
--- /dev/null
+++ b/java/res/values-el/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Εμπρός"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Επόμενο"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Προηγούμενο"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Τέλος"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Αποστολή"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Παύση"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Αναμονή"</string>
+</resources>
diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml
index 54b3c3efa..138d64da5 100644
--- a/java/res/values-el/strings.xml
+++ b/java/res/values-el/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Προεπισκόπ. δυναμικής κίνησης"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Εμφάνιση της προτεινόμενης λέξης κατά την κίνηση"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Αποθηκεύτηκε"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Μετ."</string>
- <string name="label_next_key" msgid="362972844525672568">"Επόμενο"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Προηγ"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Τέλος"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Αποστολή"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Παύση"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Αναμ."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Συνδέστε ένα σετ ακουστικών για να ακούσετε τα πλήκτρα του κωδικού πρόσβασης να εκφωνούνται δυνατά."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Το τρέχον κείμενο είναι %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Δεν υπάρχει κείμενο"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ώρα"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"διεύθυνση URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Κλειδί φωνητικής εξόδου"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Στο κύριο πληκτρολ."</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Πληκτρ. συμβ. ενερ."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Απενεργοποίηση"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Μικ. στο κύριο πληκ."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Μικ. στο πληκ. συμβ."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Απεν. φωνητ. είσοδος"</string>
<string name="configure_input_method" msgid="373356270290742459">"Διαμόρφωση μεθόδων εισαγωγής"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Γλώσσες εισόδου"</string>
<string name="send_feedback" msgid="1780431884109392046">"Αποστολή σχολίων"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Αλφάβητο (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Αλφάβητο (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoticon"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Συνδυασμός χρωμάτων"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Λευκές"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Μπλε"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Προσαρμοσ. στυλ εισαγ."</string>
<string name="add_style" msgid="6163126614514489951">"Προσθ. στυλ"</string>
<string name="add" msgid="8299699805688017798">"Προσθήκη"</string>
diff --git a/java/res/values-en-rGB/strings-action-keys.xml b/java/res/values-en-rGB/strings-action-keys.xml
new file mode 100644
index 000000000..366cf3cdf
--- /dev/null
+++ b/java/res/values-en-rGB/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Go"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Next"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Prev"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Finished"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Send"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Wait"</string>
+</resources>
diff --git a/java/res/values-en-rGB/strings.xml b/java/res/values-en-rGB/strings.xml
index bdffb94c1..56a8b90de 100644
--- a/java/res/values-en-rGB/strings.xml
+++ b/java/res/values-en-rGB/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamic floating preview"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"See the suggested word while gesturing"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Saved"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Go"</string>
- <string name="label_next_key" msgid="362972844525672568">"Next"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Prev"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Done"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Send"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Wait"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Plug in a headset to hear password keys spoken aloud."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Current text is %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"No text entered"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"time"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Voice input key"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"On main keyboard"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"On symbols keyboard"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Off"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic on main keyboard"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic on symbols keyboard"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Voice input is disabled"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configure input methods"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Input languages"</string>
<string name="send_feedback" msgid="1780431884109392046">"Send feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alphabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alphabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Colour scheme"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"White"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blue"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Customised input styles"</string>
<string name="add_style" msgid="6163126614514489951">"Add style"</string>
<string name="add" msgid="8299699805688017798">"Add"</string>
diff --git a/java/res/values-en-rIN/strings-action-keys.xml b/java/res/values-en-rIN/strings-action-keys.xml
new file mode 100644
index 000000000..366cf3cdf
--- /dev/null
+++ b/java/res/values-en-rIN/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Go"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Next"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Prev"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Finished"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Send"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Wait"</string>
+</resources>
diff --git a/java/res/values-en-rIN/strings.xml b/java/res/values-en-rIN/strings.xml
index bdffb94c1..56a8b90de 100644
--- a/java/res/values-en-rIN/strings.xml
+++ b/java/res/values-en-rIN/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamic floating preview"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"See the suggested word while gesturing"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Saved"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Go"</string>
- <string name="label_next_key" msgid="362972844525672568">"Next"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Prev"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Done"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Send"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Wait"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Plug in a headset to hear password keys spoken aloud."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Current text is %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"No text entered"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"time"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Voice input key"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"On main keyboard"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"On symbols keyboard"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Off"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic on main keyboard"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic on symbols keyboard"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Voice input is disabled"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configure input methods"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Input languages"</string>
<string name="send_feedback" msgid="1780431884109392046">"Send feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alphabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alphabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Colour scheme"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"White"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blue"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Customised input styles"</string>
<string name="add_style" msgid="6163126614514489951">"Add style"</string>
<string name="add" msgid="8299699805688017798">"Add"</string>
diff --git a/java/res/values-ms/strings-appname.xml b/java/res/values-es-rUS/strings-action-keys.xml
index 76d1d294c..d375617f4 100644
--- a/java/res/values-ms/strings-appname.xml
+++ b/java/res/values-es-rUS/strings-action-keys.xml
@@ -20,8 +20,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"Papan Kekunci Android (AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"Penyemak Ejaan Android (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"Tetapan Papan Kekunci Android (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"Tetapan Penyemak Ejaan Android (AOSP)"</string>
+ <string name="label_go_key" msgid="4033615332628671065">"Ir"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Sig."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Ant."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Listo"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Env."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausa"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Esp."</string>
</resources>
diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml
index 2d7872aaa..e33bbd5a7 100644
--- a/java/res/values-es-rUS/strings.xml
+++ b/java/res/values-es-rUS/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Vista previa dinámica flotante"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Mira la palabra sugerida mientras haces gestos"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: guardada"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Ir"</string>
- <string name="label_next_key" msgid="362972844525672568">"Siguiente"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Ant."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Listo"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Enviar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Enchufa tus auriculares para escuchar en voz alta qué teclas presionas al ingresar una contraseña."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"El texto actual es %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"No se ingresó texto."</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"hora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tecla de entrada por voz"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"En el teclado principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"En el teclado de símbolos"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Desactivado"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micrófono en el teclado principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micrófono en el teclado de símbolos"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"La entrada por voz está inhabilitada"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurar métodos de entrada"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
<string name="send_feedback" msgid="1780431884109392046">"Enviar comentarios"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Combinación de colores"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Blanco"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Azul"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Estilos de entrada personalizados"</string>
<string name="add_style" msgid="6163126614514489951">"Agr. estilo"</string>
<string name="add" msgid="8299699805688017798">"Agregar"</string>
diff --git a/java/res/values-es/strings-action-keys.xml b/java/res/values-es/strings-action-keys.xml
new file mode 100644
index 000000000..2701146c8
--- /dev/null
+++ b/java/res/values-es/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Ir"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Siguiente"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Anterior"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Listo"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Enviar"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausar"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Espera"</string>
+</resources>
diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml
index 4dfc57fa6..8240c89a5 100644
--- a/java/res/values-es/strings.xml
+++ b/java/res/values-es/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Vista previa dinámica flotante"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Ver palabra sugerida al hacer gestos"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: guardada"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Ir"</string>
- <string name="label_next_key" msgid="362972844525672568">"Sig."</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Anterior"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Ok"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Enviar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Espera"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Conecta un auricular para escuchar las contraseñas en voz alta."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"El texto actual es %s."</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"No se ha introducido texto."</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"hora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tecla de entrada de voz"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"En teclado principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"En teclado de símbolos"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"No"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micrófono en teclado principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micrófono en teclado de símbolos"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Entrada de voz inhabilitada"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurar métodos de entrada"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomas"</string>
<string name="send_feedback" msgid="1780431884109392046">"Danos tu opinión"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Patrón de color"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Blanco"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Azul"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Estilos de entrada personalizados"</string>
<string name="add_style" msgid="6163126614514489951">"Añadir estilo"</string>
<string name="add" msgid="8299699805688017798">"Añadir"</string>
diff --git a/java/res/values-et/bools.xml b/java/res/values-et-rEE/bools.xml
index 840d20c21..840d20c21 100644
--- a/java/res/values-et/bools.xml
+++ b/java/res/values-et-rEE/bools.xml
diff --git a/java/res/values-et-rEE/strings-action-keys.xml b/java/res/values-et-rEE/strings-action-keys.xml
new file mode 100644
index 000000000..64ba6d6d7
--- /dev/null
+++ b/java/res/values-et-rEE/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Mine"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Edasi"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Eelm."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Valmis"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Saada"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Peata"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Oota"</string>
+</resources>
diff --git a/java/res/values-et-rEE/strings.xml b/java/res/values-et-rEE/strings.xml
index 3a27a8892..a01d5636c 100644
--- a/java/res/values-et-rEE/strings.xml
+++ b/java/res/values-et-rEE/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dünaamiline ujuv eelvaade"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Soovitatud sõna vaatamine joonistusega sisestamise ajal"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : salvestatud"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Mine"</string>
- <string name="label_next_key" msgid="362972844525672568">"Edasi"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Eelm."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Valmis"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Saada"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Peata"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Oota"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Ühendage peakomplekt, et kuulata paroole."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Praegune tekst on %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Teksti ei ole sisestatud"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"aeg"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Häälesisendi klahv"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Peamisel klaviatuuril"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Sümbolite klaviatuuril"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Väljas"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon peamisel klaviatuuril"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikr. sümb. klaviat."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Kõnesisend on keelatud"</string>
<string name="configure_input_method" msgid="373356270290742459">"Sisestusmeetodite seadistamine"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Sisestuskeeled"</string>
<string name="send_feedback" msgid="1780431884109392046">"Saatke tagasisidet"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Tähestik (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Tähestik (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emotikon"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Värviskeem"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Valge"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Sinine"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Kohandage sisendlaadid"</string>
<string name="add_style" msgid="6163126614514489951">"Lisage laad"</string>
<string name="add" msgid="8299699805688017798">"Lisa"</string>
diff --git a/java/res/values-et/strings.xml b/java/res/values-et/strings.xml
deleted file mode 100644
index 9b9c93a7b..000000000
--- a/java/res/values-et/strings.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_input_options" msgid="3909945612939668554">"Sisestusvalikud"</string>
- <string name="english_ime_research_log" msgid="8492602295696577851">"Uuringulogi käsud"</string>
- <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"Kontakti nimede kontroll."</string>
- <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"Õigekirjakontroll kasutab teie kontaktisikute loendi sissekandeid"</string>
- <string name="vibrate_on_keypress" msgid="5258079494276955460">"Vibreeri klahvivajutusel"</string>
- <string name="sound_on_keypress" msgid="6093592297198243644">"Heli klahvivajutusel"</string>
- <string name="popup_on_keypress" msgid="123894815723512944">"Klahvivajutusel kuva hüpik"</string>
- <string name="general_category" msgid="1859088467017573195">"Üldine"</string>
- <string name="correction_category" msgid="2236750915056607613">"Teksti parandamine"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"Joonistusega sisestamine"</string>
- <string name="misc_category" msgid="6894192814868233453">"Muud valikud"</string>
- <string name="advanced_settings" msgid="362895144495591463">"Täpsemad seaded"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"Valikud ekspertidele"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Vaheta sisestusmeetodit"</string>
- <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Keelevahetuse võti hõlmab ka muid sisestusmeetodeid"</string>
- <string name="show_language_switch_key" msgid="5915478828318774384">"Keelevahetuse nupp"</string>
- <string name="show_language_switch_key_summary" msgid="7343403647474265713">"Kuva, kui lubatud on mitu sisendkeelt"</string>
- <string name="sliding_key_input_preview" msgid="6604262359510068370">"Kuva lohistamisnäidik"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Tõstu- või sümboliklahvidelt lohistades anna visuaalselt märku"</string>
- <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Hüpiku loobumisviivitus"</string>
- <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Viivituseta"</string>
- <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Vaikeseade"</string>
- <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g> ms"</string>
- <string name="settings_system_default" msgid="6268225104743331821">"Süsteemi vaikeväärt."</string>
- <string name="use_contacts_dict" msgid="4435317977804180815">"Soovita kontaktkirjeid"</string>
- <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Kasuta soovitusteks ja parandusteks nimesid kontaktiloendist"</string>
- <string name="use_double_space_period" msgid="8781529969425082860">"Punkt tühikuklahviga"</string>
- <string name="use_double_space_period_summary" msgid="6532892187247952799">"Tühikuklahvi kaks korda puudutades sisestatakse punkt ja tühik"</string>
- <string name="auto_cap" msgid="1719746674854628252">"Automaatne suurtähtede kasutamine"</string>
- <string name="auto_cap_summary" msgid="7934452761022946874">"Iga lause esimese sõna kirjutamine suure algustähega"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"Isiklik sõnastik"</string>
- <string name="configure_dictionaries_title" msgid="4238652338556902049">"Pistiksõnaraamatud"</string>
- <string name="main_dictionary" msgid="4798763781818361168">"Peamine sõnaraamat"</string>
- <string name="prefs_show_suggestions" msgid="8026799663445531637">"Kuva parandussoovitusi"</string>
- <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"Kuva sisestamise ajal sõnasoovitusi"</string>
- <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"Kuva alati"</string>
- <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"Kuva vertikaalrežiimis"</string>
- <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"Peida alati"</string>
- <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"Blokeeri solvavad sõnad"</string>
- <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"Ära soovita potentsiaals. solvavaid sõnu"</string>
- <string name="auto_correction" msgid="7630720885194996950">"Automaatparandus"</string>
- <string name="auto_correction_summary" msgid="5625751551134658006">"Tühik ja kirjavahemärgid parand. autom. kirjavigadega sõnad"</string>
- <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"Väljas"</string>
- <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"Mõõdukas"</string>
- <string name="auto_correction_threshold_mode_aggressive" msgid="7319007299148899623">"Agressiivne"</string>
- <string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"Väga agressiivne"</string>
- <string name="bigram_prediction" msgid="1084449187723948550">"Järgmise sõna soovitused"</string>
- <string name="bigram_prediction_summary" msgid="3896362682751109677">"Soovituste tegemisel eelmise sõna kasutamine"</string>
- <string name="gesture_input" msgid="826951152254563827">"Luba joonistusega sisestamine"</string>
- <string name="gesture_input_summary" msgid="9180350639305731231">"Sõna sisestamine tähtede lohistamisega"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"Näita liigutuse jälge"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dünaamiline ujuv eelvaade"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Soovitatud sõna vaatamine joonistusega sisestamise ajal"</string>
- <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : salvestatud"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Mine"</string>
- <string name="label_next_key" msgid="362972844525672568">"Edasi"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Eelm."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Valmis"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Saada"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Peata"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Oota"</string>
- <string name="spoken_use_headphones" msgid="896961781287283493">"Ühendage peakomplekt, et kuulata paroole."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"Praegune tekst on %s"</string>
- <string name="spoken_no_text_entered" msgid="7479685225597344496">"Teksti ei ole sisestatud"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"Klahvi kood: %d"</string>
- <string name="spoken_description_shift" msgid="244197883292549308">"Tõstuklahv"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Tõstuklahv sees (puudutage keelamiseks)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Suurtähelukk on sees (puudutage keelamiseks)"</string>
- <string name="spoken_description_delete" msgid="8740376944276199801">"Kustuta"</string>
- <string name="spoken_description_to_symbol" msgid="5486340107500448969">"Sümbolid"</string>
- <string name="spoken_description_to_alpha" msgid="23129338819771807">"Tähed"</string>
- <string name="spoken_description_to_numeric" msgid="591752092685161732">"Numbrid"</string>
- <string name="spoken_description_settings" msgid="4627462689603838099">"Seaded"</string>
- <string name="spoken_description_tab" msgid="2667716002663482248">"Tabulaator"</string>
- <string name="spoken_description_space" msgid="2582521050049860859">"Tühik"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"Kõnesisend"</string>
- <string name="spoken_description_smiley" msgid="2256309826200113918">"Naerunägu"</string>
- <string name="spoken_description_return" msgid="8178083177238315647">"Tagasi"</string>
- <string name="spoken_description_search" msgid="1247236163755920808">"Otsing"</string>
- <string name="spoken_description_dot" msgid="40711082435231673">"Punkt"</string>
- <string name="spoken_description_language_switch" msgid="5507091328222331316">"Keele vahetamine"</string>
- <string name="spoken_description_action_next" msgid="8636078276664150324">"Järgmine"</string>
- <string name="spoken_description_action_previous" msgid="800872415009336208">"Eelmine"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Tõstuklahv on lubatud"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Suurtähelukk on lubatud"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Tõstuklahv on keelatud"</string>
- <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"Sümbolite režiim"</string>
- <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"Tähtede režiim"</string>
- <string name="spoken_description_mode_phone" msgid="6520207943132026264">"Telefonirežiim"</string>
- <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"Telefoni sümbolite režiim"</string>
- <string name="announce_keyboard_hidden" msgid="8718927835531429807">"Klaviatuur on peidetud"</string>
- <string name="announce_keyboard_mode" msgid="4729081055438508321">"Näitab klaviatuuri režiimil <xliff:g id="MODE">%s</xliff:g>"</string>
- <string name="keyboard_mode_date" msgid="3137520166817128102">"kuupäev"</string>
- <string name="keyboard_mode_date_time" msgid="339593358488851072">"kuupäev ja kellaaeg"</string>
- <string name="keyboard_mode_email" msgid="6216248078128294262">"e-post"</string>
- <string name="keyboard_mode_im" msgid="1137405089766557048">"sõnumiside"</string>
- <string name="keyboard_mode_number" msgid="7991623440699957069">"number"</string>
- <string name="keyboard_mode_phone" msgid="6851627527401433229">"telefon"</string>
- <string name="keyboard_mode_text" msgid="6479436687899701619">"tekst"</string>
- <string name="keyboard_mode_time" msgid="4381856885582143277">"aeg"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"Häälesisendi klahv"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Peamisel klaviatuuril"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Sümbol. klaviatuuril"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Väljas"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikr. peam. klaviat."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikr. sümb. klaviat."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Kõnesisend on keelatud"</string>
- <string name="configure_input_method" msgid="373356270290742459">"Sisestusmeetodite seadistamine"</string>
- <string name="language_selection_title" msgid="1651299598555326750">"Sisestuskeeled"</string>
- <string name="send_feedback" msgid="1780431884109392046">"Saatke tagasisidet"</string>
- <string name="select_language" msgid="3693815588777926848">"Sisestuskeeled"</string>
- <string name="hint_add_to_dictionary" msgid="573678656946085380">"Salvestamiseks puudutage uuesti"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"Sõnastik saadaval"</string>
- <string name="prefs_enable_log" msgid="6620424505072963557">"Luba kasutaja tagasiside"</string>
- <string name="prefs_description_log" msgid="7525225584555429211">"Aidake seda sisestusmeetodi redigeerijat parandada, saates automaatselt kasutusstatistikat ja krahhiaruandeid."</string>
- <string name="keyboard_layout" msgid="8451164783510487501">"Klaviatuuri teema"</string>
- <string name="subtype_en_GB" msgid="88170601942311355">"Inglise (UK)"</string>
- <string name="subtype_en_US" msgid="6160452336634534239">"Inglise (USA)"</string>
- <string name="subtype_es_US" msgid="5583145191430180200">"hispaania (USA)"</string>
- <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"Inglise (UK) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"Inglise (USA) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"hispaania (USA) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_no_language" msgid="7137390094240139495">"Keel puudub (tähestik)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Tähestik (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Tähestik (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"Tähestik (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"Tähestik (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"Tähestik (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Tähestik (PC)"</string>
- <string name="custom_input_styles_title" msgid="8429952441821251512">"Kohandage sisendlaadid"</string>
- <string name="add_style" msgid="6163126614514489951">"Lisage laad"</string>
- <string name="add" msgid="8299699805688017798">"Lisa"</string>
- <string name="remove" msgid="4486081658752944606">"Eemalda"</string>
- <string name="save" msgid="7646738597196767214">"Salvesta"</string>
- <string name="subtype_locale" msgid="8576443440738143764">"Keel"</string>
- <string name="keyboard_layout_set" msgid="4309233698194565609">"Paigutus"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Kohandatud sisendi laad tuleb enne kasutamist lubada. Lubada?"</string>
- <string name="enable" msgid="5031294444630523247">"Luba"</string>
- <string name="not_now" msgid="6172462888202790482">"Mitte kohe"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Sama sisendstiil on juba olemas: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
- <string name="prefs_usability_study_mode" msgid="1261130555134595254">"Kasutatavuse uurimisrežiim"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Pika klahvivajutuse viide"</string>
- <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Klahvivajutuse vibreerimise kestus"</string>
- <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Klahvivajutuse helitugevus"</string>
- <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Välise sõnastikufaili lugemine"</string>
- <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"Kaustas Allalaadimised pole ühtegi sõnastikufaili"</string>
- <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"Installitava sõnastikufaili valimine"</string>
- <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"Kas soovite tõesti installida faili lokaadile <xliff:g id="LOCALE_NAME">%s</xliff:g>?"</string>
- <string name="error" msgid="8940763624668513648">"Ilmnes viga"</string>
- <string name="button_default" msgid="3988017840431881491">"Vaikeväärtus"</string>
- <string name="setup_welcome_title" msgid="6112821709832031715">"Tere tulemast rakendusse <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"joonistusega sisestamisega"</string>
- <string name="setup_start_action" msgid="8936036460897347708">"Alustamine"</string>
- <string name="setup_next_action" msgid="371821437915144603">"Järgmine toiming"</string>
- <string name="setup_steps_title" msgid="6400373034871816182">"Rakenduse <xliff:g id="APPLICATION_NAME">%s</xliff:g> seadistamine"</string>
- <string name="setup_step1_title" msgid="3147967630253462315">"Lubage <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step1_instruction" msgid="2578631936624637241">"Märkige oma keele ja sisestamise seadetes rakendus „<xliff:g id="APPLICATION_NAME">%s</xliff:g>”. See lubab rakenduse käitamise teie seadmes."</string>
- <string name="setup_step1_finished_instruction" msgid="10761482004957994">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> on teie keele- ja sisestusseadetes juba lubatud, seega on see toiming tehtud. Asuge järgmise toimingu juurde."</string>
- <string name="setup_step1_action" msgid="4366513534999901728">"Luba seadetes"</string>
- <string name="setup_step2_title" msgid="6860725447906690594">"Minge üle rakendusele <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step2_instruction" msgid="9141481964870023336">"Järgmisena valige aktiivseks tekstisisestusmeetodiks rakendus „<xliff:g id="APPLICATION_NAME">%s</xliff:g>”."</string>
- <string name="setup_step2_action" msgid="1660330307159824337">"Vaheta sisestusmeetodeid"</string>
- <string name="setup_step3_title" msgid="3154757183631490281">"Õnnitleme. Kõik on valmis!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"Nüüd saate rakendusega <xliff:g id="APPLICATION_NAME">%s</xliff:g> sisestada kõikides oma lemmikrakendustes."</string>
- <string name="setup_step3_action" msgid="600879797256942259">"Seadista lisakeeled"</string>
- <string name="setup_finish_action" msgid="276559243409465389">"Lõpetatud"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"Kuva rakenduse ikoon"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Rakenduse ikooni kuvamine käivitajas"</string>
- <string name="app_name" msgid="6320102637491234792">"Sõnastikupakkuja"</string>
- <string name="dictionary_provider_name" msgid="3027315045397363079">"Sõnastikupakkuja"</string>
- <string name="dictionary_service_name" msgid="6237472350693511448">"Sõnastikuteenus"</string>
- <string name="download_description" msgid="6014835283119198591">"Sõnastiku värskendamisteave"</string>
- <string name="dictionary_settings_title" msgid="8091417676045693313">"Pistiksõnastikud"</string>
- <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Sõnastik on saadaval"</string>
- <string name="dictionary_settings_summary" msgid="5305694987799824349">"Sõnastike seaded"</string>
- <string name="user_dictionaries" msgid="3582332055892252845">"Kasutaja sõnastikud"</string>
- <string name="default_user_dict_pref_name" msgid="1625055720489280530">"Kasutaja sõnastik"</string>
- <string name="dictionary_available" msgid="4728975345815214218">"Sõnastik on saadaval"</string>
- <string name="dictionary_downloading" msgid="2982650524622620983">"Praegu allalaadimisel"</string>
- <string name="dictionary_installed" msgid="8081558343559342962">"Installitud"</string>
- <string name="dictionary_disabled" msgid="8950383219564621762">"Installitud, keelatud"</string>
- <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"Probleem sõnastikuga ühendumisel"</string>
- <string name="no_dictionaries_available" msgid="8039920716566132611">"Sõnastikke pole"</string>
- <string name="check_for_updates_now" msgid="8087688440916388581">"Värskenda"</string>
- <string name="last_update" msgid="730467549913588780">"Viimati värskendatud"</string>
- <string name="message_updating" msgid="4457761393932375219">"Värskenduste otsimine"</string>
- <string name="message_loading" msgid="8689096636874758814">"Laadimine ..."</string>
- <string name="main_dict_description" msgid="3072821352793492143">"Peamine sõnastik"</string>
- <string name="cancel" msgid="6830980399865683324">"Tühista"</string>
- <string name="install_dict" msgid="180852772562189365">"Installi"</string>
- <string name="cancel_download_dict" msgid="7843340278507019303">"Tühista"</string>
- <string name="delete_dict" msgid="756853268088330054">"Kustuta"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"Mobiilseadmes valitud keelele on saadaval sõnastik.&lt;br/&gt; Teksti mugavamaks sisestamiseks soovitame &lt;b&gt;alla laadida&lt;/b&gt; <xliff:g id="LANGUAGE">%1$s</xliff:g> keele sõnastiku.&lt;br/&gt; &lt;br/&gt; 3G kaudu allalaadimisele võib kuluda minut või paar. Kehtida võivad tasud, kui te ei kasuta &lt;b&gt;piiramatut andmepaketti&lt;/b&gt;.&lt;br/&gt; Kui te ei tea, millist andmepaketti kasutate, soovitame allalaadimise automaatseks käivitamiseks leida WiFi-ühenduse.&lt;br/&gt; &lt;br/&gt; Nõuanne: sõnastikke saate alla laadida ja eemaldada, tehes valiku &lt;b&gt;Keel ja sisestamine&lt;/b&gt; mobiilseadme menüüs &lt;b&gt;Seaded&lt;/b&gt;."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"Laadi kohe alla (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g> MB)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"Laadi alla WiFi kaudu"</string>
- <string name="dict_available_notification_title" msgid="6514288591959117288">"Sõnastik on <xliff:g id="LANGUAGE">%1$s</xliff:g> keele jaoks saadaval"</string>
- <string name="dict_available_notification_description" msgid="1075194169443163487">"Vajutage ülevaatamiseks ja allalaadimiseks"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Allalaadimine: <xliff:g id="LANGUAGE">%1$s</xliff:g> keele soovitused on varsti saadaval."</string>
- <string name="version_text" msgid="2715354215568469385">"Versioon <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
- <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Lisa"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Sõnaraamatusse lisamine"</string>
- <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"Fraas"</string>
- <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"Rohkem valikuid"</string>
- <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"Vähem valikuid"</string>
- <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"OK"</string>
- <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"Sõna:"</string>
- <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"Otsetee:"</string>
- <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"Keel:"</string>
- <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"Sisestage sõna"</string>
- <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"Valikuline otsetee"</string>
- <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"Sõna muutmine"</string>
- <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"Muuda"</string>
- <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"Kustuta"</string>
- <string name="user_dict_settings_empty_text" msgid="558499587532668203">"Teie kasutaja sõnaraamatus ei ole ühtegi sõna. Sõna saate lisada, puudutades nuppu Lisa (+)."</string>
- <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"Kõikides keeltes"</string>
- <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"Rohkem keeli ..."</string>
- <string name="user_dict_settings_delete" msgid="110413335187193859">"Kustuta"</string>
- <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" ABCDEFGHIJKLMNOPQRSŠZŽTUVWÕÄÖÜXY"</string>
-</resources>
diff --git a/java/res/values-iw/donottranslate.xml b/java/res/values-fa/config-spacing-and-punctuations.xml
index 57de2538b..9e637e458 100644
--- a/java/res/values-iw/donottranslate.xml
+++ b/java/res/values-fa/config-spacing-and-punctuations.xml
@@ -21,5 +21,5 @@
<!-- The all letters need to be mirrored are found at
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
<!-- Symbols that are suggested between words -->
- <string name="suggested_punctuations">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
+ <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
diff --git a/java/res/values-fa/strings-action-keys.xml b/java/res/values-fa/strings-action-keys.xml
new file mode 100644
index 000000000..78faa8c0b
--- /dev/null
+++ b/java/res/values-fa/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"رفتن"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"بعدی"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"قبلی"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"اتمام"</string>
+ <string name="label_send_key" msgid="482252074224462163">"ارسال"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"مکث"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"انتظار"</string>
+</resources>
diff --git a/java/res/values-fa/strings-appname.xml b/java/res/values-fa/strings-appname.xml
index 38234c241..f6c9f545e 100644
--- a/java/res/values-fa/strings-appname.xml
+++ b/java/res/values-fa/strings-appname.xml
@@ -20,8 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"صفحه کلید Android ‏(AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"غلط‌گیر Android ‏(AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"تنظیمات صفحه کلید Android ‏(AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"تنظیمات غلط‌گیر Android ‏(AOSP)"</string>
+ <string name="english_ime_name" msgid="5940510615957428904">"‏صفحه کلید Android ‏(AOSP)"</string>
+ <string name="spell_checker_service_name" msgid="1254221805440242662">"‏غلط‌گیر Android ‏(AOSP)"</string>
+ <string name="english_ime_settings" msgid="5760361067176802794">"‏تنظیمات صفحه کلید Android ‏(AOSP)"</string>
+ <string name="android_spell_checker_settings" msgid="6123949487832861885">"‏تنظیمات غلط‌گیر Android ‏(AOSP)"</string>
</resources>
diff --git a/java/res/values-fa/strings.xml b/java/res/values-fa/strings.xml
index a6d9bbafd..714dbc8fc 100644
--- a/java/res/values-fa/strings.xml
+++ b/java/res/values-fa/strings.xml
@@ -38,7 +38,7 @@
<string name="show_language_switch_key" msgid="5915478828318774384">"کلید تغییر زبان"</string>
<string name="show_language_switch_key_summary" msgid="7343403647474265713">"وقتی چند زبان ورودی فعال است نشان داده شود"</string>
<string name="sliding_key_input_preview" msgid="6604262359510068370">"نمایش نشانگر لغزاندن"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"نمایش نشان بصری، هنگام لغزاندن کلیدهای Shift یا نماد"</string>
+ <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"‏نمایش نشان بصری، هنگام لغزاندن کلیدهای Shift یا نماد"</string>
<string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"تأخیر در رد کردن کلید نمایشی"</string>
<string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"بدون تأخیر"</string>
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"پیش‌فرض"</string>
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"پیش‌نمایش متحرک پویا"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"مشاهده کلمه پیشنهادی در حین انجام حرکات"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : ذخیره شد"</string>
- <string name="label_go_key" msgid="1635148082137219148">"برو"</string>
- <string name="label_next_key" msgid="362972844525672568">"بعدی"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"قبلی"</string>
- <string name="label_done_key" msgid="2441578748772529288">"انجام شد"</string>
- <string name="label_send_key" msgid="2815056534433717444">"ارسال"</string>
- <string name="label_pause_key" msgid="181098308428035340">"توقف موقت"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"منتظر بمانید"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"برای شنیدن کلیدهای گذرواژه که با صدای بلند خوانده می‌شوند، از هدست استفاده کنید."</string>
<!-- String.format failed for translation -->
<!-- no translation found for spoken_current_text_is (2485723011272583845) -->
@@ -92,8 +85,8 @@
<!-- no translation found for spoken_description_unknown (3197434010402179157) -->
<skip />
<string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift فعال است (برای غیرفعال کردن ضربه بزنید)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Caps Lock روشن است (برای غیرفعال کردن ضربه بزنید)"</string>
+ <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"‏Shift فعال است (برای غیرفعال کردن ضربه بزنید)"</string>
+ <string name="spoken_description_caps_lock" msgid="3276478269526304432">"‏Caps Lock روشن است (برای غیرفعال کردن ضربه بزنید)"</string>
<string name="spoken_description_delete" msgid="8740376944276199801">"Delete"</string>
<string name="spoken_description_to_symbol" msgid="5486340107500448969">"نمادها"</string>
<string name="spoken_description_to_alpha" msgid="23129338819771807">"حروف"</string>
@@ -109,9 +102,9 @@
<string name="spoken_description_language_switch" msgid="5507091328222331316">"تغییر زبان"</string>
<string name="spoken_description_action_next" msgid="8636078276664150324">"بعدی"</string>
<string name="spoken_description_action_previous" msgid="800872415009336208">"قبلی"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Shift فعال است"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Caps lock فعال شد"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Shift غیرفعال است"</string>
+ <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"‏Shift فعال است"</string>
+ <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"‏Caps lock فعال شد"</string>
+ <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"‏Shift غیرفعال است"</string>
<string name="spoken_description_mode_symbol" msgid="7183343879909747642">"حالت نمادها"</string>
<string name="spoken_description_mode_alpha" msgid="3528307674390156956">"حالت حروف"</string>
<string name="spoken_description_mode_phone" msgid="6520207943132026264">"حالت تلفن"</string>
@@ -128,12 +121,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"زمان"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"نشانی اینترنتی"</string>
<string name="voice_input" msgid="3583258583521397548">"کلید ورودی صدا"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"در صفحه‌کلید اصلی"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"در صفحه‌کلید نمادها"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"خاموش"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"میکروفن در صفحه‌کلید اصلی"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"میکروفن در صفحه‌کلید نمادها"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ورودی صدا غیرفعال است"</string>
<string name="configure_input_method" msgid="373356270290742459">"پیکربندی روش‌های ورودی"</string>
<string name="language_selection_title" msgid="1651299598555326750">"زبان‌های ورودی"</string>
<string name="send_feedback" msgid="1780431884109392046">"ارسال بازخورد"</string>
@@ -151,13 +138,16 @@
<string name="subtype_with_layout_es_US" msgid="6261791057007890189">"اسپانیایی (آمریکا) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
<string name="subtype_nepali_traditional" msgid="9032247506728040447">"<xliff:g id="LANGUAGE">%s</xliff:g> (سنتی)"</string>
<string name="subtype_no_language" msgid="7137390094240139495">"بدون زبان (حروف الفبا)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"حروف الفبا (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"حروف الفبا (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"حروف الفبا (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"حروف الفبا (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"حروف الفبا (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"حروف الفبا (PC)"</string>
+ <string name="subtype_no_language_qwerty" msgid="244337630616742604">"‏حروف الفبا (QWERTY)"</string>
+ <string name="subtype_no_language_qwertz" msgid="443066912507547976">"‏حروف الفبا (QWERTZ)"</string>
+ <string name="subtype_no_language_azerty" msgid="8144348527575640087">"‏حروف الفبا (AZERTY)"</string>
+ <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"‏حروف الفبا (Dvorak)"</string>
+ <string name="subtype_no_language_colemak" msgid="5837418400010302623">"‏حروف الفبا (Colemak)"</string>
+ <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"‏حروف الفبا (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"رنگ‌بندی"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"سفید"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"آبی"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"سبک‌های ورودی سفارشی"</string>
<string name="add_style" msgid="6163126614514489951">"افزودن سبک"</string>
<string name="add" msgid="8299699805688017798">"افزودن"</string>
@@ -221,9 +211,9 @@
<string name="install_dict" msgid="180852772562189365">"نصب"</string>
<string name="cancel_download_dict" msgid="7843340278507019303">"لغو"</string>
<string name="delete_dict" msgid="756853268088330054">"حذف"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"برای زبان انتخاب شده در دستگاه همراه شما فرهنگ لغتی موجود است.&lt;br/&gt; توصیه می‌کنیم فرهنگ لغت <xliff:g id="LANGUAGE">%1$s</xliff:g> را &lt;b&gt;دانلود کنید&lt;/b&gt; تا بهتر تایپ کنید.&lt;br/&gt; &lt;br/&gt; دانلود از طریق 3G ممکن است چند لحظه طول بکشد. اگر &lt;b&gt;طرح داده نامحدود&lt;/b&gt; نداشته باشید ممکن است برایتان هزینه داشته باشد.&lt;br/&gt; اگر مطمئن نیستید طرح داده شما چیست٬ توصیه می‌کنیم یک اتصال Wi-Fi پیدا کنید تا دانلود بطور خودکار شروع شود.&lt;br/&gt; &lt;br/&gt; نکته: می‌توانید فرهنگ لغت را با رفتن به منوی &lt;b&gt;زبان و ورودی&lt;/b&gt; در &lt;b&gt;تنظیمات&lt;/b&gt; در دستگاه همراه خود دانلود و حذف کنید."</string>
+ <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"‏برای زبان انتخاب شده در دستگاه همراه شما فرهنگ لغتی موجود است.&lt;br/&gt; توصیه می‌کنیم فرهنگ لغت <xliff:g id="LANGUAGE">%1$s</xliff:g> را &lt;b&gt;دانلود کنید&lt;/b&gt; تا بهتر تایپ کنید.&lt;br/&gt; &lt;br/&gt; دانلود از طریق 3G ممکن است چند لحظه طول بکشد. اگر &lt;b&gt;طرح داده نامحدود&lt;/b&gt; نداشته باشید ممکن است برایتان هزینه داشته باشد.&lt;br/&gt; اگر مطمئن نیستید طرح داده شما چیست٬ توصیه می‌کنیم یک اتصال Wi-Fi پیدا کنید تا دانلود بطور خودکار شروع شود.&lt;br/&gt; &lt;br/&gt; نکته: می‌توانید فرهنگ لغت را با رفتن به منوی &lt;b&gt;زبان و ورودی&lt;/b&gt; در &lt;b&gt;تنظیمات&lt;/b&gt; در دستگاه همراه خود دانلود و حذف کنید."</string>
<string name="download_over_metered" msgid="1643065851159409546">"هم‌اکنون بارگیری شود (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g> مگابایت)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"دانلود ازطریق Wi-Fi"</string>
+ <string name="do_not_download_over_metered" msgid="2176209579313941583">"‏دانلود ازطریق Wi-Fi"</string>
<string name="dict_available_notification_title" msgid="6514288591959117288">"یک فرهنگ لغت برای <xliff:g id="LANGUAGE">%1$s</xliff:g> موجود است"</string>
<string name="dict_available_notification_description" msgid="1075194169443163487">"برای مرور و دانلود فشار دهید"</string>
<string name="toast_downloading_suggestions" msgid="1313027353588566660">"دانلود لغات پیشنهادی برای <xliff:g id="LANGUAGE">%1$s</xliff:g> به زودی شروع می‌شود."</string>
diff --git a/java/res/values-fi/strings-action-keys.xml b/java/res/values-fi/strings-action-keys.xml
new file mode 100644
index 000000000..da7f11197
--- /dev/null
+++ b/java/res/values-fi/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Siir."</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Seur."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Edel."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Valm."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Läh."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Tauko"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Odota"</string>
+</resources>
diff --git a/java/res/values-fi/strings.xml b/java/res/values-fi/strings.xml
index cee1b7d24..f623d1a1e 100644
--- a/java/res/values-fi/strings.xml
+++ b/java/res/values-fi/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynaaminen kelluva esikatselu"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Näytä ehdotettu sana piirron aikana"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: tallennettu"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Mene"</string>
- <string name="label_next_key" msgid="362972844525672568">"Seur."</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Edel."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Valmis"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Läh."</string>
- <string name="label_pause_key" msgid="181098308428035340">"Tauko"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Odota"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Liitä kuulokkeet, niin kuulet mitä näppäimiä painat kirjoittaessasi salasanaa."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Nykyinen teksti on %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Ei kirjoitettua tekstiä"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"aika"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL-osoite"</string>
<string name="voice_input" msgid="3583258583521397548">"Äänisyöteavain"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Päänäppäimistössä"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Symbolinäppäim."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Ei käytössä"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikr. päänäppäim."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikr. symbolinäpp."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Äänisyöte ei käyt."</string>
<string name="configure_input_method" msgid="373356270290742459">"Määritä syöttötavat"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Syöttökielet"</string>
<string name="send_feedback" msgid="1780431884109392046">"Lähetä palautetta"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Aakkoset (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Aakkoset (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Väriteema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Valkoinen"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Sininen"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Muokatut syöttötyylit"</string>
<string name="add_style" msgid="6163126614514489951">"Lisää tyyli"</string>
<string name="add" msgid="8299699805688017798">"Lisää"</string>
diff --git a/java/res/values-fr-rCA/donottranslate.xml b/java/res/values-fr-rCA/config-spacing-and-punctuations.xml
index 21f18d852..06254800b 100644
--- a/java/res/values-fr-rCA/donottranslate.xml
+++ b/java/res/values-fr-rCA/config-spacing-and-punctuations.xml
@@ -20,12 +20,12 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Symbols that are normally preceded by a space (used to add an auto-space before these) -->
<!-- This is similar to French with the exception of "!" "?" and ";" which do not take a space before in Canadian French. Note that ":" does take a space before according to Canadian rules. -->
- <string name="symbols_preceded_by_space">([{&amp;:</string>
+ <string name="symbols_preceded_by_space" translatable="false">([{&amp;:</string>
<!-- Symbols that are normally followed by a space (used to add an auto-space after these) -->
- <string name="symbols_followed_by_space">.,;:!?)]}&amp;</string>
+ <string name="symbols_followed_by_space" translatable="false">.,;:!?)]}&amp;</string>
<!-- Symbols that separate words -->
<!-- Don't remove the enclosing double quotes, they protect whitespace (not just U+0020) -->
- <string name="symbols_word_separators">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
+ <string name="symbols_word_separators" translatable="false">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
<!-- Word connectors -->
- <string name="symbols_word_connectors">\'-</string>
+ <string name="symbols_word_connectors" translatable="false">\'-</string>
</resources>
diff --git a/java/res/values-fr-rCA/strings-action-keys.xml b/java/res/values-fr-rCA/strings-action-keys.xml
new file mode 100644
index 000000000..bb5568e79
--- /dev/null
+++ b/java/res/values-fr-rCA/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Aller"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Suiv."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Préc."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Term."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Env."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Att."</string>
+</resources>
diff --git a/java/res/values-fr-rCA/strings.xml b/java/res/values-fr-rCA/strings.xml
index 6f33539ce..8ff60f621 100644
--- a/java/res/values-fr-rCA/strings.xml
+++ b/java/res/values-fr-rCA/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Aperçu flottant dynamique"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Afficher le mot suggéré lors des gestes"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : enregistré"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Aller"</string>
- <string name="label_next_key" msgid="362972844525672568">"Suivant"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Préc."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Terminé"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Envoyer"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Suspendre"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Attendre"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Branchez des écouteurs pour entendre l\'énoncé à haute voix des touches lors de la saisie du mot de passe."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Le texte actuel est %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Aucun texte saisi"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"Heure"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Touche de saisie vocale"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Sur le clavier principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Sur clavier symboles"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Désactiver"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micro sur le clavier principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micro sur le clavier des symboles"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Saisie vocale désactivée"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurer les modes de saisie"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Langues de saisie"</string>
<string name="send_feedback" msgid="1780431884109392046">"Envoyer des commentaires"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alphabet latin (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alphabet latin (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Modèle de couleurs"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Blanc"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Bleu"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Styles saisie personnalisés"</string>
<string name="add_style" msgid="6163126614514489951">"Ajouter style"</string>
<string name="add" msgid="8299699805688017798">"Ajouter"</string>
diff --git a/java/res/values-fr/donottranslate.xml b/java/res/values-fr/config-spacing-and-punctuations.xml
index f0644118a..33e0236b0 100644
--- a/java/res/values-fr/donottranslate.xml
+++ b/java/res/values-fr/config-spacing-and-punctuations.xml
@@ -19,12 +19,12 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Symbols that are normally preceded by a space (used to add an auto-space before these) -->
- <string name="symbols_preceded_by_space">([{&amp;;:!?</string>
+ <string name="symbols_preceded_by_space" translatable="false">([{&amp;;:!?</string>
<!-- Symbols that are normally followed by a space (used to add an auto-space after these) -->
- <string name="symbols_followed_by_space">.,;:!?)]}&amp;</string>
+ <string name="symbols_followed_by_space" translatable="false">.,;:!?)]}&amp;</string>
<!-- Symbols that separate words -->
<!-- Don't remove the enclosing double quotes, they protect whitespace (not just U+0020) -->
- <string name="symbols_word_separators">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
+ <string name="symbols_word_separators" translatable="false">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
<!-- Word connectors -->
- <string name="symbols_word_connectors">\'-</string>
+ <string name="symbols_word_connectors" translatable="false">\'-</string>
</resources>
diff --git a/java/res/values-fr/strings-action-keys.xml b/java/res/values-fr/strings-action-keys.xml
new file mode 100644
index 000000000..1c36552d4
--- /dev/null
+++ b/java/res/values-fr/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Accès"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Suiv."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Préc."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"OK"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Envoyer"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Attente"</string>
+</resources>
diff --git a/java/res/values-fr/strings.xml b/java/res/values-fr/strings.xml
index b850df94f..9ab95583d 100644
--- a/java/res/values-fr/strings.xml
+++ b/java/res/values-fr/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Aperçu flottant dynamique"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Afficher le mot suggéré lors des gestes"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : enregistré"</string>
- <string name="label_go_key" msgid="1635148082137219148">"OK"</string>
- <string name="label_next_key" msgid="362972844525672568">"Suiv."</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Préc."</string>
- <string name="label_done_key" msgid="2441578748772529288">"OK"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Envoi"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Délai"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Branchez des écouteurs pour entendre l\'énoncé à haute voix des touches lors de la saisie du mot de passe."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Le texte actuel est %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Aucun texte saisi"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"Heure"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Touche de saisie vocale"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Sur clavier principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Sur clavier symboles"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Désactiver"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micro sur le clavier principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micro sur clavier symboles"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Saisie vocale désactivée"</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurer les modes de saisie"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Langues de saisie"</string>
<string name="send_feedback" msgid="1780431884109392046">"Envoyer des commentaires"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alphabet latin (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alphabet latin (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Jeu de couleurs"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Blanc"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Bleu"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Styles saisie personnalisés"</string>
<string name="add_style" msgid="6163126614514489951">"Ajouter style"</string>
<string name="add" msgid="8299699805688017798">"Ajouter"</string>
diff --git a/java/res/values-h1200dp-port/setup-dimens-large-tablet-port.xml b/java/res/values-h1200dp-port/setup-dimens-large-tablet-port.xml
index bc7928d6a..adc3e35a9 100644
--- a/java/res/values-h1200dp-port/setup-dimens-large-tablet-port.xml
+++ b/java/res/values-h1200dp-port/setup-dimens-large-tablet-port.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">38sp</dimen>
<dimen name="setup_step_bullet_text_size">24sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">24sp</dimen>
<dimen name="setup_step_instruction_text_size">18sp</dimen>
<dimen name="setup_step_action_text_size">20sp</dimen>
diff --git a/java/res/values-h330dp-land/setup-dimens-large-phone-land.xml b/java/res/values-h330dp-land/setup-dimens-large-phone-land.xml
index aebf6d2f3..1ff43ff9f 100644
--- a/java/res/values-h330dp-land/setup-dimens-large-phone-land.xml
+++ b/java/res/values-h330dp-land/setup-dimens-large-phone-land.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">22sp</dimen>
<dimen name="setup_step_bullet_text_size">22sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">20sp</dimen>
<dimen name="setup_step_instruction_text_size">16sp</dimen>
<dimen name="setup_step_action_text_size">18sp</dimen>
diff --git a/java/res/values-h520dp-land/setup-dimens-small-tablet-land.xml b/java/res/values-h520dp-land/setup-dimens-small-tablet-land.xml
index aedf79fb2..a0e30cd37 100644
--- a/java/res/values-h520dp-land/setup-dimens-small-tablet-land.xml
+++ b/java/res/values-h520dp-land/setup-dimens-small-tablet-land.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">32sp</dimen>
<dimen name="setup_step_bullet_text_size">24sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">24sp</dimen>
<dimen name="setup_step_instruction_text_size">18sp</dimen>
<dimen name="setup_step_action_text_size">20sp</dimen>
diff --git a/java/res/values-h540dp-port/setup-dimens-large-phone-port.xml b/java/res/values-h540dp-port/setup-dimens-large-phone-port.xml
index 6d66f46eb..cf2a10a9e 100644
--- a/java/res/values-h540dp-port/setup-dimens-large-phone-port.xml
+++ b/java/res/values-h540dp-port/setup-dimens-large-phone-port.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">26sp</dimen>
<dimen name="setup_step_bullet_text_size">22sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">20sp</dimen>
<dimen name="setup_step_instruction_text_size">16sp</dimen>
<dimen name="setup_step_action_text_size">18sp</dimen>
diff --git a/java/res/values-h720dp-land/setup-dimens-large-tablet-land.xml b/java/res/values-h720dp-land/setup-dimens-large-tablet-land.xml
index e22b741fb..a782ef8f4 100644
--- a/java/res/values-h720dp-land/setup-dimens-large-tablet-land.xml
+++ b/java/res/values-h720dp-land/setup-dimens-large-tablet-land.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">38sp</dimen>
<dimen name="setup_step_bullet_text_size">24sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">24sp</dimen>
<dimen name="setup_step_instruction_text_size">18sp</dimen>
<dimen name="setup_step_action_text_size">20sp</dimen>
diff --git a/java/res/values-h800dp-port/setup-dimens-small-tablet-port.xml b/java/res/values-h800dp-port/setup-dimens-small-tablet-port.xml
index 86cf3a04a..9ac0f115f 100644
--- a/java/res/values-h800dp-port/setup-dimens-small-tablet-port.xml
+++ b/java/res/values-h800dp-port/setup-dimens-small-tablet-port.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">36sp</dimen>
<dimen name="setup_step_bullet_text_size">24sp</dimen>
<dimen name="setup_step_triangle_indicator_height">24dp</dimen>
- <dimen name="setup_step_indicator_height">24dp</dimen>
<dimen name="setup_step_title_text_size">24sp</dimen>
<dimen name="setup_step_instruction_text_size">18sp</dimen>
<dimen name="setup_step_action_text_size">20sp</dimen>
diff --git a/java/res/values-hi/strings-action-keys.xml b/java/res/values-hi/strings-action-keys.xml
new file mode 100644
index 000000000..92cb194ea
--- /dev/null
+++ b/java/res/values-hi/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"जाएं"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"अगला"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"पिछला"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"पूर्ण"</string>
+ <string name="label_send_key" msgid="482252074224462163">"भेजें"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"रोकें"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"प्रतीक्षा करें"</string>
+</resources>
diff --git a/java/res/values-hi/strings.xml b/java/res/values-hi/strings.xml
index 6d2d5d2fe..d2ace1ac7 100644
--- a/java/res/values-hi/strings.xml
+++ b/java/res/values-hi/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"गतिशील फ़्लोटिंग पूर्वावलोकन"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"जेस्‍चर बनाते समय सुझाया गया शब्द देखें"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: सहेजा गया"</string>
- <string name="label_go_key" msgid="1635148082137219148">"जाएं"</string>
- <string name="label_next_key" msgid="362972844525672568">"अगला"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"पिछला"</string>
- <string name="label_done_key" msgid="2441578748772529288">"पूर्ण"</string>
- <string name="label_send_key" msgid="2815056534433717444">"भेजें"</string>
- <string name="label_pause_key" msgid="181098308428035340">"पॉज़ करें"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"प्रतीक्षा करें"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"ज़ोर से बोली गई पासवर्ड कुंजियां सुनने के लिए हेडसेट प्‍लग इन करें."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"वर्तमान पाठ %s है"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"कोई पाठ दर्ज नहीं किया गया"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"समय"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"ध्‍वनि‍ इनपुट कुंजी"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"मुख्‍य कीबोर्ड पर"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"प्रतीक कीबोर्ड पर"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"बंद"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"मुख्‍य कीबोर्ड पर माइक"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"प्रतीक कीबोर्ड पर माइक"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ध्‍वनि इनपुट अक्षम है"</string>
<string name="configure_input_method" msgid="373356270290742459">"इनपुट पद्धति कॉन्‍फ़िगर करें"</string>
<string name="language_selection_title" msgid="1651299598555326750">"इनपुट भाषा"</string>
<string name="send_feedback" msgid="1780431884109392046">"सुझाव भेजें"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"वर्णाक्षर (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"वर्णाक्षर (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"रंग संयोजन"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"सफ़ेद"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"नीला"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"कस्‍टम इनपुट शैलियां"</string>
<string name="add_style" msgid="6163126614514489951">"शैली जोड़ें"</string>
<string name="add" msgid="8299699805688017798">"जोड़ें"</string>
@@ -188,11 +178,11 @@
<string name="setup_step2_instruction" msgid="9141481964870023336">"इसके बाद, \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" को अपनी सक्रिय पाठ-इनपुट पद्धति के रूप में चुनें."</string>
<string name="setup_step2_action" msgid="1660330307159824337">"इनपुट पद्धतियां स्विच करें"</string>
<string name="setup_step3_title" msgid="3154757183631490281">"बधाई हो, आप बिल्कुल तैयार हैं!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"अब आप <xliff:g id="APPLICATION_NAME">%s</xliff:g> के साथ अपने सभी पसंदीदा एप्स में लिख सकते हैं."</string>
+ <string name="setup_step3_instruction" msgid="8025981829605426000">"अब आप <xliff:g id="APPLICATION_NAME">%s</xliff:g> के साथ अपने सभी पसंदीदा ऐप्स में लिख सकते हैं."</string>
<string name="setup_step3_action" msgid="600879797256942259">"अतिरिक्त भाषाएं कॉन्फ़िगर करना"</string>
<string name="setup_finish_action" msgid="276559243409465389">"समाप्त"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"एप्स आइकन दिखाएं"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"लॉन्चर में एप्स आइकन प्रदर्शित करें"</string>
+ <string name="show_setup_wizard_icon" msgid="5008028590593710830">"ऐप्स आइकन दिखाएं"</string>
+ <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"लॉन्चर में ऐप्स आइकन प्रदर्शित करें"</string>
<string name="app_name" msgid="6320102637491234792">"डिक्‍शनरी प्रदाता"</string>
<string name="dictionary_provider_name" msgid="3027315045397363079">"डिक्‍शनरी प्रदाता"</string>
<string name="dictionary_service_name" msgid="6237472350693511448">"डिक्‍शनरी सेवा"</string>
@@ -225,7 +215,7 @@
<string name="toast_downloading_suggestions" msgid="1313027353588566660">"डाउनलोड हो रहा है: <xliff:g id="LANGUAGE">%1$s</xliff:g> के लिए सुझाव जल्दी ही तैयार हो जाएंगे."</string>
<string name="version_text" msgid="2715354215568469385">"संस्करण <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
<string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"जोड़ें"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"शब्दकोष में जोड़ें"</string>
+ <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"शब्दकोश में जोड़ें"</string>
<string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"वाक्यांश"</string>
<string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"अधिक विकल्प"</string>
<string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"कम विकल्‍प"</string>
diff --git a/java/res/values-hr/strings-action-keys.xml b/java/res/values-hr/strings-action-keys.xml
new file mode 100644
index 000000000..564f70363
--- /dev/null
+++ b/java/res/values-hr/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Kreni"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Dalje"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Pret."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Got."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Poš."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauz."</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Čekaj"</string>
+</resources>
diff --git a/java/res/values-hr/strings.xml b/java/res/values-hr/strings.xml
index ee2e68a1f..e7a72f9c4 100644
--- a/java/res/values-hr/strings.xml
+++ b/java/res/values-hr/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamički plutajući pregled"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Vidi predloženu riječ tijekom pokreta"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Spremljeno"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Idi"</string>
- <string name="label_next_key" msgid="362972844525672568">"Dalje"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Pret."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Gotovo"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Pošalji"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Pričekaj"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Priključite slušalice da biste čuli tipke zaporke izgovorene naglas."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Trenutačni tekst je %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nije unesen tekst"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"vrijeme"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tipka za glasovni unos"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Na glavnoj tipkovnici"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Na tipkovnici simb."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Isključeno"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon na gl. tipkovnici"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mik. na tipk. simb."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Glas. unos onemog."</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfiguriraj načine ulaza"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Jezici unosa"</string>
<string name="send_feedback" msgid="1780431884109392046">"Slanje povratnih informacija"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Abeceda (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Abeceda (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Shema boja"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Bijela"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Plava"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Prilagođeni stilovi unosa"</string>
<string name="add_style" msgid="6163126614514489951">"Dodaj stil"</string>
<string name="add" msgid="8299699805688017798">"Dodaj"</string>
diff --git a/java/res/values-hu/strings-action-keys.xml b/java/res/values-hu/strings-action-keys.xml
new file mode 100644
index 000000000..257f30f34
--- /dev/null
+++ b/java/res/values-hu/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Mehet"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Köv."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Előző"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Kész"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Küld"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Állj"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Vár"</string>
+</resources>
diff --git a/java/res/values-hu/strings.xml b/java/res/values-hu/strings.xml
index 1a07772f3..27efd0c92 100644
--- a/java/res/values-hu/strings.xml
+++ b/java/res/values-hu/strings.xml
@@ -74,18 +74,11 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamikus lebegő előnézet"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"A javasolt szó megtekintése kézmozdulat közben"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : mentve"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Ugrás"</string>
- <string name="label_next_key" msgid="362972844525672568">"Tovább"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Előző"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Kész"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Küldés"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Szün."</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Vár"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Csatlakoztasson egy headsetet, ha hallani szeretné a jelszót felolvasva."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"A jelenlegi szöveg: %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Szöveg nincs megadva"</string>
<string name="spoken_auto_correct" msgid="8005997889020109763">"<xliff:g id="KEY">%1$s</xliff:g> billentyű: <xliff:g id="CORRECTED">%3$s</xliff:g> szóra javítja a következőt: <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g>"</string>
- <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> billentyű: automatikus javítás"</string>
+ <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> billentyű automatikus javítást végez"</string>
<string name="spoken_description_unknown" msgid="3197434010402179157">"Billentyűkód: %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
<string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift be van kapcsolva (érintse meg a kikapcsoláshoz)"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"idő"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Hangbeviteli gomb"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"A fő billentyűzeten"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Szimbólumoknál"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Ki"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon a billentyűzeten"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikr. a szimbólumoknál"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Hangbevivel KI"</string>
<string name="configure_input_method" msgid="373356270290742459">"Beviteli módok beállítása"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Beviteli nyelvek"</string>
<string name="send_feedback" msgid="1780431884109392046">"Visszajelzés küldése"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Ábécé (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Ábécé (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Hangulatjel"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Színséma"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Fehér"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Kék"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Egyedi bevitelstílusok"</string>
<string name="add_style" msgid="6163126614514489951">"Új stílus"</string>
<string name="add" msgid="8299699805688017798">"Hozzáadás"</string>
diff --git a/java/res/values-hy/donottranslate.xml b/java/res/values-hy-rAM/config-spacing-and-punctuations.xml
index 7b0c56655..f26a30def 100644
--- a/java/res/values-hy/donottranslate.xml
+++ b/java/res/values-hy-rAM/config-spacing-and-punctuations.xml
@@ -22,11 +22,11 @@
<!-- U+055D: "՝" ARMENIAN COMMA -->
<!-- U+0589: "։" ARMENIAN FULL STOP -->
<!-- Symbols that are normally followed by a space (used to add an auto-space after these) -->
- <string name="symbols_followed_by_space">.,;:!?)]}&amp;&#x0589;&#x055D;</string>
+ <string name="symbols_followed_by_space" translatable="false">.,;:!?)]}&amp;&#x0589;&#x055D;</string>
<!-- Symbols that separate words. Adding armenian period and comma. -->
<!-- Don't remove the enclosing double quotes, they protect whitespace (not just U+0020) -->
- <string name="symbols_word_separators">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"&#x0589;&#x055D;</string>
+ <string name="symbols_word_separators" translatable="false">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"&#x0589;&#x055D;</string>
<!-- The sentence separator code point, for capitalization -->
<!-- U+0589: "։" ARMENIAN FULL STOP ; 589h = 1417d -->
- <integer name="sentence_separator">1417</integer>
+ <integer name="sentence_separator" translatable="false">1417</integer>
</resources>
diff --git a/java/res/values-hy-rAM/strings-action-keys.xml b/java/res/values-hy-rAM/strings-action-keys.xml
new file mode 100644
index 000000000..af9dd5d9d
--- /dev/null
+++ b/java/res/values-hy-rAM/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Առաջ"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Հաջորդը"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Նախորդը"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Պատրաստ է"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Ուղարկել"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Դադարեցնել"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Սպասել"</string>
+</resources>
diff --git a/java/res/values-hy-rAM/strings.xml b/java/res/values-hy-rAM/strings.xml
index b7ca149dd..62dc45b1f 100644
--- a/java/res/values-hy-rAM/strings.xml
+++ b/java/res/values-hy-rAM/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Դինամիկ սահող նախատեսք"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Տեսեք առաջարկված բառը՝ ժեստի միջոցով"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>` պահված է"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Առաջ"</string>
- <string name="label_next_key" msgid="362972844525672568">"Հաջորդը"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Նխրդ"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Կատարված է"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Ուղարկել"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Դադար"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Սպասել"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Միացրեք ականջակալը՝ բարձրաձայն արտասանվող գաղտնաբառը լսելու համար:"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Տվյալ տեքստը %s է"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Տեքստ չի մուտքագրվել"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ժամանակ"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Ձայնային մուտքագրման ստեղն"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Հիմնական ստեղնաշարի վրա"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Նշանների ստեղնաշարի վրա"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Անջատված"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Բարձրախոս հիմնական ստեղնաշարի վրա"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Բարձրախոս նշանների ստեղնաշարի վրա"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Ձայնային մուտքագրումն անջատված է"</string>
<string name="configure_input_method" msgid="373356270290742459">"Կարգավորել մուտքագրման մեթոդները"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Մուտքագրման լեզուներ"</string>
<string name="send_feedback" msgid="1780431884109392046">"Արձագանքել"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Այբուբեն (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Այբուբեն (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Զմայլիկներ"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Գունավորում"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Սպիտակ"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Կապույտ"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Մուտքագրման հատուկ ոճեր"</string>
<string name="add_style" msgid="6163126614514489951">"Ավելացնել ոճ"</string>
<string name="add" msgid="8299699805688017798">"Ավելացնել"</string>
diff --git a/java/res/values-in/strings-action-keys.xml b/java/res/values-in/strings-action-keys.xml
new file mode 100644
index 000000000..26f32254d
--- /dev/null
+++ b/java/res/values-in/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Buka"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Lanjut"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Balik"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Beres"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Kirim"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Jeda"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Tunggu"</string>
+</resources>
diff --git a/java/res/values-in/strings.xml b/java/res/values-in/strings.xml
index a731478a5..83530f2b9 100644
--- a/java/res/values-in/strings.xml
+++ b/java/res/values-in/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Pratinjau mengambang dinamis"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Lihat kata yang disarankan saat melakukan isyarat"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Telah disimpan"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Buka"</string>
- <string name="label_next_key" msgid="362972844525672568">"Berikutnya"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Sblm"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Selesai"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Kirimkan"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Jeda"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Tunggu"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Pasang headset untuk mendengar tombol sandi yang diucapkan dengan keras."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Teks saat ini adalah %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Tidak ada teks yang dimasukkan"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"waktu"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tombol masukan suara"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Pada keyboard utama"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Pada keyboard simbol"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Mati"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mik pada keyboard utama"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mik pada keyboard simbol"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Masukan suara dinonaktifkan"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurasikan metode masukan"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Bahasa masukan"</string>
<string name="send_feedback" msgid="1780431884109392046">"Kirim masukan"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Abjad (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Abjad (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Skema warna"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Putih"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Biru"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Gaya masukan khusus"</string>
<string name="add_style" msgid="6163126614514489951">"Tambah gaya"</string>
<string name="add" msgid="8299699805688017798">"Tambahkan"</string>
diff --git a/java/res/values-is/strings-action-keys.xml b/java/res/values-is/strings-action-keys.xml
new file mode 100644
index 000000000..49c6199c5
--- /dev/null
+++ b/java/res/values-is/strings-action-keys.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Áfram"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Næsta"</string>
+ <string name="label_previous_key" msgid="1211868118071386787">"Fyrra"</string>
+ <string name="label_done_key" msgid="2441578748772529288">"Lokið"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Senda"</string>
+ <!-- no translation found for label_pause_key (181098308428035340) -->
+ <skip />
+ <!-- no translation found for label_wait_key (6402152600878093134) -->
+ <skip />
+</resources>
diff --git a/java/res/values-is/strings.xml b/java/res/values-is/strings.xml
new file mode 100644
index 000000000..1137fd09d
--- /dev/null
+++ b/java/res/values-is/strings.xml
@@ -0,0 +1,443 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- no translation found for english_ime_input_options (3909945612939668554) -->
+ <skip />
+ <!-- no translation found for english_ime_research_log (8492602295696577851) -->
+ <skip />
+ <!-- no translation found for use_contacts_for_spellchecking_option_title (5374120998125353898) -->
+ <skip />
+ <!-- no translation found for use_contacts_for_spellchecking_option_summary (8754413382543307713) -->
+ <skip />
+ <!-- no translation found for vibrate_on_keypress (5258079494276955460) -->
+ <skip />
+ <!-- no translation found for sound_on_keypress (6093592297198243644) -->
+ <skip />
+ <!-- no translation found for popup_on_keypress (123894815723512944) -->
+ <skip />
+ <!-- no translation found for general_category (1859088467017573195) -->
+ <skip />
+ <!-- no translation found for correction_category (2236750915056607613) -->
+ <skip />
+ <!-- no translation found for gesture_typing_category (497263612130532630) -->
+ <skip />
+ <!-- no translation found for misc_category (6894192814868233453) -->
+ <skip />
+ <!-- no translation found for advanced_settings (362895144495591463) -->
+ <skip />
+ <!-- no translation found for advanced_settings_summary (4487980456152830271) -->
+ <skip />
+ <!-- no translation found for include_other_imes_in_language_switch_list (4533689960308565519) -->
+ <skip />
+ <!-- no translation found for include_other_imes_in_language_switch_list_summary (840637129103317635) -->
+ <skip />
+ <!-- no translation found for show_language_switch_key (5915478828318774384) -->
+ <skip />
+ <!-- no translation found for show_language_switch_key_summary (7343403647474265713) -->
+ <skip />
+ <!-- no translation found for sliding_key_input_preview (6604262359510068370) -->
+ <skip />
+ <!-- no translation found for sliding_key_input_preview_summary (6340524345729093886) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_delay (6213164897443068248) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_no_delay (2096123151571458064) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_default_delay (2166964333903906734) -->
+ <skip />
+ <!-- no translation found for abbreviation_unit_milliseconds (8700286094028323363) -->
+ <skip />
+ <!-- no translation found for settings_system_default (6268225104743331821) -->
+ <skip />
+ <!-- no translation found for use_contacts_dict (4435317977804180815) -->
+ <skip />
+ <!-- no translation found for use_contacts_dict_summary (6599983334507879959) -->
+ <skip />
+ <!-- no translation found for use_double_space_period (8781529969425082860) -->
+ <skip />
+ <!-- no translation found for use_double_space_period_summary (6532892187247952799) -->
+ <skip />
+ <!-- no translation found for auto_cap (1719746674854628252) -->
+ <skip />
+ <!-- no translation found for auto_cap_summary (7934452761022946874) -->
+ <skip />
+ <!-- no translation found for edit_personal_dictionary (3996910038952940420) -->
+ <skip />
+ <!-- no translation found for configure_dictionaries_title (4238652338556902049) -->
+ <skip />
+ <!-- no translation found for main_dictionary (4798763781818361168) -->
+ <skip />
+ <!-- no translation found for prefs_show_suggestions (8026799663445531637) -->
+ <skip />
+ <!-- no translation found for prefs_show_suggestions_summary (1583132279498502825) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_show_name (3219916594067551303) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_show_only_portrait_name (3859783767435239118) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_hide_name (6309143926422234673) -->
+ <skip />
+ <!-- no translation found for prefs_block_potentially_offensive_title (5078480071057408934) -->
+ <skip />
+ <!-- no translation found for prefs_block_potentially_offensive_summary (2371835479734991364) -->
+ <skip />
+ <!-- no translation found for auto_correction (7630720885194996950) -->
+ <skip />
+ <!-- no translation found for auto_correction_summary (5625751551134658006) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_off (8470882665417944026) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_modest (8788366690620799097) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_aggressive (7319007299148899623) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_very_aggressive (1853309024129480416) -->
+ <skip />
+ <!-- no translation found for bigram_prediction (1084449187723948550) -->
+ <skip />
+ <!-- no translation found for bigram_prediction_summary (3896362682751109677) -->
+ <skip />
+ <!-- no translation found for gesture_input (826951152254563827) -->
+ <skip />
+ <!-- no translation found for gesture_input_summary (9180350639305731231) -->
+ <skip />
+ <!-- no translation found for gesture_preview_trail (3802333369335722221) -->
+ <skip />
+ <!-- no translation found for gesture_floating_preview_text (4443240334739381053) -->
+ <skip />
+ <!-- no translation found for gesture_floating_preview_text_summary (4472696213996203533) -->
+ <skip />
+ <!-- no translation found for added_word (8993883354622484372) -->
+ <skip />
+ <!-- no translation found for spoken_use_headphones (896961781287283493) -->
+ <skip />
+ <!-- no translation found for spoken_current_text_is (2485723011272583845) -->
+ <skip />
+ <!-- no translation found for spoken_no_text_entered (7479685225597344496) -->
+ <skip />
+ <!-- no translation found for spoken_auto_correct (8005997889020109763) -->
+ <skip />
+ <!-- no translation found for spoken_auto_correct_obscured (6276420476908833791) -->
+ <skip />
+ <!-- no translation found for spoken_description_unknown (3197434010402179157) -->
+ <skip />
+ <!-- no translation found for spoken_description_shift (244197883292549308) -->
+ <skip />
+ <!-- no translation found for spoken_description_shift_shifted (1681877323344195035) -->
+ <skip />
+ <!-- no translation found for spoken_description_caps_lock (3276478269526304432) -->
+ <skip />
+ <!-- no translation found for spoken_description_delete (8740376944276199801) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_symbol (5486340107500448969) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_alpha (23129338819771807) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_numeric (591752092685161732) -->
+ <skip />
+ <!-- no translation found for spoken_description_settings (4627462689603838099) -->
+ <skip />
+ <!-- no translation found for spoken_description_tab (2667716002663482248) -->
+ <skip />
+ <!-- no translation found for spoken_description_space (2582521050049860859) -->
+ <skip />
+ <!-- no translation found for spoken_description_mic (615536748882611950) -->
+ <skip />
+ <!-- no translation found for spoken_description_smiley (2256309826200113918) -->
+ <skip />
+ <!-- no translation found for spoken_description_return (8178083177238315647) -->
+ <skip />
+ <!-- no translation found for spoken_description_search (1247236163755920808) -->
+ <skip />
+ <!-- no translation found for spoken_description_dot (40711082435231673) -->
+ <skip />
+ <!-- no translation found for spoken_description_language_switch (5507091328222331316) -->
+ <skip />
+ <!-- no translation found for spoken_description_action_next (8636078276664150324) -->
+ <skip />
+ <!-- no translation found for spoken_description_action_previous (800872415009336208) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_on (5700440798609574589) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_locked (593175803181701830) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_off (657219998449174808) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_symbol (7183343879909747642) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_alpha (3528307674390156956) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_phone (6520207943132026264) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_phone_shift (5499629753962641227) -->
+ <skip />
+ <!-- no translation found for announce_keyboard_hidden (8718927835531429807) -->
+ <skip />
+ <!-- no translation found for announce_keyboard_mode (4729081055438508321) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_date (3137520166817128102) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_date_time (339593358488851072) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_email (6216248078128294262) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_im (1137405089766557048) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_number (7991623440699957069) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_phone (6851627527401433229) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_text (6479436687899701619) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_time (4381856885582143277) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_url (1519819835514911218) -->
+ <skip />
+ <!-- no translation found for voice_input (3583258583521397548) -->
+ <skip />
+ <!-- no translation found for configure_input_method (373356270290742459) -->
+ <skip />
+ <!-- no translation found for language_selection_title (1651299598555326750) -->
+ <skip />
+ <!-- no translation found for send_feedback (1780431884109392046) -->
+ <skip />
+ <!-- no translation found for select_language (3693815588777926848) -->
+ <skip />
+ <!-- no translation found for hint_add_to_dictionary (573678656946085380) -->
+ <skip />
+ <!-- no translation found for has_dictionary (6071847973466625007) -->
+ <skip />
+ <!-- no translation found for prefs_enable_log (6620424505072963557) -->
+ <skip />
+ <!-- no translation found for prefs_description_log (7525225584555429211) -->
+ <skip />
+ <!-- no translation found for keyboard_layout (8451164783510487501) -->
+ <skip />
+ <!-- no translation found for subtype_en_GB (88170601942311355) -->
+ <skip />
+ <!-- no translation found for subtype_en_US (6160452336634534239) -->
+ <skip />
+ <!-- no translation found for subtype_es_US (5583145191430180200) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_en_GB (2179097748724725906) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_en_US (1362581347576714579) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_es_US (6261791057007890189) -->
+ <skip />
+ <!-- no translation found for subtype_nepali_traditional (9032247506728040447) -->
+ <skip />
+ <!-- no translation found for subtype_no_language (7137390094240139495) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_qwerty (244337630616742604) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_qwertz (443066912507547976) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_azerty (8144348527575640087) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_dvorak (1564494667584718094) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_colemak (5837418400010302623) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_pcqwerty (5354918232046200018) -->
+ <skip />
+ <!-- no translation found for subtype_emoji (7483586578074549196) -->
+ <skip />
+ <!-- no translation found for custom_input_styles_title (8429952441821251512) -->
+ <skip />
+ <!-- no translation found for add_style (6163126614514489951) -->
+ <skip />
+ <!-- no translation found for add (8299699805688017798) -->
+ <skip />
+ <!-- no translation found for remove (4486081658752944606) -->
+ <skip />
+ <!-- no translation found for save (7646738597196767214) -->
+ <skip />
+ <!-- no translation found for subtype_locale (8576443440738143764) -->
+ <skip />
+ <!-- no translation found for keyboard_layout_set (4309233698194565609) -->
+ <skip />
+ <!-- no translation found for custom_input_style_note_message (8826731320846363423) -->
+ <skip />
+ <!-- no translation found for enable (5031294444630523247) -->
+ <skip />
+ <!-- no translation found for not_now (6172462888202790482) -->
+ <skip />
+ <!-- no translation found for custom_input_style_already_exists (8008728952215449707) -->
+ <skip />
+ <!-- no translation found for prefs_usability_study_mode (1261130555134595254) -->
+ <skip />
+ <!-- no translation found for prefs_key_longpress_timeout_settings (6102240298932897873) -->
+ <skip />
+ <!-- no translation found for prefs_keypress_vibration_duration_settings (7918341459947439226) -->
+ <skip />
+ <!-- no translation found for prefs_keypress_sound_volume_settings (6027007337036891623) -->
+ <skip />
+ <!-- no translation found for prefs_read_external_dictionary (2588931418575013067) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_no_files_message (4947420942224623792) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_multiple_files_title (7637749044265808628) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_confirm_install_message (6898610163768980870) -->
+ <skip />
+ <!-- no translation found for error (8940763624668513648) -->
+ <skip />
+ <!-- no translation found for button_default (3988017840431881491) -->
+ <skip />
+ <!-- no translation found for setup_welcome_title (6112821709832031715) -->
+ <skip />
+ <!-- no translation found for setup_welcome_additional_description (8150252008545768953) -->
+ <skip />
+ <!-- no translation found for setup_start_action (8936036460897347708) -->
+ <skip />
+ <!-- no translation found for setup_next_action (371821437915144603) -->
+ <skip />
+ <!-- no translation found for setup_steps_title (6400373034871816182) -->
+ <skip />
+ <!-- no translation found for setup_step1_title (3147967630253462315) -->
+ <skip />
+ <!-- no translation found for setup_step1_instruction (2578631936624637241) -->
+ <skip />
+ <!-- no translation found for setup_step1_finished_instruction (10761482004957994) -->
+ <skip />
+ <!-- no translation found for setup_step1_action (4366513534999901728) -->
+ <skip />
+ <!-- no translation found for setup_step2_title (6860725447906690594) -->
+ <skip />
+ <!-- no translation found for setup_step2_instruction (9141481964870023336) -->
+ <skip />
+ <!-- no translation found for setup_step2_action (1660330307159824337) -->
+ <skip />
+ <!-- no translation found for setup_step3_title (3154757183631490281) -->
+ <skip />
+ <!-- no translation found for setup_step3_instruction (8025981829605426000) -->
+ <skip />
+ <!-- no translation found for setup_step3_action (600879797256942259) -->
+ <skip />
+ <!-- no translation found for setup_finish_action (276559243409465389) -->
+ <skip />
+ <!-- no translation found for show_setup_wizard_icon (5008028590593710830) -->
+ <skip />
+ <!-- no translation found for show_setup_wizard_icon_summary (4119998322536880213) -->
+ <skip />
+ <!-- no translation found for app_name (6320102637491234792) -->
+ <skip />
+ <!-- no translation found for dictionary_provider_name (3027315045397363079) -->
+ <skip />
+ <!-- no translation found for dictionary_service_name (6237472350693511448) -->
+ <skip />
+ <!-- no translation found for download_description (6014835283119198591) -->
+ <skip />
+ <!-- no translation found for dictionary_settings_title (8091417676045693313) -->
+ <skip />
+ <!-- no translation found for dictionary_install_over_metered_network_prompt (3587517870006332980) -->
+ <skip />
+ <!-- no translation found for dictionary_settings_summary (5305694987799824349) -->
+ <skip />
+ <!-- no translation found for user_dictionaries (3582332055892252845) -->
+ <skip />
+ <!-- no translation found for default_user_dict_pref_name (1625055720489280530) -->
+ <skip />
+ <!-- no translation found for dictionary_available (4728975345815214218) -->
+ <skip />
+ <!-- no translation found for dictionary_downloading (2982650524622620983) -->
+ <skip />
+ <!-- no translation found for dictionary_installed (8081558343559342962) -->
+ <skip />
+ <!-- no translation found for dictionary_disabled (8950383219564621762) -->
+ <skip />
+ <!-- no translation found for cannot_connect_to_dict_service (9216933695765732398) -->
+ <skip />
+ <!-- no translation found for no_dictionaries_available (8039920716566132611) -->
+ <skip />
+ <!-- no translation found for check_for_updates_now (8087688440916388581) -->
+ <skip />
+ <!-- no translation found for last_update (730467549913588780) -->
+ <skip />
+ <!-- no translation found for message_updating (4457761393932375219) -->
+ <skip />
+ <!-- no translation found for message_loading (8689096636874758814) -->
+ <skip />
+ <!-- no translation found for main_dict_description (3072821352793492143) -->
+ <skip />
+ <!-- no translation found for cancel (6830980399865683324) -->
+ <skip />
+ <!-- no translation found for install_dict (180852772562189365) -->
+ <skip />
+ <!-- no translation found for cancel_download_dict (7843340278507019303) -->
+ <skip />
+ <!-- no translation found for delete_dict (756853268088330054) -->
+ <skip />
+ <!-- no translation found for should_download_over_metered_prompt (2878629598667658845) -->
+ <skip />
+ <!-- no translation found for download_over_metered (1643065851159409546) -->
+ <skip />
+ <!-- no translation found for do_not_download_over_metered (2176209579313941583) -->
+ <skip />
+ <!-- no translation found for dict_available_notification_title (6514288591959117288) -->
+ <skip />
+ <!-- no translation found for dict_available_notification_description (1075194169443163487) -->
+ <skip />
+ <!-- no translation found for toast_downloading_suggestions (1313027353588566660) -->
+ <skip />
+ <!-- no translation found for version_text (2715354215568469385) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_menu_title (1254195365689387076) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_title (4096700390211748168) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_screen_title (5818914331629278758) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_more_options (5671682004887093112) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_less_options (2716586567241724126) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_confirm (4703129507388332950) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_word_option_name (6665558053408962865) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_shortcut_option_name (3094731590655523777) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_locale_option_name (4738643440987277705) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_word_hint (4902434148985906707) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_shortcut_hint (2265453012555060178) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_edit_dialog_title (3765774633869590352) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_context_menu_edit_title (6812255903472456302) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_context_menu_delete_title (8142932447689461181) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_empty_text (558499587532668203) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_all_languages (8276126583216298886) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_more_languages (7131268499685180461) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_delete (110413335187193859) -->
+ <skip />
+ <!-- no translation found for user_dict_fast_scroll_alphabet (5431919401558285473) -->
+ <skip />
+</resources>
diff --git a/java/res/values-it/strings-action-keys.xml b/java/res/values-it/strings-action-keys.xml
new file mode 100644
index 000000000..02e7b9c94
--- /dev/null
+++ b/java/res/values-it/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Vai"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Succ."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Prec."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Fine"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Invia"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausa"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Attendi"</string>
+</resources>
diff --git a/java/res/values-it/strings.xml b/java/res/values-it/strings.xml
index ec27fd5a7..12b597ac3 100644
--- a/java/res/values-it/strings.xml
+++ b/java/res/values-it/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Anteprima mobile dinamica"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Visualizza la parola suggerita durante il gesto"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : parola salvata"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Vai"</string>
- <string name="label_next_key" msgid="362972844525672568">"Avanti"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Indietro"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Fine"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Invia"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Attesa"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Collega gli auricolari per ascoltare la pronuncia dei tasti premuti per la password."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Il testo attuale è %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nessun testo inserito"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tasto input vocale"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Su tastiera principale"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Su tastiera simboli"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"OFF"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Microfono su tastiera principale"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Microfono su tastiera simboli"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Input vocale disatt."</string>
<string name="configure_input_method" msgid="373356270290742459">"Configura metodi di immissione"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Lingue comandi"</string>
<string name="send_feedback" msgid="1780431884109392046">"Invia feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Combinazione di colori"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Bianco"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blu"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Stili personalizzati"</string>
<string name="add_style" msgid="6163126614514489951">"Aggiungi stile"</string>
<string name="add" msgid="8299699805688017798">"Aggiungi"</string>
diff --git a/java/res/values-ar/donottranslate.xml b/java/res/values-iw/config-spacing-and-punctuations.xml
index 57de2538b..9e637e458 100644
--- a/java/res/values-ar/donottranslate.xml
+++ b/java/res/values-iw/config-spacing-and-punctuations.xml
@@ -21,5 +21,5 @@
<!-- The all letters need to be mirrored are found at
http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt -->
<!-- Symbols that are suggested between words -->
- <string name="suggested_punctuations">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
+ <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(|),)|(,\',-,/,@,_</string>
</resources>
diff --git a/java/res/values-iw/strings-action-keys.xml b/java/res/values-iw/strings-action-keys.xml
new file mode 100644
index 000000000..f0f466b8e
--- /dev/null
+++ b/java/res/values-iw/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"התחל"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"הבא"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"הקודם"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"בוצע"</string>
+ <string name="label_send_key" msgid="482252074224462163">"שלח"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"השהה"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"המתן"</string>
+</resources>
diff --git a/java/res/values-iw/strings-appname.xml b/java/res/values-iw/strings-appname.xml
index 1a07c5492..fc040f9ff 100644
--- a/java/res/values-iw/strings-appname.xml
+++ b/java/res/values-iw/strings-appname.xml
@@ -20,8 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"מקלדת Android‏ (AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"בודק האיות של Android‏ (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"הגדרות מקלדת Android‏ (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"הגדרות בודק האיות של Android‏ (AOSP)"</string>
+ <string name="english_ime_name" msgid="5940510615957428904">"‏מקלדת Android‏ (AOSP)"</string>
+ <string name="spell_checker_service_name" msgid="1254221805440242662">"‏בודק האיות של Android‏ (AOSP)"</string>
+ <string name="english_ime_settings" msgid="5760361067176802794">"‏הגדרות מקלדת Android‏ (AOSP)"</string>
+ <string name="android_spell_checker_settings" msgid="6123949487832861885">"‏הגדרות בודק האיות של Android‏ (AOSP)"</string>
</resources>
diff --git a/java/res/values-iw/strings.xml b/java/res/values-iw/strings.xml
index 81d2e406d..ab15649d0 100644
--- a/java/res/values-iw/strings.xml
+++ b/java/res/values-iw/strings.xml
@@ -38,7 +38,7 @@
<string name="show_language_switch_key" msgid="5915478828318774384">"מתג החלפת שפה"</string>
<string name="show_language_switch_key_summary" msgid="7343403647474265713">"הצג כאשר ניתן להשתמש בשפות קלט מרובות"</string>
<string name="sliding_key_input_preview" msgid="6604262359510068370">"הצג את סמן ההסטה"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"הצג סימון ויזואלי בעת הסטה מ-Shift או ממקשי סמלים"</string>
+ <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"‏הצג סימון ויזואלי בעת הסטה מ-Shift או ממקשי סמלים"</string>
<string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"עיכוב בסגירת חלון קופץ של מקש"</string>
<string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"ללא עיכוב"</string>
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"ברירת מחדל"</string>
@@ -74,22 +74,15 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"תצוגה צפה דינמית"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ראה את המילה המוצעת תוך כדי הזזת האצבע"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : נשמרה"</string>
- <string name="label_go_key" msgid="1635148082137219148">"התחל"</string>
- <string name="label_next_key" msgid="362972844525672568">"הבא"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"הקודם"</string>
- <string name="label_done_key" msgid="2441578748772529288">"בוצע"</string>
- <string name="label_send_key" msgid="2815056534433717444">"שלח"</string>
- <string name="label_pause_key" msgid="181098308428035340">"השהה"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"המתן"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"חבר אוזניות כדי לשמוע הקראה של מפתחות סיסמה."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"הטקסט הנוכחי הוא %s"</string>
+ <string name="spoken_current_text_is" msgid="2485723011272583845">"‏הטקסט הנוכחי הוא %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"לא הוזן טקסט"</string>
<string name="spoken_auto_correct" msgid="8005997889020109763">"<xliff:g id="KEY">%1$s</xliff:g> מתקן את <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g> ל-<xliff:g id="CORRECTED">%3$s</xliff:g>"</string>
<string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> מבצע תיקון אוטומטי"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"קוד מקש %d"</string>
+ <string name="spoken_description_unknown" msgid="3197434010402179157">"‏קוד מקש %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift פועל (הקש כדי להשבית)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Caps Lock פועל (הקש כדי להשבית)"</string>
+ <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"‏Shift פועל (הקש כדי להשבית)"</string>
+ <string name="spoken_description_caps_lock" msgid="3276478269526304432">"‏Caps Lock פועל (הקש כדי להשבית)"</string>
<string name="spoken_description_delete" msgid="8740376944276199801">"מחק"</string>
<string name="spoken_description_to_symbol" msgid="5486340107500448969">"סמלים"</string>
<string name="spoken_description_to_alpha" msgid="23129338819771807">"אותיות"</string>
@@ -105,9 +98,9 @@
<string name="spoken_description_language_switch" msgid="5507091328222331316">"החלף שפה"</string>
<string name="spoken_description_action_next" msgid="8636078276664150324">"הבא"</string>
<string name="spoken_description_action_previous" msgid="800872415009336208">"הקודם"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Shift פועל"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Caps Lock פועל"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Shift מושבת"</string>
+ <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"‏Shift פועל"</string>
+ <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"‏Caps Lock פועל"</string>
+ <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"‏Shift מושבת"</string>
<string name="spoken_description_mode_symbol" msgid="7183343879909747642">"מצב סמלים"</string>
<string name="spoken_description_mode_alpha" msgid="3528307674390156956">"מצב אותיות"</string>
<string name="spoken_description_mode_phone" msgid="6520207943132026264">"מצב טלפון"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"זמן"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"כתובות אתרים"</string>
<string name="voice_input" msgid="3583258583521397548">"מקש קלט קולי"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"במקלדת הראשית"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"במקלדת סמלים"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"כבוי"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"מיקרופון במקלדת הראשית"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"מיקרופון במקלדת סמלים"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"הקלט הקולי מושבת"</string>
<string name="configure_input_method" msgid="373356270290742459">"הגדרת שיטות קלט"</string>
<string name="language_selection_title" msgid="1651299598555326750">"שפות קלט"</string>
<string name="send_feedback" msgid="1780431884109392046">"שלח משוב"</string>
@@ -147,13 +134,16 @@
<string name="subtype_with_layout_es_US" msgid="6261791057007890189">"ספרדית (ארצות הברית) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
<string name="subtype_nepali_traditional" msgid="9032247506728040447">"<xliff:g id="LANGUAGE">%s</xliff:g> (מסורתית)"</string>
<string name="subtype_no_language" msgid="7137390094240139495">"ללא שפה (אלף-בית)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"אלף-בית (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"אלף-בית (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"אלף-בית (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"אלף-בית (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"אלף-בית (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"אלף-בית (PC)"</string>
+ <string name="subtype_no_language_qwerty" msgid="244337630616742604">"‏אלף-בית (QWERTY)"</string>
+ <string name="subtype_no_language_qwertz" msgid="443066912507547976">"‏אלף-בית (QWERTZ)"</string>
+ <string name="subtype_no_language_azerty" msgid="8144348527575640087">"‏אלף-בית (AZERTY)"</string>
+ <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"‏אלף-בית (Dvorak)"</string>
+ <string name="subtype_no_language_colemak" msgid="5837418400010302623">"‏אלף-בית (Colemak)"</string>
+ <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"‏אלף-בית (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"אמוג\'י"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"ערכת צבעים"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"לבן"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"כחול"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"סגנונות קלט מותאמים אישית"</string>
<string name="add_style" msgid="6163126614514489951">"הוסף סגנון"</string>
<string name="add" msgid="8299699805688017798">"הוסף"</string>
@@ -217,9 +207,9 @@
<string name="install_dict" msgid="180852772562189365">"התקן"</string>
<string name="cancel_download_dict" msgid="7843340278507019303">"בטל"</string>
<string name="delete_dict" msgid="756853268088330054">"מחק"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"לשפה הנבחרת במכשיר הנייד שלך יש מילון זמין.&lt;br/&gt; אנו ממליצים &lt;b&gt;להוריד&lt;/b&gt; את המילון ב<xliff:g id="LANGUAGE">%1$s</xliff:g> כדי לשפר את חוויית ההקלדה.&lt;br/&gt; &lt;br/&gt; ההורדה עשויה לארוך דקה או שתיים ב-3G. ייתכן שתחויב אם אין לך &lt;b&gt;תוכנית נתונים בלתי מוגבלת&lt;/b&gt;.&lt;br/&gt; אם אינך בטוח איזו תוכנית נתונים יש לך, אנו ממליצים לחפש חיבור Wi-Fi כדי להתחיל בהורדה באופן אוטומטי.&lt;br/&gt; &lt;br/&gt; טיפ: ניתן להוריד ולהסיר מילונים ב&lt;b&gt;שפה וקלט&lt;/b&gt; בתפריט &lt;b&gt;הגדרות&lt;/b&gt; של המכשיר הנייד שלך."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"הורד עכשיו (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>MB)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"הורד באמצעות Wi-Fi"</string>
+ <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"‏לשפה הנבחרת במכשיר הנייד שלך יש מילון זמין.&lt;br/&gt; אנו ממליצים &lt;b&gt;להוריד&lt;/b&gt; את המילון ב<xliff:g id="LANGUAGE">%1$s</xliff:g> כדי לשפר את חוויית ההקלדה.&lt;br/&gt; &lt;br/&gt; ההורדה עשויה לארוך דקה או שתיים ב-3G. ייתכן שתחויב אם אין לך &lt;b&gt;תכנית נתונים בלתי מוגבלת&lt;/b&gt;.&lt;br/&gt; אם אינך בטוח איזו תכנית נתונים יש לך, אנו ממליצים לחפש חיבור Wi-Fi כדי להתחיל בהורדה באופן אוטומטי.&lt;br/&gt; &lt;br/&gt; טיפ: ניתן להוריד ולהסיר מילונים ב&lt;b&gt;שפה וקלט&lt;/b&gt; בתפריט &lt;b&gt;הגדרות&lt;/b&gt; של המכשיר הנייד שלך."</string>
+ <string name="download_over_metered" msgid="1643065851159409546">"‏הורד עכשיו (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>MB)"</string>
+ <string name="do_not_download_over_metered" msgid="2176209579313941583">"‏הורד באמצעות Wi-Fi"</string>
<string name="dict_available_notification_title" msgid="6514288591959117288">"יש מילון זמין עבור <xliff:g id="LANGUAGE">%1$s</xliff:g>"</string>
<string name="dict_available_notification_description" msgid="1075194169443163487">"לחץ כדי לעיין ולהוריד"</string>
<string name="toast_downloading_suggestions" msgid="1313027353588566660">"מוריד: הצעות ב<xliff:g id="LANGUAGE">%1$s</xliff:g> יהיו מוכנות בקרוב."</string>
diff --git a/java/res/values-ja/strings-action-keys.xml b/java/res/values-ja/strings-action-keys.xml
new file mode 100644
index 000000000..68aa6479e
--- /dev/null
+++ b/java/res/values-ja/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"実行"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"次へ"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"前へ"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"完了"</string>
+ <string name="label_send_key" msgid="482252074224462163">"送信"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"停止"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"待機"</string>
+</resources>
diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml
index a8229c0d7..39f14ff35 100644
--- a/java/res/values-ja/strings.xml
+++ b/java/res/values-ja/strings.xml
@@ -50,7 +50,7 @@
<string name="use_double_space_period_summary" msgid="6532892187247952799">"スペースバーをダブルタップするとピリオドとスペースを挿入できます"</string>
<string name="auto_cap" msgid="1719746674854628252">"自動大文字変換"</string>
<string name="auto_cap_summary" msgid="7934452761022946874">"英字入力で各文の最初の単語を大文字にします"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"ユーザー辞書"</string>
+ <string name="edit_personal_dictionary" msgid="3996910038952940420">"単語リスト"</string>
<string name="configure_dictionaries_title" msgid="4238652338556902049">"アドオン辞書"</string>
<string name="main_dictionary" msgid="4798763781818361168">"メイン辞書"</string>
<string name="prefs_show_suggestions" msgid="8026799663445531637">"修正候補を表示する"</string>
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"動的フローティングプレビュー"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ジェスチャーで入力候補を表示できます"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>:保存しました"</string>
- <string name="label_go_key" msgid="1635148082137219148">"実行"</string>
- <string name="label_next_key" msgid="362972844525672568">"次へ"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"前へ"</string>
- <string name="label_done_key" msgid="2441578748772529288">"完了"</string>
- <string name="label_send_key" msgid="2815056534433717444">"送信"</string>
- <string name="label_pause_key" msgid="181098308428035340">"停止"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"待機"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"パスワードのキーが音声出力されるのでヘッドセットを接続してください。"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"現在のテキスト:%s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"テキストが入力されていません"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"時刻"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"音声入力キー"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"メインキーボード上"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"記号キーボード上"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"OFF"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"メインキーボードのマイク"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"記号キーボードのマイク"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"音声入力は無効です"</string>
<string name="configure_input_method" msgid="373356270290742459">"入力方法を設定"</string>
<string name="language_selection_title" msgid="1651299598555326750">"入力言語"</string>
<string name="send_feedback" msgid="1780431884109392046">"フィードバックを送信"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"アルファベット(Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"アルファベット(PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"絵文字"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"カラーパターン"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"白"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"青"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"カスタム入力スタイル"</string>
<string name="add_style" msgid="6163126614514489951">"スタイル追加"</string>
<string name="add" msgid="8299699805688017798">"追加"</string>
diff --git a/java/res/values-ka/bools.xml b/java/res/values-ka-rGE/bools.xml
index 840d20c21..840d20c21 100644
--- a/java/res/values-ka/bools.xml
+++ b/java/res/values-ka-rGE/bools.xml
diff --git a/java/res/values-ka-rGE/strings-action-keys.xml b/java/res/values-ka-rGE/strings-action-keys.xml
new file mode 100644
index 000000000..e2dd05f7b
--- /dev/null
+++ b/java/res/values-ka-rGE/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"გად."</string>
+ <string name="label_next_key" msgid="5586407279258592635">"შემდ."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"წინა"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"დასრ."</string>
+ <string name="label_send_key" msgid="482252074224462163">"გაგზ."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"პაუზა"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"მოცდა"</string>
+</resources>
diff --git a/java/res/values-ka-rGE/strings.xml b/java/res/values-ka-rGE/strings.xml
index 62249616f..2adf9c440 100644
--- a/java/res/values-ka-rGE/strings.xml
+++ b/java/res/values-ka-rGE/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"დინამიურად მოლივლივე გადახედვა"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ჟესტიკულაციისას შეთავაზებული სიტყვის ნახვა"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : შეინახა"</string>
- <string name="label_go_key" msgid="1635148082137219148">"წასვლა"</string>
- <string name="label_next_key" msgid="362972844525672568">"შემდ."</string>
- <string name="label_previous_key" msgid="1211868118071386787">"წინა"</string>
- <string name="label_done_key" msgid="2441578748772529288">"დასრულდა"</string>
- <string name="label_send_key" msgid="2815056534433717444">"გაგზ."</string>
- <string name="label_pause_key" msgid="181098308428035340">"პაუზა"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"მოცდა"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"შეაერთეთ ყურსაცვამი, რათა მოისმინოთ აკრეფილი პაროლის კლავიშების სახელები."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"მიმდინარე ტექსტი არის %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"ტექსტი არ შეყვანილა"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"დრო"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"ხმოვანი შეყვანის კლავიში"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"მთავარ კლავიატურაზე"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"სიმბოლოთა კლავიატურაზე"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"გამორთვა"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"მიკროფონი მთავარ კლავიატურაზე"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"მიკროფონი სიმბოლოთა კლავიატურაზე"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ხმოვანი შეყვანა გამორთულია"</string>
<string name="configure_input_method" msgid="373356270290742459">"შეყვანის მეთოდების კონფიგურაცია"</string>
<string name="language_selection_title" msgid="1651299598555326750">"შეყვანის ენები"</string>
<string name="send_feedback" msgid="1780431884109392046">"უკუკავშირის გაგზავნა"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"ანბანი (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"ანბანი (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"სიცილაკები"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"ფერის სქემა"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"თეთრი"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"ლურჯი"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"შეყვანის სტილების კონფიგურაცია"</string>
<string name="add_style" msgid="6163126614514489951">"სტილის დამატება"</string>
<string name="add" msgid="8299699805688017798">"დამატება"</string>
diff --git a/java/res/values-ka/strings.xml b/java/res/values-ka/strings.xml
deleted file mode 100644
index 211e92328..000000000
--- a/java/res/values-ka/strings.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_input_options" msgid="3909945612939668554">"შეყვანის მეთოდები"</string>
- <string name="english_ime_research_log" msgid="8492602295696577851">"კვლევის აღრიცხვის ბრძანებები"</string>
- <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"კონტაქტების სახელების მოძიება"</string>
- <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"მართლწერის შემმოწმებელი ერთეულებს თქვენი კონტაქტების სიიდან იყენებს"</string>
- <string name="vibrate_on_keypress" msgid="5258079494276955460">"ვიბრაცია კლავიშზე დაჭერისას"</string>
- <string name="sound_on_keypress" msgid="6093592297198243644">"ხმაური კლავიშზე დაჭერისას"</string>
- <string name="popup_on_keypress" msgid="123894815723512944">"გადიდება ღილაკზე დაჭერისას"</string>
- <string name="general_category" msgid="1859088467017573195">"ზოგადი"</string>
- <string name="correction_category" msgid="2236750915056607613">"ტექსტის კორექცია"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"ჟესტებით წერა"</string>
- <string name="misc_category" msgid="6894192814868233453">"სხვა პარამეტრები"</string>
- <string name="advanced_settings" msgid="362895144495591463">"გაფართუებული პარამეტრები"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"პარამეტრები ექსპერტთათვის"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"შეყვანის სხვა მეთოდებზე გადართვა"</string>
- <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"ენის გადართვის ღილაკს შეყვანის სხვა მეთოდებსაც შეიცავს"</string>
- <string name="show_language_switch_key" msgid="5915478828318774384">"ენის გადართვის კლავიში"</string>
- <string name="show_language_switch_key_summary" msgid="7343403647474265713">"აჩვენე, როდესაც ჩართულია სხვადასხვა შეყვანის ენა"</string>
- <string name="sliding_key_input_preview" msgid="6604262359510068370">"გასრიალების ინდიკატ. ჩვენება"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Shift ან Symbol კლავიშებიდან გასრიალებისას ვიზუალური მინიშნების ჩვენება"</string>
- <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"ამომხტ.კლავიშის დაყოვნება"</string>
- <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"არ დაყოვნდეს"</string>
- <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"ნაგულისხმევი"</string>
- <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g>მწმ"</string>
- <string name="settings_system_default" msgid="6268225104743331821">"სისტემის ნაგულისხმევი"</string>
- <string name="use_contacts_dict" msgid="4435317977804180815">"კონტაქტის სახელების შეთავაზება"</string>
- <string name="use_contacts_dict_summary" msgid="6599983334507879959">"კონტაქტებიდან სახელების გამოყენება შეთავაზებებისთვის და კორექციისთვის"</string>
- <string name="use_double_space_period" msgid="8781529969425082860">"წერტილი ორმაგი შორისით"</string>
- <string name="use_double_space_period_summary" msgid="6532892187247952799">"შორისზე ორჯერ შეხება დაწერს წერტილს და შორისის სიმბოლოს"</string>
- <string name="auto_cap" msgid="1719746674854628252">"ავტო-კაპიტალიზაცია"</string>
- <string name="auto_cap_summary" msgid="7934452761022946874">"ყოველი წინადადების პირველი სიტყვის კაპიტალიზაცია"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"პერსონალური ლექსიკონი"</string>
- <string name="configure_dictionaries_title" msgid="4238652338556902049">"დამატებითი ლექსიკონები"</string>
- <string name="main_dictionary" msgid="4798763781818361168">"მთავარი ლექსიკონი"</string>
- <string name="prefs_show_suggestions" msgid="8026799663445531637">"კორექციის შეთავაზებების ჩვენება"</string>
- <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"წერისას შეთავაზებული სიტყვების ჩვენება"</string>
- <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"ყოველთვის ჩვენება"</string>
- <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"პორტრეტის რეჟიმში ჩვენება"</string>
- <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"ყოველთვის დამალვა"</string>
- <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"შეურაცხმყოფელი სიტყვების დაბლოკვა"</string>
- <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"არ მოხდეს პოტენციურად შეურაცხმყოფელი სიტყვების შეთავაზება"</string>
- <string name="auto_correction" msgid="7630720885194996950">"ავტოკორექცია"</string>
- <string name="auto_correction_summary" msgid="5625751551134658006">"შორისი და პუნქტუაცია ავტომატურად ასწორებს არასწორად აკრეფილ სიტყვებს"</string>
- <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"გამორთულია"</string>
- <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"მოკრძალებული"</string>
- <string name="auto_correction_threshold_mode_aggressive" msgid="7319007299148899623">"აგრესიული"</string>
- <string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"ძალიან აგრესიული"</string>
- <string name="bigram_prediction" msgid="1084449187723948550">"შემდეგი სიტყვის შეთავაზებები"</string>
- <string name="bigram_prediction_summary" msgid="3896362682751109677">"შეთავაზებებისას წინა სიტყვის გამოყენება"</string>
- <string name="gesture_input" msgid="826951152254563827">"ჟესტებით წერის ჩართვა"</string>
- <string name="gesture_input_summary" msgid="9180350639305731231">"სიტყვის შეყვანა ასო-ნიშებზე გასრიალებით"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"ჟესტიკულაციის კუდის ჩვენება"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"დინამიურად მოლივლივე გადახედვა"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ჟესტიკულაციისას შეთავაზებული სიტყვის ნახვა"</string>
- <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : შეინახა"</string>
- <string name="label_go_key" msgid="1635148082137219148">"წასვლ"</string>
- <string name="label_next_key" msgid="362972844525672568">"შემდ."</string>
- <string name="label_previous_key" msgid="1211868118071386787">"წინა"</string>
- <string name="label_done_key" msgid="2441578748772529288">"დასრულდა"</string>
- <string name="label_send_key" msgid="2815056534433717444">"გაგზ."</string>
- <string name="label_pause_key" msgid="181098308428035340">"პაუზა"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"მოცდა"</string>
- <string name="spoken_use_headphones" msgid="896961781287283493">"შეაერთეთ ყურსაცვამი, რათა მოისმინოთ აკრეფილი პაროლის კლავიშების სახელები."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"მიმდინარე ტექსტი არის %s"</string>
- <string name="spoken_no_text_entered" msgid="7479685225597344496">"ტექსტ არ შეყვანილა"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"კლავიატურის კოდი %d"</string>
- <string name="spoken_description_shift" msgid="244197883292549308">"Shift-"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift ჩართულია (შეეხეთ გამოსართავად)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"ჩართულია Caps (შეეხეთ გამოსართავად)"</string>
- <string name="spoken_description_delete" msgid="8740376944276199801">"Delete"</string>
- <string name="spoken_description_to_symbol" msgid="5486340107500448969">"სიმბოლოები"</string>
- <string name="spoken_description_to_alpha" msgid="23129338819771807">"ასოები"</string>
- <string name="spoken_description_to_numeric" msgid="591752092685161732">"ნომრები"</string>
- <string name="spoken_description_settings" msgid="4627462689603838099">"პარამეტრები"</string>
- <string name="spoken_description_tab" msgid="2667716002663482248">"Tab"</string>
- <string name="spoken_description_space" msgid="2582521050049860859">"შორისი"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"ხმოვანი შეყვანა"</string>
- <string name="spoken_description_smiley" msgid="2256309826200113918">"მომღიმარი სახე"</string>
- <string name="spoken_description_return" msgid="8178083177238315647">"Return"</string>
- <string name="spoken_description_search" msgid="1247236163755920808">"ძიება"</string>
- <string name="spoken_description_dot" msgid="40711082435231673">"წერტილი"</string>
- <string name="spoken_description_language_switch" msgid="5507091328222331316">"ენის გადართვა"</string>
- <string name="spoken_description_action_next" msgid="8636078276664150324">"შემდეგი"</string>
- <string name="spoken_description_action_previous" msgid="800872415009336208">"წინა"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Shift ჩართულია"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Caps lock ჩართულია"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Shift გამორთულია"</string>
- <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"სიმბოლოების რეჟიმი"</string>
- <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"ასოების რეჟიმი"</string>
- <string name="spoken_description_mode_phone" msgid="6520207943132026264">"ტელეფონის რეჟიმი"</string>
- <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"ტელეფონის სიმბოლოების რეჟიმი"</string>
- <string name="announce_keyboard_hidden" msgid="8718927835531429807">"კლავიატურა დამალულია"</string>
- <string name="announce_keyboard_mode" msgid="4729081055438508321">"ნაჩვენებია <xliff:g id="MODE">%s</xliff:g> კლავიატურა"</string>
- <string name="keyboard_mode_date" msgid="3137520166817128102">"თარიღი"</string>
- <string name="keyboard_mode_date_time" msgid="339593358488851072">"თარიღი და დრო"</string>
- <string name="keyboard_mode_email" msgid="6216248078128294262">"ელფოსტა"</string>
- <string name="keyboard_mode_im" msgid="1137405089766557048">"შეტყობინებები"</string>
- <string name="keyboard_mode_number" msgid="7991623440699957069">"რიცხვები"</string>
- <string name="keyboard_mode_phone" msgid="6851627527401433229">"ტელეფონი"</string>
- <string name="keyboard_mode_text" msgid="6479436687899701619">"ტექსტი"</string>
- <string name="keyboard_mode_time" msgid="4381856885582143277">"დრო"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"ხმოვანი შეყვანის კლავიში"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"მთავარ კლავიატურაზე"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"სიმბოლოთა კლავიატურაზე"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"გამორთულია"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"მიკროფონი მთავარ კლავიატურაზე"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"მიკროფონი სიმბოლოთა კლავიატურაზე"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ხმოვანი შეყვანა გამორთულია"</string>
- <string name="configure_input_method" msgid="373356270290742459">"შეყვანის მეთოდების კონფიგურაცია"</string>
- <string name="language_selection_title" msgid="1651299598555326750">"შეყვანის ენები"</string>
- <string name="send_feedback" msgid="1780431884109392046">"უკუკავშირი"</string>
- <string name="select_language" msgid="3693815588777926848">"შეყვანის ენები"</string>
- <string name="hint_add_to_dictionary" msgid="573678656946085380">"შეეხეთ ისევ შესანახად"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"ხელმისაწვდომია ლექსიკონი"</string>
- <string name="prefs_enable_log" msgid="6620424505072963557">"მომხმარებლის უკუკავშირის ჩართვა"</string>
- <string name="prefs_description_log" msgid="7525225584555429211">"შეიტანეთ წვლილი შეყვანის ამ მეთოდის გაუმჯობესებაში და გააგზავნეთ მოხმარების სტატისტიკა ავარიული გათიშვების ანგარიშები"</string>
- <string name="keyboard_layout" msgid="8451164783510487501">"კლავიატურის თემა"</string>
- <string name="subtype_en_GB" msgid="88170601942311355">"ინგლისური (გართ. სამ.)"</string>
- <string name="subtype_en_US" msgid="6160452336634534239">"ინგლისური (აშშ)"</string>
- <string name="subtype_es_US" msgid="5583145191430180200">"ესპანური (აშშ)"</string>
- <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"ინგლისური (გაერთ. სამ.) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"ინგლისური (აშშ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"ესპანური (აშშ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_no_language" msgid="7137390094240139495">"ენის გარეშე (ანბანი)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"ანბანი (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"ანბანი (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"ანბანი (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"ანბანი (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"ანბანი (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"ანბანი (PC)"</string>
- <string name="custom_input_styles_title" msgid="8429952441821251512">"შეყვანის სტილების კონფიგურაცია"</string>
- <string name="add_style" msgid="6163126614514489951">"სტილის დამატება"</string>
- <string name="add" msgid="8299699805688017798">"დამატება"</string>
- <string name="remove" msgid="4486081658752944606">"ამოშლა"</string>
- <string name="save" msgid="7646738597196767214">"შენახვა"</string>
- <string name="subtype_locale" msgid="8576443440738143764">"ენა"</string>
- <string name="keyboard_layout_set" msgid="4309233698194565609">"განლაგება"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"თქვენი მორგებული შეყვანის სტილი გამოყენებამდე უნდა გაააქტიუროთ. გსურთ მისი აქტივაცია ახლა?"</string>
- <string name="enable" msgid="5031294444630523247">"ჩართვა"</string>
- <string name="not_now" msgid="6172462888202790482">"ახლა არა"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"შეყვანის იგივე სტილი უკე არსებობს: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
- <string name="prefs_usability_study_mode" msgid="1261130555134595254">"გამოყენებადობის კვლევის რეჟიმი"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"კლავიშზე გრძელი დაჭერის დაყოვნება"</string>
- <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"კლავიშზე დაჭერის ვიბრაციის ხანგრძლივობა"</string>
- <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"კლავიშზე დაჭერის ხმა"</string>
- <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"გარე ლექსიკონის ფაილის წაკითხვა"</string>
- <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"ჩამოტვირთვების საქაღალდეში ლექსიკონის ფაილები არ არის"</string>
- <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"ინსტალაციისათვის აირჩიეთ ლექსიკონის ფაილი"</string>
- <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"ნამდვილად გსურთ ამ ფაილის <xliff:g id="LOCALE_NAME">%s</xliff:g>-ისთვის ინსტალაცია?"</string>
- <string name="error" msgid="8940763624668513648">"წარმოიშვა შეცდომა"</string>
- <string name="button_default" msgid="3988017840431881491">"ნაგულისხმევი"</string>
- <string name="setup_welcome_title" msgid="6112821709832031715">"კეთილი იყოს თქვენი მობრძანება <xliff:g id="APPLICATION_NAME">%s</xliff:g>-ში"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"ჟესტებით წერით"</string>
- <string name="setup_start_action" msgid="8936036460897347708">"დაწყება"</string>
- <string name="setup_next_action" msgid="371821437915144603">"შემდეგი საფეხური"</string>
- <string name="setup_steps_title" msgid="6400373034871816182">"მიმდინარეობს <xliff:g id="APPLICATION_NAME">%s</xliff:g>-ის დაყენება"</string>
- <string name="setup_step1_title" msgid="3147967630253462315">"<xliff:g id="APPLICATION_NAME">%s</xliff:g>-ის ჩართვა"</string>
- <string name="setup_step1_instruction" msgid="2578631936624637241">"გთხოვთ მონიშნოთ „<xliff:g id="APPLICATION_NAME">%s</xliff:g>“ თქვენი ენის და შეყვანის პარამეტრებში. ეს უფლებას მიცემს მას გაეშვას თქვენს მოწყობილობაზე."</string>
- <string name="setup_step1_finished_instruction" msgid="10761482004957994">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> უკვე გააქტიურებულია თქვენი ენის შეყვანის პარამეტრებში, ასე რომ ეს საფეხური დასრულებულია. გადადით შემდეგ საფეხურზე!"</string>
- <string name="setup_step1_action" msgid="4366513534999901728">"პარამეტრებში გააქტიურება"</string>
- <string name="setup_step2_title" msgid="6860725447906690594">"გადართეთ <xliff:g id="APPLICATION_NAME">%s</xliff:g>-ზე"</string>
- <string name="setup_step2_instruction" msgid="9141481964870023336">"შემდეგ, აირჩიეთ „<xliff:g id="APPLICATION_NAME">%s</xliff:g>“ თქვენს აქტიურ შეყვანის მეთოდად."</string>
- <string name="setup_step2_action" msgid="1660330307159824337">"შეყვანის მეთოდების გადართვა"</string>
- <string name="setup_step3_title" msgid="3154757183631490281">"გილოცავთ, პრცესი დასრულდა!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"ამიერიდან შეძლებთ ყველა სასურველ აპში <xliff:g id="APPLICATION_NAME">%s</xliff:g>-ით წერას."</string>
- <string name="setup_step3_action" msgid="600879797256942259">"დამატებითი ენების კონფიგურაცია"</string>
- <string name="setup_finish_action" msgid="276559243409465389">"დასრულებული"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"აპის ხატულის ჩვენება"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"გაშვების ხატულის ჩვენება გამშვებში"</string>
- <string name="app_name" msgid="6320102637491234792">"ლექსიკონის პროვაიდერი"</string>
- <string name="dictionary_provider_name" msgid="3027315045397363079">"ლექსიკონის პროვაიდერი"</string>
- <string name="dictionary_service_name" msgid="6237472350693511448">"ლექსიკონს სერვისი"</string>
- <string name="download_description" msgid="6014835283119198591">"ლექსიკონის განახლების მონაცემები"</string>
- <string name="dictionary_settings_title" msgid="8091417676045693313">"დამატებითი ლექსიკონები"</string>
- <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"ხელმისაწვდომია ლექსიკონი"</string>
- <string name="dictionary_settings_summary" msgid="5305694987799824349">"ლექსიკონების პარამეტრები"</string>
- <string name="user_dictionaries" msgid="3582332055892252845">"მომხმარებლის ლექსიკონები"</string>
- <string name="default_user_dict_pref_name" msgid="1625055720489280530">"მომხარებლის ლექსიკონი"</string>
- <string name="dictionary_available" msgid="4728975345815214218">"ხელმისაწვდომია ლექსიკონი"</string>
- <string name="dictionary_downloading" msgid="2982650524622620983">"მიმდინარეობს ჩამოტვირთვა"</string>
- <string name="dictionary_installed" msgid="8081558343559342962">"დაყენებულია"</string>
- <string name="dictionary_disabled" msgid="8950383219564621762">"დაყენებულია, გაუქმებულია"</string>
- <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"ლექსიკონის სერვისთან დაკავშირებით პრობლემა წარმოიშვა"</string>
- <string name="no_dictionaries_available" msgid="8039920716566132611">"ლექსიკონები მიუწვდომელია"</string>
- <string name="check_for_updates_now" msgid="8087688440916388581">"განახლება"</string>
- <string name="last_update" msgid="730467549913588780">"ბოლო განახლება"</string>
- <string name="message_updating" msgid="4457761393932375219">"მიმდინარეობს განახლებების შემოწმება"</string>
- <string name="message_loading" msgid="8689096636874758814">"იტვირთება..."</string>
- <string name="main_dict_description" msgid="3072821352793492143">"მთავარი ლექსიკონი"</string>
- <string name="cancel" msgid="6830980399865683324">"გაუქმება"</string>
- <string name="install_dict" msgid="180852772562189365">"ინსტალაცია"</string>
- <string name="cancel_download_dict" msgid="7843340278507019303">"გაუქმება"</string>
- <string name="delete_dict" msgid="756853268088330054">"წაშლა"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"თქვენს მიერ მობილურ მოწყობილობაზე არჩეული ენისათვის ხელმისაწვდომია ლექსიკონი.&lt;br/&gt; გირჩევთ, &lt;b&gt;ჩამოტვირთოთ&lt;/b&gt; <xliff:g id="LANGUAGE">%1$s</xliff:g> ლექსიკონი, რათა გაიმარტივოთ ტექსტის შეყვანა.&lt;br/&gt; &lt;br/&gt; ჩამოტვირთვას შესაძლოა დაჭირდეს ერთი ან ორი წუთი 3G სისწრაფეზე. თუ ულიმიტო არ გაგაჩნიათ &lt;b&gt; მობილური ინტერნეტის ტარიფი&lt;/b&gt;.&lt;br/&amp;gt, შესაძლოა ჩამოტვირთვა დამატებით გადასახადებთან იყოს დაკავშირებული; თუ არ ხართ დარწმუნებული მობილური ინტერნეტის აქტიური ტარიფის შესახებ, გირჩევთ იპოვოთ Wi-Fi კავშირი და ავტომატურად დაიწყოთ ჩამოტვირთვა.&lt;br/&gt; &lt;br/&gt; რჩევა: ლექსიკონების ჩამოტვირთვა და ამოშლა შესაძლებელია სექციიდან &lt;b&gt;ენა და შეყვანა&lt;/b&gt; სექციიდან, თქვენი მობილური მოწყობილობის &lt;b&gt;პარამეტრების&lt;/b&gt; მენიუში."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"ახლა ჩამოტვირთვა (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>მბაიტი)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"Wi-Fi კავშირზე ჩამოტვირთვა"</string>
- <string name="dict_available_notification_title" msgid="6514288591959117288">"<xliff:g id="LANGUAGE">%1$s</xliff:g>-ისთვის ხელმისაწვდომია ლექსიკონი"</string>
- <string name="dict_available_notification_description" msgid="1075194169443163487">"დააჭირეთ განხილვას და ჩამოტვირთეთ"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"ჩამოტვირთვა: <xliff:g id="LANGUAGE">%1$s</xliff:g>-ის შემოთავაზებები მალე მომზადდება."</string>
- <string name="version_text" msgid="2715354215568469385">"ვერსია <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
- <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"დამატება"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"ლექსიკონში დამატება"</string>
- <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"ფრაზა"</string>
- <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"მეტი ვარიანტები"</string>
- <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"ნაკლები ვარიანტები"</string>
- <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"კარგი"</string>
- <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"სიტყვა:"</string>
- <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"მალსახმობი:"</string>
- <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"ენა:"</string>
- <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"შიყვანეთ სიტყვა"</string>
- <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"არასავალდებულო მალსახმობი"</string>
- <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"სიტყვის შესწორება"</string>
- <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"რედაქტირება"</string>
- <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"წაშლა"</string>
- <string name="user_dict_settings_empty_text" msgid="558499587532668203">"თქვენ არ გაქვთ სიტყვები მომხმარებლის ლექსიკონში. დაამატეთ სიტყვები ღილაკ Add (+) შეხებით."</string>
- <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"ყველა ენისთვის"</string>
- <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"სხვა ენები…"</string>
- <string name="user_dict_settings_delete" msgid="110413335187193859">"წაშლა"</string>
- <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
-</resources>
diff --git a/java/res/values-kk/strings-action-keys.xml b/java/res/values-kk/strings-action-keys.xml
new file mode 100644
index 000000000..95c84a2ca
--- /dev/null
+++ b/java/res/values-kk/strings-action-keys.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Өту"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Келесі"</string>
+ <string name="label_previous_key" msgid="1211868118071386787">"Алдағы"</string>
+ <string name="label_done_key" msgid="2441578748772529288">"Дайын"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Жіберу"</string>
+ <string name="label_pause_key" msgid="181098308428035340">"Тоқтата тұру"</string>
+ <string name="label_wait_key" msgid="6402152600878093134">"Күту"</string>
+</resources>
diff --git a/java/res/values-kk/strings.xml b/java/res/values-kk/strings.xml
new file mode 100644
index 000000000..80b289f4d
--- /dev/null
+++ b/java/res/values-kk/strings.xml
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="english_ime_input_options" msgid="3909945612939668554">"Енгізу опциялары"</string>
+ <string name="english_ime_research_log" msgid="8492602295696577851">"Журнал пәрмендерін зерттеу"</string>
+ <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"Контакт аттарын іздеу"</string>
+ <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"Емлені тексеру құралы контактілер тізімінің жазбаларын пайдаланады"</string>
+ <string name="vibrate_on_keypress" msgid="5258079494276955460">"Пернені басқан кездегі діріл"</string>
+ <string name="sound_on_keypress" msgid="6093592297198243644">"Пернені басу кезіндегі дыбыс"</string>
+ <string name="popup_on_keypress" msgid="123894815723512944">"Пернені басқан кездегі ашылмалы мәзір"</string>
+ <string name="general_category" msgid="1859088467017573195">"Жалпы"</string>
+ <string name="correction_category" msgid="2236750915056607613">"Мәтін түзетпесі"</string>
+ <string name="gesture_typing_category" msgid="497263612130532630">"Қимылмен теру"</string>
+ <string name="misc_category" msgid="6894192814868233453">"Басқа опциялар"</string>
+ <string name="advanced_settings" msgid="362895144495591463">"Қосымша параметрлер"</string>
+ <string name="advanced_settings_summary" msgid="4487980456152830271">"Сарапшылар опциялары"</string>
+ <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Басқа енгізу әдістеріне ауыстырыңыз"</string>
+ <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Тілді ауыстыру пернесі басқа енгізу әдістерін де қамтиды"</string>
+ <string name="show_language_switch_key" msgid="5915478828318774384">"Тілді ауыстыру пернесі"</string>
+ <string name="show_language_switch_key_summary" msgid="7343403647474265713">"Бірнеше енгізу тілдері қосылған кезде көрсету"</string>
+ <string name="sliding_key_input_preview" msgid="6604262359510068370">"Жылжыту индикаторын көрсету"</string>
+ <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Shift немесе Таңба пернелерінен жылжыту кезіндегі көрнекі сөзкөмекті көрсету"</string>
+ <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Перненің ашылмалы мәзірі кідірісті жояды"</string>
+ <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Кідіріс жоқ"</string>
+ <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Әдепкі"</string>
+ <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g>мс"</string>
+ <string name="settings_system_default" msgid="6268225104743331821">"Жүйе әдепкісі"</string>
+ <string name="use_contacts_dict" msgid="4435317977804180815">"Контакт аттарын ұсыну"</string>
+ <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Ұсыныстар мен түзетулер үшін контакт аттарын пайдалану"</string>
+ <string name="use_double_space_period" msgid="8781529969425082860">"Қос бос орын кезеңі"</string>
+ <string name="use_double_space_period_summary" msgid="6532892187247952799">"Бос орынға екі рет түрту бос орыннан кейінгі кезеңді енгізеді"</string>
+ <string name="auto_cap" msgid="1719746674854628252">"Авто бас әріптерге түрлендіру"</string>
+ <string name="auto_cap_summary" msgid="7934452761022946874">"Әрбір сөйлемнің бірінші әріпін бас әріпке түрлендіру"</string>
+ <string name="edit_personal_dictionary" msgid="3996910038952940420">"Жеке сөздік"</string>
+ <string name="configure_dictionaries_title" msgid="4238652338556902049">"Қосымша сөздіктер"</string>
+ <string name="main_dictionary" msgid="4798763781818361168">"Негізгі сөздік"</string>
+ <string name="prefs_show_suggestions" msgid="8026799663445531637">"Түзету ұсыныстарын көрсету"</string>
+ <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"Теру кезінде ұсынылған сөздерді көрсету"</string>
+ <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"Үнемі көрсету"</string>
+ <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"Портрет режимінде көрсету"</string>
+ <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"Үнемі жасыру"</string>
+ <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"Қорлаушы сөздерді құлыптамау"</string>
+ <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"Қорлаушы сөздерді ұсынбау"</string>
+ <string name="auto_correction" msgid="7630720885194996950">"Авто түзету"</string>
+ <string name="auto_correction_summary" msgid="5625751551134658006">"Бос орын және тыныс белгі автоматты түрде қателерді түзетеді"</string>
+ <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"Өшірулі"</string>
+ <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"Баяу"</string>
+ <string name="auto_correction_threshold_mode_aggressive" msgid="7319007299148899623">"Белсенді"</string>
+ <string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"Өте белсенді"</string>
+ <string name="bigram_prediction" msgid="1084449187723948550">"Келесі сөз ұсыныстары"</string>
+ <string name="bigram_prediction_summary" msgid="3896362682751109677">"Ұсыныстар жасауда бастапқы сөзді пайдалану"</string>
+ <string name="gesture_input" msgid="826951152254563827">"Қимылмен теруді қосу"</string>
+ <string name="gesture_input_summary" msgid="9180350639305731231">"Әріптерді жанап өту арқылы сөзді енгізу"</string>
+ <string name="gesture_preview_trail" msgid="3802333369335722221">"Қимыл қадамын көрсету"</string>
+ <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамикалық қалқымалы қарап шығу"</string>
+ <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Қимылдау кезінде ұсынылған сөзді көру"</string>
+ <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Сақталды"</string>
+ <string name="spoken_use_headphones" msgid="896961781287283493">"Дауыспен айтылатын құпия сөз кілттерін есту үшін құлақаспап қосыңыз."</string>
+ <string name="spoken_current_text_is" msgid="2485723011272583845">"Ағымдағы мәтін - %s"</string>
+ <string name="spoken_no_text_entered" msgid="7479685225597344496">"Мәтін енгізілмеген"</string>
+ <!-- no translation found for spoken_auto_correct (8005997889020109763) -->
+ <skip />
+ <!-- no translation found for spoken_auto_correct_obscured (6276420476908833791) -->
+ <skip />
+ <string name="spoken_description_unknown" msgid="3197434010402179157">"Перне коды %d"</string>
+ <string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
+ <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift қосулы (өшіру үшін түрту)"</string>
+ <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Caps lock қосулы (өшіру үшін түрту)"</string>
+ <string name="spoken_description_delete" msgid="8740376944276199801">"Жою"</string>
+ <string name="spoken_description_to_symbol" msgid="5486340107500448969">"Таңбалар"</string>
+ <string name="spoken_description_to_alpha" msgid="23129338819771807">"Әріптер"</string>
+ <string name="spoken_description_to_numeric" msgid="591752092685161732">"Сандар"</string>
+ <string name="spoken_description_settings" msgid="4627462689603838099">"Баптаулар"</string>
+ <string name="spoken_description_tab" msgid="2667716002663482248">"Tab"</string>
+ <string name="spoken_description_space" msgid="2582521050049860859">"Бос орын"</string>
+ <string name="spoken_description_mic" msgid="615536748882611950">"Дауыстық енгізу"</string>
+ <string name="spoken_description_smiley" msgid="2256309826200113918">"Жымиған жүз"</string>
+ <string name="spoken_description_return" msgid="8178083177238315647">"Қалпына келтіру"</string>
+ <string name="spoken_description_search" msgid="1247236163755920808">"Іздеу"</string>
+ <string name="spoken_description_dot" msgid="40711082435231673">"Нүкте"</string>
+ <string name="spoken_description_language_switch" msgid="5507091328222331316">"Тілді ауыстыру"</string>
+ <string name="spoken_description_action_next" msgid="8636078276664150324">"Келесі"</string>
+ <string name="spoken_description_action_previous" msgid="800872415009336208">"Алдағы"</string>
+ <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Shift қосылған"</string>
+ <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Caps lock қосылған"</string>
+ <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Shift өшірілген"</string>
+ <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"Таңбалар режимі"</string>
+ <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"Әріптер режимі"</string>
+ <string name="spoken_description_mode_phone" msgid="6520207943132026264">"Телефон режимі"</string>
+ <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"Телефон таңбалары режимі"</string>
+ <string name="announce_keyboard_hidden" msgid="8718927835531429807">"Пернетақта жасырылған"</string>
+ <string name="announce_keyboard_mode" msgid="4729081055438508321">"Көрсетілетін <xliff:g id="MODE">%s</xliff:g> пернетақтасы"</string>
+ <string name="keyboard_mode_date" msgid="3137520166817128102">"күн"</string>
+ <string name="keyboard_mode_date_time" msgid="339593358488851072">"күн мен уақыт"</string>
+ <string name="keyboard_mode_email" msgid="6216248078128294262">"электрондық пошта"</string>
+ <string name="keyboard_mode_im" msgid="1137405089766557048">"хабар алмасу"</string>
+ <string name="keyboard_mode_number" msgid="7991623440699957069">"нөмір"</string>
+ <string name="keyboard_mode_phone" msgid="6851627527401433229">"телефон"</string>
+ <string name="keyboard_mode_text" msgid="6479436687899701619">"мәтін"</string>
+ <string name="keyboard_mode_time" msgid="4381856885582143277">"уақыт"</string>
+ <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
+ <string name="voice_input" msgid="3583258583521397548">"Дауыстық енгізу пернесі"</string>
+ <string name="configure_input_method" msgid="373356270290742459">"Енгізу әдістерін теңшеу"</string>
+ <string name="language_selection_title" msgid="1651299598555326750">"Енгізу тілдері"</string>
+ <string name="send_feedback" msgid="1780431884109392046">"Кері байланыс жіберу"</string>
+ <string name="select_language" msgid="3693815588777926848">"Енгізу тілдері"</string>
+ <string name="hint_add_to_dictionary" msgid="573678656946085380">"Сақтау үшін қайта түртіңіз"</string>
+ <string name="has_dictionary" msgid="6071847973466625007">"Сөздік қолжетімді"</string>
+ <string name="prefs_enable_log" msgid="6620424505072963557">"Пайдаланушының кері байланысын қосу"</string>
+ <string name="prefs_description_log" msgid="7525225584555429211">"Қолданыс статистикасын және бұзылыс есептерін автоматты түрде жіберу арқылы осы енгізу әдісінің редакторын арттыруға көмектесу"</string>
+ <string name="keyboard_layout" msgid="8451164783510487501">"Пернетақта тақырыбы"</string>
+ <string name="subtype_en_GB" msgid="88170601942311355">"ағылшын (ҰБ)"</string>
+ <string name="subtype_en_US" msgid="6160452336634534239">"ағылшын (АҚШ)"</string>
+ <string name="subtype_es_US" msgid="5583145191430180200">"Испан (АҚШ)"</string>
+ <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"ағылшын (ҰБ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
+ <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"ағылшын (АҚШ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
+ <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"Испан (АҚШ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
+ <!-- no translation found for subtype_nepali_traditional (9032247506728040447) -->
+ <skip />
+ <string name="subtype_no_language" msgid="7137390094240139495">"Тіл жоқ (әліпби)"</string>
+ <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Әліпби (QWERTY)"</string>
+ <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Әліпби (QWERTZ)"</string>
+ <string name="subtype_no_language_azerty" msgid="8144348527575640087">"Әліпби (AZERTY)"</string>
+ <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"Әліпби (Dvorak)"</string>
+ <string name="subtype_no_language_colemak" msgid="5837418400010302623">"Әліпби (Colemak)"</string>
+ <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Әліпби (ДК)"</string>
+ <!-- no translation found for subtype_emoji (7483586578074549196) -->
+ <skip />
+ <string name="custom_input_styles_title" msgid="8429952441821251512">"Реттелетін енгізу стильдері"</string>
+ <string name="add_style" msgid="6163126614514489951">"Стиль қосу"</string>
+ <string name="add" msgid="8299699805688017798">"Қосу"</string>
+ <string name="remove" msgid="4486081658752944606">"Аластау"</string>
+ <string name="save" msgid="7646738597196767214">"Сақтау"</string>
+ <string name="subtype_locale" msgid="8576443440738143764">"Тіл"</string>
+ <string name="keyboard_layout_set" msgid="4309233698194565609">"Пішім"</string>
+ <string name="custom_input_style_note_message" msgid="8826731320846363423">"Реттелетін енгізу стилі пайдалануды бастамас бұрын қосылуы қажет. Оны қазір қосу қажет пе?"</string>
+ <string name="enable" msgid="5031294444630523247">"Қосу"</string>
+ <string name="not_now" msgid="6172462888202790482">"Қазір емес"</string>
+ <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Бірдей енгізу стилі бұрыннан бар: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
+ <string name="prefs_usability_study_mode" msgid="1261130555134595254">"Қолайлылықты зерттеу режимі"</string>
+ <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Пернені ұзақ басу кідірісі"</string>
+ <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Пернені басқан кездегі діріл ұзақтығы"</string>
+ <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Пернені басқан кездегі дыбыс деңгейі"</string>
+ <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Сыртқы сөздік файлын оқу"</string>
+ <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"Жүктеп алулар қалтасында сөздік файлдары жоқ"</string>
+ <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"Орнату үшін сөздік файлын таңдау"</string>
+ <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"<xliff:g id="LOCALE_NAME">%s</xliff:g> үшін осы файлды орнату қажет пе?"</string>
+ <string name="error" msgid="8940763624668513648">"Қате болды"</string>
+ <string name="button_default" msgid="3988017840431881491">"Әдепкі"</string>
+ <string name="setup_welcome_title" msgid="6112821709832031715">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> қолданбасына қош келдіңіз"</string>
+ <string name="setup_welcome_additional_description" msgid="8150252008545768953">"Қимылмен теру арқылы"</string>
+ <string name="setup_start_action" msgid="8936036460897347708">"Іске қосылды"</string>
+ <string name="setup_next_action" msgid="371821437915144603">"Келесі қадам"</string>
+ <string name="setup_steps_title" msgid="6400373034871816182">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> орнату"</string>
+ <string name="setup_step1_title" msgid="3147967630253462315">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> қосу"</string>
+ <string name="setup_step1_instruction" msgid="2578631936624637241">"Тіл &amp; енгізу параметрлерінде <xliff:g id="APPLICATION_NAME">%s</xliff:g> тексеріңіз. Бұл оған құрылғыңызды басқаруға рұқсат береді."</string>
+ <string name="setup_step1_finished_instruction" msgid="10761482004957994">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> қолданбасы әлдеқашан Тіл &amp; енгізу параметрлерінде қосылған, сол себепті бұл қадам орындалған.Келесі біреуін қосыңыз!"</string>
+ <string name="setup_step1_action" msgid="4366513534999901728">"Параметрлер ішінде қосу"</string>
+ <string name="setup_step2_title" msgid="6860725447906690594">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> қолданбасына ауыстыру"</string>
+ <string name="setup_step2_instruction" msgid="9141481964870023336">"Одан кейін \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" қолданбасын белсенді мәтінді енгізу әдісі ретінде таңдаңыз."</string>
+ <string name="setup_step2_action" msgid="1660330307159824337">"Енгізу әдістерін ауыстыру"</string>
+ <string name="setup_step3_title" msgid="3154757183631490281">"Құттықтаймыз, барлығы дайын!"</string>
+ <string name="setup_step3_instruction" msgid="8025981829605426000">"Қазір барлық таңдаулы қолданбаларда <xliff:g id="APPLICATION_NAME">%s</xliff:g> арқылы теруге болады."</string>
+ <string name="setup_step3_action" msgid="600879797256942259">"Қосымша тілдерді теңшеу"</string>
+ <string name="setup_finish_action" msgid="276559243409465389">"Аяқталған"</string>
+ <string name="show_setup_wizard_icon" msgid="5008028590593710830">"Қолданба белгішесін көрсету"</string>
+ <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Іске қосу құралындағы қолданба белгішесін көрсету"</string>
+ <string name="app_name" msgid="6320102637491234792">"Сөздік провайдері"</string>
+ <string name="dictionary_provider_name" msgid="3027315045397363079">"Сөздік провайдері"</string>
+ <string name="dictionary_service_name" msgid="6237472350693511448">"Сөздік қызметі"</string>
+ <string name="download_description" msgid="6014835283119198591">"Сөздікті жаңарту ақпараты"</string>
+ <string name="dictionary_settings_title" msgid="8091417676045693313">"Қосымша сөздіктер"</string>
+ <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Сөздік қолжетімді"</string>
+ <string name="dictionary_settings_summary" msgid="5305694987799824349">"Сөздіктер параметрлері"</string>
+ <string name="user_dictionaries" msgid="3582332055892252845">"Пайдаланушы сөздіктері"</string>
+ <string name="default_user_dict_pref_name" msgid="1625055720489280530">"Пайдаланушы сөздігі"</string>
+ <string name="dictionary_available" msgid="4728975345815214218">"Сөздік қолжетімді"</string>
+ <string name="dictionary_downloading" msgid="2982650524622620983">"Ағымда жүктеп алынуда"</string>
+ <string name="dictionary_installed" msgid="8081558343559342962">"Орнатылған"</string>
+ <string name="dictionary_disabled" msgid="8950383219564621762">"Орнатылған, өшірілген"</string>
+ <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"Сөздік қызметіне қосылу мәселесі"</string>
+ <string name="no_dictionaries_available" msgid="8039920716566132611">"Сөздіктер қолжетімсіз"</string>
+ <string name="check_for_updates_now" msgid="8087688440916388581">"Жаңарту"</string>
+ <string name="last_update" msgid="730467549913588780">"Соңғы жаңартылған"</string>
+ <string name="message_updating" msgid="4457761393932375219">"Жаңартуларды тексеру"</string>
+ <string name="message_loading" msgid="8689096636874758814">"Жүктелуде..."</string>
+ <string name="main_dict_description" msgid="3072821352793492143">"Негізгі сөздік"</string>
+ <string name="cancel" msgid="6830980399865683324">"Болдырмау"</string>
+ <string name="install_dict" msgid="180852772562189365">"Орнату"</string>
+ <string name="cancel_download_dict" msgid="7843340278507019303">"Болдырмау"</string>
+ <string name="delete_dict" msgid="756853268088330054">"Жою"</string>
+ <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"Ұялы құрылғыдағы таңдалған тілде қолжетімді сөздік бар.&lt;br/&gt; Теру тәжірибесін арттыру үшін <xliff:g id="LANGUAGE">%1$s</xliff:g> сөздігін &lt;b&gt;жүктеп алуды&lt;/b&gt; ұсынамыз.&lt;br/&gt; &lt;br/&gt; Жүктеп алу 3G арқылы бір немесе екі минут алуы мүмкін. Егер &lt;b&gt;шектеусіз деректер жоспары&lt;/b&gt; болмаса, қосымша төлем алынуы мүмкін.&lt;br/&gt; Егер қай дерек жоспарына ие екеніңізді білмесеңіз, жүктеп алуды автоматты түрде бастау үшін Wi-Fi байланысын табуды ұсынамыз.&lt;br/&gt; &lt;br/&gt; Кеңес: Ұялы құрылғының &lt;b&gt;Параметрлер&lt;/b&gt; мәзіріндегі &lt;b&gt;Тіл &amp; енгізу&lt;/b&gt; параметріне өту арқылы сөздіктерді жүктеп алуға және жоюға болады."</string>
+ <string name="download_over_metered" msgid="1643065851159409546">"Қазір жүктеп алу (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>МБ)"</string>
+ <string name="do_not_download_over_metered" msgid="2176209579313941583">"Wi-Fi арқылы жүктеп алу"</string>
+ <string name="dict_available_notification_title" msgid="6514288591959117288">"<xliff:g id="LANGUAGE">%1$s</xliff:g> үшін сөздік қолжетімді"</string>
+ <string name="dict_available_notification_description" msgid="1075194169443163487">"Қарап шығу және жүктеп алу үшін басу"</string>
+ <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Жүктеп алу: <xliff:g id="LANGUAGE">%1$s</xliff:g> ұсыныстары жақында дайын болады."</string>
+ <string name="version_text" msgid="2715354215568469385">"<xliff:g id="VERSION_NUMBER">%1$s</xliff:g> нұсқасы"</string>
+ <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Қосу"</string>
+ <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Сөздікке қосу"</string>
+ <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"Фраза"</string>
+ <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"Басқа талғаулар"</string>
+ <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"Аз опциялар"</string>
+ <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"Жарайды"</string>
+ <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"Сөз:"</string>
+ <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"Пернелер тіркесімі:"</string>
+ <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"Тіл:"</string>
+ <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"Сөзді теру"</string>
+ <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"Қосымша пернелер тіркесімі"</string>
+ <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"Сөзді өңдеу"</string>
+ <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"Өңдеу"</string>
+ <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"Жою"</string>
+ <string name="user_dict_settings_empty_text" msgid="558499587532668203">"Пайдаланушы сөздігінде сөздер жоқ. Қосу (+) түймесін басу арқылы сөзді қосыңыз."</string>
+ <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"Барлық тілдер үшін"</string>
+ <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"Қосымша тілдер…"</string>
+ <string name="user_dict_settings_delete" msgid="110413335187193859">"Жою"</string>
+ <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" АӘБВГҒДЕЁЖЗИЙКҚЛМНҢОӨПРСТУҰҮФХҺЦЧШЩЪЫІЬЭЮЯ"</string>
+</resources>
diff --git a/java/res/values-km/donottranslate.xml b/java/res/values-km-rKH/config-spacing-and-punctuations.xml
index a9893feec..a9893feec 100644
--- a/java/res/values-km/donottranslate.xml
+++ b/java/res/values-km-rKH/config-spacing-and-punctuations.xml
diff --git a/java/res/values-km-rKH/strings-action-keys.xml b/java/res/values-km-rKH/strings-action-keys.xml
new file mode 100644
index 000000000..ff747d9f5
--- /dev/null
+++ b/java/res/values-km-rKH/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"ទៅ"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"បន្ទាប់"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"មុន"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"រួចរាល់"</string>
+ <string name="label_send_key" msgid="482252074224462163">"ផ្ញើ"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"ផ្អាក"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"រង់ចាំ"</string>
+</resources>
diff --git a/java/res/values-km-rKH/strings.xml b/java/res/values-km-rKH/strings.xml
index c2cdeac2f..0609bd26d 100644
--- a/java/res/values-km-rKH/strings.xml
+++ b/java/res/values-km-rKH/strings.xml
@@ -74,18 +74,11 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"មើល​ការ​​អណ្ដែត​ដែល​មាន​ចលនា​ជា​មុន"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"​មើល​ពាក្យ​​​ដែល​បាន​ស្នើ​​​ខណៈ​ពេល​កំពុង​ធ្វើ​កាយ​វិការ"</string>
<string name="added_word" msgid="8993883354622484372">"បាន​រក្សាទុក <xliff:g id="WORD">%s</xliff:g> ៖"</string>
- <string name="label_go_key" msgid="1635148082137219148">"ទៅ"</string>
- <string name="label_next_key" msgid="362972844525672568">"បន្ទាប់"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"មុន"</string>
- <string name="label_done_key" msgid="2441578748772529288">"រួចរាល់"</string>
- <string name="label_send_key" msgid="2815056534433717444">"ផ្ញើ"</string>
- <string name="label_pause_key" msgid="181098308428035340">"ផ្អាក"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"រង់ចាំ"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"ដោត​កាស ដើម្បី​ស្ដាប់​ពាក្យ​សម្ងាត់។"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"អត្ថបទ​បច្ចុប្បន្ន​គឺ %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"គ្មាន​អត្ថបទ​​​បាន​បញ្ចូល"</string>
<string name="spoken_auto_correct" msgid="8005997889020109763">"<xliff:g id="KEY">%1$s</xliff:g> កែ <xliff:g id="ORIGINAL_WORD">%2$s</xliff:g> ទៅ <xliff:g id="CORRECTED">%3$s</xliff:g>"</string>
- <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> អនុវត្តការ​កែ​ដោយស្វ័យប្រវត្តិ"</string>
+ <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"<xliff:g id="KEY">%1$s</xliff:g> អនុវត្ត​ការ​កែ​ដោយស្វ័យប្រវត្តិ"</string>
<string name="spoken_description_unknown" msgid="3197434010402179157">"កូដ​គ្រាប់​ចុច %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
<string name="spoken_description_shift_shifted" msgid="1681877323344195035">"បើក Shift (​ប៉ះ​ដើម្បី​បិទ)"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ពេលវេលា"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"គ្រាប់​ចុច​បញ្ចូល​​សំឡេង"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"នៅ​លើ​ក្ដារចុច​ចម្បង"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"នៅ​លើ​ក្ដារចុច​​និមិត្ត​សញ្ញា"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"បិទ"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"មីក្រូហ្វូន​នៅ​លើ​​ក្ដារចុច​ចម្បង"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"មីក្រូហ្វូន​នៅ​លើ​​ក្ដារចុច​និមិត្ត​សញ្ញា"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"បាន​បិទ​ការ​បញ្ចូល​សំឡេង"</string>
<string name="configure_input_method" msgid="373356270290742459">"កំណត់​រចនាសម្ព័ន្ធ​វិធីសាស្ត្រ​បញ្ចូល"</string>
<string name="language_selection_title" msgid="1651299598555326750">"បញ្ចូល​ភាសា"</string>
<string name="send_feedback" msgid="1780431884109392046">"ផ្ញើ​មតិ​អ្នក​ប្រើ"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"តាម​លំដាប់​អក្សរក្រម (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"តាម​លំដាប់​អក្សរក្រម (កុំព្យូទ័រ)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"សញ្ញា​អារម្មណ៍"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"ពណ៌​ចម្រុះ"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"ស"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"ខៀវ"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"រចនាប័ទ្ម​បញ្ចូល​ផ្ទាល់ខ្លួន"</string>
<string name="add_style" msgid="6163126614514489951">"បន្ថែម​រចនាប័ទ្ម"</string>
<string name="add" msgid="8299699805688017798">"បន្ថែម"</string>
diff --git a/java/res/values-ko/strings-action-keys.xml b/java/res/values-ko/strings-action-keys.xml
new file mode 100644
index 000000000..04febeeea
--- /dev/null
+++ b/java/res/values-ko/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"이동"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"다음"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"이전"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"완료"</string>
+ <string name="label_send_key" msgid="482252074224462163">"전송"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"중지"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"대기"</string>
+</resources>
diff --git a/java/res/values-ko/strings.xml b/java/res/values-ko/strings.xml
index 255e23440..678cc3ee4 100644
--- a/java/res/values-ko/strings.xml
+++ b/java/res/values-ko/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"동적 플로팅 미리보기"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"제스처에 따라 추천 단어 보기"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: 저장됨"</string>
- <string name="label_go_key" msgid="1635148082137219148">"이동"</string>
- <string name="label_next_key" msgid="362972844525672568">"다음"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"이전"</string>
- <string name="label_done_key" msgid="2441578748772529288">"완료"</string>
- <string name="label_send_key" msgid="2815056534433717444">"전송"</string>
- <string name="label_pause_key" msgid="181098308428035340">"일시 중지"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"대기"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"비밀번호 키를 음성으로 들으려면 헤드셋을 연결하세요."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"입력한 텍스트: %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"입력한 텍스트 없음"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"시간"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"음성 입력 키"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"기본 키보드"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"기호 키보드"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"사용 안함"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"기본 키보드의 마이크"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"기호 키보드의 마이크"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"음성 입력이 사용 중지됨"</string>
<string name="configure_input_method" msgid="373356270290742459">"입력 방법 설정"</string>
<string name="language_selection_title" msgid="1651299598555326750">"입력 언어"</string>
<string name="send_feedback" msgid="1780431884109392046">"의견 보내기"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"알파벳(콜맥)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"알파벳(PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"이모티콘"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"색구성표"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"흰색"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"파란색"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"맞춤 입력 스타일"</string>
<string name="add_style" msgid="6163126614514489951">"스타일 추가"</string>
<string name="add" msgid="8299699805688017798">"추가"</string>
diff --git a/java/res/values-ky/strings-action-keys.xml b/java/res/values-ky/strings-action-keys.xml
new file mode 100644
index 000000000..5eda61e1b
--- /dev/null
+++ b/java/res/values-ky/strings-action-keys.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Баруу"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Кийин"</string>
+ <string name="label_previous_key" msgid="1211868118071386787">"Мурун"</string>
+ <string name="label_done_key" msgid="2441578748772529288">"Даяр"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Жибер"</string>
+ <!-- no translation found for label_pause_key (181098308428035340) -->
+ <skip />
+ <!-- no translation found for label_wait_key (6402152600878093134) -->
+ <skip />
+</resources>
diff --git a/java/res/values-ky/strings.xml b/java/res/values-ky/strings.xml
index 45d855cf6..c3aab7858 100644
--- a/java/res/values-ky/strings.xml
+++ b/java/res/values-ky/strings.xml
@@ -112,19 +112,10 @@
<skip />
<!-- no translation found for added_word (8993883354622484372) -->
<skip />
- <string name="label_go_key" msgid="1635148082137219148">"Баруу"</string>
- <string name="label_next_key" msgid="362972844525672568">"Кийин"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Мурун"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Даяр"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Жибер"</string>
<!-- no translation found for label_to_symbol_key (8516904117128967293) -->
<skip />
<!-- no translation found for label_to_symbol_with_microphone_key (9035925553010061906) -->
<skip />
- <!-- no translation found for label_pause_key (181098308428035340) -->
- <skip />
- <!-- no translation found for label_wait_key (6402152600878093134) -->
- <skip />
<!-- no translation found for spoken_use_headphones (896961781287283493) -->
<skip />
<!-- no translation found for spoken_current_text_is (2485723011272583845) -->
@@ -177,18 +168,6 @@
<skip />
<!-- no translation found for voice_input (3583258583521397548) -->
<skip />
- <!-- no translation found for voice_input_modes_main_keyboard (3360660341121083174) -->
- <skip />
- <!-- no translation found for voice_input_modes_symbols_keyboard (7203213240786084067) -->
- <skip />
- <!-- no translation found for voice_input_modes_off (3745699748218082014) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_main_keyboard (6586544292900314339) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_symbols_keyboard (5233725927281932391) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_off (63875609591897607) -->
- <skip />
<!-- no translation found for configure_input_method (373356270290742459) -->
<skip />
<!-- no translation found for language_selection_title (1651299598555326750) -->
diff --git a/java/res/values-land/config.xml b/java/res/values-land/config.xml
index 7d93cc2ff..ade7d002c 100644
--- a/java/res/values-land/config.xml
+++ b/java/res/values-land/config.xml
@@ -18,6 +18,67 @@
*/
-->
+<!-- Configuration values for Small Phone Landscape. -->
<resources>
<bool name="config_use_fullscreen_mode">true</bool>
+
+ <!-- Preferable keyboard height in absolute scale: 1.100in -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">176.0dp</dimen>
+ <fraction name="config_min_keyboard_height">45%p</fraction>
+
+ <!-- key_height + key_bottom_gap = config_more_keys_keyboard_key_height -->
+ <dimen name="config_more_keys_keyboard_key_height">44.8dp</dimen>
+ <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
+ <!-- config_more_keys_keyboard_key_height x 1.2 -->
+ <dimen name="config_more_keys_keyboard_slide_allowance">53.76dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_gb">1.818%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">5.941%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">0.997%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -1.0 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_gb">-44.8dp</dimen>
+ <dimen name="config_key_preview_offset_gb">0.0dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_holo">2.727%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">5.368%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">1.020%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -0.5 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_holo">-22.4dp</dimen>
+ <dimen name="config_key_preview_offset_holo">1.6dp</dimen>
+
+ <fraction name="config_key_preview_text_ratio">90%</fraction>
+ <fraction name="config_key_letter_ratio">65%</fraction>
+ <fraction name="config_key_large_letter_ratio">74%</fraction>
+ <fraction name="config_key_label_ratio">40%</fraction>
+ <fraction name="config_key_hint_letter_ratio">30%</fraction>
+ <fraction name="config_key_hint_label_ratio">52%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">40%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">40.000%</fraction>
+ <!-- left or right padding of label alignment -->
+ <dimen name="config_key_label_horizontal_padding">8dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">3.20%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">78%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">48%</fraction>
+
+ <dimen name="config_suggestions_strip_height">36dp</dimen>
+ <dimen name="config_more_suggestions_row_height">36dp</dimen>
+ <integer name="config_max_more_suggestions_row">2</integer>
+ <fraction name="config_min_more_suggestions_width">60%</fraction>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">23dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">54dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">23dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">15dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">10%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">50%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">54%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">20</integer>
</resources>
diff --git a/java/res/values-land/dimens.xml b/java/res/values-land/dimens.xml
deleted file mode 100644
index b874d4881..000000000
--- a/java/res/values-land/dimens.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 1.100in -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">176.0dp</dimen>
- <fraction name="minKeyboardHeight">45%p</fraction>
- <!-- key_height + key_bottom_gap = popup_key_height -->
- <dimen name="popup_key_height">44.8dp</dimen>
-
- <fraction name="keyboard_top_padding_gb">1.818%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">0.0%p</fraction>
- <fraction name="key_bottom_gap_gb">5.941%p</fraction>
- <fraction name="key_horizontal_gap_gb">0.997%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">2.727%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
- <fraction name="key_bottom_gap_ics">5.368%p</fraction>
- <fraction name="key_horizontal_gap_ics">1.020%p</fraction>
-
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_padding">8dp</dimen>
-
- <fraction name="key_letter_ratio">65%</fraction>
- <fraction name="key_large_letter_ratio">74%</fraction>
- <fraction name="key_label_ratio">40%</fraction>
- <fraction name="key_hint_letter_ratio">30%</fraction>
- <fraction name="key_hint_label_ratio">52%</fraction>
- <fraction name="key_uppercase_letter_ratio">40%</fraction>
- <fraction name="key_preview_text_ratio">90%</fraction>
- <fraction name="spacebar_text_ratio">40.000%</fraction>
- <dimen name="key_preview_offset_gb">0.0dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">3.20%p</fraction>
- <fraction name="key_letter_ratio_5row">78%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">48%</fraction>
-
- <dimen name="key_preview_offset_ics">1.6dp</dimen>
- <!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-22.4dp</dimen>
-
- <dimen name="suggestions_strip_height">36dp</dimen>
- <dimen name="more_suggestions_row_height">36dp</dimen>
- <integer name="max_more_suggestions_row">2</integer>
- <fraction name="min_more_suggestions_width">60%</fraction>
- <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
- <!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">53.76dp</dimen>
- <!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction_gb">-44.8dp</dimen>
-
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">23dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">54dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">23dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">15dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">10%p</fraction>
- <fraction name="emoji_keyboard_row_height">50%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">54%p</fraction>
- <integer name="emoji_keyboard_max_key_count">20</integer>
-
-</resources>
diff --git a/java/res/values-land/setup-dimens-small-phone-land.xml b/java/res/values-land/setup-dimens-small-phone-land.xml
index 088e6562a..de93eee08 100644
--- a/java/res/values-land/setup-dimens-small-phone-land.xml
+++ b/java/res/values-land/setup-dimens-small-phone-land.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">18sp</dimen>
<dimen name="setup_step_bullet_text_size">18sp</dimen>
<dimen name="setup_step_triangle_indicator_height">18dp</dimen>
- <dimen name="setup_step_indicator_height">18dp</dimen>
<dimen name="setup_step_title_text_size">18sp</dimen>
<dimen name="setup_step_instruction_text_size">14sp</dimen>
<dimen name="setup_step_action_text_size">16sp</dimen>
diff --git a/java/res/values-lo/donottranslate.xml b/java/res/values-lo-rLA/config-spacing-and-punctuations.xml
index a9893feec..a9893feec 100644
--- a/java/res/values-lo/donottranslate.xml
+++ b/java/res/values-lo-rLA/config-spacing-and-punctuations.xml
diff --git a/java/res/values-lo-rLA/strings-action-keys.xml b/java/res/values-lo-rLA/strings-action-keys.xml
new file mode 100644
index 000000000..08dc983e0
--- /dev/null
+++ b/java/res/values-lo-rLA/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"ໄປ"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"ຕໍ່ໄປ"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"ກ່ອນໜ້າ"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Done"</string>
+ <string name="label_send_key" msgid="482252074224462163">"ສົ່ງ"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"ຢຸດຊົ່ວຄາວ"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"ລໍຖ້າ"</string>
+</resources>
diff --git a/java/res/values-lo-rLA/strings.xml b/java/res/values-lo-rLA/strings.xml
index 1597f9237..bbf1715b8 100644
--- a/java/res/values-lo-rLA/strings.xml
+++ b/java/res/values-lo-rLA/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"ມີຄຳຕົວຢ່າງລອຍຂຶ້ນມາ"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ເບິ່ງຄຳທີ່ຖືກແນະນຳໃນເວລາທີ່ກຳລັງຊີ້"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : ບັນທຶກແລ້ວ"</string>
- <string name="label_go_key" msgid="1635148082137219148">"ໄປ"</string>
- <string name="label_next_key" msgid="362972844525672568">"ຕໍ່ໄປ"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"ກ່ອນໜ້າ"</string>
- <string name="label_done_key" msgid="2441578748772529288">"ແລ້ວໆ"</string>
- <string name="label_send_key" msgid="2815056534433717444">"ສົ່ງ"</string>
- <string name="label_pause_key" msgid="181098308428035340">"ຄ້າງໄວ້"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"ລໍຖ້າ"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"ສຽບສາຍຫູຟັງເພື່ອຟັງລະຫັດຜ່ານ."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"ຂໍ້ຄວາມປະຈຸບັນແມ່ນ %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"ບໍ່ມີການໃສ່ຂໍ້ຄວາມ"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ເວລາ"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"ປຸ່ມປ້ອນຂໍ້ມູນດ້ວຍສຽງ"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"ແປ້ນພິມຫຼັກ"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"ໃນແປ້ນພິມສັນຍາລັກ"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"ປິດ"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"ໄມໃນແປ້ນພິມຫຼັກ"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"ໄມໃນແປ້ນພິມສັນຍາລັກ"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ການປ້ອນຂໍ້ມູນດ້ວຍສຽງປິດນຳໃຊ້ຢູ່"</string>
<string name="configure_input_method" msgid="373356270290742459">"ຕັ້ງຄ່າຮູບແບບການປ້ອນຂໍ້ມູນ"</string>
<string name="language_selection_title" msgid="1651299598555326750">"ພາສາການປ້ອນຂໍ້ມູນ"</string>
<string name="send_feedback" msgid="1780431884109392046">"ສົ່ງຄຳຕິຊົມ"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"ໂຕອັກສອນ (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"ໂຕອັກສອນ (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"ອີໂມຈິ"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"ຮູບແບບສີ"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"ສີຂາວ"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"ສີຟ້າ"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"ຮູບແບບການປ້ອນຂໍ້ມູນສ່ວນຕົວ"</string>
<string name="add_style" msgid="6163126614514489951">"ເພີ່ມຮູບແບບ"</string>
<string name="add" msgid="8299699805688017798">"ເພີ່ມ"</string>
diff --git a/java/res/values-lt/strings-action-keys.xml b/java/res/values-lt/strings-action-keys.xml
new file mode 100644
index 000000000..39b3894be
--- /dev/null
+++ b/java/res/values-lt/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Prad."</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Kitas"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Anks."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Atl."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Siųs."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pris."</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Lauk."</string>
+</resources>
diff --git a/java/res/values-lt/strings.xml b/java/res/values-lt/strings.xml
index 1cb84d00b..bf37143db 100644
--- a/java/res/values-lt/strings.xml
+++ b/java/res/values-lt/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinaminė slankioji peržiūra"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Gestikuliuojant peržiūrėti siūlomą žodį"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: išsaugota"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Pradėti"</string>
- <string name="label_next_key" msgid="362972844525672568">"Kitas"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Anks."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Atlikta"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Siųsti"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Prist."</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Lauk."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Prijunkite ausines, kad išgirstumėte sakomus slaptažodžio klavišus."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Dabartinis tekstas yra %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nėra įvesto teksto"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"laiko"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Įvesties balsu klavišas"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Pagr. klaviatūroje"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Simbolių klaviatūr."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Išjungta"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrof. pagr. klav."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrof. simb. klav."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Balso įv. neleidž."</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigūruoti įvesties metodus"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Įvesties kalbos"</string>
<string name="send_feedback" msgid="1780431884109392046">"Siųsti atsiliepimą"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Abėcėlė („Colemak“)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Abėcėlė (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Jaustukai"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Spalvų schema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Balta"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Mėlyna"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Pasirinkti įvesties stilių"</string>
<string name="add_style" msgid="6163126614514489951">"Prid. stilių"</string>
<string name="add" msgid="8299699805688017798">"Pridėti"</string>
diff --git a/java/res/values-lv/strings-action-keys.xml b/java/res/values-lv/strings-action-keys.xml
new file mode 100644
index 000000000..c2fbda26b
--- /dev/null
+++ b/java/res/values-lv/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Sākt"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Tālāk"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Iepr."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Gatavs"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Sūtīt"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauze"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Gaidīt"</string>
+</resources>
diff --git a/java/res/values-lv/strings.xml b/java/res/values-lv/strings.xml
index 221cc2e05..9afea26b8 100644
--- a/java/res/values-lv/strings.xml
+++ b/java/res/values-lv/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamisk. peldošais priekšsk."</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Skatiet ieteikto vārdu, veicot žestu."</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: saglabāts"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Sākt"</string>
- <string name="label_next_key" msgid="362972844525672568">"Tālāk"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Iepr."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Gatavs"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Sūtīt"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauze"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Gaidīt"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Pievienojiet austiņas, lai dzirdētu paroles rakstzīmes."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Pašreizējais teksts ir %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nav ievadīts teksts"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"laiks"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Balss ievades atslēga"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Uz galv. tastatūras"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Uz simbolu tastat."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Izslēgts"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikr.uz galv.tastat."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikr.uz simb.tastat."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Balss iev. atspējota"</string>
<string name="configure_input_method" msgid="373356270290742459">"Ievades metožu konfigurēšana"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Ievades valodas"</string>
<string name="send_feedback" msgid="1780431884109392046">"Sūtīt atsauksmes"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabēts (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabēts (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Japāņu emocijzīmes"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Krāsu shēma"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Balta"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Zila"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Pielāg. ievades stili"</string>
<string name="add_style" msgid="6163126614514489951">"Piev. stilu"</string>
<string name="add" msgid="8299699805688017798">"Pievienot"</string>
diff --git a/java/res/values-mk/strings-action-keys.xml b/java/res/values-mk/strings-action-keys.xml
new file mode 100644
index 000000000..40de51b00
--- /dev/null
+++ b/java/res/values-mk/strings-action-keys.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Оди"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Следно"</string>
+ <string name="label_previous_key" msgid="1211868118071386787">"Претходно"</string>
+ <string name="label_done_key" msgid="2441578748772529288">"Готово"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Испрати"</string>
+ <!-- no translation found for label_pause_key (181098308428035340) -->
+ <skip />
+ <!-- no translation found for label_wait_key (6402152600878093134) -->
+ <skip />
+</resources>
diff --git a/java/res/values-mk/strings.xml b/java/res/values-mk/strings.xml
new file mode 100644
index 000000000..1137fd09d
--- /dev/null
+++ b/java/res/values-mk/strings.xml
@@ -0,0 +1,443 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- no translation found for english_ime_input_options (3909945612939668554) -->
+ <skip />
+ <!-- no translation found for english_ime_research_log (8492602295696577851) -->
+ <skip />
+ <!-- no translation found for use_contacts_for_spellchecking_option_title (5374120998125353898) -->
+ <skip />
+ <!-- no translation found for use_contacts_for_spellchecking_option_summary (8754413382543307713) -->
+ <skip />
+ <!-- no translation found for vibrate_on_keypress (5258079494276955460) -->
+ <skip />
+ <!-- no translation found for sound_on_keypress (6093592297198243644) -->
+ <skip />
+ <!-- no translation found for popup_on_keypress (123894815723512944) -->
+ <skip />
+ <!-- no translation found for general_category (1859088467017573195) -->
+ <skip />
+ <!-- no translation found for correction_category (2236750915056607613) -->
+ <skip />
+ <!-- no translation found for gesture_typing_category (497263612130532630) -->
+ <skip />
+ <!-- no translation found for misc_category (6894192814868233453) -->
+ <skip />
+ <!-- no translation found for advanced_settings (362895144495591463) -->
+ <skip />
+ <!-- no translation found for advanced_settings_summary (4487980456152830271) -->
+ <skip />
+ <!-- no translation found for include_other_imes_in_language_switch_list (4533689960308565519) -->
+ <skip />
+ <!-- no translation found for include_other_imes_in_language_switch_list_summary (840637129103317635) -->
+ <skip />
+ <!-- no translation found for show_language_switch_key (5915478828318774384) -->
+ <skip />
+ <!-- no translation found for show_language_switch_key_summary (7343403647474265713) -->
+ <skip />
+ <!-- no translation found for sliding_key_input_preview (6604262359510068370) -->
+ <skip />
+ <!-- no translation found for sliding_key_input_preview_summary (6340524345729093886) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_delay (6213164897443068248) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_no_delay (2096123151571458064) -->
+ <skip />
+ <!-- no translation found for key_preview_popup_dismiss_default_delay (2166964333903906734) -->
+ <skip />
+ <!-- no translation found for abbreviation_unit_milliseconds (8700286094028323363) -->
+ <skip />
+ <!-- no translation found for settings_system_default (6268225104743331821) -->
+ <skip />
+ <!-- no translation found for use_contacts_dict (4435317977804180815) -->
+ <skip />
+ <!-- no translation found for use_contacts_dict_summary (6599983334507879959) -->
+ <skip />
+ <!-- no translation found for use_double_space_period (8781529969425082860) -->
+ <skip />
+ <!-- no translation found for use_double_space_period_summary (6532892187247952799) -->
+ <skip />
+ <!-- no translation found for auto_cap (1719746674854628252) -->
+ <skip />
+ <!-- no translation found for auto_cap_summary (7934452761022946874) -->
+ <skip />
+ <!-- no translation found for edit_personal_dictionary (3996910038952940420) -->
+ <skip />
+ <!-- no translation found for configure_dictionaries_title (4238652338556902049) -->
+ <skip />
+ <!-- no translation found for main_dictionary (4798763781818361168) -->
+ <skip />
+ <!-- no translation found for prefs_show_suggestions (8026799663445531637) -->
+ <skip />
+ <!-- no translation found for prefs_show_suggestions_summary (1583132279498502825) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_show_name (3219916594067551303) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_show_only_portrait_name (3859783767435239118) -->
+ <skip />
+ <!-- no translation found for prefs_suggestion_visibility_hide_name (6309143926422234673) -->
+ <skip />
+ <!-- no translation found for prefs_block_potentially_offensive_title (5078480071057408934) -->
+ <skip />
+ <!-- no translation found for prefs_block_potentially_offensive_summary (2371835479734991364) -->
+ <skip />
+ <!-- no translation found for auto_correction (7630720885194996950) -->
+ <skip />
+ <!-- no translation found for auto_correction_summary (5625751551134658006) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_off (8470882665417944026) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_modest (8788366690620799097) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_aggressive (7319007299148899623) -->
+ <skip />
+ <!-- no translation found for auto_correction_threshold_mode_very_aggressive (1853309024129480416) -->
+ <skip />
+ <!-- no translation found for bigram_prediction (1084449187723948550) -->
+ <skip />
+ <!-- no translation found for bigram_prediction_summary (3896362682751109677) -->
+ <skip />
+ <!-- no translation found for gesture_input (826951152254563827) -->
+ <skip />
+ <!-- no translation found for gesture_input_summary (9180350639305731231) -->
+ <skip />
+ <!-- no translation found for gesture_preview_trail (3802333369335722221) -->
+ <skip />
+ <!-- no translation found for gesture_floating_preview_text (4443240334739381053) -->
+ <skip />
+ <!-- no translation found for gesture_floating_preview_text_summary (4472696213996203533) -->
+ <skip />
+ <!-- no translation found for added_word (8993883354622484372) -->
+ <skip />
+ <!-- no translation found for spoken_use_headphones (896961781287283493) -->
+ <skip />
+ <!-- no translation found for spoken_current_text_is (2485723011272583845) -->
+ <skip />
+ <!-- no translation found for spoken_no_text_entered (7479685225597344496) -->
+ <skip />
+ <!-- no translation found for spoken_auto_correct (8005997889020109763) -->
+ <skip />
+ <!-- no translation found for spoken_auto_correct_obscured (6276420476908833791) -->
+ <skip />
+ <!-- no translation found for spoken_description_unknown (3197434010402179157) -->
+ <skip />
+ <!-- no translation found for spoken_description_shift (244197883292549308) -->
+ <skip />
+ <!-- no translation found for spoken_description_shift_shifted (1681877323344195035) -->
+ <skip />
+ <!-- no translation found for spoken_description_caps_lock (3276478269526304432) -->
+ <skip />
+ <!-- no translation found for spoken_description_delete (8740376944276199801) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_symbol (5486340107500448969) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_alpha (23129338819771807) -->
+ <skip />
+ <!-- no translation found for spoken_description_to_numeric (591752092685161732) -->
+ <skip />
+ <!-- no translation found for spoken_description_settings (4627462689603838099) -->
+ <skip />
+ <!-- no translation found for spoken_description_tab (2667716002663482248) -->
+ <skip />
+ <!-- no translation found for spoken_description_space (2582521050049860859) -->
+ <skip />
+ <!-- no translation found for spoken_description_mic (615536748882611950) -->
+ <skip />
+ <!-- no translation found for spoken_description_smiley (2256309826200113918) -->
+ <skip />
+ <!-- no translation found for spoken_description_return (8178083177238315647) -->
+ <skip />
+ <!-- no translation found for spoken_description_search (1247236163755920808) -->
+ <skip />
+ <!-- no translation found for spoken_description_dot (40711082435231673) -->
+ <skip />
+ <!-- no translation found for spoken_description_language_switch (5507091328222331316) -->
+ <skip />
+ <!-- no translation found for spoken_description_action_next (8636078276664150324) -->
+ <skip />
+ <!-- no translation found for spoken_description_action_previous (800872415009336208) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_on (5700440798609574589) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_locked (593175803181701830) -->
+ <skip />
+ <!-- no translation found for spoken_description_shiftmode_off (657219998449174808) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_symbol (7183343879909747642) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_alpha (3528307674390156956) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_phone (6520207943132026264) -->
+ <skip />
+ <!-- no translation found for spoken_description_mode_phone_shift (5499629753962641227) -->
+ <skip />
+ <!-- no translation found for announce_keyboard_hidden (8718927835531429807) -->
+ <skip />
+ <!-- no translation found for announce_keyboard_mode (4729081055438508321) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_date (3137520166817128102) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_date_time (339593358488851072) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_email (6216248078128294262) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_im (1137405089766557048) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_number (7991623440699957069) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_phone (6851627527401433229) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_text (6479436687899701619) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_time (4381856885582143277) -->
+ <skip />
+ <!-- no translation found for keyboard_mode_url (1519819835514911218) -->
+ <skip />
+ <!-- no translation found for voice_input (3583258583521397548) -->
+ <skip />
+ <!-- no translation found for configure_input_method (373356270290742459) -->
+ <skip />
+ <!-- no translation found for language_selection_title (1651299598555326750) -->
+ <skip />
+ <!-- no translation found for send_feedback (1780431884109392046) -->
+ <skip />
+ <!-- no translation found for select_language (3693815588777926848) -->
+ <skip />
+ <!-- no translation found for hint_add_to_dictionary (573678656946085380) -->
+ <skip />
+ <!-- no translation found for has_dictionary (6071847973466625007) -->
+ <skip />
+ <!-- no translation found for prefs_enable_log (6620424505072963557) -->
+ <skip />
+ <!-- no translation found for prefs_description_log (7525225584555429211) -->
+ <skip />
+ <!-- no translation found for keyboard_layout (8451164783510487501) -->
+ <skip />
+ <!-- no translation found for subtype_en_GB (88170601942311355) -->
+ <skip />
+ <!-- no translation found for subtype_en_US (6160452336634534239) -->
+ <skip />
+ <!-- no translation found for subtype_es_US (5583145191430180200) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_en_GB (2179097748724725906) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_en_US (1362581347576714579) -->
+ <skip />
+ <!-- no translation found for subtype_with_layout_es_US (6261791057007890189) -->
+ <skip />
+ <!-- no translation found for subtype_nepali_traditional (9032247506728040447) -->
+ <skip />
+ <!-- no translation found for subtype_no_language (7137390094240139495) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_qwerty (244337630616742604) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_qwertz (443066912507547976) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_azerty (8144348527575640087) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_dvorak (1564494667584718094) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_colemak (5837418400010302623) -->
+ <skip />
+ <!-- no translation found for subtype_no_language_pcqwerty (5354918232046200018) -->
+ <skip />
+ <!-- no translation found for subtype_emoji (7483586578074549196) -->
+ <skip />
+ <!-- no translation found for custom_input_styles_title (8429952441821251512) -->
+ <skip />
+ <!-- no translation found for add_style (6163126614514489951) -->
+ <skip />
+ <!-- no translation found for add (8299699805688017798) -->
+ <skip />
+ <!-- no translation found for remove (4486081658752944606) -->
+ <skip />
+ <!-- no translation found for save (7646738597196767214) -->
+ <skip />
+ <!-- no translation found for subtype_locale (8576443440738143764) -->
+ <skip />
+ <!-- no translation found for keyboard_layout_set (4309233698194565609) -->
+ <skip />
+ <!-- no translation found for custom_input_style_note_message (8826731320846363423) -->
+ <skip />
+ <!-- no translation found for enable (5031294444630523247) -->
+ <skip />
+ <!-- no translation found for not_now (6172462888202790482) -->
+ <skip />
+ <!-- no translation found for custom_input_style_already_exists (8008728952215449707) -->
+ <skip />
+ <!-- no translation found for prefs_usability_study_mode (1261130555134595254) -->
+ <skip />
+ <!-- no translation found for prefs_key_longpress_timeout_settings (6102240298932897873) -->
+ <skip />
+ <!-- no translation found for prefs_keypress_vibration_duration_settings (7918341459947439226) -->
+ <skip />
+ <!-- no translation found for prefs_keypress_sound_volume_settings (6027007337036891623) -->
+ <skip />
+ <!-- no translation found for prefs_read_external_dictionary (2588931418575013067) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_no_files_message (4947420942224623792) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_multiple_files_title (7637749044265808628) -->
+ <skip />
+ <!-- no translation found for read_external_dictionary_confirm_install_message (6898610163768980870) -->
+ <skip />
+ <!-- no translation found for error (8940763624668513648) -->
+ <skip />
+ <!-- no translation found for button_default (3988017840431881491) -->
+ <skip />
+ <!-- no translation found for setup_welcome_title (6112821709832031715) -->
+ <skip />
+ <!-- no translation found for setup_welcome_additional_description (8150252008545768953) -->
+ <skip />
+ <!-- no translation found for setup_start_action (8936036460897347708) -->
+ <skip />
+ <!-- no translation found for setup_next_action (371821437915144603) -->
+ <skip />
+ <!-- no translation found for setup_steps_title (6400373034871816182) -->
+ <skip />
+ <!-- no translation found for setup_step1_title (3147967630253462315) -->
+ <skip />
+ <!-- no translation found for setup_step1_instruction (2578631936624637241) -->
+ <skip />
+ <!-- no translation found for setup_step1_finished_instruction (10761482004957994) -->
+ <skip />
+ <!-- no translation found for setup_step1_action (4366513534999901728) -->
+ <skip />
+ <!-- no translation found for setup_step2_title (6860725447906690594) -->
+ <skip />
+ <!-- no translation found for setup_step2_instruction (9141481964870023336) -->
+ <skip />
+ <!-- no translation found for setup_step2_action (1660330307159824337) -->
+ <skip />
+ <!-- no translation found for setup_step3_title (3154757183631490281) -->
+ <skip />
+ <!-- no translation found for setup_step3_instruction (8025981829605426000) -->
+ <skip />
+ <!-- no translation found for setup_step3_action (600879797256942259) -->
+ <skip />
+ <!-- no translation found for setup_finish_action (276559243409465389) -->
+ <skip />
+ <!-- no translation found for show_setup_wizard_icon (5008028590593710830) -->
+ <skip />
+ <!-- no translation found for show_setup_wizard_icon_summary (4119998322536880213) -->
+ <skip />
+ <!-- no translation found for app_name (6320102637491234792) -->
+ <skip />
+ <!-- no translation found for dictionary_provider_name (3027315045397363079) -->
+ <skip />
+ <!-- no translation found for dictionary_service_name (6237472350693511448) -->
+ <skip />
+ <!-- no translation found for download_description (6014835283119198591) -->
+ <skip />
+ <!-- no translation found for dictionary_settings_title (8091417676045693313) -->
+ <skip />
+ <!-- no translation found for dictionary_install_over_metered_network_prompt (3587517870006332980) -->
+ <skip />
+ <!-- no translation found for dictionary_settings_summary (5305694987799824349) -->
+ <skip />
+ <!-- no translation found for user_dictionaries (3582332055892252845) -->
+ <skip />
+ <!-- no translation found for default_user_dict_pref_name (1625055720489280530) -->
+ <skip />
+ <!-- no translation found for dictionary_available (4728975345815214218) -->
+ <skip />
+ <!-- no translation found for dictionary_downloading (2982650524622620983) -->
+ <skip />
+ <!-- no translation found for dictionary_installed (8081558343559342962) -->
+ <skip />
+ <!-- no translation found for dictionary_disabled (8950383219564621762) -->
+ <skip />
+ <!-- no translation found for cannot_connect_to_dict_service (9216933695765732398) -->
+ <skip />
+ <!-- no translation found for no_dictionaries_available (8039920716566132611) -->
+ <skip />
+ <!-- no translation found for check_for_updates_now (8087688440916388581) -->
+ <skip />
+ <!-- no translation found for last_update (730467549913588780) -->
+ <skip />
+ <!-- no translation found for message_updating (4457761393932375219) -->
+ <skip />
+ <!-- no translation found for message_loading (8689096636874758814) -->
+ <skip />
+ <!-- no translation found for main_dict_description (3072821352793492143) -->
+ <skip />
+ <!-- no translation found for cancel (6830980399865683324) -->
+ <skip />
+ <!-- no translation found for install_dict (180852772562189365) -->
+ <skip />
+ <!-- no translation found for cancel_download_dict (7843340278507019303) -->
+ <skip />
+ <!-- no translation found for delete_dict (756853268088330054) -->
+ <skip />
+ <!-- no translation found for should_download_over_metered_prompt (2878629598667658845) -->
+ <skip />
+ <!-- no translation found for download_over_metered (1643065851159409546) -->
+ <skip />
+ <!-- no translation found for do_not_download_over_metered (2176209579313941583) -->
+ <skip />
+ <!-- no translation found for dict_available_notification_title (6514288591959117288) -->
+ <skip />
+ <!-- no translation found for dict_available_notification_description (1075194169443163487) -->
+ <skip />
+ <!-- no translation found for toast_downloading_suggestions (1313027353588566660) -->
+ <skip />
+ <!-- no translation found for version_text (2715354215568469385) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_menu_title (1254195365689387076) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_title (4096700390211748168) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_screen_title (5818914331629278758) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_more_options (5671682004887093112) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_less_options (2716586567241724126) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_dialog_confirm (4703129507388332950) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_word_option_name (6665558053408962865) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_shortcut_option_name (3094731590655523777) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_locale_option_name (4738643440987277705) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_word_hint (4902434148985906707) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_add_shortcut_hint (2265453012555060178) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_edit_dialog_title (3765774633869590352) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_context_menu_edit_title (6812255903472456302) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_context_menu_delete_title (8142932447689461181) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_empty_text (558499587532668203) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_all_languages (8276126583216298886) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_more_languages (7131268499685180461) -->
+ <skip />
+ <!-- no translation found for user_dict_settings_delete (110413335187193859) -->
+ <skip />
+ <!-- no translation found for user_dict_fast_scroll_alphabet (5431919401558285473) -->
+ <skip />
+</resources>
diff --git a/java/res/values-mn-rMN/strings-action-keys.xml b/java/res/values-mn-rMN/strings-action-keys.xml
new file mode 100644
index 000000000..77b8f2c05
--- /dev/null
+++ b/java/res/values-mn-rMN/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Очих"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Дараах"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Өмнөх"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Дууссан"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Илгээх"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Түр зогсоох"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Хүлээх"</string>
+</resources>
diff --git a/java/res/values-mn-rMN/strings.xml b/java/res/values-mn-rMN/strings.xml
index 5633cf8cf..4b36f03d6 100644
--- a/java/res/values-mn-rMN/strings.xml
+++ b/java/res/values-mn-rMN/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамик хөвөгчөөр урьдчилан харах"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Зангах явцад санал болгож буй үгийг харах"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Хадгалагдсан"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Явах"</string>
- <string name="label_next_key" msgid="362972844525672568">"Дараах"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Өмнөх"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Дууссан"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Илгээх"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауз"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Хүлээх"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Нууц үгний товчнуудыг чангаар уншихыг сонсохын тулд чихэвчээ залгана уу."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Одоогийн текст %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Текст оруулаагүй"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"цаг"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Дуун оруулгын товч"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Үндсэн гар дээр"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Симбол гар дээр"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Идэвхгүй"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Мик үндсэн гар дээр"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Мик симбол гар дээр"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Дуун оруулах идэвхгүйжсэн"</string>
<string name="configure_input_method" msgid="373356270290742459">"Оруулах аргуудын тохиргоо"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Оруулах хэл"</string>
<string name="send_feedback" msgid="1780431884109392046">"Санал хүсэлт илгээх"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Цагаан толгой (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Цагаан толгой (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Инээмсэглэл"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Өнгөний схем"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Цагаан"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Хөх"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Өөрийн оруулах загвар"</string>
<string name="add_style" msgid="6163126614514489951">"Загвар нэмэх"</string>
<string name="add" msgid="8299699805688017798">"Нэмэх"</string>
diff --git a/java/res/values-mn/strings.xml b/java/res/values-mn/strings.xml
deleted file mode 100644
index 4a612040e..000000000
--- a/java/res/values-mn/strings.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_input_options" msgid="3909945612939668554">"Оруулах сонголтууд"</string>
- <string name="english_ime_research_log" msgid="8492602295696577851">"Судалгааны протоколын командууд"</string>
- <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"Харилцагчийн нэр хайх"</string>
- <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"Алдаа шалгагч нь таны харилцагчдын жагсаалтаас ашиглана"</string>
- <string name="vibrate_on_keypress" msgid="5258079494276955460">"Товч дарахад чичрэх"</string>
- <string name="sound_on_keypress" msgid="6093592297198243644">"Товч дарахад дуу гаргах"</string>
- <string name="popup_on_keypress" msgid="123894815723512944">"Товч дарахад попап гарна"</string>
- <string name="general_category" msgid="1859088467017573195">"Ерөнхий"</string>
- <string name="correction_category" msgid="2236750915056607613">"Текст залруулалт"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"Зангаагаар бичих"</string>
- <string name="misc_category" msgid="6894192814868233453">"Бусад сонголтууд"</string>
- <string name="advanced_settings" msgid="362895144495591463">"Дэлгэрэнгүй тохиргоо"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"Экспертүүдэд зориулсан тохиргоо"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Оруулах өөр арга руу шилжүүлэх"</string>
- <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Хэл солих түлхүүрт өөр оруулах аргууд мөн багтсан байгаа"</string>
- <string name="show_language_switch_key" msgid="5915478828318774384">"Хэл солих товч"</string>
- <string name="show_language_switch_key_summary" msgid="7343403647474265713">"Оруулах хэл олныг идэвхжүүлсэн үед харуулах"</string>
- <string name="sliding_key_input_preview" msgid="6604262359510068370">"Гулсалт заагчийг харуулах"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Сэлгэх буюу Симбол товчуудаас гулсах үед нүдэнд харагдуулах"</string>
- <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Товчны попап арилах хугацаа"</string>
- <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Хүлээхгүй"</string>
- <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Үндсэн"</string>
- <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g>мс"</string>
- <string name="settings_system_default" msgid="6268225104743331821">"Системийн үндсэн утга"</string>
- <string name="use_contacts_dict" msgid="4435317977804180815">"Харилцагчдын нэрс санал болгох"</string>
- <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Санал болгох, залруулахда Харилцагчдын нэрсээс ашиглах"</string>
- <string name="use_double_space_period" msgid="8781529969425082860">"Давхар зайтай цэг"</string>
- <string name="use_double_space_period_summary" msgid="6532892187247952799">"Ардаа зайтай цэг оруулахын тулд Зай авах дээр давхар товшино уу"</string>
- <string name="auto_cap" msgid="1719746674854628252">"Автоматаар томруулах"</string>
- <string name="auto_cap_summary" msgid="7934452761022946874">"Өгүүлбэр бүрийн эхний үгийн эхний үсгийг томруулах"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"Хувийн толь бичиг"</string>
- <string name="configure_dictionaries_title" msgid="4238652338556902049">"Нэмэлт толь бичгүүд"</string>
- <string name="main_dictionary" msgid="4798763781818361168">"Үндсэн толь бичиг"</string>
- <string name="prefs_show_suggestions" msgid="8026799663445531637">"Залруулах санал болголтуудыг харуулах"</string>
- <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"Бичих явцад санал болгосон үгсийг харуулах"</string>
- <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"Байнга харуулах"</string>
- <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"Босоо горимд харуулах"</string>
- <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"Байнга нуух"</string>
- <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"Доромжилсон үгсийг хаах"</string>
- <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"Доромжилсон үгсийг санал болгохгүй байх"</string>
- <string name="auto_correction" msgid="7630720885194996950">"Авто-залруулга"</string>
- <string name="auto_correction_summary" msgid="5625751551134658006">"Хоосон зай болон цэг таслал нь буруу бичсэн үгсийг автоматаар залруулна"</string>
- <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"Идэвхгүй"</string>
- <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"Хүлээцтэй"</string>
- <string name="auto_correction_threshold_mode_aggressive" msgid="7319007299148899623">"Хүчтэй"</string>
- <string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"Маш хүчтэй"</string>
- <string name="bigram_prediction" msgid="1084449187723948550">"Дараагийн-үг санал болгох"</string>
- <string name="bigram_prediction_summary" msgid="3896362682751109677">"Өмнөх үгийг үг санал болгоход ашиглах"</string>
- <string name="gesture_input" msgid="826951152254563827">"Зангаагаар бичихийг идэвхжүүлэх"</string>
- <string name="gesture_input_summary" msgid="9180350639305731231">"Үсгүүд дээр гулсуулах замаар үг оруулах"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"Зангасан мөрийг харуулах"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамик хөвөгчөөр урьдчилан харах"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Зангах явцад санал болгож буй үгийг харах"</string>
- <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Хадгалагдсан"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Явах"</string>
- <string name="label_next_key" msgid="362972844525672568">"Дараах"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Өмнөх"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Дууссан"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Илгээх"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауз"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Хүлээх"</string>
- <string name="spoken_use_headphones" msgid="896961781287283493">"Нууц үгний товчнуудыг чангаар уншихыг сонсохын тулд чихэвчээ залгана уу."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"Одоогийн текст %s"</string>
- <string name="spoken_no_text_entered" msgid="7479685225597344496">"Текст оруулаагүй"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"Товчийн код %d"</string>
- <string name="spoken_description_shift" msgid="244197883292549308">"Сэлгэх"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Сэлгэхийг идэвхжүүлсэн (товшиж идэвхгүйжүүлнэ үү)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Томоор бичихийг асаасан (товшиж идэвхгүйжүүлнэ үү)"</string>
- <string name="spoken_description_delete" msgid="8740376944276199801">"Устгах"</string>
- <string name="spoken_description_to_symbol" msgid="5486340107500448969">"Симбол"</string>
- <string name="spoken_description_to_alpha" msgid="23129338819771807">"Үсэгнүүд"</string>
- <string name="spoken_description_to_numeric" msgid="591752092685161732">"Тоонууд"</string>
- <string name="spoken_description_settings" msgid="4627462689603838099">"Тохиргоо"</string>
- <string name="spoken_description_tab" msgid="2667716002663482248">"Таб"</string>
- <string name="spoken_description_space" msgid="2582521050049860859">"Хоосон зай"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"Дуугаар оруулах"</string>
- <string name="spoken_description_smiley" msgid="2256309826200113918">"Инээсэн царай"</string>
- <string name="spoken_description_return" msgid="8178083177238315647">"Буцах"</string>
- <string name="spoken_description_search" msgid="1247236163755920808">"Хайх"</string>
- <string name="spoken_description_dot" msgid="40711082435231673">"Цэг"</string>
- <string name="spoken_description_language_switch" msgid="5507091328222331316">"Хэл солих"</string>
- <string name="spoken_description_action_next" msgid="8636078276664150324">"Дараах"</string>
- <string name="spoken_description_action_previous" msgid="800872415009336208">"Өмнөх"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Сэлгэхийг идэвхжүүлсэн"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Томоор бичихийг идэвхжүүлсэн"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Сэлгэхийг идэвхжүүлээгүй"</string>
- <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"Симбол төлөв"</string>
- <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"Үсэгнүүд төлөв"</string>
- <string name="spoken_description_mode_phone" msgid="6520207943132026264">"Утасны төлөв"</string>
- <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"Утасны символ төлөв"</string>
- <string name="announce_keyboard_hidden" msgid="8718927835531429807">"Гарыг нуусан"</string>
- <string name="announce_keyboard_mode" msgid="4729081055438508321">"<xliff:g id="MODE">%s</xliff:g> гарыг харуулж байна"</string>
- <string name="keyboard_mode_date" msgid="3137520166817128102">"огноо"</string>
- <string name="keyboard_mode_date_time" msgid="339593358488851072">"огноо болон цаг"</string>
- <string name="keyboard_mode_email" msgid="6216248078128294262">"имэйл"</string>
- <string name="keyboard_mode_im" msgid="1137405089766557048">"зурвас"</string>
- <string name="keyboard_mode_number" msgid="7991623440699957069">"дугаар"</string>
- <string name="keyboard_mode_phone" msgid="6851627527401433229">"утас"</string>
- <string name="keyboard_mode_text" msgid="6479436687899701619">"текст"</string>
- <string name="keyboard_mode_time" msgid="4381856885582143277">"цаг"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"Дуун оруулгын товч"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Үндсэн гар дээр"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Симбол гар дээр"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Хаах"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Мик үндсэн гар дээр"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Мик симбол гар дээр"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Дуун оруулах идэвхгүйжсэн"</string>
- <string name="configure_input_method" msgid="373356270290742459">"Оруулах аргуудын тохиргоо"</string>
- <string name="language_selection_title" msgid="1651299598555326750">"Оруулах хэл"</string>
- <string name="send_feedback" msgid="1780431884109392046">"Санал хүсэл илгээх"</string>
- <string name="select_language" msgid="3693815588777926848">"Оруулах хэл"</string>
- <string name="hint_add_to_dictionary" msgid="573678656946085380">"Хадгалахын тулд дахин хүрнэ үү"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"Толь бичиг байна"</string>
- <string name="prefs_enable_log" msgid="6620424505072963557">"Хэрэглэгчийн санал хүсэлтийг идэвхжүүлэх"</string>
- <string name="prefs_description_log" msgid="7525225584555429211">"Ашиглалтын статистик болон гацалтын репортуудыг автоматаар илгээснээр энэ оруулах арга засагчийг сайжруулахад туслаарай"</string>
- <string name="keyboard_layout" msgid="8451164783510487501">"Гарын загвар"</string>
- <string name="subtype_en_GB" msgid="88170601942311355">"Англи (ИБ)"</string>
- <string name="subtype_en_US" msgid="6160452336634534239">"Англи (АНУ)"</string>
- <string name="subtype_es_US" msgid="5583145191430180200">"Испани (АНУ)"</string>
- <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"Англи (ИБ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"Англи (АНУ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"Испани (АНУ) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_no_language" msgid="7137390094240139495">"Хэл байхгүй (Цагаан толгой)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Цагаан толгой (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Цагаан толгой (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"Цагаан толгой (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"Цагаан толгой (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"Цагаан толгой (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Цагаан толгой (PC)"</string>
- <string name="custom_input_styles_title" msgid="8429952441821251512">"Өөрийн оруулах загвар"</string>
- <string name="add_style" msgid="6163126614514489951">"Загвар нэмэх"</string>
- <string name="add" msgid="8299699805688017798">"Нэмэх"</string>
- <string name="remove" msgid="4486081658752944606">"Устгах"</string>
- <string name="save" msgid="7646738597196767214">"Хадгалах"</string>
- <string name="subtype_locale" msgid="8576443440738143764">"Хэл"</string>
- <string name="keyboard_layout_set" msgid="4309233698194565609">"Байршил"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Та өөрийн оруулах загварыг ашиглахаас өмнө идэвхжүүлэх шаардлагатай. Одоо идэвхжүүлэх үү?"</string>
- <string name="enable" msgid="5031294444630523247">"Идэвхжүүлэх"</string>
- <string name="not_now" msgid="6172462888202790482">"Одоо биш"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Ижилхэн оруулах загвар байна: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
- <string name="prefs_usability_study_mode" msgid="1261130555134595254">"Ашиглалтын судалгааны горим"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Товч удаан дарах хугацааны тохиргоо"</string>
- <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Товч дарах чичиргээний хугацаа"</string>
- <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Товчны дууны хэмжээ"</string>
- <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Толь бичгийн гадны файлыг унших"</string>
- <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"Татаж авсан фолдерт толь бичгийн файл байхгүй байна"</string>
- <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"Суулгах толь бичгийн файлыг сонгоно уу"</string>
- <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"<xliff:g id="LOCALE_NAME">%s</xliff:g>-д зориулсан энэ файлыг үнэхээр суулгах уу?"</string>
- <string name="error" msgid="8940763624668513648">"Алдаа гарсан"</string>
- <string name="button_default" msgid="3988017840431881491">"Үндсэн"</string>
- <string name="setup_welcome_title" msgid="6112821709832031715">"Та <xliff:g id="APPLICATION_NAME">%s</xliff:g>-д тавтай морилно уу"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"Зангаагаар бичихээр"</string>
- <string name="setup_start_action" msgid="8936036460897347708">"Эхлүүлэх"</string>
- <string name="setup_next_action" msgid="371821437915144603">"Дараагийн алхам"</string>
- <string name="setup_steps_title" msgid="6400373034871816182">"<xliff:g id="APPLICATION_NAME">%s</xliff:g>-г тохируулж байна"</string>
- <string name="setup_step1_title" msgid="3147967630253462315">"<xliff:g id="APPLICATION_NAME">%s</xliff:g>-г идэвхжүүлэх"</string>
- <string name="setup_step1_instruction" msgid="2578631936624637241">"Өөрийн Хэл &amp; оруулах тохиргоон дотроос \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\"-г сонгоно уу. Ингэснээр таны төхөөрөмж дээр ажиллах зөвшөөрлийг өгөх болно."</string>
- <string name="setup_step1_finished_instruction" msgid="10761482004957994">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> таны Хэл &amp;amp оруулах тохиргоонд аль хэдийн идэвхжүүлсэн байгаа учир энэ алхам хийгдсэн. Дараагийн алхам руу!"</string>
- <string name="setup_step1_action" msgid="4366513534999901728">"Тохиргоо дотроос идэвхжүүлэх"</string>
- <string name="setup_step2_title" msgid="6860725447906690594">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> рүү шилжих"</string>
- <string name="setup_step2_instruction" msgid="9141481964870023336">"Дараа нь \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\"-г өөрийн идэвхтэй текст-оруулах аргаар сонгоно уу."</string>
- <string name="setup_step2_action" msgid="1660330307159824337">"Оруулах аргыг солих"</string>
- <string name="setup_step3_title" msgid="3154757183631490281">"Баяр хүргэе, та бүгдийг нь тохируулчихлаа!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"Та одоо өөрийн дуртай апп-ууд дотроо <xliff:g id="APPLICATION_NAME">%s</xliff:g> ашиглан бичих болохоор боллоо."</string>
- <string name="setup_step3_action" msgid="600879797256942259">"Нэмэлт хэлнүүдийг тохируулах"</string>
- <string name="setup_finish_action" msgid="276559243409465389">"Дууссан"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"Апп дүрсийг харуулах"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Эхлүүлэгч дээр аппликешний дүрсийг харуулах"</string>
- <string name="app_name" msgid="6320102637491234792">"Толь бичгээг хангагч"</string>
- <string name="dictionary_provider_name" msgid="3027315045397363079">"Толь бичгээг хангагч"</string>
- <string name="dictionary_service_name" msgid="6237472350693511448">"Толь бичгийн үйлчилгээ"</string>
- <string name="download_description" msgid="6014835283119198591">"Толь бичгийн шинэчлэлтийн мэдээлэл"</string>
- <string name="dictionary_settings_title" msgid="8091417676045693313">"Нэмэлт толь бичгүүд"</string>
- <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Толь бичиг байна"</string>
- <string name="dictionary_settings_summary" msgid="5305694987799824349">"Толь бичгийн тохиргоо"</string>
- <string name="user_dictionaries" msgid="3582332055892252845">"Хэрэглэгчийн толь бичиг"</string>
- <string name="default_user_dict_pref_name" msgid="1625055720489280530">"Хэрэглэгчийн толь"</string>
- <string name="dictionary_available" msgid="4728975345815214218">"Толь бичиг байна"</string>
- <string name="dictionary_downloading" msgid="2982650524622620983">"Одоо татаж байна"</string>
- <string name="dictionary_installed" msgid="8081558343559342962">"Суулгасан"</string>
- <string name="dictionary_disabled" msgid="8950383219564621762">"Суулгасан, идэвхгүйжүүлсэн"</string>
- <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"Толь бичгийн үйлчилгээнд холбогдоход алдаа гарлаа"</string>
- <string name="no_dictionaries_available" msgid="8039920716566132611">"Толь бичиг байхгүй"</string>
- <string name="check_for_updates_now" msgid="8087688440916388581">"Дахин ачаалах"</string>
- <string name="last_update" msgid="730467549913588780">"Сүүлд шинэчлэгдсэн"</string>
- <string name="message_updating" msgid="4457761393932375219">"Шинэчлэлтийг шалгаж байна"</string>
- <string name="message_loading" msgid="8689096636874758814">"Ачаалж байна..."</string>
- <string name="main_dict_description" msgid="3072821352793492143">"Үндсэн толь бичиг"</string>
- <string name="cancel" msgid="6830980399865683324">"Цуцлах"</string>
- <string name="install_dict" msgid="180852772562189365">"Суулгах"</string>
- <string name="cancel_download_dict" msgid="7843340278507019303">"Цуцлах"</string>
- <string name="delete_dict" msgid="756853268088330054">"Устгах"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"Таны мобайль төхөөрөмж дээр сонгосон хэлэнд толь бичиг байна.&lt;br/&gt; Тус  <xliff:g id="LANGUAGE">%1$s</xliff:g> толь бичгийг &lt;b&gt;татаж аван&lt;/b&gt; зөв бичилтээ сайжруулахыг бид зөвлөж байна.&lt;br/&gt; &lt;br/&gt; Татаж авахад 3G сүлжээгээр нэг хоёр минут болно. Танд &lt;b&gt;хязгааргүй дата эрх&lt;/b&gt; байхгүй бол нэмэлт төлбөр гарч болно.&lt;br/&gt; Та дата эрхийнхээ талаар сайн мэдэхгүй байгаа бол Wi-Fi холболттой газар очин автоматаар татаж авахыг зөвлөж байна.&lt;br/&gt; &lt;br/&gt; Зөвлөмж: Та өөрийн мобайль төхөөрөмжийн &lt;b&gt;Тохиргоо&lt;/b&gt; цэсний &lt;b&gt;Хэл &amp; оруулах&lt;/b&gt; руу очиж толь бичиг татаж авах буюу устгаж болно."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"Одоо татах (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>MB)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"Wi-Fi-р татаж авах"</string>
- <string name="dict_available_notification_title" msgid="6514288591959117288">"<xliff:g id="LANGUAGE">%1$s</xliff:g> хэлний толь бичигтэй"</string>
- <string name="dict_available_notification_description" msgid="1075194169443163487">"Шалгах болон татаж авахын тулд дарна уу"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Татаж байна: <xliff:g id="LANGUAGE">%1$s</xliff:g> хэлний санал болгох үгс удахгүй бэлэн болно."</string>
- <string name="version_text" msgid="2715354215568469385">"Хувилбар <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
- <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Нэмэх"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Толь бичигт нэмэх"</string>
- <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"Хэллэг"</string>
- <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"Илүү сонголтууд"</string>
- <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"Цөөн сонголт"</string>
- <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"Тийм"</string>
- <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"Үг:"</string>
- <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"Товчилбор:"</string>
- <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"Хэл:"</string>
- <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"Үг оруулна уу"</string>
- <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"Зайлшгүй биш товчилбор"</string>
- <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"Үг засах"</string>
- <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"Засах"</string>
- <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"Устгах"</string>
- <string name="user_dict_settings_empty_text" msgid="558499587532668203">"Таны хэрэглэгчийн толинд ямар ч үг алга байна. Нэмэх (+) товчинд хүрэн үг нэмнэ үү."</string>
- <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"Бүх хэлэнд"</string>
- <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"Өөр хэлүүд…"</string>
- <string name="user_dict_settings_delete" msgid="110413335187193859">"Устгах"</string>
- <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
-</resources>
diff --git a/java/res/values-ms/bools.xml b/java/res/values-ms-rMY/bools.xml
index 840d20c21..840d20c21 100644
--- a/java/res/values-ms/bools.xml
+++ b/java/res/values-ms-rMY/bools.xml
diff --git a/java/res/values-ms-rMY/strings-action-keys.xml b/java/res/values-ms-rMY/strings-action-keys.xml
new file mode 100644
index 000000000..f1a75d2ef
--- /dev/null
+++ b/java/res/values-ms-rMY/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Pergi"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Slps"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Sblm"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Siap"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Hntr"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Jeda"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Tggu"</string>
+</resources>
diff --git a/java/res/values-ms-rMY/strings.xml b/java/res/values-ms-rMY/strings.xml
index 41bb9f80c..d3ab3f97c 100644
--- a/java/res/values-ms-rMY/strings.xml
+++ b/java/res/values-ms-rMY/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Pratonton terapung dinamik"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Lihat perkataan yang dicadangkan semasa membuat gerak isyarat"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Disimpan"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Pergi"</string>
- <string name="label_next_key" msgid="362972844525672568">"Seterusnya"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Sblm"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Selesai"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Hantar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Jeda"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Tunggu"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Pasangkan set kepala untuk mendengar kekunci kata laluan disebut dengan kuat."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Teks semasa adalah %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Tiada teks dimasukkan"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"masa"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Kunci input suara"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Pada papan kekunci utama"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Pada papan kekunci simbol"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Dimati"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon pada papan kekunci utama"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofon pada papan kekunci simbol"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Input suara dilmphkn"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurasikan kaedah input"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Bahasa input"</string>
<string name="send_feedback" msgid="1780431884109392046">"Hantar maklum balas"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Abjad (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Abjad (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Skim warna"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Putih"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Biru"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Gaya input peribadi"</string>
<string name="add_style" msgid="6163126614514489951">"Tambah gaya"</string>
<string name="add" msgid="8299699805688017798">"Tambah"</string>
diff --git a/java/res/values-ms/strings.xml b/java/res/values-ms/strings.xml
deleted file mode 100644
index df30627aa..000000000
--- a/java/res/values-ms/strings.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_input_options" msgid="3909945612939668554">"Pilihan input"</string>
- <string name="english_ime_research_log" msgid="8492602295696577851">"Arahan Log Penyelidikan"</string>
- <string name="use_contacts_for_spellchecking_option_title" msgid="5374120998125353898">"Cari nama kenalan"</string>
- <string name="use_contacts_for_spellchecking_option_summary" msgid="8754413382543307713">"Penyemak ejaan menggunakan entri dari senarai kenalan anda"</string>
- <string name="vibrate_on_keypress" msgid="5258079494276955460">"Getar pada tekanan kekunci"</string>
- <string name="sound_on_keypress" msgid="6093592297198243644">"Bunyi pada tekanan kekunci"</string>
- <string name="popup_on_keypress" msgid="123894815723512944">"Pop timbul pada tekanan kunci"</string>
- <string name="general_category" msgid="1859088467017573195">"Umum"</string>
- <string name="correction_category" msgid="2236750915056607613">"Pembetulan teks"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"Taipan gerak isyarat"</string>
- <string name="misc_category" msgid="6894192814868233453">"Pilihan lain"</string>
- <string name="advanced_settings" msgid="362895144495591463">"Tetapan terperinci"</string>
- <string name="advanced_settings_summary" msgid="4487980456152830271">"Pilihan untuk pakar"</string>
- <string name="include_other_imes_in_language_switch_list" msgid="4533689960308565519">"Tukar ke kaedah input lain"</string>
- <string name="include_other_imes_in_language_switch_list_summary" msgid="840637129103317635">"Kunci pertukaran bahasa meliputi kaedah masukan lain juga"</string>
- <string name="show_language_switch_key" msgid="5915478828318774384">"Kekunci tukar bahasa"</string>
- <string name="show_language_switch_key_summary" msgid="7343403647474265713">"Tunjukkan apabila berbilang bahasa input didayakan"</string>
- <string name="sliding_key_input_preview" msgid="6604262359510068370">"Tunjukkan penunjuk slaid"</string>
- <string name="sliding_key_input_preview_summary" msgid="6340524345729093886">"Paparkan petunjuk visual semasa meluncur daripada kekunci Shift atau Simbol"</string>
- <string name="key_preview_popup_dismiss_delay" msgid="6213164897443068248">"Pop tmbl knci ketpkn lengah"</string>
- <string name="key_preview_popup_dismiss_no_delay" msgid="2096123151571458064">"Tiada lengah"</string>
- <string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"Lalai"</string>
- <string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g>ms"</string>
- <string name="settings_system_default" msgid="6268225104743331821">"Tetapan asal sistem"</string>
- <string name="use_contacts_dict" msgid="4435317977804180815">"Cadangkan nama Kenalan"</string>
- <string name="use_contacts_dict_summary" msgid="6599983334507879959">"Menggunakan nama daripada Kenalan untuk cadangan dan pembetulan"</string>
- <string name="use_double_space_period" msgid="8781529969425082860">"Titik ruang berganda"</string>
- <string name="use_double_space_period_summary" msgid="6532892187247952799">"Mengetik 2X pada bar ruang memasukkan titik diikuti dengan ruang"</string>
- <string name="auto_cap" msgid="1719746674854628252">"Huruf besar auto"</string>
- <string name="auto_cap_summary" msgid="7934452761022946874">"Besarkan perkataan pertama setiap ayat"</string>
- <string name="edit_personal_dictionary" msgid="3996910038952940420">"Kamus peribadi"</string>
- <string name="configure_dictionaries_title" msgid="4238652338556902049">"Kamus tambahan"</string>
- <string name="main_dictionary" msgid="4798763781818361168">"Kamus utama"</string>
- <string name="prefs_show_suggestions" msgid="8026799663445531637">"Tunjukkan cadangan pembetulan"</string>
- <string name="prefs_show_suggestions_summary" msgid="1583132279498502825">"Paparkan cadangan perkataan semasa menaip"</string>
- <string name="prefs_suggestion_visibility_show_name" msgid="3219916594067551303">"Sentiasa tunjukkan"</string>
- <string name="prefs_suggestion_visibility_show_only_portrait_name" msgid="3859783767435239118">"Tunjukkan dalam mod potret"</string>
- <string name="prefs_suggestion_visibility_hide_name" msgid="6309143926422234673">"Sentiasa sembunyikan"</string>
- <string name="prefs_block_potentially_offensive_title" msgid="5078480071057408934">"Sekat perkataan yg menyinggung"</string>
- <string name="prefs_block_potentially_offensive_summary" msgid="2371835479734991364">"Jangan cadangkan perkataan yang boleh menyinggung"</string>
- <string name="auto_correction" msgid="7630720885194996950">"Auto pembetulan"</string>
- <string name="auto_correction_summary" msgid="5625751551134658006">"Bar ruang dan tanda baca secara automatik membetulkan perkataan yang ditaip salah"</string>
- <string name="auto_correction_threshold_mode_off" msgid="8470882665417944026">"Matikan"</string>
- <string name="auto_correction_threshold_mode_modest" msgid="8788366690620799097">"Sederhana"</string>
- <string name="auto_correction_threshold_mode_aggressive" msgid="7319007299148899623">"Agresif"</string>
- <string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"Sangat agresif"</string>
- <string name="bigram_prediction" msgid="1084449187723948550">"Cadangan perkataan seterusnya"</string>
- <string name="bigram_prediction_summary" msgid="3896362682751109677">"Gunakan perkataan sebelumnya dalam membuat cadangan"</string>
- <string name="gesture_input" msgid="826951152254563827">"Dayakan taipan gerak isyarat"</string>
- <string name="gesture_input_summary" msgid="9180350639305731231">"Input perkataan dengan meluncur melalui huruf"</string>
- <string name="gesture_preview_trail" msgid="3802333369335722221">"Tunjukkan jejak gerak isyarat"</string>
- <string name="gesture_floating_preview_text" msgid="4443240334739381053">"Pratonton terapung dinamik"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Lihat perkataan yang dicadangkan semasa membuat gerak isyarat"</string>
- <string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Disimpan"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Pergi"</string>
- <string name="label_next_key" msgid="362972844525672568">"Seterusnya"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Sblm"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Selesai"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Hantar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Jeda"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Tnggu"</string>
- <string name="spoken_use_headphones" msgid="896961781287283493">"Pasangkan set kepala untuk mendengar kekunci kata laluan disebut dengan kuat."</string>
- <string name="spoken_current_text_is" msgid="2485723011272583845">"Teks semasa adalah %s"</string>
- <string name="spoken_no_text_entered" msgid="7479685225597344496">"Tiada teks dimasukkan"</string>
- <string name="spoken_description_unknown" msgid="3197434010402179157">"Kod kunci %d"</string>
- <string name="spoken_description_shift" msgid="244197883292549308">"Shift"</string>
- <string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Kunci anjak dihidupkan (ketik untuk melumpuhkan)"</string>
- <string name="spoken_description_caps_lock" msgid="3276478269526304432">"Kunci huruf besar dihidupkan (ketik untuk melumpuhkan)"</string>
- <string name="spoken_description_delete" msgid="8740376944276199801">"Padam"</string>
- <string name="spoken_description_to_symbol" msgid="5486340107500448969">"Simbol"</string>
- <string name="spoken_description_to_alpha" msgid="23129338819771807">"Huruf"</string>
- <string name="spoken_description_to_numeric" msgid="591752092685161732">"Nombor"</string>
- <string name="spoken_description_settings" msgid="4627462689603838099">"Tetapan"</string>
- <string name="spoken_description_tab" msgid="2667716002663482248">"Tab"</string>
- <string name="spoken_description_space" msgid="2582521050049860859">"Space"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"Input suara"</string>
- <string name="spoken_description_smiley" msgid="2256309826200113918">"Muka senyum"</string>
- <string name="spoken_description_return" msgid="8178083177238315647">"Return"</string>
- <string name="spoken_description_search" msgid="1247236163755920808">"Carian"</string>
- <string name="spoken_description_dot" msgid="40711082435231673">"Titik"</string>
- <string name="spoken_description_language_switch" msgid="5507091328222331316">"Tukar bahasa"</string>
- <string name="spoken_description_action_next" msgid="8636078276664150324">"Seterusnya"</string>
- <string name="spoken_description_action_previous" msgid="800872415009336208">"Sebelumnya"</string>
- <string name="spoken_description_shiftmode_on" msgid="5700440798609574589">"Kunci anjak didayakan"</string>
- <string name="spoken_description_shiftmode_locked" msgid="593175803181701830">"Kunci huruf besar didayakan"</string>
- <string name="spoken_description_shiftmode_off" msgid="657219998449174808">"Kunci anjak dilumpuhkan"</string>
- <string name="spoken_description_mode_symbol" msgid="7183343879909747642">"Mod simbol"</string>
- <string name="spoken_description_mode_alpha" msgid="3528307674390156956">"Mod huruf"</string>
- <string name="spoken_description_mode_phone" msgid="6520207943132026264">"Mod telefon"</string>
- <string name="spoken_description_mode_phone_shift" msgid="5499629753962641227">"Mod simbol telefon"</string>
- <string name="announce_keyboard_hidden" msgid="8718927835531429807">"Papan kekunci tersembunyi"</string>
- <string name="announce_keyboard_mode" msgid="4729081055438508321">"Menunjukkan <xliff:g id="MODE">%s</xliff:g> papan kekunci"</string>
- <string name="keyboard_mode_date" msgid="3137520166817128102">"tarikh"</string>
- <string name="keyboard_mode_date_time" msgid="339593358488851072">"tarikh dan masa"</string>
- <string name="keyboard_mode_email" msgid="6216248078128294262">"e-mel"</string>
- <string name="keyboard_mode_im" msgid="1137405089766557048">"pemesejan"</string>
- <string name="keyboard_mode_number" msgid="7991623440699957069">"nombor"</string>
- <string name="keyboard_mode_phone" msgid="6851627527401433229">"telefon"</string>
- <string name="keyboard_mode_text" msgid="6479436687899701619">"teks"</string>
- <string name="keyboard_mode_time" msgid="4381856885582143277">"masa"</string>
- <string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"Kunci input suara"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Hidpkn kekunci utama"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Pd ppn k’unci simbol"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Matikan"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mik. pd kekunci utma"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mik. pd kekunci smbl"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Input suara dilmphkn"</string>
- <string name="configure_input_method" msgid="373356270290742459">"Konfigurasikan kaedah input"</string>
- <string name="language_selection_title" msgid="1651299598555326750">"Bahasa input"</string>
- <string name="send_feedback" msgid="1780431884109392046">"Hantar maklum balas"</string>
- <string name="select_language" msgid="3693815588777926848">"Bahasa input"</string>
- <string name="hint_add_to_dictionary" msgid="573678656946085380">"Sentuh lagi untuk menyimpan"</string>
- <string name="has_dictionary" msgid="6071847973466625007">"Kamus tersedia"</string>
- <string name="prefs_enable_log" msgid="6620424505072963557">"Dayakan maklum balas pengguna"</string>
- <string name="prefs_description_log" msgid="7525225584555429211">"Bantu memperbaik editor kaedah input ini dengan menghantar statistik penggunaan dan laporan ranap secara automatik"</string>
- <string name="keyboard_layout" msgid="8451164783510487501">"Tema papan kekunci"</string>
- <string name="subtype_en_GB" msgid="88170601942311355">"Bahasa Inggeris (UK)"</string>
- <string name="subtype_en_US" msgid="6160452336634534239">"Bahasa Inggeris (AS)"</string>
- <string name="subtype_es_US" msgid="5583145191430180200">"Bahasa Sepanyol (AS)"</string>
- <string name="subtype_with_layout_en_GB" msgid="2179097748724725906">"Bahasa Inggeris (UK) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_en_US" msgid="1362581347576714579">"Bahasa Inggeris (AS) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_with_layout_es_US" msgid="6261791057007890189">"Bahasa Sepanyol (AS) (<xliff:g id="LAYOUT">%s</xliff:g>)"</string>
- <string name="subtype_no_language" msgid="7137390094240139495">"Tiada bahasa (Abjad)"</string>
- <string name="subtype_no_language_qwerty" msgid="244337630616742604">"Abjad (QWERTY)"</string>
- <string name="subtype_no_language_qwertz" msgid="443066912507547976">"Abjad (QWERTZ)"</string>
- <string name="subtype_no_language_azerty" msgid="8144348527575640087">"Abjad (AZERTY)"</string>
- <string name="subtype_no_language_dvorak" msgid="1564494667584718094">"Abjad (Dvorak)"</string>
- <string name="subtype_no_language_colemak" msgid="5837418400010302623">"Abjad (Colemak)"</string>
- <string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Abjad (PC)"</string>
- <string name="custom_input_styles_title" msgid="8429952441821251512">"Gaya input peribadi"</string>
- <string name="add_style" msgid="6163126614514489951">"Tambah gaya"</string>
- <string name="add" msgid="8299699805688017798">"Tambah"</string>
- <string name="remove" msgid="4486081658752944606">"Alih keluar"</string>
- <string name="save" msgid="7646738597196767214">"Simpan"</string>
- <string name="subtype_locale" msgid="8576443440738143764">"Bahasa"</string>
- <string name="keyboard_layout_set" msgid="4309233698194565609">"Reka Letak"</string>
- <string name="custom_input_style_note_message" msgid="8826731320846363423">"Gaya input tersuai anda perlu didayakan sebelum anda mula menggunakannya. Adakah anda ingin mendayakannya sekarang?"</string>
- <string name="enable" msgid="5031294444630523247">"Dayakan"</string>
- <string name="not_now" msgid="6172462888202790482">"Bukan sekarang"</string>
- <string name="custom_input_style_already_exists" msgid="8008728952215449707">"Gaya input yang sama sudah wujud: <xliff:g id="INPUT_STYLE_NAME">%s</xliff:g>"</string>
- <string name="prefs_usability_study_mode" msgid="1261130555134595254">"Mod kajian kebolehgunaan"</string>
- <string name="prefs_key_longpress_timeout_settings" msgid="6102240298932897873">"Kelewatan tekan lama kekunci"</string>
- <string name="prefs_keypress_vibration_duration_settings" msgid="7918341459947439226">"Tempoh getaran tekan kekunci"</string>
- <string name="prefs_keypress_sound_volume_settings" msgid="6027007337036891623">"Kelantangan bunyi tekan kekunci"</string>
- <string name="prefs_read_external_dictionary" msgid="2588931418575013067">"Baca fail kamus luaran"</string>
- <string name="read_external_dictionary_no_files_message" msgid="4947420942224623792">"Tiada fail kamus dalam folder Muat Turun"</string>
- <string name="read_external_dictionary_multiple_files_title" msgid="7637749044265808628">"Pilih fail kamus untuk dipasang"</string>
- <string name="read_external_dictionary_confirm_install_message" msgid="6898610163768980870">"Betul-betul pasang fail ini untuk <xliff:g id="LOCALE_NAME">%s</xliff:g>?"</string>
- <string name="error" msgid="8940763624668513648">"Berlaku ralat"</string>
- <string name="button_default" msgid="3988017840431881491">"Lalai"</string>
- <string name="setup_welcome_title" msgid="6112821709832031715">"Selamat datang ke <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"dengan Taipan Gerak Isyarat"</string>
- <string name="setup_start_action" msgid="8936036460897347708">"Bermula"</string>
- <string name="setup_next_action" msgid="371821437915144603">"Langkah seterusnya"</string>
- <string name="setup_steps_title" msgid="6400373034871816182">"Menyediakan <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step1_title" msgid="3147967630253462315">"Dayakan <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step1_instruction" msgid="2578631936624637241">"Sila semak \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" dlm ttpn Bhs &amp; input. Ini mbnarkn apl djlnkn pd pranti anda."</string>
- <string name="setup_step1_finished_instruction" msgid="10761482004957994">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> sudah didayakan dalam tetapan Bahasa &amp; input anda, jadi langkah ini telah selesai. Beralih ke langkah seterusnya!"</string>
- <string name="setup_step1_action" msgid="4366513534999901728">"Dayakan dalam Tetapan"</string>
- <string name="setup_step2_title" msgid="6860725447906690594">"Beralih ke <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_step2_instruction" msgid="9141481964870023336">"Seterusnya, pilih \"<xliff:g id="APPLICATION_NAME">%s</xliff:g>\" sebagai kaedah input teks aktif anda."</string>
- <string name="setup_step2_action" msgid="1660330307159824337">"Tukar kaedah input"</string>
- <string name="setup_step3_title" msgid="3154757183631490281">"Tahniah, anda sudah sedia!"</string>
- <string name="setup_step3_instruction" msgid="8025981829605426000">"Kini anda boleh menaip dalam semua apl kegemaran anda dengan <xliff:g id="APPLICATION_NAME">%s</xliff:g>."</string>
- <string name="setup_step3_action" msgid="600879797256942259">"Konfigurasikan bahasa tambahan"</string>
- <string name="setup_finish_action" msgid="276559243409465389">"Selesai"</string>
- <string name="show_setup_wizard_icon" msgid="5008028590593710830">"Tunjukkan ikon apl"</string>
- <string name="show_setup_wizard_icon_summary" msgid="4119998322536880213">"Paparkan ikon apl dalam pelancar"</string>
- <string name="app_name" msgid="6320102637491234792">"Pembekal Kamus"</string>
- <string name="dictionary_provider_name" msgid="3027315045397363079">"Pembekal Kamus"</string>
- <string name="dictionary_service_name" msgid="6237472350693511448">"Perkhidmatan Kamus"</string>
- <string name="download_description" msgid="6014835283119198591">"Maklumat kemas kini kamus"</string>
- <string name="dictionary_settings_title" msgid="8091417676045693313">"Kamus tambahan"</string>
- <string name="dictionary_install_over_metered_network_prompt" msgid="3587517870006332980">"Kamus tersedia"</string>
- <string name="dictionary_settings_summary" msgid="5305694987799824349">"Tetapan untuk kamus"</string>
- <string name="user_dictionaries" msgid="3582332055892252845">"Kamus pengguna"</string>
- <string name="default_user_dict_pref_name" msgid="1625055720489280530">"Kamus pengguna"</string>
- <string name="dictionary_available" msgid="4728975345815214218">"Kamus tersedia"</string>
- <string name="dictionary_downloading" msgid="2982650524622620983">"Sedang memuat turun"</string>
- <string name="dictionary_installed" msgid="8081558343559342962">"Dipasang"</string>
- <string name="dictionary_disabled" msgid="8950383219564621762">"Dipasang, dilumpuhkan"</string>
- <string name="cannot_connect_to_dict_service" msgid="9216933695765732398">"Masalah menyambung kepada perkhidmatan kamus"</string>
- <string name="no_dictionaries_available" msgid="8039920716566132611">"Tiada kamus tersedia"</string>
- <string name="check_for_updates_now" msgid="8087688440916388581">"Muatkan semula"</string>
- <string name="last_update" msgid="730467549913588780">"Kali terakhir dikemas kini"</string>
- <string name="message_updating" msgid="4457761393932375219">"Menyemak kemas kini"</string>
- <string name="message_loading" msgid="8689096636874758814">"Memuatkan..."</string>
- <string name="main_dict_description" msgid="3072821352793492143">"Kamus utama"</string>
- <string name="cancel" msgid="6830980399865683324">"Batal"</string>
- <string name="install_dict" msgid="180852772562189365">"Pasang"</string>
- <string name="cancel_download_dict" msgid="7843340278507019303">"Batal"</string>
- <string name="delete_dict" msgid="756853268088330054">"Padam"</string>
- <string name="should_download_over_metered_prompt" msgid="2878629598667658845">"Bahasa pilihan pada peranti mudah alih anda mempunyai kamus tersedia.&lt;br/&gt; Kami mengesyorkan &lt;b&gt;memuat turun&lt;/b&gt; kamus <xliff:g id="LANGUAGE">%1$s</xliff:g> untuk memperbaik pengalaman menaip anda.&lt;br/&gt; &lt;br/&gt; Muat turun boleh mengambil masa seminit atau dua melalui 3G. Caj mungkin dikenakan jika anda tidak mempunyai &lt;b&gt;pelan data tanpa had&lt;/b&gt;.&lt;br/&gt; Jika anda tidak pasti jenis pelan data yang anda miliki, kami mengesyorkan agar anda mencari sambungan Wi-Fi untuk mula memuat turun secara automatik.&lt;br/&gt; &lt;br/&gt; Petua: Anda boleh memuat turun dan mengalih keluar kamus dengan pergi ke menu &lt;b&gt;Bahasa &amp; input&lt;/b&gt; dalam &lt;b&gt;Tetapan&lt;/b&gt; peranti mudah alih anda."</string>
- <string name="download_over_metered" msgid="1643065851159409546">"Muat turun sekarang (<xliff:g id="SIZE_IN_MEGABYTES">%1$.1f</xliff:g>MB)"</string>
- <string name="do_not_download_over_metered" msgid="2176209579313941583">"Muat turun melalui Wi-Fi"</string>
- <string name="dict_available_notification_title" msgid="6514288591959117288">"Kamus tersedia untuk <xliff:g id="LANGUAGE">%1$s</xliff:g>"</string>
- <string name="dict_available_notification_description" msgid="1075194169443163487">"Tekan untuk mengulas dan memuat turun"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Memuat turun: cadangan untuk <xliff:g id="LANGUAGE">%1$s</xliff:g> akan sedia tidak lama lagi."</string>
- <string name="version_text" msgid="2715354215568469385">"Versi <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
- <string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Tambah"</string>
- <string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Tambah ke kamus"</string>
- <string name="user_dict_settings_add_screen_title" msgid="5818914331629278758">"Frasa"</string>
- <string name="user_dict_settings_add_dialog_more_options" msgid="5671682004887093112">"Lagi pilihan"</string>
- <string name="user_dict_settings_add_dialog_less_options" msgid="2716586567241724126">"Kurang pilihan"</string>
- <string name="user_dict_settings_add_dialog_confirm" msgid="4703129507388332950">"OK"</string>
- <string name="user_dict_settings_add_word_option_name" msgid="6665558053408962865">"Perkataan:"</string>
- <string name="user_dict_settings_add_shortcut_option_name" msgid="3094731590655523777">"Pintasan:"</string>
- <string name="user_dict_settings_add_locale_option_name" msgid="4738643440987277705">"Bahasa:"</string>
- <string name="user_dict_settings_add_word_hint" msgid="4902434148985906707">"Taip perkataan"</string>
- <string name="user_dict_settings_add_shortcut_hint" msgid="2265453012555060178">"Pintasan pilihan"</string>
- <string name="user_dict_settings_edit_dialog_title" msgid="3765774633869590352">"Edit perkataan"</string>
- <string name="user_dict_settings_context_menu_edit_title" msgid="6812255903472456302">"Edit"</string>
- <string name="user_dict_settings_context_menu_delete_title" msgid="8142932447689461181">"Padam"</string>
- <string name="user_dict_settings_empty_text" msgid="558499587532668203">"Anda tidak mempunyai sebarang perkataan dalam kamus pengguna. Tambahkan perkataan dengan menyentuh butang Tambah (+)."</string>
- <string name="user_dict_settings_all_languages" msgid="8276126583216298886">"Untuk semua bahasa"</string>
- <string name="user_dict_settings_more_languages" msgid="7131268499685180461">"Lebih banyak bahasa..."</string>
- <string name="user_dict_settings_delete" msgid="110413335187193859">"Padam"</string>
- <string name="user_dict_fast_scroll_alphabet" msgid="5431919401558285473">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
-</resources>
diff --git a/java/res/values-nb/strings-action-keys.xml b/java/res/values-nb/strings-action-keys.xml
new file mode 100644
index 000000000..d4acd36c9
--- /dev/null
+++ b/java/res/values-nb/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Utfør"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Neste"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Forrige"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Ferdig"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Send"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Vent"</string>
+</resources>
diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml
index 0a2def8b2..6d9f64fb3 100644
--- a/java/res/values-nb/strings.xml
+++ b/java/res/values-nb/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamisk flytende forhåndsvsn."</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Se det foreslåtte ordet mens du utfører bevegelser"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: Lagret"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Utfør"</string>
- <string name="label_next_key" msgid="362972844525672568">"Neste"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Forr."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Utfør"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Send"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Vent"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Koble til hodetelefoner for å høre opplesing av bokstavene i passordet."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Gjeldende tekst er %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Ingen tekst er skrevet inn"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"tid"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"Nettadresse"</string>
<string name="voice_input" msgid="3583258583521397548">"Tast for taleinndata"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"På hovedtastatur"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"På talltastatur"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Av"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon på hovedtast."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofon på talltastatur"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Taleinndata er deaktiv."</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurer inndatametoder"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Inndataspråk"</string>
<string name="send_feedback" msgid="1780431884109392046">"Send tilbakemelding"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Fargetema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Hvit"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blå"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Egendefinerte inndata"</string>
<string name="add_style" msgid="6163126614514489951">"Legg til stil"</string>
<string name="add" msgid="8299699805688017798">"Legg til"</string>
@@ -222,7 +212,7 @@
<string name="do_not_download_over_metered" msgid="2176209579313941583">"Last ned via Wi-Fi"</string>
<string name="dict_available_notification_title" msgid="6514288591959117288">"En ordliste er tilgjengelig for <xliff:g id="LANGUAGE">%1$s</xliff:g>"</string>
<string name="dict_available_notification_description" msgid="1075194169443163487">"Trykk for å se gjennom og laste ned"</string>
- <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Laster ned: forslag blir snart tilgjengelige for <xliff:g id="LANGUAGE">%1$s</xliff:g>."</string>
+ <string name="toast_downloading_suggestions" msgid="1313027353588566660">"Laster ned: Forslag blir snart tilgjengelige for <xliff:g id="LANGUAGE">%1$s</xliff:g>."</string>
<string name="version_text" msgid="2715354215568469385">"Versjon <xliff:g id="VERSION_NUMBER">%1$s</xliff:g>"</string>
<string name="user_dict_settings_add_menu_title" msgid="1254195365689387076">"Legg til"</string>
<string name="user_dict_settings_add_dialog_title" msgid="4096700390211748168">"Legg til i ordlisten"</string>
diff --git a/java/res/values-nl/strings-action-keys.xml b/java/res/values-nl/strings-action-keys.xml
new file mode 100644
index 000000000..c1ce25acf
--- /dev/null
+++ b/java/res/values-nl/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Ga"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Volg."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Vorig"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Klaar"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Verz."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauze"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Wacht"</string>
+</resources>
diff --git a/java/res/values-nl/strings.xml b/java/res/values-nl/strings.xml
index 60db9f0e8..f99c34520 100644
--- a/java/res/values-nl/strings.xml
+++ b/java/res/values-nl/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamisch zwevend voorbeeld"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Het voorgestelde woord weergeven tijdens het tekenen"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: opgeslagen"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Start"</string>
- <string name="label_next_key" msgid="362972844525672568">"Verder"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Vorig"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Gereed"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Zenden"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauze"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Wacht"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Sluit een headset aan om wachtwoordtoetsen hardop te laten voorlezen."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Huidige tekst is %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Geen tekst ingevoerd"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"tijd"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Toets voor spraakinvoer"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Op hoofdtoetsenbord"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Op symbooltoetsenb."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Uitgeschakeld"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Microfoon op hoofdtoetsenbord"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic op symb.toetsb."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Spraakinvoer is uit"</string>
<string name="configure_input_method" msgid="373356270290742459">"Invoermethoden configureren"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Invoertalen"</string>
<string name="send_feedback" msgid="1780431884109392046">"Feedback verzenden"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (pc)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Kleurenschema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Wit"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blauw"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Aangep. invoerstijlen"</string>
<string name="add_style" msgid="6163126614514489951">"Stijl toev."</string>
<string name="add" msgid="8299699805688017798">"Toevoegen"</string>
diff --git a/java/res/values-pl/strings-action-keys.xml b/java/res/values-pl/strings-action-keys.xml
new file mode 100644
index 000000000..2984b98b8
--- /dev/null
+++ b/java/res/values-pl/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"OK"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Dalej"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Wróć"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Gotowe"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Wyślij"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauza"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Czekaj"</string>
+</resources>
diff --git a/java/res/values-pl/strings.xml b/java/res/values-pl/strings.xml
index c3ed2d897..558415d89 100644
--- a/java/res/values-pl/strings.xml
+++ b/java/res/values-pl/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamiczny podgląd słowa"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Podczas gestykulacji będzie widoczne podpowiadane słowo"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Zapisano"</string>
- <string name="label_go_key" msgid="1635148082137219148">"OK"</string>
- <string name="label_next_key" msgid="362972844525672568">"Dalej"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Wstecz"</string>
- <string name="label_done_key" msgid="2441578748772529288">"OK"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Wyślij"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauza"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Czekaj"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Podłącz zestaw słuchawkowy, aby usłyszeć znaki hasła wypowiadane na głos."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Aktualny tekst: %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nie wprowadzono tekstu"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"godzina"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Klawisz rozpoznawania mowy"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Na klawiaturze głównej"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Na klawiaturze z symbolami"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Wyłącz"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofon na klawiaturze głównej"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofon na klawiaturze z symbolami"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Rozpoznawanie mowy jest wyłączone"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfiguruj metody wprowadzania"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Języki wprowadzania"</string>
<string name="send_feedback" msgid="1780431884109392046">"Prześlij opinię"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emotikony"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Schemat kolorów"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Biały"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Niebieski"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Style niestandardowe"</string>
<string name="add_style" msgid="6163126614514489951">"Dodaj styl"</string>
<string name="add" msgid="8299699805688017798">"Dodaj"</string>
diff --git a/java/res/values-port/setup-dimens-small-phone-port.xml b/java/res/values-port/setup-dimens-small-phone-port.xml
index 8ac72ea7c..cf2751f1b 100644
--- a/java/res/values-port/setup-dimens-small-phone-port.xml
+++ b/java/res/values-port/setup-dimens-small-phone-port.xml
@@ -20,7 +20,6 @@
<dimen name="setup_welcome_description_text_size">20sp</dimen>
<dimen name="setup_step_bullet_text_size">18sp</dimen>
<dimen name="setup_step_triangle_indicator_height">18dp</dimen>
- <dimen name="setup_step_indicator_height">18dp</dimen>
<dimen name="setup_step_title_text_size">18sp</dimen>
<dimen name="setup_step_instruction_text_size">14sp</dimen>
<dimen name="setup_step_action_text_size">16sp</dimen>
diff --git a/java/res/values-mn/strings-appname.xml b/java/res/values-pt-rPT/strings-action-keys.xml
index 6c27e3d34..7a7559fea 100644
--- a/java/res/values-mn/strings-appname.xml
+++ b/java/res/values-pt-rPT/strings-action-keys.xml
@@ -20,8 +20,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="english_ime_name" msgid="5940510615957428904">"Андройд Гар (AOSP)"</string>
- <string name="spell_checker_service_name" msgid="1254221805440242662">"Андройд Алдаа Шалгагч (AOSP)"</string>
- <string name="english_ime_settings" msgid="5760361067176802794">"Андройд Гарын Тохиргоо (AOSP)"</string>
- <string name="android_spell_checker_settings" msgid="6123949487832861885">"Андройд Алдаа Шалгагчийн Тохиргоо (AOSP)"</string>
+ <string name="label_go_key" msgid="4033615332628671065">"Ok"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Seg."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Ant."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Conc."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Env."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausa"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Esp."</string>
</resources>
diff --git a/java/res/values-pt-rPT/strings.xml b/java/res/values-pt-rPT/strings.xml
index 2a4c2b823..36425e174 100644
--- a/java/res/values-pt-rPT/strings.xml
+++ b/java/res/values-pt-rPT/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Pré-visual. flutuante dinâmica"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Ver palavra sugerida enquanto toca"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: guardada"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Ir"</string>
- <string name="label_next_key" msgid="362972844525672568">"Avançar"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Ant."</string>
- <string name="label_done_key" msgid="2441578748772529288">"OK"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Enviar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Esp."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Ligar auscultadores com microfone integrado para ouvir as teclas da palavra-passe."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"O texto atual é %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nenhum texto digitado"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"hora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URLs"</string>
<string name="voice_input" msgid="3583258583521397548">"Chave de entrada de voz"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"No teclado principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"No teclado símbolos"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Desligar"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic. tecl. principal"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic. tecl. símbolos"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Entr. voz desact."</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurar métodos de introdução"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
<string name="send_feedback" msgid="1780431884109392046">"Enviar comentários"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Esquema de cor"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Branco"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Azul"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Estilos entrada pers."</string>
<string name="add_style" msgid="6163126614514489951">"Adic. estilo"</string>
<string name="add" msgid="8299699805688017798">"Adicionar"</string>
diff --git a/java/res/values-pt/strings-action-keys.xml b/java/res/values-pt/strings-action-keys.xml
new file mode 100644
index 000000000..1d8e760e7
--- /dev/null
+++ b/java/res/values-pt/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Ir"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Próx."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Ant."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Conc."</string>
+ <string name="label_send_key" msgid="482252074224462163">"Env."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausa"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Esp."</string>
+</resources>
diff --git a/java/res/values-pt/strings.xml b/java/res/values-pt/strings.xml
index c0e1aa6b1..925adf0b0 100644
--- a/java/res/values-pt/strings.xml
+++ b/java/res/values-pt/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Visualizaç. dinâmica flutuante"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Ver a palavra sugerida ao usar gestos"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Salvo"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Ir"</string>
- <string name="label_next_key" msgid="362972844525672568">"Avançar"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Volt."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Feito"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Enviar"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Esp."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Conecte um fone de ouvido para ouvir as chaves de senha em voz alta."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"O texto atual é %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nenhum texto digitado"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"hora"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Chave de entrada de texto por voz"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"No teclado principal"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"No teclado de símb."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Desativado"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic. no teclado"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic. no teclado"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Texto por voz desat."</string>
<string name="configure_input_method" msgid="373356270290742459">"Configurar métodos de entrada"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomas de entrada"</string>
<string name="send_feedback" msgid="1780431884109392046">"Enviar comentários"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Esquema de cores"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Branco"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Azul"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Estilos personalizados"</string>
<string name="add_style" msgid="6163126614514489951">"Adic. estilo"</string>
<string name="add" msgid="8299699805688017798">"Adicionar"</string>
diff --git a/java/res/values-rm/strings-action-keys.xml b/java/res/values-rm/strings-action-keys.xml
new file mode 100644
index 000000000..fbe84b573
--- /dev/null
+++ b/java/res/values-rm/strings-action-keys.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="1635148082137219148">"Dai"</string>
+ <string name="label_next_key" msgid="362972844525672568">"Vinavant"</string>
+ <!-- no translation found for label_previous_key (1211868118071386787) -->
+ <skip />
+ <string name="label_done_key" msgid="2441578748772529288">"Finì"</string>
+ <string name="label_send_key" msgid="2815056534433717444">"Trametter"</string>
+ <!-- no translation found for label_pause_key (181098308428035340) -->
+ <skip />
+ <!-- no translation found for label_wait_key (6402152600878093134) -->
+ <skip />
+</resources>
diff --git a/java/res/values-rm/strings.xml b/java/res/values-rm/strings.xml
index b956619c5..378c25426 100644
--- a/java/res/values-rm/strings.xml
+++ b/java/res/values-rm/strings.xml
@@ -123,16 +123,6 @@
<!-- no translation found for gesture_floating_preview_text_summary (4472696213996203533) -->
<skip />
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Memorisà"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Dai"</string>
- <string name="label_next_key" msgid="362972844525672568">"Vinavant"</string>
- <!-- no translation found for label_previous_key (1211868118071386787) -->
- <skip />
- <string name="label_done_key" msgid="2441578748772529288">"Finì"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Trametter"</string>
- <!-- no translation found for label_pause_key (181098308428035340) -->
- <skip />
- <!-- no translation found for label_wait_key (6402152600878093134) -->
- <skip />
<!-- no translation found for spoken_use_headphones (896961781287283493) -->
<skip />
<!-- no translation found for spoken_current_text_is (2485723011272583845) -->
@@ -219,18 +209,6 @@
<skip />
<!-- no translation found for voice_input (3583258583521397548) -->
<skip />
- <!-- no translation found for voice_input_modes_main_keyboard (3360660341121083174) -->
- <skip />
- <!-- no translation found for voice_input_modes_symbols_keyboard (7203213240786084067) -->
- <skip />
- <!-- no translation found for voice_input_modes_off (3745699748218082014) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_main_keyboard (6586544292900314339) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_symbols_keyboard (5233725927281932391) -->
- <skip />
- <!-- no translation found for voice_input_modes_summary_off (63875609591897607) -->
- <skip />
<!-- no translation found for configure_input_method (373356270290742459) -->
<skip />
<string name="language_selection_title" msgid="1651299598555326750">"Linguas da cumonds vocals"</string>
diff --git a/java/res/values-ro/strings-action-keys.xml b/java/res/values-ro/strings-action-keys.xml
new file mode 100644
index 000000000..51aa82f9c
--- /dev/null
+++ b/java/res/values-ro/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Start"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Înai."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Înap."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Gata"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Trim."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauză"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Așt."</string>
+</resources>
diff --git a/java/res/values-ro/strings.xml b/java/res/values-ro/strings.xml
index c24ec01d1..9758a0b62 100644
--- a/java/res/values-ro/strings.xml
+++ b/java/res/values-ro/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Sugestie flotantă dinamică"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Afişaţi cuvântul sugerat când utilizaţi gesturi"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: salvat"</string>
- <string name="label_go_key" msgid="1635148082137219148">"OK"</string>
- <string name="label_next_key" msgid="362972844525672568">"Înainte"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Înapoi"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Terminat"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Trimiteţi"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pauză"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Aşt."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Conectaţi un set căşti-microfon pentru a auzi tastele apăsate când introduceţi parola."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Textul curent este %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nu a fost introdus text"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ore"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"adrese URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tastă pentru intrarea vocală"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Pe tastat. princip."</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Pe tastat. simbol."</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Dezactivată"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic. pe tast. princ."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micr. pe tast. simb."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Intr. vocală dezact."</string>
<string name="configure_input_method" msgid="373356270290742459">"Configuraţi metodele de intrare"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Selectaţi limba"</string>
<string name="send_feedback" msgid="1780431884109392046">"Trimiteți feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Schemă de culori"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Alb"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Albastru"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Stiluri personalizate"</string>
<string name="add_style" msgid="6163126614514489951">"Stil"</string>
<string name="add" msgid="8299699805688017798">"Adăugaţi"</string>
diff --git a/java/res/values-ru/strings-action-keys.xml b/java/res/values-ru/strings-action-keys.xml
new file mode 100644
index 000000000..d5080ceb5
--- /dev/null
+++ b/java/res/values-ru/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"ОК"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Далее"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Назад"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Готово"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Отправить"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Пауза"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Пауза"</string>
+</resources>
diff --git a/java/res/values-ru/strings.xml b/java/res/values-ru/strings.xml
index 176e75eda..36990fe41 100644
--- a/java/res/values-ru/strings.xml
+++ b/java/res/values-ru/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Показывать подсказки"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Показывать подсказки при вводе текста"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: сохранено"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Поиск"</string>
- <string name="label_next_key" msgid="362972844525672568">"Далее"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Пред."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Готово"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Отправить"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Ждать"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Подключите гарнитуру, чтобы услышать пароль."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Введенный текст: %s."</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Текст не введен"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ввода времени"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"ввода URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Кнопка голосового ввода"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Значок на основной клавиатуре"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Значок на клавиатуре символов"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Выкл."</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Значок на основной клавиатуре"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Значок на клавиатуре символов"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Голосовой ввод откл."</string>
<string name="configure_input_method" msgid="373356270290742459">"Настройка способов ввода"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Языки ввода"</string>
<string name="send_feedback" msgid="1780431884109392046">"Отправить отзыв"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Латиница (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Латиница (ПК)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Эмодзи"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Цветовая гамма"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Белый"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Синий"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Персонализированные стили"</string>
<string name="add_style" msgid="6163126614514489951">"Добавить стиль"</string>
<string name="add" msgid="8299699805688017798">"Добавить"</string>
diff --git a/java/res/values-sk/strings-action-keys.xml b/java/res/values-sk/strings-action-keys.xml
new file mode 100644
index 000000000..3586fb140
--- /dev/null
+++ b/java/res/values-sk/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Ísť"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Ďalej"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Pred."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"OK"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Posl."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pauza"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Čakať"</string>
+</resources>
diff --git a/java/res/values-sk/strings.xml b/java/res/values-sk/strings.xml
index bc5d6d297..42e55fa1f 100644
--- a/java/res/values-sk/strings.xml
+++ b/java/res/values-sk/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamická plávajúca ukážka"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Zobrazenie navrhovaného slova pri písaní gestami"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Uložené"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Hľadať"</string>
- <string name="label_next_key" msgid="362972844525672568">"Ďalej"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Pred."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Hotovo"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Odoslať"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pozastaviť"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Čakajte"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Ak si chcete pri zadávaní hesla vypočuť nahlas vyslovené klávesy, pripojte náhlavnú súpravu."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Aktuálny text je %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Nie je zadaný žiadny text"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"čas"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"Adresa URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Kľúč hlasového vstupu"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Na hlavnej klávesnici"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Na klávesnici so symbolmi"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Vypnuté"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mikrofón na hlavnej klávesnici"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mikrofón na klávesnici so symbolmi"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Hlasový vstup je zakázaný"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurovať metódy vstupu"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Jazyky vstupu"</string>
<string name="send_feedback" msgid="1780431884109392046">"Odoslať spätnú väzbu"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Latinka (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Latinka (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Farebná schéma"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Biela"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Modrá"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Vlastné štýly vstupu"</string>
<string name="add_style" msgid="6163126614514489951">"Pridať štýl"</string>
<string name="add" msgid="8299699805688017798">"Pridať"</string>
diff --git a/java/res/values-sl/strings-action-keys.xml b/java/res/values-sl/strings-action-keys.xml
new file mode 100644
index 000000000..0235887af
--- /dev/null
+++ b/java/res/values-sl/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Pojdi"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Napr."</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Prej."</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Konec"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Pošl."</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Zaus."</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Čakaj"</string>
+</resources>
diff --git a/java/res/values-sl/strings.xml b/java/res/values-sl/strings.xml
index c7d698b2f..59113e30b 100644
--- a/java/res/values-sl/strings.xml
+++ b/java/res/values-sl/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamični plavajoči predogled"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Prikaz predlagane besede med vnosom s prstom"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: shranjeno"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Pojdi"</string>
- <string name="label_next_key" msgid="362972844525672568">"Naprej"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Nazaj"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Dokončano"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Pošlji"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Premor"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Čakaj"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Priključite slušalke, če želite slišati izgovorjene tipke gesla."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Trenutno besedilo je %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Ni vnesenega besedila"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"ura"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Tipka za glasovni vnos"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Na glavni tipkovnici"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Na tipk. s simboli"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Izklopljeno"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mik. na glavni tipk."</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mik. na tipk. s sim."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Glas. vnos je onem."</string>
<string name="configure_input_method" msgid="373356270290742459">"Nastavitev načinov vnosa"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Jeziki vnosa"</string>
<string name="send_feedback" msgid="1780431884109392046">"Pošljite povratne informacije"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Latinica (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Latinica (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Znaki »emoji«"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Barvna shema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Bela"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Modra"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Slogi vnosa po meri"</string>
<string name="add_style" msgid="6163126614514489951">"Dodaj slog"</string>
<string name="add" msgid="8299699805688017798">"Dodaj"</string>
diff --git a/java/res/values-sr/strings-action-keys.xml b/java/res/values-sr/strings-action-keys.xml
new file mode 100644
index 000000000..1ce0ed7fb
--- /dev/null
+++ b/java/res/values-sr/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Иди"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"След"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Претх"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Готов"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Шаљи"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Пауза"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Чекај"</string>
+</resources>
diff --git a/java/res/values-sr/strings.xml b/java/res/values-sr/strings.xml
index e93661a93..663cb327d 100644
--- a/java/res/values-sr/strings.xml
+++ b/java/res/values-sr/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамички плутајући преглед"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Приказује предложену реч при уносу покретом"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Сачувано"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Иди"</string>
- <string name="label_next_key" msgid="362972844525672568">"Следеће"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Прет."</string>
- <string name="label_done_key" msgid="2441578748772529288">"Готово"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Пошаљи"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Чекај"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Укључите слушалице да бисте чули наглас изговорене тастере за лозинку."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Тренутни текст је %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Текст није унет"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"време"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Тастер за гласовни унос"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"На главној тастатури"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"На тастатури са симболима"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Искључи"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Микрофон на главној тастатури"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Микрофон на тастатури са симболима"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Гласовни унос је онемогућен"</string>
<string name="configure_input_method" msgid="373356270290742459">"Конфигурисање метода уноса"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Језици за унос"</string>
<string name="send_feedback" msgid="1780431884109392046">"Пошаљи повратне информације"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Абецеда (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Абецеда (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Емотикони"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Шема боја"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Бела"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Плава"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Прилаг. стилови уноса"</string>
<string name="add_style" msgid="6163126614514489951">"Додав. стила"</string>
<string name="add" msgid="8299699805688017798">"Додај"</string>
diff --git a/java/res/values-sv/strings-action-keys.xml b/java/res/values-sv/strings-action-keys.xml
new file mode 100644
index 000000000..e13860811
--- /dev/null
+++ b/java/res/values-sv/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Kör"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Nästa"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Föreg"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Klart"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Sänd"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pausa"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Vänta"</string>
+</resources>
diff --git a/java/res/values-sv/strings.xml b/java/res/values-sv/strings.xml
index 1b23e334e..f5e129af9 100644
--- a/java/res/values-sv/strings.xml
+++ b/java/res/values-sv/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Visa ordförslag vid svepskrivning"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Ordförslaget visas i rörelsen medan du skriver"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: sparat"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Kör"</string>
- <string name="label_next_key" msgid="362972844525672568">"Nästa"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Föreg"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Färdig"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Skicka"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pausa"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Vänta"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Anslut hörlurar om du vill att lösenordet ska läsas upp."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Nuvarande text är %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Ingen text har angetts"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"klockslag"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"webbadresser"</string>
<string name="voice_input" msgid="3583258583521397548">"Röstinmatningsknapp"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"På huvudtangentbord"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"På symboltangentbord"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Av"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mick huvudtangentbord"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mick bland symboler"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Röstinmatning inaktiv"</string>
<string name="configure_input_method" msgid="373356270290742459">"Konfigurera inmatningsmetoder"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Inmatningsspråk"</string>
<string name="send_feedback" msgid="1780431884109392046">"Skicka feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabet (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabet (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Humörsymbol"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Färgschema"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Vit"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Blå"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Anpassade indatastilar"</string>
<string name="add_style" msgid="6163126614514489951">"Ny stil"</string>
<string name="add" msgid="8299699805688017798">"Lägg till"</string>
diff --git a/java/res/values-sw/strings-action-keys.xml b/java/res/values-sw/strings-action-keys.xml
new file mode 100644
index 000000000..7d8822e80
--- /dev/null
+++ b/java/res/values-sw/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Fanya"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Inayofuata"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Nyuma"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Imekamilika"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Tuma"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Sitisha"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Subiri"</string>
+</resources>
diff --git a/java/res/values-sw/strings.xml b/java/res/values-sw/strings.xml
index 9a22d20c5..8e23496d1 100644
--- a/java/res/values-sw/strings.xml
+++ b/java/res/values-sw/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Kihakiki kinachobadilika cha kuelea"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Onyesha neno lililopendekezwa unapoonyesha ishara"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Imehifadhiwa"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Nenda"</string>
- <string name="label_next_key" msgid="362972844525672568">"Inayofuata"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Iliyotangulia"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Kwisha"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Tuma"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pumzisha"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Subiri"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Chomeka plagi ya kifaa cha kichwa cha kusikiza ili kusikiliza msimbo wa nenosiri inayozungumwa kwa sauti ya juu."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Maandishi ya sasa ni %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Hakuna maandishi yaliyoingizwa"</string>
@@ -97,7 +90,7 @@
<string name="spoken_description_settings" msgid="4627462689603838099">"Mipangilio"</string>
<string name="spoken_description_tab" msgid="2667716002663482248">"Kichupo"</string>
<string name="spoken_description_space" msgid="2582521050049860859">"Nafasi"</string>
- <string name="spoken_description_mic" msgid="615536748882611950">"Uingizaji sauti"</string>
+ <string name="spoken_description_mic" msgid="615536748882611950">"Kuweka data kwa kutamka"</string>
<string name="spoken_description_smiley" msgid="2256309826200113918">"Uso wenye tabasamu"</string>
<string name="spoken_description_return" msgid="8178083177238315647">"Rudi"</string>
<string name="spoken_description_search" msgid="1247236163755920808">"Tafuta"</string>
@@ -123,13 +116,7 @@
<string name="keyboard_mode_text" msgid="6479436687899701619">"maandishi"</string>
<string name="keyboard_mode_time" msgid="4381856885582143277">"wakati"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
- <string name="voice_input" msgid="3583258583521397548">"Kibao cha kuingizia sauti"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Kwenye kibodi kuu"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Kwenye kibodi ya ishara"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Zima"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Maikrofoni kwenye kibodi kuu"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Maikrofoni kwenye kibodi ya ishara"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Uingizaji sauti umelemazwa"</string>
+ <string name="voice_input" msgid="3583258583521397548">"Kibao cha kuweka data kwa kutamka"</string>
<string name="configure_input_method" msgid="373356270290742459">"Sanidi mbinu za uingizaji"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Lugha za uingizaji"</string>
<string name="send_feedback" msgid="1780431884109392046">"Tuma maoni"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabeti (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabeti (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Mpangilio wa rangi"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Nyeupe"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Samawati"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Mitindo maalum ya ingizo"</string>
<string name="add_style" msgid="6163126614514489951">"Ongeza mtindo"</string>
<string name="add" msgid="8299699805688017798">"Ongeza"</string>
diff --git a/java/res/values-sw540dp-land/config.xml b/java/res/values-sw540dp-land/config.xml
index b3cd7278d..f4785e721 100644
--- a/java/res/values-sw540dp-land/config.xml
+++ b/java/res/values-sw540dp-land/config.xml
@@ -18,6 +18,56 @@
*/
-->
+<!-- Configuration values for Large Phone and Small Tablet Landscape. -->
<resources>
<bool name="config_use_fullscreen_mode">false</bool>
+
+ <!-- Preferable keyboard height in absolute scale: 45.0mm -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">283.5dp</dimen>
+ <fraction name="config_min_keyboard_height">45%p</fraction>
+
+ <dimen name="config_more_keys_keyboard_key_height">81.9dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_gb">2.444%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">5.200%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">1.447%p</fraction>
+
+ <fraction name="config_keyboard_top_padding_holo">2.727%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">4.5%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">0.9%p</fraction>
+
+ <fraction name="config_key_letter_ratio">50%</fraction>
+ <fraction name="config_key_large_letter_ratio">48%</fraction>
+ <fraction name="config_key_label_ratio">32%</fraction>
+ <fraction name="config_key_hint_letter_ratio">23%</fraction>
+ <fraction name="config_key_hint_label_ratio">34%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">29%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">30.0%</fraction>
+ <!-- left or right padding of label alignment -->
+ <dimen name="config_key_label_horizontal_padding">18dp</dimen>
+ <dimen name="config_key_shifted_letter_hint_padding">4dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">3.20%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">62%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">36%</fraction>
+
+ <dimen name="config_suggestions_strip_horizontal_padding">252.0dp</dimen>
+ <integer name="config_max_more_suggestions_row">5</integer>
+ <fraction name="config_min_more_suggestions_width">50%</fraction>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">26dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">76dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">26dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">17dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">10%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">33%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">70%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">30</integer>
</resources>
diff --git a/java/res/values-sw540dp-land/dimens.xml b/java/res/values-sw540dp-land/dimens.xml
deleted file mode 100644
index d79e8ca35..000000000
--- a/java/res/values-sw540dp-land/dimens.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 45.0mm -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">283.5dp</dimen>
- <fraction name="minKeyboardHeight">45%p</fraction>
-
- <fraction name="keyboard_top_padding_gb">2.444%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">0.0%p</fraction>
- <fraction name="key_bottom_gap_gb">5.200%p</fraction>
- <fraction name="key_horizontal_gap_gb">1.447%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">2.727%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
- <fraction name="key_bottom_gap_ics">4.5%p</fraction>
- <fraction name="key_horizontal_gap_ics">0.9%p</fraction>
-
- <dimen name="popup_key_height">81.9dp</dimen>
-
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_padding">18dp</dimen>
-
- <fraction name="key_letter_ratio">50%</fraction>
- <fraction name="key_large_letter_ratio">48%</fraction>
- <fraction name="key_label_ratio">32%</fraction>
- <fraction name="key_hint_letter_ratio">23%</fraction>
- <fraction name="key_hint_label_ratio">34%</fraction>
- <fraction name="key_uppercase_letter_ratio">29%</fraction>
- <fraction name="spacebar_text_ratio">30.0%</fraction>
- <dimen name="key_uppercase_letter_padding">4dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">3.20%p</fraction>
- <fraction name="key_letter_ratio_5row">62%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">36%</fraction>
-
- <dimen name="suggestions_strip_padding">252.0dp</dimen>
- <integer name="max_more_suggestions_row">5</integer>
- <fraction name="min_more_suggestions_width">50%</fraction>
-
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">26dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">76dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">26dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">17dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">10%p</fraction>
- <fraction name="emoji_keyboard_row_height">33%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">70%p</fraction>
- <integer name="emoji_keyboard_max_key_count">30</integer>
-
-</resources>
diff --git a/java/res/values-sw540dp/config-per-form-factor.xml b/java/res/values-sw540dp/config-per-form-factor.xml
new file mode 100644
index 000000000..7f898e017
--- /dev/null
+++ b/java/res/values-sw540dp/config-per-form-factor.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Configuration values for Large Phone. -->
+<resources>
+ <bool name="config_enable_show_key_preview_popup_option">false</bool>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="config_default_key_preview_popup">false</bool>
+ <bool name="config_default_sound_enabled">true</bool>
+ <bool name="config_enable_show_voice_key_option">true</bool>
+ <bool name="config_key_selection_by_dragging_finger">false</bool>
+ <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
+ false -->
+ <bool name="config_show_more_keys_keyboard_at_touched_point">false</bool>
+</resources>
diff --git a/java/res/values-hdpi/config.xml b/java/res/values-sw540dp/config-screen-metrics.xml
index 4cf3562fe..1205aaa1e 100644
--- a/java/res/values-hdpi/config.xml
+++ b/java/res/values-sw540dp/config-screen-metrics.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -20,11 +20,10 @@
<resources>
<!-- Screen metrics for logging.
- 0 = "mdpi phone screen"
- 1 = "hdpi phone screen"
- 2 = "mdpi 11 inch tablet screen"
- 3 = "xhdpi phone screen?"
- 4 = ?
+ 0 = "small phone screen"
+ 1 = "large phone screen"
+ 2 = "large tablet screen"
+ 3 = "small tablet screen"
-->
<integer name="log_screen_metrics">1</integer>
</resources>
diff --git a/java/res/values-sw540dp/config.xml b/java/res/values-sw540dp/config.xml
index 93862a767..8637d6bab 100644
--- a/java/res/values-sw540dp/config.xml
+++ b/java/res/values-sw540dp/config.xml
@@ -18,23 +18,78 @@
*/
-->
+<!-- Configuration values for Large Phone and Small Tablet Portrait. -->
<resources>
- <bool name="config_enable_show_voice_key_option">false</bool>
- <bool name="config_enable_show_option_of_key_preview_popup">false</bool>
- <bool name="config_enable_bigram_suggestions_option">false</bool>
- <!-- Whether or not Popup on key press is enabled by default -->
- <bool name="config_default_key_preview_popup">false</bool>
- <bool name="config_default_sound_enabled">true</bool>
- <bool name="config_auto_correction_spacebar_led_enabled">false</bool>
- <!-- The language is never displayed if == 0, always displayed if < 0 -->
- <integer name="config_delay_before_fadeout_language_on_spacebar">1200</integer>
- <integer name="config_max_more_keys_column">5</integer>
- <!--
- Configuration for MainKeyboardView
- -->
<dimen name="config_key_hysteresis_distance">40.0dp</dimen>
- <bool name="config_sliding_key_input_enabled">false</bool>
- <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
- false -->
- <bool name="config_show_more_keys_keyboard_at_touched_point">true</bool>
+
+ <!-- Preferable keyboard height in absolute scale: 48.0mm -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">302.4dp</dimen>
+ <fraction name="config_max_keyboard_height">46%p</fraction>
+ <fraction name="config_min_keyboard_height">-35.0%p</fraction>
+
+ <dimen name="config_more_keys_keyboard_key_height">63.0dp</dimen>
+ <dimen name="config_more_keys_keyboard_key_horizontal_padding">6dp</dimen>
+ <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
+ <!-- config_more_keys_keyboard_key_height x 1.2 -->
+ <dimen name="config_more_keys_keyboard_slide_allowance">98.3dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_gb">2.291%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">4.625%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">2.113%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -1.0 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_gb">-81.9dp</dimen>
+ <dimen name="config_key_preview_offset_gb">16.0dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_holo">2.335%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">4.0%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">4.5%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">1.565%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -0.5 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_holo">-31.5dp</dimen>
+ <dimen name="config_key_preview_offset_holo">8.0dp</dimen>
+
+ <dimen name="config_key_preview_height">94.5dp</dimen>
+ <fraction name="config_key_preview_text_ratio">50%</fraction>
+ <fraction name="config_key_letter_ratio">42%</fraction>
+ <fraction name="config_key_large_letter_ratio">45%</fraction>
+ <fraction name="config_key_label_ratio">25%</fraction>
+ <fraction name="config_key_large_label_ratio">32%</fraction>
+ <fraction name="config_key_hint_letter_ratio">23%</fraction>
+ <fraction name="config_key_hint_label_ratio">28%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">22%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">28.0%</fraction>
+ <!-- left or right padding of label alignment -->
+ <dimen name="config_key_label_horizontal_padding">6dp</dimen>
+ <dimen name="config_key_hint_letter_padding">3dp</dimen>
+ <dimen name="config_key_shifted_letter_hint_padding">3dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">3.20%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">52%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">27%</fraction>
+
+ <dimen name="config_suggestions_strip_height">44dp</dimen>
+ <dimen name="config_more_suggestions_row_height">44dp</dimen>
+ <integer name="config_max_more_suggestions_row">6</integer>
+ <fraction name="config_min_more_suggestions_width">90%</fraction>
+ <dimen name="config_suggestions_strip_horizontal_padding">94.5dp</dimen>
+ <dimen name="config_suggestion_min_width">48.0dp</dimen>
+ <dimen name="config_suggestion_text_horizontal_padding">12dp</dimen>
+ <dimen name="config_suggestion_text_size">22dp</dimen>
+ <dimen name="config_more_suggestions_hint_text_size">33dp</dimen>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">28dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">87dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">28dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">19dp</dimen>
+ <dimen name="config_gesture_floating_preview_round_radius">3dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">12.5%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">33%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">60%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">24</integer>
</resources>
diff --git a/java/res/values-sw540dp/dimens.xml b/java/res/values-sw540dp/dimens.xml
deleted file mode 100644
index b2f4ae043..000000000
--- a/java/res/values-sw540dp/dimens.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 48.0mm -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">302.4dp</dimen>
- <fraction name="maxKeyboardHeight">46%p</fraction>
- <fraction name="minKeyboardHeight">-35.0%p</fraction>
-
- <dimen name="popup_key_height">63.0dp</dimen>
-
- <fraction name="keyboard_top_padding_gb">2.291%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">0.0%p</fraction>
- <fraction name="key_bottom_gap_gb">4.625%p</fraction>
- <fraction name="key_horizontal_gap_gb">2.113%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">2.335%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">4.0%p</fraction>
- <fraction name="key_bottom_gap_ics">4.5%p</fraction>
- <fraction name="key_horizontal_gap_ics">1.565%p</fraction>
-
- <dimen name="more_keys_keyboard_key_horizontal_padding">6dp</dimen>
- <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
- <!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">98.3dp</dimen>
- <!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction_gb">-81.9dp</dimen>
-
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_padding">6dp</dimen>
- <dimen name="key_hint_letter_padding">3dp</dimen>
- <dimen name="key_uppercase_letter_padding">3dp</dimen>
-
- <fraction name="key_letter_ratio">42%</fraction>
- <fraction name="key_large_letter_ratio">45%</fraction>
- <fraction name="key_label_ratio">25%</fraction>
- <fraction name="key_large_label_ratio">32%</fraction>
- <fraction name="key_hint_letter_ratio">23%</fraction>
- <fraction name="key_hint_label_ratio">28%</fraction>
- <fraction name="key_uppercase_letter_ratio">22%</fraction>
- <fraction name="key_preview_text_ratio">50%</fraction>
- <fraction name="spacebar_text_ratio">28.0%</fraction>
- <dimen name="key_preview_height">94.5dp</dimen>
- <dimen name="key_preview_offset_gb">16.0dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">3.20%p</fraction>
- <fraction name="key_letter_ratio_5row">52%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">27%</fraction>
-
- <dimen name="key_preview_offset_ics">8.0dp</dimen>
- <!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-31.5dp</dimen>
-
- <dimen name="suggestions_strip_height">44dp</dimen>
- <dimen name="more_suggestions_row_height">44dp</dimen>
- <integer name="max_more_suggestions_row">6</integer>
- <fraction name="min_more_suggestions_width">90%</fraction>
- <dimen name="suggestions_strip_padding">94.5dp</dimen>
- <dimen name="suggestion_min_width">48.0dp</dimen>
- <dimen name="suggestion_padding">12dp</dimen>
- <dimen name="suggestion_text_size">22dp</dimen>
- <dimen name="more_suggestions_hint_text_size">33dp</dimen>
-
- <!-- Gesture trail parameters -->
- <dimen name="gesture_trail_width">2.5dp</dimen>
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">28dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">87dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">28dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">19dp</dimen>
- <dimen name="gesture_floating_preview_round_radius">3dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">12.5%p</fraction>
- <fraction name="emoji_keyboard_row_height">33%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">60%p</fraction>
- <integer name="emoji_keyboard_max_key_count">24</integer>
-
-</resources>
diff --git a/java/res/values-sw540dp/touch-position-correction.xml b/java/res/values-sw540dp/touch-position-correction.xml
index df07c1295..932b8fc72 100644
--- a/java/res/values-sw540dp/touch-position-correction.xml
+++ b/java/res/values-sw540dp/touch-position-correction.xml
@@ -48,7 +48,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_ics"
+ name="touch_position_correction_data_holo"
translatable="false"
>
<!-- The default touch position data (See com.android.inputmethod.keyboard.ProximityInfo)
diff --git a/java/res/values-sw600dp/config-per-form-factor.xml b/java/res/values-sw600dp/config-per-form-factor.xml
new file mode 100644
index 000000000..1c7e677a9
--- /dev/null
+++ b/java/res/values-sw600dp/config-per-form-factor.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Configuration values for Small Tablet. -->
+<resources>
+ <bool name="config_enable_show_key_preview_popup_option">false</bool>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="config_default_key_preview_popup">false</bool>
+ <bool name="config_default_sound_enabled">true</bool>
+ <bool name="config_enable_show_voice_key_option">false</bool>
+ <bool name="config_key_selection_by_dragging_finger">false</bool>
+ <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
+ false -->
+ <bool name="config_show_more_keys_keyboard_at_touched_point">false</bool>
+</resources>
diff --git a/java/res/values-sw600dp/config-screen-metrics.xml b/java/res/values-sw600dp/config-screen-metrics.xml
new file mode 100644
index 000000000..e939c068f
--- /dev/null
+++ b/java/res/values-sw600dp/config-screen-metrics.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <!-- Screen metrics for logging.
+ 0 = "small phone screen"
+ 1 = "large phone screen"
+ 2 = "large tablet screen"
+ 3 = "small tablet screen"
+ -->
+ <integer name="log_screen_metrics">3</integer>
+</resources>
diff --git a/java/res/values-sw768dp-land/config.xml b/java/res/values-sw768dp-land/config.xml
index b3cd7278d..b97872f54 100644
--- a/java/res/values-sw768dp-land/config.xml
+++ b/java/res/values-sw768dp-land/config.xml
@@ -18,6 +18,56 @@
*/
-->
+<!-- Configuration values for Large Tablet Landscape. -->
<resources>
<bool name="config_use_fullscreen_mode">false</bool>
+
+ <!-- Preferable keyboard height in absolute scale: 58.0mm -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">365.4dp</dimen>
+ <fraction name="config_min_keyboard_height">45%p</fraction>
+
+ <fraction name="config_keyboard_top_padding_gb">1.896%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">3.896%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">1.195%p</fraction>
+
+ <fraction name="config_keyboard_top_padding_holo">1.896%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">3.690%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">1.030%p</fraction>
+ <dimen name="config_key_preview_offset_holo">8.0dp</dimen>
+
+ <dimen name="config_more_keys_keyboard_key_height">81.9dp</dimen>
+
+ <dimen name="config_key_preview_height">107.1dp</dimen>
+ <fraction name="config_key_letter_ratio">43%</fraction>
+ <fraction name="config_key_large_letter_ratio">42%</fraction>
+ <fraction name="config_key_label_ratio">28%</fraction>
+ <fraction name="config_key_hint_letter_ratio">23%</fraction>
+ <fraction name="config_key_hint_label_ratio">28%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">24%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">24.00%</fraction>
+ <!-- left or right padding of label alignment -->
+ <dimen name="config_key_label_horizontal_padding">18dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">2.65%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">53%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">30%</fraction>
+
+ <dimen name="config_suggestions_strip_horizontal_padding">252.0dp</dimen>
+ <fraction name="config_min_more_suggestions_width">50%</fraction>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">32dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">100dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">32dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">21dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">7.69%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">33%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">60%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">39</integer>
</resources>
diff --git a/java/res/values-sw768dp-land/dimens.xml b/java/res/values-sw768dp-land/dimens.xml
deleted file mode 100644
index ce315b0fc..000000000
--- a/java/res/values-sw768dp-land/dimens.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 58.0mm -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">365.4dp</dimen>
- <fraction name="minKeyboardHeight">45%p</fraction>
-
- <fraction name="keyboard_top_padding_gb">1.896%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">0.0%p</fraction>
- <fraction name="key_bottom_gap_gb">3.896%p</fraction>
- <fraction name="key_horizontal_gap_gb">1.195%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">1.896%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
- <fraction name="key_bottom_gap_ics">3.690%p</fraction>
- <fraction name="key_horizontal_gap_ics">1.030%p</fraction>
-
- <dimen name="popup_key_height">81.9dp</dimen>
-
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_padding">18dp</dimen>
-
- <fraction name="key_letter_ratio">43%</fraction>
- <fraction name="key_large_letter_ratio">42%</fraction>
- <fraction name="key_label_ratio">28%</fraction>
- <fraction name="key_hint_letter_ratio">23%</fraction>
- <fraction name="key_hint_label_ratio">28%</fraction>
- <fraction name="key_uppercase_letter_ratio">24%</fraction>
- <fraction name="spacebar_text_ratio">24.00%</fraction>
- <dimen name="key_preview_height">107.1dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">2.65%p</fraction>
- <fraction name="key_letter_ratio_5row">53%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">30%</fraction>
-
- <dimen name="key_preview_offset_ics">8.0dp</dimen>
-
- <dimen name="suggestions_strip_padding">252.0dp</dimen>
- <fraction name="min_more_suggestions_width">50%</fraction>
-
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">32dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">100dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">32dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">21dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">7.69%p</fraction>
- <fraction name="emoji_keyboard_row_height">33%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">60%p</fraction>
- <integer name="emoji_keyboard_max_key_count">39</integer>
-
-</resources>
diff --git a/java/res/values-sw768dp/config-per-form-factor.xml b/java/res/values-sw768dp/config-per-form-factor.xml
new file mode 100644
index 000000000..136f41567
--- /dev/null
+++ b/java/res/values-sw768dp/config-per-form-factor.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Configuration values for Large Tablet. -->
+<resources>
+ <bool name="config_enable_show_key_preview_popup_option">false</bool>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="config_default_key_preview_popup">false</bool>
+ <bool name="config_default_sound_enabled">true</bool>
+ <bool name="config_enable_show_voice_key_option">false</bool>
+ <bool name="config_key_selection_by_dragging_finger">false</bool>
+ <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
+ false -->
+ <bool name="config_show_more_keys_keyboard_at_touched_point">true</bool>
+</resources>
diff --git a/java/res/values-sw768dp/config-screen-metrics.xml b/java/res/values-sw768dp/config-screen-metrics.xml
new file mode 100644
index 000000000..c555cbb9f
--- /dev/null
+++ b/java/res/values-sw768dp/config-screen-metrics.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <!-- Screen metrics for logging.
+ 0 = "small phone screen"
+ 1 = "large phone screen"
+ 2 = "large tablet screen"
+ 3 = "small tablet screen"
+ -->
+ <integer name="log_screen_metrics">2</integer>
+</resources>
diff --git a/java/res/values-sw768dp/config.xml b/java/res/values-sw768dp/config.xml
index e1c07d6f8..33286c686 100644
--- a/java/res/values-sw768dp/config.xml
+++ b/java/res/values-sw768dp/config.xml
@@ -18,28 +18,76 @@
*/
-->
+<!-- Configuration values for Large Tablet Portrait. -->
<resources>
- <bool name="config_enable_show_voice_key_option">false</bool>
- <bool name="config_enable_show_option_of_key_preview_popup">false</bool>
- <bool name="config_enable_bigram_suggestions_option">false</bool>
- <!-- Whether or not Popup on key press is enabled by default -->
- <bool name="config_default_key_preview_popup">false</bool>
- <bool name="config_default_sound_enabled">true</bool>
- <bool name="config_auto_correction_spacebar_led_enabled">false</bool>
- <integer name="config_max_more_keys_column">5</integer>
- <!--
- Configuration for MainKeyboardView
- -->
- <bool name="config_sliding_key_input_enabled">false</bool>
- <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
- false -->
- <bool name="config_show_more_keys_keyboard_at_touched_point">true</bool>
- <!-- Screen metrics for logging.
- 0 = "mdpi phone screen"
- 1 = "hdpi phone screen"
- 2 = "mdpi 11 inch tablet screen"
- 3 = "xhdpi phone screen?"
- 4 = ?
- -->
- <integer name="log_screen_metrics">2</integer>
+ <!-- Preferable keyboard height in absolute scale: 48.0mm -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">302.4dp</dimen>
+ <fraction name="config_max_keyboard_height">46%p</fraction>
+ <fraction name="config_min_keyboard_height">-35.0%p</fraction>
+
+ <fraction name="config_keyboard_top_padding_gb">2.291%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">4.687%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">1.272%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -1.0 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_gb">-81.9dp</dimen>
+ <dimen name="config_key_preview_offset_gb">16.0dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_holo">2.335%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">0.0%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">3.312%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">1.066%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -0.5 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_holo">-31.5dp</dimen>
+ <dimen name="config_key_preview_offset_holo">8.0dp</dimen>
+
+ <dimen name="config_more_keys_keyboard_key_height">63.0dp</dimen>
+ <dimen name="config_more_keys_keyboard_key_horizontal_padding">12dp</dimen>
+ <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
+ <!-- config_more_keys_keyboard_key_height x 1.2 -->
+ <dimen name="config_more_keys_keyboard_slide_allowance">98.3dp</dimen>
+
+ <dimen name="config_key_preview_height">94.5dp</dimen>
+ <fraction name="config_key_preview_text_ratio">50%</fraction>
+ <fraction name="config_key_letter_ratio">40%</fraction>
+ <fraction name="config_key_large_letter_ratio">42%</fraction>
+ <fraction name="config_key_label_ratio">28%</fraction>
+ <fraction name="config_key_large_label_ratio">28%</fraction>
+ <fraction name="config_key_hint_letter_ratio">23%</fraction>
+ <fraction name="config_key_hint_label_ratio">28%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">26%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">29.03%</fraction>
+ <!-- left or right padding of label alignment -->
+ <dimen name="config_key_label_horizontal_padding">6dp</dimen>
+ <dimen name="config_key_hint_letter_padding">3dp</dimen>
+ <dimen name="config_key_shifted_letter_hint_padding">3dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">2.95%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">51%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">33%</fraction>
+
+ <dimen name="config_suggestions_strip_height">44dp</dimen>
+ <dimen name="config_more_suggestions_row_height">44dp</dimen>
+ <integer name="config_max_more_suggestions_row">6</integer>
+ <fraction name="config_min_more_suggestions_width">90%</fraction>
+ <dimen name="config_suggestions_strip_horizontal_padding">94.5dp</dimen>
+ <dimen name="config_suggestion_min_width">46dp</dimen>
+ <dimen name="config_suggestion_text_horizontal_padding">8dp</dimen>
+ <dimen name="config_suggestion_text_size">22dp</dimen>
+ <dimen name="config_more_suggestions_hint_text_size">33dp</dimen>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">26dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">86dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">26dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">17dp</dimen>
+ <dimen name="config_gesture_floating_preview_round_radius">3dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">10%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">33%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">68%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">30</integer>
</resources>
diff --git a/java/res/values-sw768dp/dimens.xml b/java/res/values-sw768dp/dimens.xml
deleted file mode 100644
index c90da7fed..000000000
--- a/java/res/values-sw768dp/dimens.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 48.0mm -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">302.4dp</dimen>
- <fraction name="maxKeyboardHeight">46%p</fraction>
- <fraction name="minKeyboardHeight">-35.0%p</fraction>
-
- <fraction name="keyboard_top_padding_gb">2.291%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">0.0%p</fraction>
- <fraction name="key_bottom_gap_gb">4.687%p</fraction>
- <fraction name="key_horizontal_gap_gb">1.272%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">2.335%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">0.0%p</fraction>
- <fraction name="key_bottom_gap_ics">3.312%p</fraction>
- <fraction name="key_horizontal_gap_ics">1.066%p</fraction>
-
- <dimen name="popup_key_height">63.0dp</dimen>
-
- <dimen name="more_keys_keyboard_key_horizontal_padding">12dp</dimen>
- <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
- <!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">98.3dp</dimen>
- <!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction_gb">-81.9dp</dimen>
-
- <!-- left or right padding of label alignment -->
- <dimen name="key_label_horizontal_padding">6dp</dimen>
- <dimen name="key_hint_letter_padding">3dp</dimen>
- <dimen name="key_uppercase_letter_padding">3dp</dimen>
-
- <fraction name="key_letter_ratio">40%</fraction>
- <fraction name="key_large_letter_ratio">42%</fraction>
- <fraction name="key_label_ratio">28%</fraction>
- <fraction name="key_large_label_ratio">28%</fraction>
- <fraction name="key_hint_letter_ratio">23%</fraction>
- <fraction name="key_hint_label_ratio">28%</fraction>
- <fraction name="key_uppercase_letter_ratio">26%</fraction>
- <fraction name="key_preview_text_ratio">50%</fraction>
- <fraction name="spacebar_text_ratio">29.03%</fraction>
- <dimen name="key_preview_height">94.5dp</dimen>
- <dimen name="key_preview_offset_gb">16.0dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">2.95%p</fraction>
- <fraction name="key_letter_ratio_5row">51%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">33%</fraction>
-
- <dimen name="key_preview_offset_ics">8.0dp</dimen>
- <!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-31.5dp</dimen>
-
- <dimen name="suggestions_strip_height">44dp</dimen>
- <dimen name="more_suggestions_row_height">44dp</dimen>
- <integer name="max_more_suggestions_row">6</integer>
- <fraction name="min_more_suggestions_width">90%</fraction>
- <dimen name="suggestions_strip_padding">94.5dp</dimen>
- <dimen name="suggestion_min_width">46dp</dimen>
- <dimen name="suggestion_padding">8dp</dimen>
- <dimen name="suggestion_text_size">22dp</dimen>
- <dimen name="more_suggestions_hint_text_size">33dp</dimen>
-
- <!-- Gesture trail parameters -->
- <dimen name="gesture_trail_width">2.5dp</dimen>
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">26dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">86dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">26dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">17dp</dimen>
- <dimen name="gesture_floating_preview_round_radius">3dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">10%p</fraction>
- <fraction name="emoji_keyboard_row_height">33%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">68%p</fraction>
- <integer name="emoji_keyboard_max_key_count">30</integer>
-
-</resources>
diff --git a/java/res/values-th/donottranslate.xml b/java/res/values-th/config-spacing-and-punctuations.xml
index a9893feec..a9893feec 100644
--- a/java/res/values-th/donottranslate.xml
+++ b/java/res/values-th/config-spacing-and-punctuations.xml
diff --git a/java/res/values-th/strings-action-keys.xml b/java/res/values-th/strings-action-keys.xml
new file mode 100644
index 000000000..f23bfbc2a
--- /dev/null
+++ b/java/res/values-th/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"เริ่ม"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"ถัดไป"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"ก่อน"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"เสร็จ"</string>
+ <string name="label_send_key" msgid="482252074224462163">"ส่ง"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"หยุด"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"รอ"</string>
+</resources>
diff --git a/java/res/values-th/strings.xml b/java/res/values-th/strings.xml
index bb8b556ce..8b1567679 100644
--- a/java/res/values-th/strings.xml
+++ b/java/res/values-th/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"ดูตัวอย่างลอยแบบไดนามิก"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"ดูคำแนะนำในขณะที่ใช้ท่าทางสัมผัส"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : บันทึกแล้ว"</string>
- <string name="label_go_key" msgid="1635148082137219148">"ไป"</string>
- <string name="label_next_key" msgid="362972844525672568">"ถัดไป"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"ก่อนหน้า"</string>
- <string name="label_done_key" msgid="2441578748772529288">"เสร็จสิ้น"</string>
- <string name="label_send_key" msgid="2815056534433717444">"ส่ง"</string>
- <string name="label_pause_key" msgid="181098308428035340">"หยุดชั่วคราว"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"รอ"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"เสียบชุดหูฟังเพื่อฟังเสียงเมื่อพิมพ์รหัสผ่าน"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"ข้อความปัจจุบันคือ %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"ไม่มีข้อความ"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"เวลา"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"แป้นการป้อนข้อมูลด้วยเสียง"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"บนแป้นพิมพ์หลัก"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"บนแป้นพิมพ์สัญลักษณ์"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"ปิด"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"ไมค์บนแป้นพิมพ์หลัก"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"ไมค์บนแป้นพิมพ์สัญลักษณ์"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"ปิดใช้งานป้อนข้อมูลด้วยเสียง"</string>
<string name="configure_input_method" msgid="373356270290742459">"กำหนดค่าวิธีการป้อนข้อมูล"</string>
<string name="language_selection_title" msgid="1651299598555326750">"ภาษาในการป้อนข้อมูล"</string>
<string name="send_feedback" msgid="1780431884109392046">"ส่งข้อเสนอแนะ"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"ตัวอักษร (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"ตัวอักษร (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"อีโมจิ"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"รูปแบบสี"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"ขาว"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"น้ำเงิน"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"รูปแบบอินพุตกำหนดเอง"</string>
<string name="add_style" msgid="6163126614514489951">"เพิ่มสไตล์"</string>
<string name="add" msgid="8299699805688017798">"เพิ่ม"</string>
diff --git a/java/res/values-tl/strings-action-keys.xml b/java/res/values-tl/strings-action-keys.xml
new file mode 100644
index 000000000..a7f4cc78f
--- /dev/null
+++ b/java/res/values-tl/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Go"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Sunod"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Nauna"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Tapos"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Send"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Pause"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Intay"</string>
+</resources>
diff --git a/java/res/values-tl/strings.xml b/java/res/values-tl/strings.xml
index 60ba0814c..5da0861a9 100644
--- a/java/res/values-tl/strings.xml
+++ b/java/res/values-tl/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dynamic na floating preview"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Tingnan ang iminungkahing salita habang gumagalaw"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Na-save"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Punta"</string>
- <string name="label_next_key" msgid="362972844525672568">"Susunod"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Nkrn"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Tapos na"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Ipadala"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Pause"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Intay"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Mag-plug in ng headset upang marinig ang mga password key na binabanggit nang malakas."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Ang kasalukuyang teksto ay %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Walang tekstong inilagay"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"oras"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Voice input key"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Sa pangunahing keyboard"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Sa keyboard ng mga simbolo"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Naka-off"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Mic sa pangunahing keyboard"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Mic sa keyboard ng mga simbolo"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Hindi pinagana ang voice input"</string>
<string name="configure_input_method" msgid="373356270290742459">"I-configure ang mga pamamaraan ng pag-input"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Mag-input ng mga wika"</string>
<string name="send_feedback" msgid="1780431884109392046">"Magpadala ng feedback"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alpabeto (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alpabeto (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Scheme ng kulay"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Puti"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Asul"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Custom style ng input"</string>
<string name="add_style" msgid="6163126614514489951">"Dagdag style"</string>
<string name="add" msgid="8299699805688017798">"Idagdag"</string>
diff --git a/java/res/values-tr/strings-action-keys.xml b/java/res/values-tr/strings-action-keys.xml
new file mode 100644
index 000000000..b34c576b6
--- /dev/null
+++ b/java/res/values-tr/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Git"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"İleri"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Geri"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Bitti"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Gönder"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Dur"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Bekle"</string>
+</resources>
diff --git a/java/res/values-tr/strings.xml b/java/res/values-tr/strings.xml
index 676cc3c7d..7304f464b 100644
--- a/java/res/values-tr/strings.xml
+++ b/java/res/values-tr/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Dinamik kayan önizleme"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Hareket sırasında önerilen kelimeyi göster"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Kaydedildi"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Git"</string>
- <string name="label_next_key" msgid="362972844525672568">"İleri"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Önceki"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Bitti"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Gönder"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Durkl"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Bekle"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Şifre tuşlarının sesli okunmasını dinlemek için mikrofonlu kulaklık takın."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Mevcut metin: %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Hiç metin girilmedi"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"saat"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Ses girişi tuşu"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Ana klavyede"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Simge klavyesinde"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Kapalı"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Ana klavyedeki mikrofon"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Simge klavysnd mikrf"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Sesle grş devre dışı"</string>
<string name="configure_input_method" msgid="373356270290742459">"Giriş yöntemlerini yapılandır"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Giriş dilleri"</string>
<string name="send_feedback" msgid="1780431884109392046">"Geri bildirim gönder"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabe (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabe (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Renk şeması"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Beyaz"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Mavi"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Özel giriş stilleri"</string>
<string name="add_style" msgid="6163126614514489951">"Stil ekle"</string>
<string name="add" msgid="8299699805688017798">"Ekle"</string>
diff --git a/java/res/values-uk/strings-action-keys.xml b/java/res/values-uk/strings-action-keys.xml
new file mode 100644
index 000000000..3e5762b3f
--- /dev/null
+++ b/java/res/values-uk/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Іти"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Далі"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Назад"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"ОК"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Слати"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Пауза"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Ждати"</string>
+</resources>
diff --git a/java/res/values-uk/strings.xml b/java/res/values-uk/strings.xml
index 2a8b937c2..ab952912d 100644
--- a/java/res/values-uk/strings.xml
+++ b/java/res/values-uk/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Динамічний спливаючий перегляд"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Показувати пропоноване слово під час введення тексту жестами"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : збережено"</string>
- <string name="label_go_key" msgid="1635148082137219148">"OK"</string>
- <string name="label_next_key" msgid="362972844525672568">"Далі"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Назад"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Готово"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Надісл."</string>
- <string name="label_pause_key" msgid="181098308428035340">"Пауза"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Чек."</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Підключіть гарнітуру, щоб прослухати відтворені вголос символи пароля."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Поточний текст – %s."</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Текст не введено"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"час"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL-адреси"</string>
<string name="voice_input" msgid="3583258583521397548">"Ключ голосового вводу"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"На основ. клавіатурі"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Символьна клавіатура"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Вимк."</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Мікрофон на основній клавіатурі"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Miкр. на симв. клавіат."</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Голос. ввід вимкнено"</string>
<string name="configure_input_method" msgid="373356270290742459">"Налаштування методів введення"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Мови вводу"</string>
<string name="send_feedback" msgid="1780431884109392046">"Надіслати відгук"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Латиниця (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Латиниця (ПК)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Cмайли Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Схема кольорів"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Біла"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Синя"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Персональні стилі введення"</string>
<string name="add_style" msgid="6163126614514489951">"Додати стиль"</string>
<string name="add" msgid="8299699805688017798">"Додати"</string>
diff --git a/java/res/values-vi/strings-action-keys.xml b/java/res/values-vi/strings-action-keys.xml
new file mode 100644
index 000000000..ceb780ed1
--- /dev/null
+++ b/java/res/values-vi/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Tìm"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Tiếp"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Trước"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Xong"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Gửi"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Tdừng"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Đợi"</string>
+</resources>
diff --git a/java/res/values-vi/strings.xml b/java/res/values-vi/strings.xml
index 74ef95a83..d75016a0a 100644
--- a/java/res/values-vi/strings.xml
+++ b/java/res/values-vi/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Xem trước nổi động"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Xem từ được đề xuất trong khi dùng cử chỉ"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Đã lưu"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Tìm"</string>
- <string name="label_next_key" msgid="362972844525672568">"Tiếp theo"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Trước"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Xong"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Gửi"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Tạm dừng"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Đợi"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Cắm tai nghe để nghe mật khẩu."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Ký tự hiện tại là %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Không có ký tự nào được nhập"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"giờ"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Khóa nhập giọng nói"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Trên bàn phím chính"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Trên bàn phím biểu tượng"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"Tắt"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"Micrô trên bàn phím chính"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Micrô trên bàn phím biểu tượng"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Nhập liệu bằng giọng nói đã bị tắt"</string>
<string name="configure_input_method" msgid="373356270290742459">"Định cấu hình phương thức nhập"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Ngôn ngữ nhập"</string>
<string name="send_feedback" msgid="1780431884109392046">"Gửi phản hồi"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Bảng chữ cái (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Bảng chữ cái (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Biểu tượng cảm xúc"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Phối màu"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Trắng"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Lam"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Kiểu nhập tùy chỉnh"</string>
<string name="add_style" msgid="6163126614514489951">"Thêm kiểu"</string>
<string name="add" msgid="8299699805688017798">"Thêm"</string>
diff --git a/java/res/values-zh-rCN/strings-action-keys.xml b/java/res/values-zh-rCN/strings-action-keys.xml
new file mode 100644
index 000000000..aacbb5fc7
--- /dev/null
+++ b/java/res/values-zh-rCN/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"前往"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"下个"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"上个"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"完成"</string>
+ <string name="label_send_key" msgid="482252074224462163">"发送"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"暂停"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"等待"</string>
+</resources>
diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml
index c55269329..1b59935a2 100644
--- a/java/res/values-zh-rCN/strings.xml
+++ b/java/res/values-zh-rCN/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"动态漂浮预览"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"在滑行输入过程中显示建议字词"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>:已保存"</string>
- <string name="label_go_key" msgid="1635148082137219148">"开始"</string>
- <string name="label_next_key" msgid="362972844525672568">"下个"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"后退"</string>
- <string name="label_done_key" msgid="2441578748772529288">"完成"</string>
- <string name="label_send_key" msgid="2815056534433717444">"发送"</string>
- <string name="label_pause_key" msgid="181098308428035340">"暂停"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"等待"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"需要插入耳机才能听到密码的按键声。"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"当前文本为%s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"未输入文字"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"时间"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"网址"</string>
<string name="voice_input" msgid="3583258583521397548">"语音输入键"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"主键盘上"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"符号键盘上"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"关闭"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"主键盘上的麦克风"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"符号键盘上的麦克风"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"语音输入功能已停用"</string>
<string name="configure_input_method" msgid="373356270290742459">"配置输入法"</string>
<string name="language_selection_title" msgid="1651299598555326750">"输入语言"</string>
<string name="send_feedback" msgid="1780431884109392046">"发送反馈"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"字母 (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"字母 (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"表情符号"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"配色方案"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"白色"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"蓝色"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"自定义输入风格"</string>
<string name="add_style" msgid="6163126614514489951">"添加样式"</string>
<string name="add" msgid="8299699805688017798">"添加"</string>
diff --git a/java/res/values-zh-rHK/strings-action-keys.xml b/java/res/values-zh-rHK/strings-action-keys.xml
new file mode 100644
index 000000000..e95251696
--- /dev/null
+++ b/java/res/values-zh-rHK/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"前往"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"下一步"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"上一步"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"完成"</string>
+ <string name="label_send_key" msgid="482252074224462163">"傳送"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"暫停"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"等候"</string>
+</resources>
diff --git a/java/res/values-zh-rHK/strings.xml b/java/res/values-zh-rHK/strings.xml
index 17aef4b83..665728db7 100644
--- a/java/res/values-zh-rHK/strings.xml
+++ b/java/res/values-zh-rHK/strings.xml
@@ -74,18 +74,11 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"動態浮動預覽"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"在啟用手勢輸入時顯示建議的字詞"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>:已儲存"</string>
- <string name="label_go_key" msgid="1635148082137219148">"開始"</string>
- <string name="label_next_key" msgid="362972844525672568">"下一步"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"上一步"</string>
- <string name="label_done_key" msgid="2441578748772529288">"完成"</string>
- <string name="label_send_key" msgid="2815056534433717444">"發送"</string>
- <string name="label_pause_key" msgid="181098308428035340">"暫停"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"等候"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"插上耳機即可聽到系統朗讀密碼鍵。"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"目前文字為 %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"未輸入文字"</string>
- <string name="spoken_auto_correct" msgid="8005997889020109763">"按下「<xliff:g id="KEY">%1$s</xliff:g>」可將「<xliff:g id="ORIGINAL_WORD">%2$s</xliff:g>」修正為「<xliff:g id="CORRECTED">%3$s</xliff:g>」"</string>
- <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"按下「<xliff:g id="KEY">%1$s</xliff:g>」可自動修正"</string>
+ <string name="spoken_auto_correct" msgid="8005997889020109763">"按「<xliff:g id="KEY">%1$s</xliff:g>」可將「<xliff:g id="ORIGINAL_WORD">%2$s</xliff:g>」修正為「<xliff:g id="CORRECTED">%3$s</xliff:g>」"</string>
+ <string name="spoken_auto_correct_obscured" msgid="6276420476908833791">"按「<xliff:g id="KEY">%1$s</xliff:g>」可自動修正"</string>
<string name="spoken_description_unknown" msgid="3197434010402179157">"按鍵代碼 %d"</string>
<string name="spoken_description_shift" msgid="244197883292549308">"Shift 鍵"</string>
<string name="spoken_description_shift_shifted" msgid="1681877323344195035">"Shift 鍵已開啟 (輕按即可停用)"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"時間"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"網址"</string>
<string name="voice_input" msgid="3583258583521397548">"語音輸入鍵"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"於主鍵盤"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"符號鍵盤上"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"關閉"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"主鍵盤上的麥克風"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"符號鍵盤上的麥克風"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"語音輸入已停用"</string>
<string name="configure_input_method" msgid="373356270290742459">"設定輸入法"</string>
<string name="language_selection_title" msgid="1651299598555326750">"輸入語言"</string>
<string name="send_feedback" msgid="1780431884109392046">"傳送意見"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"字母 (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"字母 (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"色彩配置"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"白色"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"藍色"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"自訂輸入樣式"</string>
<string name="add_style" msgid="6163126614514489951">"新增樣式"</string>
<string name="add" msgid="8299699805688017798">"新增"</string>
diff --git a/java/res/values-zh-rTW/strings-action-keys.xml b/java/res/values-zh-rTW/strings-action-keys.xml
new file mode 100644
index 000000000..00daa5c63
--- /dev/null
+++ b/java/res/values-zh-rTW/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"執行"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"繼續"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"返回"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"完成"</string>
+ <string name="label_send_key" msgid="482252074224462163">"傳送"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"暫停"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"等待"</string>
+</resources>
diff --git a/java/res/values-zh-rTW/strings.xml b/java/res/values-zh-rTW/strings.xml
index 7df5fc538..d082fc744 100644
--- a/java/res/values-zh-rTW/strings.xml
+++ b/java/res/values-zh-rTW/strings.xml
@@ -29,7 +29,7 @@
<string name="popup_on_keypress" msgid="123894815723512944">"按鍵時彈出"</string>
<string name="general_category" msgid="1859088467017573195">"一般"</string>
<string name="correction_category" msgid="2236750915056607613">"文字修正"</string>
- <string name="gesture_typing_category" msgid="497263612130532630">"手勢輸入"</string>
+ <string name="gesture_typing_category" msgid="497263612130532630">"滑行輸入"</string>
<string name="misc_category" msgid="6894192814868233453">"其他選項"</string>
<string name="advanced_settings" msgid="362895144495591463">"進階設定"</string>
<string name="advanced_settings_summary" msgid="4487980456152830271">"進階選項"</string>
@@ -44,7 +44,7 @@
<string name="key_preview_popup_dismiss_default_delay" msgid="2166964333903906734">"預設"</string>
<string name="abbreviation_unit_milliseconds" msgid="8700286094028323363">"<xliff:g id="MILLISECONDS">%s</xliff:g> 毫秒"</string>
<string name="settings_system_default" msgid="6268225104743331821">"系統預設"</string>
- <string name="use_contacts_dict" msgid="4435317977804180815">"建議聯絡人姓名"</string>
+ <string name="use_contacts_dict" msgid="4435317977804180815">"聯絡人姓名建議"</string>
<string name="use_contacts_dict_summary" msgid="6599983334507879959">"根據「聯絡人」名稱提供建議與修正"</string>
<string name="use_double_space_period" msgid="8781529969425082860">"輕按兩下空格鍵即插入句號"</string>
<string name="use_double_space_period_summary" msgid="6532892187247952799">"輕按兩下空格鍵可插入句號另加一個空格"</string>
@@ -68,19 +68,12 @@
<string name="auto_correction_threshold_mode_very_aggressive" msgid="1853309024129480416">"極大幅度更正"</string>
<string name="bigram_prediction" msgid="1084449187723948550">"建議下一個字詞"</string>
<string name="bigram_prediction_summary" msgid="3896362682751109677">"根據前一個字詞提供建議"</string>
- <string name="gesture_input" msgid="826951152254563827">"啟用手勢輸入"</string>
+ <string name="gesture_input" msgid="826951152254563827">"啟用滑行輸入"</string>
<string name="gesture_input_summary" msgid="9180350639305731231">"以滑動方式寫出字詞中字母來輸入字詞"</string>
<string name="gesture_preview_trail" msgid="3802333369335722221">"顯示手勢軌跡"</string>
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"動態浮動預覽"</string>
- <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"使用手勢輸入時顯示建議字詞"</string>
+ <string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"使用滑行輸入時顯示建議字詞"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>:已儲存"</string>
- <string name="label_go_key" msgid="1635148082137219148">"前往"</string>
- <string name="label_next_key" msgid="362972844525672568">"下一頁"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"上一頁"</string>
- <string name="label_done_key" msgid="2441578748772529288">"完成"</string>
- <string name="label_send_key" msgid="2815056534433717444">"傳送"</string>
- <string name="label_pause_key" msgid="181098308428035340">"暫停"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"等待"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"連接耳機即可聽取系統朗讀密碼按鍵。"</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"目前文字為 %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"未輸入文字"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"時間"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"網址"</string>
<string name="voice_input" msgid="3583258583521397548">"語音輸入按鍵"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"主鍵盤上"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"符號鍵盤上"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"關閉"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"主鍵盤上的麥克風"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"符號鍵盤上的麥克風"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"語音輸入已停用"</string>
<string name="configure_input_method" msgid="373356270290742459">"設定輸入法"</string>
<string name="language_selection_title" msgid="1651299598555326750">"輸入語言"</string>
<string name="send_feedback" msgid="1780431884109392046">"提供意見"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"字母 (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"字母 (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"表情符號"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"色彩配置"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"白色"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"藍色"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"自訂輸入樣式"</string>
<string name="add_style" msgid="6163126614514489951">"新增樣式"</string>
<string name="add" msgid="8299699805688017798">"新增"</string>
@@ -176,7 +166,7 @@
<string name="error" msgid="8940763624668513648">"發生錯誤"</string>
<string name="button_default" msgid="3988017840431881491">"預設"</string>
<string name="setup_welcome_title" msgid="6112821709832031715">"歡迎使用 <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
- <string name="setup_welcome_additional_description" msgid="8150252008545768953">"含手勢輸入功能"</string>
+ <string name="setup_welcome_additional_description" msgid="8150252008545768953">"含滑行輸入功能"</string>
<string name="setup_start_action" msgid="8936036460897347708">"開始設定"</string>
<string name="setup_next_action" msgid="371821437915144603">"下一步"</string>
<string name="setup_steps_title" msgid="6400373034871816182">"正在設定「<xliff:g id="APPLICATION_NAME">%s</xliff:g>」"</string>
diff --git a/java/res/values-zu/strings-action-keys.xml b/java/res/values-zu/strings-action-keys.xml
new file mode 100644
index 000000000..6cd5e8c99
--- /dev/null
+++ b/java/res/values-zu/strings-action-keys.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="label_go_key" msgid="4033615332628671065">"Hamba"</string>
+ <string name="label_next_key" msgid="5586407279258592635">"Okulandelayo"</string>
+ <string name="label_previous_key" msgid="1421141755779895275">"Okwedlule"</string>
+ <string name="label_done_key" msgid="7564866296502630852">"Kwenziwe"</string>
+ <string name="label_send_key" msgid="482252074224462163">"Thumela"</string>
+ <string name="label_pause_key" msgid="2225922926459730642">"Misa isikhashana"</string>
+ <string name="label_wait_key" msgid="5891247853595466039">"Linda"</string>
+</resources>
diff --git a/java/res/values-zu/strings.xml b/java/res/values-zu/strings.xml
index d245c32d4..fb2cd6e34 100644
--- a/java/res/values-zu/strings.xml
+++ b/java/res/values-zu/strings.xml
@@ -74,13 +74,6 @@
<string name="gesture_floating_preview_text" msgid="4443240334739381053">"Ukuhlola kuqala okuntantayo okunamandla"</string>
<string name="gesture_floating_preview_text_summary" msgid="4472696213996203533">"Bona igama eliphakanyisiwe ngenkathi uthinta"</string>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g> : Kulondoloziwe"</string>
- <string name="label_go_key" msgid="1635148082137219148">"Iya"</string>
- <string name="label_next_key" msgid="362972844525672568">"Okulandelayo"</string>
- <string name="label_previous_key" msgid="1211868118071386787">"Eledlule"</string>
- <string name="label_done_key" msgid="2441578748772529288">"Kwenziwe"</string>
- <string name="label_send_key" msgid="2815056534433717444">"Thumela"</string>
- <string name="label_pause_key" msgid="181098308428035340">"Misa okwesikhashana"</string>
- <string name="label_wait_key" msgid="6402152600878093134">"Linda"</string>
<string name="spoken_use_headphones" msgid="896961781287283493">"Plaka ku-headset ukuze uzwe okhiye bephasiwedi ezindlebeni zakho bezwakala kakhulu."</string>
<string name="spoken_current_text_is" msgid="2485723011272583845">"Umbhalo wamanje ngu %s"</string>
<string name="spoken_no_text_entered" msgid="7479685225597344496">"Awukho umbhalo ofakiwe"</string>
@@ -124,12 +117,6 @@
<string name="keyboard_mode_time" msgid="4381856885582143277">"isikhathi"</string>
<string name="keyboard_mode_url" msgid="1519819835514911218">"I-URL"</string>
<string name="voice_input" msgid="3583258583521397548">"Inkinobho yokufaka izwi"</string>
- <string name="voice_input_modes_main_keyboard" msgid="3360660341121083174">"Kwikhibhodi eyisisekelo"</string>
- <string name="voice_input_modes_symbols_keyboard" msgid="7203213240786084067">"Ikhibhodi yezimpawu"</string>
- <string name="voice_input_modes_off" msgid="3745699748218082014">"VALIWE"</string>
- <string name="voice_input_modes_summary_main_keyboard" msgid="6586544292900314339">"I-mic kwikhibhodi eyisisekelo"</string>
- <string name="voice_input_modes_summary_symbols_keyboard" msgid="5233725927281932391">"Ikhibhodi yezimpawu ze-mic"</string>
- <string name="voice_input_modes_summary_off" msgid="63875609591897607">"Okufakwayo ngezwi kuvinjelwe"</string>
<string name="configure_input_method" msgid="373356270290742459">"Misa izindlela zokufakwayo"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Izilimi zokufakwayo"</string>
<string name="send_feedback" msgid="1780431884109392046">"Thumela impendulo"</string>
@@ -154,6 +141,9 @@
<string name="subtype_no_language_colemak" msgid="5837418400010302623">"Alfabhethi (Colemak)"</string>
<string name="subtype_no_language_pcqwerty" msgid="5354918232046200018">"Alfabhethi (PC)"</string>
<string name="subtype_emoji" msgid="7483586578074549196">"I-Emoji"</string>
+ <string name="keyboard_color_scheme" msgid="9192934113872818070">"Isikimu sombala"</string>
+ <string name="keyboard_color_scheme_white" msgid="6684064723850265438">"Okumhlophe"</string>
+ <string name="keyboard_color_scheme_blue" msgid="2488527224758177593">"Okuluhlaza okwesibhakabhaka"</string>
<string name="custom_input_styles_title" msgid="8429952441821251512">"Izitayela zokufaka ngokwezifiso"</string>
<string name="add_style" msgid="6163126614514489951">"Engeza isitayela"</string>
<string name="add" msgid="8299699805688017798">"Engeza"</string>
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 31945d020..a9474a03a 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -26,14 +26,14 @@
<attr name="keyboardViewStyle" format="reference" />
<!-- MainKeyboardView style -->
<attr name="mainKeyboardViewStyle" format="reference" />
+ <!-- Key preview text view style -->
+ <attr name="keyPreviewTextViewStyle" format="reference"/>
<!-- EmojiPalettesView style -->
<attr name="emojiPalettesViewStyle" format="reference" />
<!-- MoreKeysKeyboard style -->
<attr name="moreKeysKeyboardStyle" format="reference" />
<!-- MoreKeysKeyboardView style -->
<attr name="moreKeysKeyboardViewStyle" format="reference" />
- <!-- MoreKeysKeyboardView container style -->
- <attr name="moreKeysKeyboardContainerStyle" format="reference" />
<!-- Suggestions strip style -->
<attr name="suggestionStripViewStyle" format="reference" />
<!-- Suggestion word style -->
@@ -41,9 +41,9 @@
</declare-styleable>
<declare-styleable name="KeyboardView">
- <!-- Image for the key. This image needs to be a StateListDrawable, with the following
- possible states: normal, pressed, checkable, checkable+pressed, checkable+checked,
- checkable+checked+pressed. -->
+ <!-- Image for the key. This image needs to be a {@link StateListDrawable}, with the
+ following possible states: normal, pressed, checkable, checkable+pressed,
+ checkable+checked, checkable+checked+pressed. -->
<attr name="keyBackground" format="reference" />
<!-- Image for the functional key used in Emoji layout. -->
<attr name="keyBackgroundEmojiFunctional" format="reference" />
@@ -72,9 +72,11 @@
<attr name="autoCorrectionSpacebarLedEnabled" format="boolean" />
<attr name="autoCorrectionSpacebarLedIcon" format="reference" />
<!-- Size of the text for spacebar language label, in the proportion of key height. -->
- <attr name="spacebarTextRatio" format="fraction" />
- <attr name="spacebarTextColor" format="color" />
- <attr name="spacebarTextShadowColor" format="color" />
+ <attr name="languageOnSpacebarTextRatio" format="fraction" />
+ <attr name="languageOnSpacebarTextColor" format="color" />
+ <attr name="languageOnSpacebarTextShadowColor" format="color" />
+ <!-- Background image for the spacebar. -->
+ <attr name="spacebarBackground" format="reference" />
<!-- Fadeout animator for spacebar language label. -->
<attr name="languageOnSpacebarFinalAlpha" format="integer" />
<attr name="languageOnSpacebarFadeoutAnimator" format="reference" />
@@ -89,8 +91,8 @@
<attr name="touchNoiseThresholdTime" format="integer" />
<!-- Touch noise threshold distance in millimeter -->
<attr name="touchNoiseThresholdDistance" format="dimension" />
- <!-- Sliding key input enable -->
- <attr name="slidingKeyInputEnable" format="boolean" />
+ <!-- Enable key selection by dragging finger -->
+ <attr name="keySelectionByDraggingFinger" format="boolean" />
<attr name="slidingKeyInputPreviewColor" format="color" />
<attr name="slidingKeyInputPreviewWidth" format="dimension" />
<attr name="slidingKeyInputPreviewBodyRatio" format="integer" />
@@ -109,6 +111,10 @@
<attr name="keyPreviewOffset" format="dimension" />
<!-- Height of the key press feedback popup. -->
<attr name="keyPreviewHeight" format="dimension" />
+ <!-- Duration of key preview popup zoom in animation in millisecond -->
+ <attr name="keyPreviewZoomInDuration" format="integer" />
+ <!-- Duration of key preview popup zoom out animation in millisecond -->
+ <attr name="keyPreviewZoomOutDuration" format="integer" />
<!-- Delay after key releasing and key press feedback dismissing in millisecond -->
<attr name="keyPreviewLingerTimeout" format="integer" />
<!-- Layout resource for more keys keyboard -->
@@ -217,7 +223,6 @@
<attr name="iconSearchKey" format="reference" />
<attr name="iconTabKey" format="reference" />
<attr name="iconShortcutKey" format="reference" />
- <attr name="iconShortcutForLabel" format="reference" />
<attr name="iconSpaceKeyForNumberLayout" format="reference" />
<attr name="iconShiftKeyShifted" format="reference" />
<attr name="iconShortcutKeyDisabled" format="reference" />
@@ -276,6 +281,8 @@
<attr name="keyLabel" format="string" />
<!-- The hint label to display on the key in conjunction with the label. -->
<attr name="keyHintLabel" format="string" />
+ <!-- The vertical adjustment of key hint label in proportion to its height. -->
+ <attr name="keyHintLabelVerticalAdjustment" format="fraction" />
<!-- The key label flags. -->
<attr name="keyLabelFlags" format="integer">
<!-- This should be aligned with Key.LABEL_FLAGS__* -->
@@ -292,17 +299,20 @@
<flag name="hasPopupHint" value="0x200" />
<flag name="hasShiftedLetterHint" value="0x400" />
<flag name="hasHintLabel" value="0x800" />
+ <!-- These two flags are currently unused. Leave these for possible future use. -->
<flag name="withIconLeft" value="0x1000" />
<flag name="withIconRight" value="0x2000" />
<flag name="autoXScale" value="0x4000" />
+ <!-- The autoScale value implies autoXScale bit on to optimize scaling code path. -->
+ <flag name="autoScale" value="0xc000" />
<!-- If true, character case of code, altCode, moreKeys, keyOutputText, keyLabel,
or keyHintLabel will never be subject to change. -->
- <flag name="preserveCase" value="0x8000" />
+ <flag name="preserveCase" value="0x10000" />
<!-- If true, use keyShiftedLetterHintActivatedColor for the shifted letter hint and
keyTextInactivatedColor for the primary key top label. -->
- <flag name="shiftedLetterActivated" value="0x10000" />
+ <flag name="shiftedLetterActivated" value="0x20000" />
<!-- If true, use EditorInfo.actionLabel for the key label. -->
- <flag name="fromCustomActionLabel" value="0x20000" />
+ <flag name="fromCustomActionLabel" value="0x40000" />
<!-- If true, disable keyHintLabel. -->
<flag name="disableKeyHintLabel" value="0x40000000" />
<!-- If true, disable additionalMoreKeys. -->
@@ -415,8 +425,7 @@
<attr name="navigatePrevious" format="boolean" />
<attr name="passwordInput" format="boolean" />
<attr name="clobberSettingsKey" format="boolean" />
- <attr name="shortcutKeyEnabled" format="boolean" />
- <attr name="shortcutKeyOnSymbols" format="boolean" />
+ <attr name="supportsSwitchingToShortcutIme" format="boolean" />
<attr name="hasShortcutKey" format="boolean" />
<attr name="languageSwitchKeyEnabled" format="boolean" />
<attr name="isMultiLine" format="boolean" />
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index 94fadb964..93f25a7f6 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -39,20 +39,20 @@
<color name="typed_word_color_ics">#D833B5E5</color>
<color name="suggested_word_color_ics">#B233B5E5</color>
<color name="highlight_translucent_color_ics">#9933B5E5</color>
- <color name="key_text_shadow_color_ics">@android:color/transparent</color>
- <color name="key_text_inactivated_color_ics">#66E0E4E5</color>
- <color name="key_hint_letter_color_ics">#80000000</color>
- <color name="key_hint_label_color_ics">#A0FFFFFF</color>
- <color name="key_shifted_letter_hint_inactivated_color_ics">#66E0E4E5</color>
- <color name="key_shifted_letter_hint_activated_color_ics">@android:color/white</color>
- <color name="spacebar_text_color_ics">#FFC0C0C0</color>
- <color name="spacebar_text_shadow_color_ics">#80000000</color>
- <color name="gesture_floating_preview_color_ics">#C0000000</color>
+ <color name="key_text_shadow_color_holo">@android:color/transparent</color>
+ <color name="key_text_inactivated_color_holo">#66E0E4E5</color>
+ <color name="key_hint_letter_color_holo">#80000000</color>
+ <color name="key_hint_label_color_holo">#A0FFFFFF</color>
+ <color name="key_shifted_letter_hint_inactivated_color_holo">#66E0E4E5</color>
+ <color name="key_shifted_letter_hint_activated_color_holo">@android:color/white</color>
+ <color name="spacebar_text_color_holo">#FFC0C0C0</color>
+ <color name="spacebar_text_shadow_color_holo">#80000000</color>
+ <color name="gesture_floating_preview_color_holo">#C0000000</color>
<!-- Color resources for KLP theme. Base color = F0F0F0 -->
- <color name="highlight_color_holo">#FFF0F0F0</color>
- <color name="typed_word_color_holo">#D8F0F0F0</color>
- <color name="suggested_word_color_holo">#B2F0F0F0</color>
- <color name="highlight_translucent_color_holo">#99E0E0E0</color>
+ <color name="highlight_color_klp">#FFF0F0F0</color>
+ <color name="typed_word_color_klp">#D8F0F0F0</color>
+ <color name="suggested_word_color_klp">#B2F0F0F0</color>
+ <color name="highlight_translucent_color_klp">#99E0E0E0</color>
<!-- Color resources for setup wizard and tutorial -->
<color name="setup_background">#FFEBEBEB</color>
<color name="setup_text_dark">#FF707070</color>
@@ -66,6 +66,6 @@
<color name="emoji_key_background_color">#00000000</color>
<color name="emoji_key_pressed_background_color">#30FFFFFF</color>
- <color name="key_text_color_normal_ics">@android:color/white</color>
- <color name="key_text_color_functional_ics">@android:color/white</color>
+ <color name="key_text_color_normal_holo">@android:color/white</color>
+ <color name="key_text_color_functional_holo">@android:color/white</color>
</resources>
diff --git a/java/res/values/config-auto-correction-thresholds.xml b/java/res/values/config-auto-correction-thresholds.xml
new file mode 100644
index 000000000..7d94a42a4
--- /dev/null
+++ b/java/res/values/config-auto-correction-thresholds.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <!-- The array of auto correction threshold values. -->
+ <string-array name="auto_correction_threshold_values" translatable="false">
+ <!-- Off, When auto correction setting is Off, this value is not used. -->
+ <item>floatMaxValue</item>
+ <!-- Modest : Suggestion whose normalized score is greater than this value
+ will be subject to auto-correction. -->
+ <item>0.185</item>
+ <!-- Aggressive -->
+ <item>0.067</item>
+ <!-- Very Aggressive : Suggestion whose normalized score is greater than this value
+ will be subject to auto-correction. "floatNegativeInfinity" is a special marker
+ string for Float.NEGATIVE_INFINITY -->
+ <item>floatNegativeInfinity</item>
+ </string-array>
+
+ <!-- The index of the auto correction threshold values array. -->
+ <string name="auto_correction_threshold_mode_index_off" translatable="false">0</string>
+ <string name="auto_correction_threshold_mode_index_modest" translatable="false">1</string>
+ <string name="auto_correction_threshold_mode_index_aggressive" translatable="false">2</string>
+ <string name="auto_correction_threshold_mode_index_very_aggressive" translatable="false">3</string>
+
+ <!-- The array of the auto correction threshold settings values. -->
+ <string-array name="auto_correction_threshold_mode_indexes" translatable="false">
+ <item>@string/auto_correction_threshold_mode_index_off</item>
+ <item>@string/auto_correction_threshold_mode_index_modest</item>
+ <item>@string/auto_correction_threshold_mode_index_aggressive</item>
+ <item>@string/auto_correction_threshold_mode_index_very_aggressive</item>
+ </string-array>
+ <!-- The array of the human readable auto correction threshold settings entries. -->
+ <string-array name="auto_correction_threshold_modes" translatable="false">
+ <item>@string/auto_correction_threshold_mode_off</item>
+ <item>@string/auto_correction_threshold_mode_modest</item>
+ <item>@string/auto_correction_threshold_mode_aggressive</item>
+ <item>@string/auto_correction_threshold_mode_very_aggressive</item>
+ </string-array>
+</resources>
diff --git a/java/res/values/config-common.xml b/java/res/values/config-common.xml
new file mode 100644
index 000000000..ab16a9045
--- /dev/null
+++ b/java/res/values/config-common.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <bool name="config_block_potentially_offensive">true</bool>
+ <!-- Default value for next word prediction: after entering a word and a space only, should we look
+ at input history to suggest a hopefully helpful suggestions for the next word? -->
+ <bool name="config_default_next_word_prediction">true</bool>
+
+ <!-- This configuration is an index of {@link KeyboardSwitcher#KEYBOARD_THEMES[]}. -->
+ <string name="config_default_keyboard_theme_index" translatable="false">2</string>
+
+ <integer name="config_delay_update_shift_state">100</integer>
+ <integer name="config_double_space_period_timeout">1100</integer>
+
+ <integer name="config_key_repeat_start_timeout">400</integer>
+ <integer name="config_key_repeat_interval">50</integer>
+
+ <integer name="config_ignore_alt_code_key_timeout">350</integer>
+
+ <integer name="config_key_preview_zoom_in_duration">35</integer>
+ <integer name="config_key_preview_zoom_out_duration">40</integer>
+ <integer name="config_key_preview_linger_timeout">70</integer>
+ <!-- Suppress showing key preview duration after batch input in millisecond -->
+ <integer name="config_suppress_key_preview_after_batch_input_duration">1000</integer>
+
+ <bool name="config_default_vibration_enabled">true</bool>
+ <integer name="config_max_vibration_duration">100</integer>
+
+ <integer name="config_default_longpress_key_timeout">300</integer>
+ <integer name="config_max_longpress_timeout">700</integer>
+ <integer name="config_min_longpress_timeout">100</integer>
+ <integer name="config_longpress_timeout_step">10</integer>
+ <integer name="config_max_more_keys_column">5</integer>
+ <integer name="config_more_keys_keyboard_fadein_anim_time">0</integer>
+ <integer name="config_more_keys_keyboard_fadeout_anim_time">100</integer>
+
+ <!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 -->
+ <integer name="config_longpress_shift_lock_timeout">1200</integer>
+
+ <!-- Sliding key input preview parameters -->
+ <dimen name="config_sliding_key_input_preview_width">8.0dp</dimen>
+ <!-- Percentages of sliding key input preview body and shadow, in proportion to the width.
+ A negative value of the shadow ratio disables drawing shadow. -->
+ <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
+ <integer name="config_sliding_key_input_preview_body_ratio">100</integer>
+ <integer name="config_sliding_key_input_preview_shadow_ratio">-1</integer>
+ <dimen name="config_key_hysteresis_distance_for_sliding_modifier">8.0dp</dimen>
+
+ <integer name="config_language_on_spacebar_final_alpha">128</integer>
+ <dimen name="config_language_on_spacebar_horizontal_margin">1dp</dimen>
+
+ <integer name="config_gesture_floating_preview_text_linger_timeout">200</integer>
+ <integer name="config_gesture_trail_fadeout_start_delay">100</integer>
+ <integer name="config_gesture_trail_fadeout_duration">800</integer>
+ <integer name="config_gesture_trail_update_interval">20</integer>
+ <!-- Static threshold for gesture after fast typing (msec) -->
+ <integer name="config_gesture_static_time_threshold_after_fast_typing">500</integer>
+ <!-- Static threshold for starting gesture detection (keyWidth%/sec) -->
+ <fraction name="config_gesture_detect_fast_move_speed_threshold">150%</fraction>
+ <!-- Dynamic threshold for gesture after fast typing (msec) -->
+ <integer name="config_gesture_dynamic_threshold_decay_duration">450</integer>
+ <!-- Time based threshold values for gesture detection (msec) -->
+ <integer name="config_gesture_dynamic_time_threshold_from">300</integer>
+ <integer name="config_gesture_dynamic_time_threshold_to">20</integer>
+ <!-- Distance based threshold values for gesture detection (keyWidth%/sec) -->
+ <fraction name="config_gesture_dynamic_distance_threshold_from">600%</fraction>
+ <fraction name="config_gesture_dynamic_distance_threshold_to">50%</fraction>
+ <!-- Parameter for gesture sampling (keyWidth%/sec) -->
+ <fraction name="config_gesture_sampling_minimum_distance">16.6666%</fraction>
+ <!-- Parameters for gesture recognition (msec) and (keyWidth%/sec) -->
+ <integer name="config_gesture_recognition_minimum_time">100</integer>
+ <integer name="config_gesture_recognition_update_time">100</integer>
+ <fraction name="config_gesture_recognition_speed_threshold">550%</fraction>
+
+ <integer name="config_keyboard_grid_width">32</integer>
+ <integer name="config_keyboard_grid_height">16</integer>
+ <dimen name="config_touch_noise_threshold_distance">12.6dp</dimen>
+ <integer name="config_touch_noise_threshold_time">40</integer>
+
+ <!-- Common keyboard configuration. -->
+ <fraction name="config_keyboard_left_padding">0%p</fraction>
+ <fraction name="config_keyboard_right_padding">0%p</fraction>
+ <dimen name="config_keyboard_vertical_correction">0.0dp</dimen>
+
+ <!-- Common key top visual configuration. -->
+ <dimen name="config_key_popup_hint_letter_padding">2dp</dimen>
+
+ <!-- Common suggestion strip configuration. -->
+ <integer name="config_suggestions_count_in_strip">3</integer>
+ <fraction name="config_center_suggestion_percentile">36%</fraction>
+ <integer name="config_delay_update_suggestions">100</integer>
+ <integer name="config_delay_update_old_suggestions">300</integer>
+
+ <!-- Common more suggestions configuraion. -->
+ <dimen name="config_more_suggestions_key_horizontal_padding">12dp</dimen>
+ <dimen name="config_more_suggestions_bottom_gap">6dp</dimen>
+ <dimen name="config_more_suggestions_modal_tolerance">32.0dp</dimen>
+ <fraction name="config_more_suggestions_info_ratio">18%</fraction>
+
+ <!-- Common gesture trail parameters -->
+ <!-- Minimum distance between gesture trail sampling points. -->
+ <dimen name="config_gesture_trail_min_sampling_distance">9.6dp</dimen>
+ <!-- Maximum angular threshold between gesture trails interpolation segments in degree. -->
+ <integer name="config_gesture_trail_max_interpolation_angular_threshold">15</integer>
+ <!-- Maximum distance threshold between gesture trails interpolation segments. -->
+ <dimen name="config_gesture_trail_max_interpolation_distance_threshold">16.0dp</dimen>
+ <!-- Maximum number of gesture trail interpolation segments. -->
+ <integer name="config_gesture_trail_max_interpolation_segments">6</integer>
+ <dimen name="config_gesture_trail_start_width">10.0dp</dimen>
+ <dimen name="config_gesture_trail_end_width">2.5dp</dimen>
+ <!-- Percentages of gesture preview taril body and shadow, in proportion to the trail width.
+ A negative value of the shadow ratio disables drawing shadow. -->
+ <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
+ <integer name="config_gesture_trail_body_ratio">100</integer>
+ <integer name="config_gesture_trail_shadow_ratio">-1</integer>
+
+ <!-- Common configuration of Emoji keyboard -->
+ <dimen name="config_emoji_category_page_id_height">3dp</dimen>
+
+ <!-- Inset used in Accessibility mode to avoid accidental key presses when a finger slides off the screen. -->
+ <dimen name="config_accessibility_edge_slop">8dp</dimen>
+
+ <integer name="config_user_dictionary_max_word_length">48</integer>
+</resources>
diff --git a/java/res/values/config-dictionary-pack.xml b/java/res/values/config-dictionary-pack.xml
new file mode 100644
index 000000000..d076af452
--- /dev/null
+++ b/java/res/values/config-dictionary-pack.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Configuration values for Dictionary pack. -->
+<resources>
+ <!-- Settings for the dictionary pack -->
+ <bool name="allow_over_metered">false</bool>
+ <bool name="allow_over_roaming">false</bool>
+ <bool name="dict_downloads_visible_in_download_UI">false</bool>
+ <bool name="metadata_downloads_visible_in_download_UI">false</bool>
+ <bool name="display_notification_for_auto_update">false</bool>
+ <bool name="display_notification_for_user_requested_update">false</bool>
+</resources>
diff --git a/java/res/values/config-per-form-factor.xml b/java/res/values/config-per-form-factor.xml
new file mode 100644
index 000000000..67fc75134
--- /dev/null
+++ b/java/res/values/config-per-form-factor.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- Configuration values for Small Phone. -->
+<resources>
+ <bool name="config_enable_show_key_preview_popup_option">true</bool>
+ <!-- Whether or not Popup on key press is enabled by default -->
+ <bool name="config_default_key_preview_popup">true</bool>
+ <bool name="config_default_sound_enabled">false</bool>
+ <bool name="config_enable_show_voice_key_option">true</bool>
+ <bool name="config_key_selection_by_dragging_finger">true</bool>
+ <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
+ false -->
+ <bool name="config_show_more_keys_keyboard_at_touched_point">false</bool>
+</resources>
diff --git a/java/res/values/config-screen-metrics.xml b/java/res/values/config-screen-metrics.xml
new file mode 100644
index 000000000..7b9870602
--- /dev/null
+++ b/java/res/values/config-screen-metrics.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <!-- Screen metrics for logging.
+ 0 = "small phone screen"
+ 1 = "large phone screen"
+ 2 = "large tablet screen"
+ 3 = "small tablet screen"
+ -->
+ <integer name="log_screen_metrics">0</integer>
+</resources>
diff --git a/java/res/values/config-spacing-and-punctuations.xml b/java/res/values/config-spacing-and-punctuations.xml
new file mode 100644
index 000000000..f10f810dc
--- /dev/null
+++ b/java/res/values/config-spacing-and-punctuations.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- TODO: these settings depend on the language. They should be put either in the dictionary
+ header, or in the subtype maybe? -->
+ <!-- Symbols that are suggested between words -->
+ <string name="suggested_punctuations" translatable="false">!,?,\\,,:,;,\",(,),\',-,/,@,_</string>
+ <!-- Symbols that are normally preceded by a space (used to add an auto-space before these) -->
+ <string name="symbols_preceded_by_space" translatable="false">([{&amp;</string>
+ <!-- Symbols that are normally followed by a space (used to add an auto-space after these) -->
+ <string name="symbols_followed_by_space" translatable="false">.,;:!?)]}&amp;</string>
+ <!-- Symbols that separate words -->
+ <!-- Don't remove the enclosing double quotes, they protect whitespace (not just U+0020) -->
+ <string name="symbols_word_separators" translatable="false">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
+ <!-- Word connectors -->
+ <string name="symbols_word_connectors" translatable="false">\'-</string>
+ <!-- The sentence separator code point, for capitalization -->
+ <!-- U+002E: "." FULL STOP ; 2Eh = 46d -->
+ <integer name="sentence_separator" translatable="false">46</integer>
+ <!-- Whether this language uses spaces between words -->
+ <bool name="current_language_has_spaces">true</bool>
+</resources>
diff --git a/java/res/values/config-spellchecker-thresholds.xml b/java/res/values/config-spellchecker-thresholds.xml
new file mode 100644
index 000000000..e99ba6621
--- /dev/null
+++ b/java/res/values/config-spellchecker-thresholds.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources>
+ <!-- Threshold of the normalized score of the best suggestion for the spell checker to declare
+ a word to be "recommended" -->
+ <string name="spellchecker_recommended_threshold_value" translatable="false">0.11</string>
+</resources>
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index 66b9b7082..e64b4b192 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -18,120 +18,79 @@
*/
-->
+<!-- Configuration values for Small Phone Portrait. -->
<resources>
<bool name="config_use_fullscreen_mode">false</bool>
- <bool name="config_enable_show_voice_key_option">true</bool>
- <bool name="config_enable_show_option_of_key_preview_popup">true</bool>
- <!-- TODO: Disable the following configuration for production. -->
- <bool name="config_enable_usability_study_mode_option">true</bool>
- <!-- Whether or not Popup on key press is enabled by default -->
- <bool name="config_default_key_preview_popup">true</bool>
- <!-- Default value for next word prediction: after entering a word and a space only, should we look
- at input history to suggest a hopefully helpful suggestions for the next word? -->
- <bool name="config_default_next_word_prediction">true</bool>
- <bool name="config_default_sound_enabled">false</bool>
- <bool name="config_default_vibration_enabled">true</bool>
- <integer name="config_max_vibration_duration">100</integer> <!-- milliseconds -->
- <integer name="config_delay_update_suggestions">100</integer>
- <integer name="config_delay_update_old_suggestions">300</integer>
- <integer name="config_delay_update_shift_state">100</integer>
- <integer name="config_language_on_spacebar_final_alpha">128</integer>
- <integer name="config_more_keys_keyboard_fadein_anim_time">0</integer>
- <integer name="config_more_keys_keyboard_fadeout_anim_time">100</integer>
- <integer name="config_keyboard_grid_width">32</integer>
- <integer name="config_keyboard_grid_height">16</integer>
- <integer name="config_double_space_period_timeout">1100</integer>
- <!-- This configuration is the index of the array {@link KeyboardSwitcher.KEYBOARD_THEMES}. -->
- <string name="config_default_keyboard_theme_index" translatable="false">0</string>
- <integer name="config_max_more_keys_column">5</integer>
- <!--
- Configuration for MainKeyboardView
- -->
<dimen name="config_key_hysteresis_distance">8.0dp</dimen>
- <dimen name="config_key_hysteresis_distance_for_sliding_modifier">8.0dp</dimen>
- <integer name="config_touch_noise_threshold_time">40</integer>
- <dimen name="config_touch_noise_threshold_distance">12.6dp</dimen>
- <integer name="config_key_preview_linger_timeout">70</integer>
- <bool name="config_sliding_key_input_enabled">true</bool>
- <!-- Sliding key input preview parameters -->
- <dimen name="config_sliding_key_input_preview_width">8.0dp</dimen>
- <!-- Percentages of sliding key input preview body and shadow, in proportion to the width.
- A negative value of the shadow ratio disables drawing shadow. -->
- <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
- <integer name="config_sliding_key_input_preview_body_ratio">100</integer>
- <integer name="config_sliding_key_input_preview_shadow_ratio">-1</integer>
- <integer name="config_key_repeat_start_timeout">400</integer>
- <integer name="config_key_repeat_interval">50</integer>
- <integer name="config_default_longpress_key_timeout">300</integer> <!-- milliseconds -->
- <integer name="config_longpress_timeout_step">10</integer> <!-- milliseconds -->
- <integer name="config_min_longpress_timeout">100</integer> <!-- milliseconds -->
- <integer name="config_max_longpress_timeout">700</integer> <!-- milliseconds -->
- <!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 -->
- <integer name="config_longpress_shift_lock_timeout">1200</integer> <!-- milliseconds -->
- <integer name="config_ignore_alt_code_key_timeout">350</integer> <!-- milliseconds -->
- <!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
- false -->
- <bool name="config_show_more_keys_keyboard_at_touched_point">false</bool>
- <bool name="config_block_potentially_offensive">true</bool>
- <integer name="config_gesture_floating_preview_text_linger_timeout">200</integer>
- <integer name="config_gesture_trail_fadeout_start_delay">100</integer>
- <integer name="config_gesture_trail_fadeout_duration">800</integer>
- <integer name="config_gesture_trail_update_interval">20</integer>
- <!-- Static threshold for gesture after fast typing (msec) -->
- <integer name="config_gesture_static_time_threshold_after_fast_typing">500</integer>
- <!-- Static threshold for starting gesture detection (keyWidth%/sec) -->
- <fraction name="config_gesture_detect_fast_move_speed_threshold">150%</fraction>
- <!-- Dynamic threshold for gesture after fast typing (msec) -->
- <integer name="config_gesture_dynamic_threshold_decay_duration">450</integer>
- <!-- Time based threshold values for gesture detection (msec) -->
- <integer name="config_gesture_dynamic_time_threshold_from">300</integer>
- <integer name="config_gesture_dynamic_time_threshold_to">20</integer>
- <!-- Distance based threshold values for gesture detection (keyWidth%/sec) -->
- <fraction name="config_gesture_dynamic_distance_threshold_from">600%</fraction>
- <fraction name="config_gesture_dynamic_distance_threshold_to">50%</fraction>
- <!-- Parameter for gesture sampling (keyWidth%/sec) -->
- <fraction name="config_gesture_sampling_minimum_distance">16.6666%</fraction>
- <!-- Parameters for gesture recognition (msec) and (keyWidth%/sec) -->
- <integer name="config_gesture_recognition_minimum_time">100</integer>
- <integer name="config_gesture_recognition_update_time">100</integer>
- <fraction name="config_gesture_recognition_speed_threshold">550%</fraction>
- <!-- Suppress showing key preview duration after batch input in millisecond -->
- <integer name="config_suppress_key_preview_after_batch_input_duration">1000</integer>
- <!--
- Configuration for auto correction
- -->
- <string-array name="auto_correction_threshold_values" translatable="false">
- <!-- Off, When auto correction setting is Off, this value is not used. -->
- <item>floatMaxValue</item>
- <!-- Modest : Suggestion whose normalized score is greater than this value
- will be subject to auto-correction. -->
- <item>0.185</item>
- <!-- Aggressive -->
- <item>0.067</item>
- <!-- Very Aggressive : Suggestion whose normalized score is greater than this value
- will be subject to auto-correction. "floatNegativeInfinity" is a special marker
- string for Float.NEGATIVE_INFINITY -->
- <item>floatNegativeInfinity</item>
- </string-array>
- <!-- Threshold of the normalized score of the best suggestion for the spell checker to declare
- a word to be "recommended" -->
- <string name="spellchecker_recommended_threshold_value" translatable="false">0.11</string>
- <!-- Screen metrics for logging.
- 0 = "mdpi phone screen"
- 1 = "hdpi phone screen"
- 2 = "mdpi 11 inch tablet screen"
- 3 = "xhdpi phone screen?"
- 4 = ?
- -->
- <integer name="log_screen_metrics">0</integer>
- <!-- Settings for the dictionary pack -->
- <bool name="allow_over_metered">false</bool>
- <bool name="allow_over_roaming">false</bool>
- <bool name="dict_downloads_visible_in_download_UI">false</bool>
- <bool name="metadata_downloads_visible_in_download_UI">false</bool>
- <bool name="display_notification_for_auto_update">false</bool>
- <bool name="display_notification_for_user_requested_update">false</bool>
+ <!-- Preferable keyboard height in absolute scale: 1.285in -->
+ <!-- This config_default_keyboard_height value should match with keyboard-heights.xml -->
+ <dimen name="config_default_keyboard_height">205.6dp</dimen>
+ <fraction name="config_max_keyboard_height">46%p</fraction>
+ <fraction name="config_min_keyboard_height">-61.8%p</fraction>
+ <dimen name="config_more_keys_keyboard_key_height">52.8dp</dimen>
+ <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
+ <!-- config_more_keys_keyboard_key_height x 1.2 -->
+ <dimen name="config_more_keys_keyboard_slide_allowance">63.36dp</dimen>
+ <dimen name="config_more_keys_keyboard_key_horizontal_padding">8dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_gb">1.556%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_gb">4.669%p</fraction>
+ <fraction name="config_key_vertical_gap_gb">6.495%p</fraction>
+ <fraction name="config_key_horizontal_gap_gb">1.971%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -1.0 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_gb">-52.8dp</dimen>
+ <dimen name="config_key_preview_offset_gb">-8.0dp</dimen>
+
+ <fraction name="config_keyboard_top_padding_holo">2.335%p</fraction>
+ <fraction name="config_keyboard_bottom_padding_holo">4.669%p</fraction>
+ <fraction name="config_key_vertical_gap_holo">6.127%p</fraction>
+ <fraction name="config_key_horizontal_gap_holo">1.739%p</fraction>
+ <!-- config_more_keys_keyboard_key_height x -0.5 -->
+ <dimen name="config_more_keys_keyboard_vertical_correction_holo">-26.4dp</dimen>
+ <dimen name="config_key_preview_offset_holo">8.0dp</dimen>
+
+ <dimen name="config_key_preview_height">80dp</dimen>
+ <fraction name="config_key_preview_text_ratio">82%</fraction>
+ <fraction name="config_key_letter_ratio">55%</fraction>
+ <fraction name="config_key_large_letter_ratio">65%</fraction>
+ <fraction name="config_key_label_ratio">34%</fraction>
+ <fraction name="config_key_large_label_ratio">40%</fraction>
+ <fraction name="config_key_hint_letter_ratio">25%</fraction>
+ <fraction name="config_key_hint_label_ratio">44%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio">35%</fraction>
+ <fraction name="config_language_on_spacebar_text_ratio">33.735%</fraction>
+ <dimen name="config_key_label_horizontal_padding">4dp</dimen>
+ <dimen name="config_key_hint_letter_padding">1dp</dimen>
+ <dimen name="config_key_shifted_letter_hint_padding">2dp</dimen>
+
+ <!-- For 5-row keyboard -->
+ <fraction name="config_key_vertical_gap_5row">3.20%p</fraction>
+ <fraction name="config_key_letter_ratio_5row">64%</fraction>
+ <fraction name="config_key_shifted_letter_hint_ratio_5row">41%</fraction>
+
+ <dimen name="config_suggestions_strip_height">40dp</dimen>
+ <dimen name="config_more_suggestions_row_height">40dp</dimen>
+ <integer name="config_max_more_suggestions_row">6</integer>
+ <fraction name="config_min_more_suggestions_width">90%</fraction>
+ <dimen name="config_suggestions_strip_horizontal_padding">0dp</dimen>
+ <dimen name="config_suggestion_min_width">44dp</dimen>
+ <dimen name="config_suggestion_text_horizontal_padding">6dp</dimen>
+ <dimen name="config_suggestion_text_size">18dp</dimen>
+ <dimen name="config_more_suggestions_hint_text_size">27dp</dimen>
+
+ <!-- Gesture floating preview text parameters -->
+ <dimen name="config_gesture_floating_preview_text_size">24dp</dimen>
+ <dimen name="config_gesture_floating_preview_text_offset">73dp</dimen>
+ <dimen name="config_gesture_floating_preview_horizontal_padding">24dp</dimen>
+ <dimen name="config_gesture_floating_preview_vertical_padding">16dp</dimen>
+ <dimen name="config_gesture_floating_preview_round_radius">2dp</dimen>
+
+ <!-- Emoji keyboard -->
+ <fraction name="config_emoji_keyboard_key_width">14.2857%p</fraction>
+ <fraction name="config_emoji_keyboard_row_height">33%p</fraction>
+ <fraction name="config_emoji_keyboard_key_letter_size">68%p</fraction>
+ <integer name="config_emoji_keyboard_max_page_key_count">21</integer>
</resources>
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
deleted file mode 100644
index 18cb262e2..000000000
--- a/java/res/values/dimens.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Preferable keyboard height in absolute scale: 1.285in -->
- <!-- This keyboardHeight value should match with keyboard-heights.xml -->
- <dimen name="keyboardHeight">205.6dp</dimen>
- <fraction name="maxKeyboardHeight">46%p</fraction>
- <fraction name="minKeyboardHeight">-61.8%p</fraction>
-
- <dimen name="popup_key_height">52.8dp</dimen>
-
- <dimen name="more_keys_keyboard_key_horizontal_padding">8dp</dimen>
-
- <fraction name="keyboard_left_padding">0%p</fraction>
- <fraction name="keyboard_right_padding">0%p</fraction>
-
- <fraction name="keyboard_top_padding_gb">1.556%p</fraction>
- <fraction name="keyboard_bottom_padding_gb">4.669%p</fraction>
- <fraction name="key_bottom_gap_gb">6.495%p</fraction>
- <fraction name="key_horizontal_gap_gb">1.971%p</fraction>
-
- <fraction name="keyboard_top_padding_ics">2.335%p</fraction>
- <fraction name="keyboard_bottom_padding_ics">4.669%p</fraction>
- <fraction name="key_bottom_gap_ics">6.127%p</fraction>
- <fraction name="key_horizontal_gap_ics">1.739%p</fraction>
-
- <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. -->
- <!-- popup_key_height x 1.2 -->
- <dimen name="more_keys_keyboard_slide_allowance">63.36dp</dimen>
- <!-- popup_key_height x -1.0 -->
- <dimen name="more_keys_keyboard_vertical_correction_gb">-52.8dp</dimen>
- <dimen name="keyboard_vertical_correction">0.0dp</dimen>
-
- <fraction name="key_letter_ratio">55%</fraction>
- <fraction name="key_large_letter_ratio">65%</fraction>
- <fraction name="key_label_ratio">34%</fraction>
- <fraction name="key_large_label_ratio">40%</fraction>
- <fraction name="key_hint_letter_ratio">25%</fraction>
- <fraction name="key_hint_label_ratio">44%</fraction>
- <fraction name="key_uppercase_letter_ratio">35%</fraction>
- <fraction name="key_preview_text_ratio">82%</fraction>
- <fraction name="spacebar_text_ratio">33.735%</fraction>
- <dimen name="key_preview_height">80dp</dimen>
- <dimen name="key_preview_offset_gb">-8.0dp</dimen>
-
- <dimen name="key_label_horizontal_padding">4dp</dimen>
- <dimen name="key_hint_letter_padding">1dp</dimen>
- <dimen name="key_popup_hint_letter_padding">2dp</dimen>
- <dimen name="key_uppercase_letter_padding">2dp</dimen>
-
- <!-- For 5-row keyboard -->
- <fraction name="key_bottom_gap_5row">3.20%p</fraction>
- <fraction name="key_letter_ratio_5row">64%</fraction>
- <fraction name="key_uppercase_letter_ratio_5row">41%</fraction>
-
- <dimen name="key_preview_offset_ics">8.0dp</dimen>
- <!-- popup_key_height x -0.5 -->
- <dimen name="more_keys_keyboard_vertical_correction_ics">-26.4dp</dimen>
-
- <dimen name="suggestions_strip_height">40dp</dimen>
- <dimen name="more_suggestions_key_horizontal_padding">12dp</dimen>
- <dimen name="more_suggestions_row_height">40dp</dimen>
- <dimen name="more_suggestions_bottom_gap">6dp</dimen>
- <dimen name="more_suggestions_modal_tolerance">32.0dp</dimen>
- <dimen name="more_suggestions_slide_allowance">16.0dp</dimen>
- <integer name="max_more_suggestions_row">6</integer>
- <fraction name="min_more_suggestions_width">90%</fraction>
- <fraction name="more_suggestions_info_ratio">18%</fraction>
- <dimen name="suggestions_strip_padding">0dp</dimen>
- <dimen name="suggestion_min_width">44dp</dimen>
- <dimen name="suggestion_padding">6dp</dimen>
- <dimen name="suggestion_text_size">18dp</dimen>
- <dimen name="more_suggestions_hint_text_size">27dp</dimen>
- <integer name="suggestions_count_in_strip">3</integer>
- <fraction name="center_suggestion_percentile">36%</fraction>
-
- <!-- Gesture trail parameters -->
- <!-- Minimum distance between gesture trail sampling points. -->
- <dimen name="gesture_trail_min_sampling_distance">9.6dp</dimen>
- <!-- Maximum angular threshold between gesture trails interpolation segments in degree. -->
- <integer name="gesture_trail_max_interpolation_angular_threshold">15</integer>
- <!-- Maximum distance threshold between gesture trails interpolation segments. -->
- <dimen name="gesture_trail_max_interpolation_distance_threshold">16.0dp</dimen>
- <!-- Maximum number of gesture trail interpolation segments. -->
- <integer name="gesture_trail_max_interpolation_segments">6</integer>
- <dimen name="gesture_trail_start_width">10.0dp</dimen>
- <dimen name="gesture_trail_end_width">2.5dp</dimen>
- <!-- Percentages of gesture preview taril body and shadow, in proportion to the trail width.
- A negative value of the shadow ratio disables drawing shadow. -->
- <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
- <integer name="gesture_trail_body_ratio">100</integer>
- <integer name="gesture_trail_shadow_ratio">-1</integer>
- <!-- Gesture floating preview text parameters -->
- <dimen name="gesture_floating_preview_text_size">24dp</dimen>
- <dimen name="gesture_floating_preview_text_offset">73dp</dimen>
- <dimen name="gesture_floating_preview_horizontal_padding">24dp</dimen>
- <dimen name="gesture_floating_preview_vertical_padding">16dp</dimen>
- <dimen name="gesture_floating_preview_round_radius">2dp</dimen>
-
- <!-- Emoji keyboard -->
- <fraction name="emoji_keyboard_key_width">14.2857%p</fraction>
- <fraction name="emoji_keyboard_row_height">33%p</fraction>
- <fraction name="emoji_keyboard_key_letter_size">68%p</fraction>
- <integer name="emoji_keyboard_max_key_count">21</integer>
- <dimen name="emoji_category_page_id_height">3dp</dimen>
-
- <!-- Inset used in Accessibility mode to avoid accidental key presses when a finger slides off the screen. -->
- <dimen name="accessibility_edge_slop">8dp</dimen>
-
- <integer name="user_dictionary_max_word_length" translatable="false">48</integer>
-
- <dimen name="language_on_spacebar_horizontal_margin">1dp</dimen>
-
-</resources>
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 4733aa257..4be5863f2 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -18,25 +18,6 @@
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- TODO: these settings depend on the language. They should be put either in the dictionary
- header, or in the subtype maybe? -->
- <!-- Symbols that are suggested between words -->
- <string name="suggested_punctuations">!,?,\\,,:,;,\",(,),\',-,/,@,_</string>
- <!-- Symbols that are normally preceded by a space (used to add an auto-space before these) -->
- <string name="symbols_preceded_by_space">([{&amp;</string>
- <!-- Symbols that are normally followed by a space (used to add an auto-space after these) -->
- <string name="symbols_followed_by_space">.,;:!?)]}&amp;</string>
- <!-- Symbols that separate words -->
- <!-- Don't remove the enclosing double quotes, they protect whitespace (not just U+0020) -->
- <string name="symbols_word_separators">"&#x0009;&#x0020;\n"()[]{}*&amp;&lt;&gt;+=|.,;:!?/_\"</string>
- <!-- Word connectors -->
- <string name="symbols_word_connectors">\'-</string>
- <!-- The sentence separator code point, for capitalization -->
- <!-- U+002E: "." FULL STOP ; 2Eh = 46d -->
- <integer name="sentence_separator">46</integer>
- <!-- Whether this language uses spaces between words -->
- <bool name="current_language_has_spaces">true</bool>
-
<!-- Always show the suggestion strip -->
<string name="prefs_suggestion_visibility_show_value">0</string>
<!-- Show the suggestion strip only on portrait mode -->
@@ -57,43 +38,9 @@
<item>@string/prefs_suggestion_visibility_hide_name</item>
</string-array>
- <string name="auto_correction_threshold_mode_index_off">0</string>
- <string name="auto_correction_threshold_mode_index_modest">1</string>
- <string name="auto_correction_threshold_mode_index_aggressive">2</string>
- <string name="auto_correction_threshold_mode_index_very_aggressive">3</string>
- <string-array name="auto_correction_threshold_mode_indexes">
- <item>@string/auto_correction_threshold_mode_index_off</item>
- <item>@string/auto_correction_threshold_mode_index_modest</item>
- <item>@string/auto_correction_threshold_mode_index_aggressive</item>
- <item>@string/auto_correction_threshold_mode_index_very_aggressive</item>
- </string-array>
- <string-array name="auto_correction_threshold_modes">
- <item>@string/auto_correction_threshold_mode_off</item>
- <item>@string/auto_correction_threshold_mode_modest</item>
- <item>@string/auto_correction_threshold_mode_aggressive</item>
- <item>@string/auto_correction_threshold_mode_very_aggressive</item>
- </string-array>
-
+ <!-- For backward compatibility.
+ See {@link SettingsValues#needsToShowVoiceInputKey(SharedPreferences,Resources)} -->
<string name="voice_mode_main">0</string>
- <string name="voice_mode_symbols">1</string>
- <string name="voice_mode_off">2</string>
- <string-array name="voice_input_modes_values">
- <item>@string/voice_mode_main</item>
- <item>@string/voice_mode_symbols</item>
- <item>@string/voice_mode_off</item>
- </string-array>
- <!-- Array of Voice Input modes -->
- <string-array name="voice_input_modes">
- <item>@string/voice_input_modes_main_keyboard</item>
- <item>@string/voice_input_modes_symbols_keyboard</item>
- <item>@string/voice_input_modes_off</item>
- </string-array>
- <!-- Array of Voice Input modes summary -->
- <string-array name="voice_input_modes_summary">
- <item>@string/voice_input_modes_summary_main_keyboard</item>
- <item>@string/voice_input_modes_summary_symbols_keyboard</item>
- <item>@string/voice_input_modes_summary_off</item>
- </string-array>
<!-- Title for Latin keyboard debug settings activity / dialog -->
<string name="english_ime_debug_settings">Android keyboard Debug settings</string>
@@ -103,15 +50,30 @@
<!-- Keyboard theme names -->
<string name="layout_gingerbread">Gingerbread</string>
<string name="layout_ics">IceCreamSandwich</string>
+ <string name="layout_klp">KeyLimePie</string>
<!-- For keyboard theme switcher dialog -->
<string-array name="keyboard_layout_modes">
<item>@string/layout_ics</item>
<item>@string/layout_gingerbread</item>
+ <item>@string/layout_klp</item>
</string-array>
+ <!-- An element must be an index of {@link KeyboardSwitcher#KEYBOARD_THEMES[]}. -->
<string-array name="keyboard_layout_modes_values">
<item>0</item>
<item>1</item>
+ <item>2</item>
+ </string-array>
+
+ <!-- For keyboard color scheme option dialog. -->
+ <string-array name="keyboard_color_schemes">
+ <item>@string/keyboard_color_scheme_white</item>
+ <item>@string/keyboard_color_scheme_blue</item>
+ </string-array>
+ <!-- An element must be an index of {@link KeyboardSwitcher#KEYBOARD_THEMES[]}. -->
+ <string-array name="keyboard_color_schemes_values">
+ <item>2</item>
+ <item>0</item>
</string-array>
<!-- Subtype locale display name exceptions.
diff --git a/java/res/values/keyboard-icons-holo.xml b/java/res/values/keyboard-icons-holo.xml
new file mode 100644
index 000000000..4c888d570
--- /dev/null
+++ b/java/res/values/keyboard-icons-holo.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="KeyboardIcons.Holo">
+ <!-- Keyboard icons -->
+ <!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are missing.
+ sym_keyboard_123_mic_holo
+ -->
+ <item name="iconShiftKey">@drawable/sym_keyboard_shift_holo_dark</item>
+ <item name="iconDeleteKey">@drawable/sym_keyboard_delete_holo_dark</item>
+ <item name="iconSettingsKey">@drawable/sym_keyboard_settings_holo_dark</item>
+ <item name="iconSpaceKey">@null</item>
+ <item name="iconEnterKey">@drawable/sym_keyboard_return_holo_dark</item>
+ <item name="iconSearchKey">@drawable/sym_keyboard_search_holo_dark</item>
+ <item name="iconTabKey">@drawable/sym_keyboard_tab_holo_dark</item>
+ <item name="iconShortcutKey">@drawable/sym_keyboard_voice_holo_dark</item>
+ <item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_holo_dark</item>
+ <item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_holo_dark</item>
+ <item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_holo_dark</item>
+ <item name="iconTabKeyPreview">@drawable/sym_keyboard_feedback_tab</item>
+ <item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_dark</item>
+ <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo_dark</item>
+ <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo_dark</item>
+ <item name="iconEmojiKey">@drawable/sym_keyboard_smiley_holo_dark</item>
+ </style>
+</resources>
diff --git a/java/res/values/keypress-vibration-durations.xml b/java/res/values/keypress-vibration-durations.xml
index ee0ac003c..cde4e4447 100644
--- a/java/res/values/keypress-vibration-durations.xml
+++ b/java/res/values/keypress-vibration-durations.xml
@@ -55,6 +55,8 @@
<item>MODEL=HTL22:MANUFACTURER=HTC,15</item>
<!-- Motorola Razor M -->
<item>MODEL=XT907:MANUFACTURER=motorola,30</item>
+ <!-- Motorola DVX -->
+ <item>MODEL=XT1035:MANUFACTURER=motorola,18</item>
<!-- Sony Xperia Z, Z Ultra -->
<item>MODEL=C6603|C6806:MANUFACTURER=Sony,35</item>
<!-- Default value for unknown device. The negative value means system default. -->
diff --git a/java/res/values/strings-action-keys.xml b/java/res/values/strings-action-keys.xml
new file mode 100644
index 000000000..7003784c6
--- /dev/null
+++ b/java/res/values/strings-action-keys.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Label for soft enter key when it performs GO action. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_go_key">Go</string>
+ <!-- Label for soft enter key when it performs NEXT action. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_next_key">Next</string>
+ <!-- Label for soft enter key when it performs PREVIOUS action. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_previous_key">Prev</string>
+ <!-- Label for soft enter key when it performs DONE action. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_done_key">Done</string>
+ <!-- Label for soft enter key when it performs SEND action. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_send_key">Send</string>
+ <!-- Label for "Pause" key of phone number keyboard. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7] -->
+ <string name="label_pause_key">Pause</string>
+ <!-- Label for "Wait" key of phone number keyboard. Must be short to fit on key. 5 chars or less is preferable. [CHAR LIMIT=7]-->
+ <string name="label_wait_key">Wait</string>
+</resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index a779c6efa..a269d4979 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -151,21 +151,6 @@
<!-- Indicates that a word has been added to the dictionary -->
<string name="added_word"><xliff:g id="word">%s</xliff:g> : Saved</string>
- <!-- Label for soft enter key when it performs GO action. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_go_key">Go</string>
- <!-- Label for soft enter key when it performs NEXT action. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_next_key">Next</string>
- <!-- Label for soft enter key when it performs PREVIOUS action. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_previous_key">Prev</string>
- <!-- Label for soft enter key when it performs DONE action. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_done_key">Done</string>
- <!-- Label for soft enter key when it performs SEND action. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_send_key">Send</string>
- <!-- Label for "Pause" key of phone number keyboard. Must be short to fit on key! [CHAR LIMIT=5] -->
- <string name="label_pause_key">Pause</string>
- <!-- Label for "Wait" key of phone number keyboard. Must be short to fit on key! [CHAR LIMIT=5]-->
- <string name="label_wait_key">Wait</string>
-
<!-- Spoken description to let the user know that when typing in a password, they can plug in a headset in to hear spoken descriptions of the keys they type. [CHAR LIMIT=NONE] -->
<string name="spoken_use_headphones">Plug in a headset to hear password keys spoken aloud.</string>
@@ -260,21 +245,6 @@
<!-- Preferences item for enabling speech input -->
<string name="voice_input">Voice input key</string>
- <!-- Voice Input modes -->
- <!-- On settings screen, voice input pop-up menu option to show voice key on main keyboard [CHAR LIMIT=20] -->
- <string name="voice_input_modes_main_keyboard">On main keyboard</string>
- <!-- On settings screen, voice input pop-up menu option to show voice key on symbols keyboard [CHAR LIMIT=20] -->
- <string name="voice_input_modes_symbols_keyboard">On symbols keyboard</string>
- <!-- On settings screen, voice input pop-up menu option to never show voice key [CHAR LIMIT=20] -->
- <string name="voice_input_modes_off">Off</string>
- <!-- Voice Input modes summary -->
- <!-- On settings screen, voice input pop-up menu summary text to show voice key on main keyboard [CHAR LIMIT=20] -->
- <string name="voice_input_modes_summary_main_keyboard">Mic on main keyboard</string>
- <!-- On settings screen, voice input pop-up menu summary text to show voice key on symbols keyboard [CHAR LIMIT=20] -->
- <string name="voice_input_modes_summary_symbols_keyboard">Mic on symbols keyboard</string>
- <!-- On settings screen, voice input pop-up menu summary text to never show voice key [CHAR LIMIT=20] -->
- <string name="voice_input_modes_summary_off">Voice input is disabled</string>
-
<!-- Title for configuring input method settings [CHAR LIMIT=35] -->
<string name="configure_input_method">Configure input methods</string>
@@ -467,6 +437,13 @@ mobile devices. [CHAR LIMIT=25] -->
<!-- Description for Emoji keyboard subtype [CHAR LIMIT=25] -->
<string name="subtype_emoji">Emoji</string>
+ <!-- Title of the preference settings for switching keyboard color scheme [CHAR LIMIT=35] -->
+ <string name="keyboard_color_scheme">Color scheme</string>
+ <!-- The keyboard color scheme name, White [CHAR LIMIT=16] -->
+ <string name="keyboard_color_scheme_white">White</string>
+ <!-- The keyboard color scheme name, Blue [CHAR LIMIT=16] -->
+ <string name="keyboard_color_scheme_blue">Blue</string>
+
<!-- Title of the preference settings for custom input styles (language and keyboard layout pairs) [CHAR LIMIT=35]-->
<string name="custom_input_styles_title">Custom input styles</string>
<!-- Title of the option menu to add a new style entry in the preference settings [CHAR LIMIT=16] -->
diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml
index 37607711d..7c9b51c0a 100644
--- a/java/res/values/themes-common.xml
+++ b/java/res/values/themes-common.xml
@@ -25,49 +25,49 @@
<item name="touchPositionCorrectionData">@array/touch_position_correction_data_default</item>
<item name="rowHeight">25%p</item>
<item name="moreKeysTemplate">@xml/kbd_more_keys_keyboard_template</item>
- <item name="keyboardLeftPadding">@fraction/keyboard_left_padding</item>
- <item name="keyboardRightPadding">@fraction/keyboard_right_padding</item>
+ <item name="keyboardLeftPadding">@fraction/config_keyboard_left_padding</item>
+ <item name="keyboardRightPadding">@fraction/config_keyboard_right_padding</item>
<item name="maxMoreKeysColumn">@integer/config_max_more_keys_column</item>
</style>
<style name="KeyboardView">
- <item name="keyBackground">@drawable/btn_keyboard_key_ics</item>
- <item name="keyLetterSize">@fraction/key_letter_ratio</item>
- <item name="keyLargeLetterRatio">@fraction/key_large_letter_ratio</item>
- <item name="keyLabelSize">@fraction/key_label_ratio</item>
- <item name="keyLargeLabelRatio">@fraction/key_large_label_ratio</item>
- <item name="keyHintLetterRatio">@fraction/key_hint_letter_ratio</item>
- <item name="keyHintLabelRatio">@fraction/key_hint_label_ratio</item>
- <item name="keyShiftedLetterHintRatio">@fraction/key_uppercase_letter_ratio</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_klp</item>
+ <item name="keyLetterSize">@fraction/config_key_letter_ratio</item>
+ <item name="keyLargeLetterRatio">@fraction/config_key_large_letter_ratio</item>
+ <item name="keyLabelSize">@fraction/config_key_label_ratio</item>
+ <item name="keyLargeLabelRatio">@fraction/config_key_large_label_ratio</item>
+ <item name="keyHintLetterRatio">@fraction/config_key_hint_letter_ratio</item>
+ <item name="keyHintLabelRatio">@fraction/config_key_hint_label_ratio</item>
+ <item name="keyShiftedLetterHintRatio">@fraction/config_key_shifted_letter_hint_ratio</item>
<item name="keyTypeface">normal</item>
- <item name="keyLabelHorizontalPadding">@dimen/key_label_horizontal_padding</item>
- <item name="keyHintLetterPadding">@dimen/key_hint_letter_padding</item>
- <item name="keyPopupHintLetterPadding">@dimen/key_popup_hint_letter_padding</item>
- <item name="keyShiftedLetterHintPadding">@dimen/key_uppercase_letter_padding</item>
- <item name="keyPreviewTextRatio">@fraction/key_preview_text_ratio</item>
- <item name="verticalCorrection">@dimen/keyboard_vertical_correction</item>
+ <item name="keyLabelHorizontalPadding">@dimen/config_key_label_horizontal_padding</item>
+ <item name="keyHintLetterPadding">@dimen/config_key_hint_letter_padding</item>
+ <item name="keyPopupHintLetterPadding">@dimen/config_key_popup_hint_letter_padding</item>
+ <item name="keyShiftedLetterHintPadding">@dimen/config_key_shifted_letter_hint_padding</item>
+ <item name="keyPreviewTextRatio">@fraction/config_key_preview_text_ratio</item>
+ <item name="verticalCorrection">@dimen/config_keyboard_vertical_correction</item>
<item name="backgroundDimAlpha">128</item>
- <item name="gestureFloatingPreviewTextSize">@dimen/gesture_floating_preview_text_size</item>
- <item name="gestureFloatingPreviewTextOffset">@dimen/gesture_floating_preview_text_offset</item>
- <item name="gestureFloatingPreviewHorizontalPadding">@dimen/gesture_floating_preview_horizontal_padding</item>
- <item name="gestureFloatingPreviewVerticalPadding">@dimen/gesture_floating_preview_vertical_padding</item>
- <item name="gestureFloatingPreviewRoundRadius">@dimen/gesture_floating_preview_round_radius</item>
- <item name="gestureTrailMinSamplingDistance">@dimen/gesture_trail_min_sampling_distance</item>
- <item name="gestureTrailMaxInterpolationAngularThreshold">@integer/gesture_trail_max_interpolation_angular_threshold</item>
- <item name="gestureTrailMaxInterpolationDistanceThreshold">@dimen/gesture_trail_max_interpolation_distance_threshold</item>
- <item name="gestureTrailMaxInterpolationSegments">@integer/gesture_trail_max_interpolation_segments</item>
+ <item name="gestureFloatingPreviewTextSize">@dimen/config_gesture_floating_preview_text_size</item>
+ <item name="gestureFloatingPreviewTextOffset">@dimen/config_gesture_floating_preview_text_offset</item>
+ <item name="gestureFloatingPreviewHorizontalPadding">@dimen/config_gesture_floating_preview_horizontal_padding</item>
+ <item name="gestureFloatingPreviewVerticalPadding">@dimen/config_gesture_floating_preview_vertical_padding</item>
+ <item name="gestureFloatingPreviewRoundRadius">@dimen/config_gesture_floating_preview_round_radius</item>
+ <item name="gestureTrailMinSamplingDistance">@dimen/config_gesture_trail_min_sampling_distance</item>
+ <item name="gestureTrailMaxInterpolationAngularThreshold">@integer/config_gesture_trail_max_interpolation_angular_threshold</item>
+ <item name="gestureTrailMaxInterpolationDistanceThreshold">@dimen/config_gesture_trail_max_interpolation_distance_threshold</item>
+ <item name="gestureTrailMaxInterpolationSegments">@integer/config_gesture_trail_max_interpolation_segments</item>
<item name="gestureTrailFadeoutStartDelay">@integer/config_gesture_trail_fadeout_start_delay</item>
<item name="gestureTrailFadeoutDuration">@integer/config_gesture_trail_fadeout_duration</item>
<item name="gestureTrailUpdateInterval">@integer/config_gesture_trail_update_interval</item>
- <item name="gestureTrailStartWidth">@dimen/gesture_trail_start_width</item>
- <item name="gestureTrailEndWidth">@dimen/gesture_trail_end_width</item>
- <item name="gestureTrailBodyRatio">@integer/gesture_trail_body_ratio</item>
- <item name="gestureTrailShadowRatio">@integer/gesture_trail_shadow_ratio</item>
+ <item name="gestureTrailStartWidth">@dimen/config_gesture_trail_start_width</item>
+ <item name="gestureTrailEndWidth">@dimen/config_gesture_trail_end_width</item>
+ <item name="gestureTrailBodyRatio">@integer/config_gesture_trail_body_ratio</item>
+ <item name="gestureTrailShadowRatio">@integer/config_gesture_trail_shadow_ratio</item>
<!-- Common attributes of MainKeyboardView -->
<item name="keyHysteresisDistance">@dimen/config_key_hysteresis_distance</item>
<item name="keyHysteresisDistanceForSlidingModifier">@dimen/config_key_hysteresis_distance_for_sliding_modifier</item>
<item name="touchNoiseThresholdTime">@integer/config_touch_noise_threshold_time</item>
<item name="touchNoiseThresholdDistance">@dimen/config_touch_noise_threshold_distance</item>
- <item name="slidingKeyInputEnable">@bool/config_sliding_key_input_enabled</item>
+ <item name="keySelectionByDraggingFinger">@bool/config_key_selection_by_dragging_finger</item>
<item name="slidingKeyInputPreviewWidth">@dimen/config_sliding_key_input_preview_width</item>
<item name="slidingKeyInputPreviewBodyRatio">@integer/config_sliding_key_input_preview_body_ratio</item>
<item name="slidingKeyInputPreviewShadowRatio">@integer/config_sliding_key_input_preview_shadow_ratio</item>
@@ -75,11 +75,14 @@
<item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
<item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
<item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
- <item name="keyPreviewHeight">@dimen/key_preview_height</item>
+ <item name="keyPreviewLayout">@layout/key_preview</item>
+ <item name="keyPreviewHeight">@dimen/config_key_preview_height</item>
+ <item name="keyPreviewZoomInDuration">@integer/config_key_preview_zoom_in_duration</item>
+ <item name="keyPreviewZoomOutDuration">@integer/config_key_preview_zoom_out_duration</item>
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
<item name="moreKeysKeyboardLayout">@layout/more_keys_keyboard</item>
<item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
- <item name="spacebarTextRatio">@fraction/spacebar_text_ratio</item>
+ <item name="languageOnSpacebarTextRatio">@fraction/config_language_on_spacebar_text_ratio</item>
<item name="languageOnSpacebarFinalAlpha">@integer/config_language_on_spacebar_final_alpha</item>
<item name="languageOnSpacebarFadeoutAnimator">@anim/language_on_spacebar_fadeout</item>
<!-- Remove animations for now because it could drain a non-negligible amount of battery while typing.
@@ -104,13 +107,14 @@
<style
name="MainKeyboardView"
parent="KeyboardView" />
+ <style name="KeyPreviewTextView" />
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
<style
name="EmojiPalettesView"
parent="KeyboardView"
>
- <item name="emojiTabLabelColor">@color/emoji_tab_label_color_ics</item>
+ <item name="emojiTabLabelColor">@color/emoji_tab_label_color_holo</item>
</style>
<style name="MoreKeysKeyboard" />
<style
@@ -118,14 +122,14 @@
parent="MainKeyboardView" />
<style name="MoreKeysKeyboardContainer" />
<style name="SuggestionStripView">
- <item name="suggestionsCountInStrip">@integer/suggestions_count_in_strip</item>
- <item name="centerSuggestionPercentile">@fraction/center_suggestion_percentile</item>
- <item name="maxMoreSuggestionsRow">@integer/max_more_suggestions_row</item>
- <item name="minMoreSuggestionsWidth">@fraction/min_more_suggestions_width</item>
+ <item name="suggestionsCountInStrip">@integer/config_suggestions_count_in_strip</item>
+ <item name="centerSuggestionPercentile">@fraction/config_center_suggestion_percentile</item>
+ <item name="maxMoreSuggestionsRow">@integer/config_max_more_suggestions_row</item>
+ <item name="minMoreSuggestionsWidth">@fraction/config_min_more_suggestions_width</item>
</style>
<style name="SuggestionWord" />
<style name="MoreKeysKeyboardAnimation">
<item name="android:windowEnterAnimation">@anim/more_keys_keyboard_fadein</item>
<item name="android:windowExitAnimation">@anim/more_keys_keyboard_fadeout</item>
</style>
-</resources> \ No newline at end of file
+</resources>
diff --git a/java/res/values/themes-gb.xml b/java/res/values/themes-gb.xml
index f52695f55..52ecafd62 100644
--- a/java/res/values/themes-gb.xml
+++ b/java/res/values/themes-gb.xml
@@ -23,10 +23,10 @@
<item name="keyboardStyle">@style/Keyboard.GB</item>
<item name="keyboardViewStyle">@style/KeyboardView.GB</item>
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.GB</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.GB</item>
<item name="emojiPalettesViewStyle">@style/EmojiPalettesView.GB</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.GB</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.GB</item>
- <item name="moreKeysKeyboardContainerStyle">@style/MoreKeysKeyboardContainer.GB</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripView.GB</item>
<item name="suggestionWordStyle">@style/SuggestionWord.GB</item>
</style>
@@ -40,7 +40,6 @@
<item name="iconSearchKey">@drawable/sym_keyboard_search_holo_dark</item>
<item name="iconTabKey">@drawable/sym_keyboard_tab_holo_dark</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_mic_holo_dark</item>
- <item name="iconShortcutForLabel">@drawable/sym_keyboard_label_mic_holo_dark</item>
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space</item>
<item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_holo_dark</item>
<!-- TODO: Needs non-holo disabled shortcut icon drawable -->
@@ -59,10 +58,10 @@
<!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
<item name="themeId">1</item>
<item name="touchPositionCorrectionData">@array/touch_position_correction_data_gb</item>
- <item name="keyboardTopPadding">@fraction/keyboard_top_padding_gb</item>
- <item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding_gb</item>
- <item name="horizontalGap">@fraction/key_horizontal_gap_gb</item>
- <item name="verticalGap">@fraction/key_bottom_gap_gb</item>
+ <item name="keyboardTopPadding">@fraction/config_keyboard_top_padding_gb</item>
+ <item name="keyboardBottomPadding">@fraction/config_keyboard_bottom_padding_gb</item>
+ <item name="horizontalGap">@fraction/config_key_horizontal_gap_gb</item>
+ <item name="verticalGap">@fraction/config_key_vertical_gap_gb</item>
</style>
<style
name="KeyboardView.GB"
@@ -85,16 +84,22 @@
name="MainKeyboardView.GB"
parent="KeyboardView.GB"
>
- <item name="keyPreviewLayout">@layout/key_preview_gb</item>
- <item name="keyPreviewOffset">@dimen/key_preview_offset_gb</item>
+ <item name="keyPreviewOffset">@dimen/config_key_preview_offset_gb</item>
<item name="gestureFloatingPreviewTextColor">@color/highlight_color_gb</item>
<item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_gb</item>
<item name="gestureTrailColor">@color/highlight_color_gb</item>
<item name="slidingKeyInputPreviewColor">@color/highlight_translucent_color_gb</item>
<item name="autoCorrectionSpacebarLedEnabled">true</item>
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led_gb</item>
- <item name="spacebarTextColor">@color/spacebar_text_color_gb</item>
- <item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_gb</item>
+ <item name="languageOnSpacebarTextColor">@color/spacebar_text_color_gb</item>
+ <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_gb</item>
+ <item name="spacebarBackground">@drawable/btn_keyboard_spacebar_gb</item>
+ </style>
+ <style
+ name="KeyPreviewTextView.GB"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_gb</item>
</style>
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
@@ -118,15 +123,10 @@
name="MoreKeysKeyboardView.GB"
parent="KeyboardView.GB"
>
- <item name="android:background">@null</item>
+ <item name="android:background">@drawable/keyboard_popup_panel_background_gb</item>
<item name="keyBackground">@drawable/btn_keyboard_key_popup_gb</item>
<item name="keyTypeface">normal</item>
- <item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction_gb</item>
- </style>
- <style
- name="MoreKeysKeyboardContainer.GB"
- >
- <item name="android:background">@drawable/keyboard_popup_panel_background_gb</item>
+ <item name="verticalCorrection">@dimen/config_more_keys_keyboard_vertical_correction_gb</item>
</style>
<style
name="SuggestionStripView.GB"
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index a77e685c2..125b640b6 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -2,7 +2,7 @@
<!--
/*
**
-** Copyright 2011, The Android Open Source Project
+** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -19,51 +19,28 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="KeyboardTheme.ICS" parent="KeyboardIcons.ICS">
+ <style name="KeyboardTheme.ICS" parent="KeyboardIcons.Holo">
<item name="keyboardStyle">@style/Keyboard.ICS</item>
<item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.ICS</item>
<item name="emojiPalettesViewStyle">@style/EmojiPalettesView.ICS</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
- <item name="moreKeysKeyboardContainerStyle">@style/MoreKeysKeyboardContainer.ICS</item>
<item name="suggestionStripViewStyle">@style/SuggestionStripView.ICS</item>
<item name="suggestionWordStyle">@style/SuggestionWord.ICS</item>
</style>
- <style name="KeyboardIcons.ICS">
- <!-- Keyboard icons -->
- <!-- TODO: The following holo icon for phone (drawable-hdpi and drawable-xhdpi) are missing.
- sym_keyboard_123_mic_holo
- -->
- <item name="iconShiftKey">@drawable/sym_keyboard_shift_holo_dark</item>
- <item name="iconDeleteKey">@drawable/sym_keyboard_delete_holo_dark</item>
- <item name="iconSettingsKey">@drawable/sym_keyboard_settings_holo_dark</item>
- <item name="iconSpaceKey">@null</item>
- <item name="iconEnterKey">@drawable/sym_keyboard_return_holo_dark</item>
- <item name="iconSearchKey">@drawable/sym_keyboard_search_holo_dark</item>
- <item name="iconTabKey">@drawable/sym_keyboard_tab_holo_dark</item>
- <item name="iconShortcutKey">@drawable/sym_keyboard_voice_holo_dark</item>
- <item name="iconShortcutForLabel">@drawable/sym_keyboard_label_mic_holo_dark</item>
- <item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_holo_dark</item>
- <item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_holo_dark</item>
- <item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_holo_dark</item>
- <item name="iconTabKeyPreview">@drawable/sym_keyboard_feedback_tab</item>
- <item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_dark</item>
- <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo_dark</item>
- <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo_dark</item>
- <item name="iconEmojiKey">@drawable/sym_keyboard_smiley_holo_dark</item>
- </style>
<style
name="Keyboard.ICS"
parent="Keyboard"
>
<!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
- <item name="themeId">0</item>
- <item name="keyboardTopPadding">@fraction/keyboard_top_padding_ics</item>
- <item name="keyboardBottomPadding">@fraction/keyboard_bottom_padding_ics</item>
- <item name="horizontalGap">@fraction/key_horizontal_gap_ics</item>
- <item name="verticalGap">@fraction/key_bottom_gap_ics</item>
- <item name="touchPositionCorrectionData">@array/touch_position_correction_data_ics</item>
+ <item name="themeId">2</item>
+ <item name="keyboardTopPadding">@fraction/config_keyboard_top_padding_holo</item>
+ <item name="keyboardBottomPadding">@fraction/config_keyboard_bottom_padding_holo</item>
+ <item name="horizontalGap">@fraction/config_key_horizontal_gap_holo</item>
+ <item name="verticalGap">@fraction/config_key_vertical_gap_holo</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_holo</item>
</style>
<style
name="KeyboardView.ICS"
@@ -72,30 +49,36 @@
<item name="android:background">@drawable/keyboard_background_holo</item>
<item name="keyBackground">@drawable/btn_keyboard_key_ics</item>
<item name="keyTypeface">bold</item>
- <item name="keyTextColor">@color/key_text_color_ics</item>
- <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_ics</item>
- <item name="keyHintLetterColor">@color/key_hint_letter_color_ics</item>
- <item name="keyHintLabelColor">@color/key_hint_label_color_ics</item>
- <item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_ics</item>
- <item name="keyShiftedLetterHintActivatedColor">@color/key_shifted_letter_hint_activated_color_ics</item>
- <item name="keyPreviewTextColor">@color/key_text_color_ics</item>
- <item name="keyTextShadowColor">@color/key_text_shadow_color_ics</item>
+ <item name="keyTextColor">@color/key_text_color_holo</item>
+ <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_holo</item>
+ <item name="keyHintLetterColor">@color/key_hint_letter_color_holo</item>
+ <item name="keyHintLabelColor">@color/key_hint_label_color_holo</item>
+ <item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_holo</item>
+ <item name="keyShiftedLetterHintActivatedColor">@color/key_shifted_letter_hint_activated_color_holo</item>
+ <item name="keyPreviewTextColor">@color/key_text_color_holo</item>
+ <item name="keyTextShadowColor">@color/key_text_shadow_color_holo</item>
<item name="keyTextShadowRadius">0.0</item>
</style>
<style
name="MainKeyboardView.ICS"
parent="KeyboardView.ICS"
>
- <item name="keyPreviewLayout">@layout/key_preview_ics</item>
- <item name="keyPreviewOffset">@dimen/key_preview_offset_ics</item>
- <item name="gestureFloatingPreviewTextColor">@color/highlight_color_holo</item>
- <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_ics</item>
- <item name="gestureTrailColor">@color/highlight_color_holo</item>
- <item name="slidingKeyInputPreviewColor">@color/highlight_translucent_color_holo</item>
+ <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
+ <item name="gestureFloatingPreviewTextColor">@color/highlight_color_ics</item>
+ <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
+ <item name="gestureTrailColor">@color/highlight_color_ics</item>
+ <item name="slidingKeyInputPreviewColor">@color/highlight_translucent_color_ics</item>
<item name="autoCorrectionSpacebarLedEnabled">false</item>
<item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led_holo</item>
- <item name="spacebarTextColor">@color/spacebar_text_color_ics</item>
- <item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_ics</item>
+ <item name="languageOnSpacebarTextColor">@color/spacebar_text_color_holo</item>
+ <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
+ <item name="spacebarBackground">@drawable/btn_keyboard_spacebar_ics</item>
+ </style>
+ <style
+ name="KeyPreviewTextView.ICS"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_ics</item>
</style>
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
@@ -104,7 +87,7 @@
parent="KeyboardView.ICS"
>
<item name="keyBackgroundEmojiFunctional">@drawable/btn_keyboard_key_functional_ics</item>
- <item name="emojiTabLabelColor">@color/emoji_tab_label_color_ics</item>
+ <item name="emojiTabLabelColor">@color/emoji_tab_label_color_holo</item>
</style>
<style
name="MoreKeysKeyboard.ICS"
@@ -119,15 +102,10 @@
name="MoreKeysKeyboardView.ICS"
parent="KeyboardView.ICS"
>
- <item name="android:background">@null</item>
+ <item name="android:background">@drawable/keyboard_popup_panel_background_ics</item>
<item name="keyBackground">@drawable/btn_keyboard_key_popup_ics</item>
<item name="keyTypeface">normal</item>
- <item name="verticalCorrection">@dimen/more_keys_keyboard_vertical_correction_ics</item>
- </style>
- <style
- name="MoreKeysKeyboardContainer.ICS"
- >
- <item name="android:background">@drawable/keyboard_popup_panel_background_holo</item>
+ <item name="verticalCorrection">@dimen/config_more_keys_keyboard_vertical_correction_holo</item>
</style>
<style
name="SuggestionStripView.ICS"
@@ -135,10 +113,10 @@
>
<item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
- <item name="colorValidTypedWord">@color/typed_word_color_holo</item>
- <item name="colorTypedWord">@color/typed_word_color_holo</item>
- <item name="colorAutoCorrect">@color/highlight_color_holo</item>
- <item name="colorSuggested">@color/suggested_word_color_holo</item>
+ <item name="colorValidTypedWord">@color/typed_word_color_ics</item>
+ <item name="colorTypedWord">@color/typed_word_color_ics</item>
+ <item name="colorAutoCorrect">@color/highlight_color_ics</item>
+ <item name="colorSuggested">@color/suggested_word_color_ics</item>
<item name="alphaObsoleted">70%</item>
</style>
<style name="SuggestionWord.ICS">
diff --git a/java/res/values/themes-klp.xml b/java/res/values/themes-klp.xml
new file mode 100644
index 000000000..f6c076767
--- /dev/null
+++ b/java/res/values/themes-klp.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="KeyboardTheme.KLP" parent="KeyboardIcons.Holo">
+ <item name="keyboardStyle">@style/Keyboard.KLP</item>
+ <item name="keyboardViewStyle">@style/KeyboardView.KLP</item>
+ <item name="mainKeyboardViewStyle">@style/MainKeyboardView.KLP</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.KLP</item>
+ <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.KLP</item>
+ <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.KLP</item>
+ <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.KLP</item>
+ <item name="suggestionStripViewStyle">@style/SuggestionStripView.KLP</item>
+ <item name="suggestionWordStyle">@style/SuggestionWord.KLP</item>
+ </style>
+ <style
+ name="Keyboard.KLP"
+ parent="Keyboard"
+ >
+ <!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
+ <item name="themeId">0</item>
+ <item name="keyboardTopPadding">@fraction/config_keyboard_top_padding_holo</item>
+ <item name="keyboardBottomPadding">@fraction/config_keyboard_bottom_padding_holo</item>
+ <item name="horizontalGap">@fraction/config_key_horizontal_gap_holo</item>
+ <item name="verticalGap">@fraction/config_key_vertical_gap_holo</item>
+ <item name="touchPositionCorrectionData">@array/touch_position_correction_data_holo</item>
+ </style>
+ <style
+ name="KeyboardView.KLP"
+ parent="KeyboardView"
+ >
+ <item name="android:background">@drawable/keyboard_background_holo</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_klp</item>
+ <item name="keyTypeface">bold</item>
+ <item name="keyTextColor">@color/key_text_color_holo</item>
+ <item name="keyTextInactivatedColor">@color/key_text_inactivated_color_holo</item>
+ <item name="keyHintLetterColor">@color/key_hint_letter_color_holo</item>
+ <item name="keyHintLabelColor">@color/key_hint_label_color_holo</item>
+ <item name="keyShiftedLetterHintInactivatedColor">@color/key_shifted_letter_hint_inactivated_color_holo</item>
+ <item name="keyShiftedLetterHintActivatedColor">@color/key_shifted_letter_hint_activated_color_holo</item>
+ <item name="keyPreviewTextColor">@color/key_text_color_holo</item>
+ <item name="keyTextShadowColor">@color/key_text_shadow_color_holo</item>
+ <item name="keyTextShadowRadius">0.0</item>
+ </style>
+ <style
+ name="MainKeyboardView.KLP"
+ parent="KeyboardView.KLP"
+ >
+ <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
+ <item name="gestureFloatingPreviewTextColor">@color/highlight_color_klp</item>
+ <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
+ <item name="gestureTrailColor">@color/highlight_color_klp</item>
+ <item name="slidingKeyInputPreviewColor">@color/highlight_translucent_color_klp</item>
+ <item name="autoCorrectionSpacebarLedEnabled">false</item>
+ <item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led_holo</item>
+ <item name="languageOnSpacebarTextColor">@color/spacebar_text_color_holo</item>
+ <item name="languageOnSpacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
+ <item name="spacebarBackground">@drawable/btn_keyboard_spacebar_klp</item>
+ </style>
+ <style
+ name="KeyPreviewTextView.KLP"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_klp</item>
+ </style>
+ <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
+ for instance delete button, need themed {@link KeyboardView} attributes. -->
+ <style
+ name="EmojiPalettesView.KLP"
+ parent="KeyboardView.KLP"
+ >
+ <item name="keyBackgroundEmojiFunctional">@drawable/btn_keyboard_key_functional_klp</item>
+ <item name="emojiTabLabelColor">@color/emoji_tab_label_color_holo</item>
+ </style>
+ <style
+ name="MoreKeysKeyboard.KLP"
+ parent="Keyboard.KLP"
+ >
+ <item name="keyboardTopPadding">0%p</item>
+ <item name="keyboardBottomPadding">0%p</item>
+ <item name="horizontalGap">0%p</item>
+ <item name="touchPositionCorrectionData">@null</item>
+ </style>
+ <style
+ name="MoreKeysKeyboardView.KLP"
+ parent="KeyboardView.KLP"
+ >
+ <item name="android:background">@drawable/keyboard_popup_panel_background_klp</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_popup_klp</item>
+ <item name="keyTypeface">normal</item>
+ <item name="verticalCorrection">@dimen/config_more_keys_keyboard_vertical_correction_holo</item>
+ </style>
+ <style
+ name="SuggestionStripView.KLP"
+ parent="SuggestionStripView"
+ >
+ <item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
+ <item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
+ <item name="colorValidTypedWord">@color/typed_word_color_klp</item>
+ <item name="colorTypedWord">@color/typed_word_color_klp</item>
+ <item name="colorAutoCorrect">@color/highlight_color_klp</item>
+ <item name="colorSuggested">@color/suggested_word_color_klp</item>
+ <item name="alphaObsoleted">70%</item>
+ </style>
+ <style name="SuggestionWord.KLP">
+ <item name="android:background">@drawable/btn_suggestion_klp</item>
+ </style>
+</resources>
diff --git a/java/res/values/touch-position-correction.xml b/java/res/values/touch-position-correction.xml
index 9df517b32..becec0e0a 100644
--- a/java/res/values/touch-position-correction.xml
+++ b/java/res/values/touch-position-correction.xml
@@ -57,7 +57,7 @@
</string-array>
<string-array
- name="touch_position_correction_data_ics"
+ name="touch_position_correction_data_holo"
translatable="false"
>
<!-- First row -->
diff --git a/java/res/xml-sw600dp-land/kbd_more_keys_keyboard_template.xml b/java/res/xml-sw600dp-land/kbd_more_keys_keyboard_template.xml
index 4d8b446a2..c7d446014 100644
--- a/java/res/xml-sw600dp-land/kbd_more_keys_keyboard_template.xml
+++ b/java/res/xml-sw600dp-land/kbd_more_keys_keyboard_template.xml
@@ -20,7 +20,7 @@
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="5%p"
- latin:rowHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/config_more_keys_keyboard_key_height"
style="?attr/moreKeysKeyboardStyle"
>
</Keyboard>
diff --git a/java/res/xml-sw600dp/kbd_more_keys_keyboard_template.xml b/java/res/xml-sw600dp/kbd_more_keys_keyboard_template.xml
index d90a5884e..fbe8cfcc0 100644
--- a/java/res/xml-sw600dp/kbd_more_keys_keyboard_template.xml
+++ b/java/res/xml-sw600dp/kbd_more_keys_keyboard_template.xml
@@ -20,7 +20,7 @@
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="8%p"
- latin:rowHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/config_more_keys_keyboard_key_height"
style="?attr/moreKeysKeyboardStyle"
>
</Keyboard>
diff --git a/java/res/xml-sw600dp/key_f1.xml b/java/res/xml-sw600dp/key_f1.xml
index ac0053236..530f7d63b 100644
--- a/java/res/xml-sw600dp/key_f1.xml
+++ b/java/res/xml-sw600dp/key_f1.xml
@@ -23,34 +23,11 @@
>
<switch>
<case
- latin:keyboardLayoutSetElement="symbols"
- latin:mode="url"
- >
- <Key
- latin:keyLabel=":" />
- </case>
- <case
- latin:keyboardLayoutSetElement="symbols"
- >
- <Key
- latin:keyLabel="\@" />
- </case>
- <!-- keyboardLayoutSetElement != "symbols" -->
- <case
latin:mode="email"
>
<Key
latin:keyLabel="\@" />
</case>
- <case
- latin:mode="url"
- >
- <Key
- latin:keyLabel="/"
- latin:keyHintLabel=":"
- latin:moreKeys=":"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
<default>
<Key
latin:keyLabel="/" />
diff --git a/java/res/xml-sw600dp/key_shortcut.xml b/java/res/xml-sw600dp/key_shortcut.xml
index 87fc75cd5..c869e745b 100644
--- a/java/res/xml-sw600dp/key_shortcut.xml
+++ b/java/res/xml-sw600dp/key_shortcut.xml
@@ -23,7 +23,7 @@
>
<switch>
<case
- latin:shortcutKeyEnabled="true"
+ latin:supportsSwitchingToShortcutIme="true"
latin:clobberSettingsKey="false"
>
<Key
@@ -32,20 +32,20 @@
latin:moreKeys="!text/settings_as_more_key" />
</case>
<case
- latin:shortcutKeyEnabled="true"
+ latin:supportsSwitchingToShortcutIme="true"
latin:clobberSettingsKey="true"
>
<Key
latin:keyStyle="shortcutKeyStyle" />
</case>
<case
- latin:shortcutKeyEnabled="false"
+ latin:supportsSwitchingToShortcutIme="false"
latin:clobberSettingsKey="false"
>
<Key
latin:keyStyle="settingsKeyStyle" />
</case>
- <!-- shortcutKeyEnabled="false" clobberSettingsKey="true" -->
+ <!-- supportsSwitchingToShortcutIme="false" clobberSettingsKey="true" -->
<default>
<Spacer />
</default>
diff --git a/java/res/xml-sw600dp/key_space_symbols.xml b/java/res/xml-sw600dp/key_space_symbols.xml
index 07aa7d179..d6f7cab09 100644
--- a/java/res/xml-sw600dp/key_space_symbols.xml
+++ b/java/res/xml-sw600dp/key_space_symbols.xml
@@ -22,5 +22,6 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<include
+ latin:backgroundType="normal"
latin:keyboardLayout="@xml/key_space_5kw" />
</merge>
diff --git a/java/res/xml-sw600dp/key_styles_enter.xml b/java/res/xml-sw600dp/key_styles_enter.xml
new file mode 100644
index 000000000..1d8ccfae3
--- /dev/null
+++ b/java/res/xml-sw600dp/key_styles_enter.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <!-- TODO: Stop using many conditional cases for emoji_key_as_more_key. There are way too many to maintain. -->
+ <!-- Navigate more keys style -->
+ <switch>
+ <!-- latin:passwordInput="true" -->
+ <case
+ latin:imeAction="actionNext"
+ latin:navigatePrevious="true"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
+ latin:moreKeys="!text/action_previous_as_more_key" />
+ </case>
+ <case
+ latin:imeAction="actionNext"
+ latin:navigatePrevious="false"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle" />
+ </case>
+ <case
+ latin:imeAction="actionPrevious"
+ latin:navigateNext="true"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
+ latin:moreKeys="!text/action_next_as_more_key" />
+ </case>
+ <case
+ latin:imeAction="actionPrevious"
+ latin:navigateNext="false"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle" />
+ </case>
+ <case
+ latin:navigateNext="true"
+ latin:navigatePrevious="true"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
+ latin:moreKeys="!fixedColumnOrder!2,!needsDividers!,!text/action_previous_as_more_key,!text/action_next_as_more_key" />
+ </case>
+ <case
+ latin:navigateNext="true"
+ latin:navigatePrevious="false"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
+ latin:moreKeys="!text/action_next_as_more_key" />
+ </case>
+ <case
+ latin:navigateNext="false"
+ latin:navigatePrevious="true"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
+ latin:moreKeys="!text/action_previous_as_more_key" />
+ </case>
+ <case
+ latin:navigateNext="false"
+ latin:navigatePrevious="false"
+ >
+ <key-style
+ latin:styleName="navigateMoreKeysStyle" />
+ </case>
+ <default>
+ <key-style
+ latin:styleName="navigateMoreKeysStyle" />
+ </default>
+ </switch>
+ <!-- Enter key style -->
+ <key-style
+ latin:styleName="defaultEnterKeyStyle"
+ latin:code="!code/key_enter"
+ latin:keyIcon="!icon/enter_key"
+ latin:keyLabelFlags="preserveCase|autoXScale|followKeyLabelRatio"
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="functional"
+ latin:parentStyle="navigateMoreKeysStyle" />
+ <key-style
+ latin:styleName="shiftEnterKeyStyle"
+ latin:code="!code/key_shift_enter"
+ latin:parentStyle="defaultEnterKeyStyle" />
+ <key-style
+ latin:styleName="defaultActionEnterKeyStyle"
+ latin:code="!code/key_enter"
+ latin:keyIcon="!icon/undefined"
+ latin:backgroundType="action"
+ latin:parentStyle="defaultEnterKeyStyle" />
+ <switch>
+ <!-- Shift + Enter in textMultiLine field. -->
+ <case
+ latin:isMultiLine="true"
+ latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLockShifted"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:parentStyle="shiftEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionGo"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabel="!text/label_go_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionNext"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabel="!text/label_next_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionPrevious"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabel="!text/label_previous_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionDone"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabel="!text/label_done_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionSend"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabel="!text/label_send_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionSearch"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyIcon="!icon/search_key"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <case
+ latin:imeAction="actionCustomLabel"
+ >
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:keyLabelFlags="fromCustomActionLabel"
+ latin:parentStyle="defaultActionEnterKeyStyle" />
+ </case>
+ <!-- imeAction is either actionNone or actionUnspecified. -->
+ <default>
+ <key-style
+ latin:styleName="enterKeyStyle"
+ latin:parentStyle="defaultEnterKeyStyle" />
+ </default>
+ </switch>
+</merge>
diff --git a/java/res/xml-sw600dp/keys_comma_period.xml b/java/res/xml-sw600dp/keys_comma_period.xml
index 7604e033d..55302aeab 100644
--- a/java/res/xml-sw600dp/keys_comma_period.xml
+++ b/java/res/xml-sw600dp/keys_comma_period.xml
@@ -21,83 +21,18 @@
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
- <switch>
- <case
- latin:mode="email|url"
- >
- <Key
- latin:keyLabel=","
- latin:keyHintLabel="-"
- latin:moreKeys="-"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="_"
- latin:moreKeys="_"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
- <case
- latin:languageCode="ar"
- >
- <Key
- latin:keyLabel="!text/keylabel_for_apostrophe"
- latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
- latin:moreKeys="!text/more_keys_for_apostrophe"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_arabic_diacritics"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
- <case
- latin:languageCode="fa"
- >
- <Key
- latin:keyLabel="!text/keylabel_for_apostrophe"
- latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_apostrophe"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_arabic_diacritics"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
- <case
- latin:languageCode="hy"
- >
- <!-- U+055D: "՝" ARMENIAN COMMA -->
- <Key
- latin:keyLabel="&#x055D;"
- latin:backgroundType="functional" />
- <!-- U+0589: "։" ARMENIAN FULL STOP -->
- <Key
- latin:keyLabel="&#x0589;"
- latin:keyLabelFlags="hasPopupHint"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_punctuation" />
- </case>
- <default>
- <Key
- latin:keyLabel="!text/keylabel_for_tablet_comma"
- latin:keyHintLabel="!text/keyhintlabel_for_tablet_comma"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_tablet_comma" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_period"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_period" />
- </default>
- </switch>
+ <Key
+ latin:keyLabel="!text/keylabel_for_tablet_comma"
+ latin:keyHintLabel="!text/keyhintlabel_for_tablet_comma"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="!text/more_keys_for_tablet_comma"
+ latin:backgroundType="functional"
+ latin:keyStyle="hasShiftedLetterHintStyle" />
+ <Key
+ latin:keyLabel="!text/keylabel_for_tablet_period"
+ latin:keyHintLabel="!text/keyhintlabel_for_tablet_period"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:moreKeys="!text/more_keys_for_tablet_period"
+ latin:backgroundType="functional"
+ latin:keyStyle="hasShiftedLetterHintStyle" />
</merge>
diff --git a/java/res/xml-sw600dp/keys_exclamation_question.xml b/java/res/xml-sw600dp/keys_exclamation_question.xml
index cd38282ee..fd849222d 100644
--- a/java/res/xml-sw600dp/keys_exclamation_question.xml
+++ b/java/res/xml-sw600dp/keys_exclamation_question.xml
@@ -22,7 +22,9 @@
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<Key
- latin:keyLabel="!" />
+ latin:keyLabel="!"
+ latin:moreKeys="!text/more_keys_for_exclamation" />
<Key
- latin:keyLabel="\?" />
+ latin:keyLabel="\?"
+ latin:moreKeys="!text/more_keys_for_question" />
</merge>
diff --git a/java/res/xml-sw600dp/keys_pcqwerty4_right3.xml b/java/res/xml-sw600dp/keys_pcqwerty4_right3.xml
index 774ff8d05..46a1c85dc 100644
--- a/java/res/xml-sw600dp/keys_pcqwerty4_right3.xml
+++ b/java/res/xml-sw600dp/keys_pcqwerty4_right3.xml
@@ -40,7 +40,7 @@
latin:keyHintLabel="\?"
latin:additionalMoreKeys="\?"
latin:keyStyle="hasShiftedLetterHintStyle"
- latin:moreKeys="!text/more_keys_for_symbols_question" />
+ latin:moreKeys="!text/more_keys_for_question" />
</case>
<!-- keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" -->
<default>
@@ -58,7 +58,7 @@
latin:moreKeys="!fixedColumnOrder!3,&#x203A;,&#x2265;,&#x00BB;" />
<Key
latin:keyLabel="\?"
- latin:moreKeys="!text/more_keys_for_symbols_question" />
+ latin:moreKeys="!text/more_keys_for_question" />
</default>
</switch>
</merge>
diff --git a/java/res/xml-sw600dp/rowkeys_pcqwerty1.xml b/java/res/xml-sw600dp/rowkeys_pcqwerty1.xml
index 254d3fdba..ae6bab79c 100644
--- a/java/res/xml-sw600dp/rowkeys_pcqwerty1.xml
+++ b/java/res/xml-sw600dp/rowkeys_pcqwerty1.xml
@@ -31,7 +31,7 @@
latin:keyHintLabel="!"
latin:additionalMoreKeys="!"
latin:keyStyle="hasShiftedLetterHintStyle"
- latin:moreKeys="!text/more_keys_for_symbols_exclamation,!text/more_keys_for_symbols_1" />
+ latin:moreKeys="!text/more_keys_for_exclamation,!text/more_keys_for_symbols_1" />
<Key
latin:keyLabel="2"
latin:keyHintLabel="\@"
diff --git a/java/res/xml-sw600dp/rows_hebrew.xml b/java/res/xml-sw600dp/rows_hebrew.xml
index 852e17683..86b34202f 100644
--- a/java/res/xml-sw600dp/rows_hebrew.xml
+++ b/java/res/xml-sw600dp/rows_hebrew.xml
@@ -45,8 +45,10 @@
latin:keyWidth="9.0%p"
>
<include
- latin:keyboardLayout="@xml/rowkeys_hebrew3"
- latin:keyXPos="10.0%p" />
+ latin:keyboardLayout="@xml/rowkeys_hebrew3" />
+ <include
+ latin:keyboardLayout="@xml/keys_exclamation_question"
+ latin:keyWidth="9.5%p" />
</Row>
<include
latin:keyboardLayout="@xml/row_qwerty4" />
diff --git a/java/res/xml-sw600dp/rows_swiss.xml b/java/res/xml-sw600dp/rows_swiss.xml
new file mode 100644
index 000000000..4f4ca85b4
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_swiss.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="8.182%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_swiss1" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="8.182%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_swiss2" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <Row
+ latin:keyWidth="8.182%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="10.0%p" />
+ <Spacer
+ latin:keyWidth="3.181%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz3" />
+ <include
+ latin:keyboardLayout="@xml/keys_exclamation_question" />
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyXPos="-10.0%p"
+ latin:keyWidth="fillRight" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml-sw600dp/rows_symbols.xml b/java/res/xml-sw600dp/rows_symbols.xml
index cf94b06ed..7a33f4923 100644
--- a/java/res/xml-sw600dp/rows_symbols.xml
+++ b/java/res/xml-sw600dp/rows_symbols.xml
@@ -62,6 +62,7 @@
</Row>
<Row
latin:keyWidth="9.0%p"
+ latin:backgroundType="functional"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
diff --git a/java/res/xml-sw600dp/rows_symbols_shift.xml b/java/res/xml-sw600dp/rows_symbols_shift.xml
index aad047ff6..79d1aa142 100644
--- a/java/res/xml-sw600dp/rows_symbols_shift.xml
+++ b/java/res/xml-sw600dp/rows_symbols_shift.xml
@@ -64,11 +64,14 @@
</Row>
<Row
latin:keyWidth="9.0%p"
+ latin:backgroundType="functional"
>
<Key
latin:keyStyle="toAlphaKeyStyle"
latin:keyWidth="10%p" />
<include
latin:keyboardLayout="@xml/row_symbols_shift4" />
+ <include
+ latin:keyboardLayout="@xml/key_f2" />
</Row>
</merge>
diff --git a/java/res/xml/kbd_armenian_phonetic.xml b/java/res/xml/kbd_armenian_phonetic.xml
index 1eb3c7e7d..da12870ed 100644
--- a/java/res/xml/kbd_armenian_phonetic.xml
+++ b/java/res/xml/kbd_armenian_phonetic.xml
@@ -21,9 +21,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:rowHeight="20%p"
- latin:verticalGap="@fraction/key_bottom_gap_5row"
- latin:keyLetterSize="@fraction/key_letter_ratio_5row"
- latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+ latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+ latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+ latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
diff --git a/java/res/xml/kbd_emoji_category1.xml b/java/res/xml/kbd_emoji_category1.xml
index c11a83017..5145ea9d3 100644
--- a/java/res/xml/kbd_emoji_category1.xml
+++ b/java/res/xml/kbd_emoji_category1.xml
@@ -20,9 +20,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_faces"
diff --git a/java/res/xml/kbd_emoji_category2.xml b/java/res/xml/kbd_emoji_category2.xml
index d3e5890ea..ac8784f4b 100644
--- a/java/res/xml/kbd_emoji_category2.xml
+++ b/java/res/xml/kbd_emoji_category2.xml
@@ -20,9 +20,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_objects"
diff --git a/java/res/xml/kbd_emoji_category3.xml b/java/res/xml/kbd_emoji_category3.xml
index 0efafa814..88c4db92b 100644
--- a/java/res/xml/kbd_emoji_category3.xml
+++ b/java/res/xml/kbd_emoji_category3.xml
@@ -20,9 +20,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_nature"
diff --git a/java/res/xml/kbd_emoji_category4.xml b/java/res/xml/kbd_emoji_category4.xml
index e5291207f..262384d80 100644
--- a/java/res/xml/kbd_emoji_category4.xml
+++ b/java/res/xml/kbd_emoji_category4.xml
@@ -20,9 +20,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_places"
diff --git a/java/res/xml/kbd_emoji_category5.xml b/java/res/xml/kbd_emoji_category5.xml
index 1836879d6..bf823f978 100644
--- a/java/res/xml/kbd_emoji_category5.xml
+++ b/java/res/xml/kbd_emoji_category5.xml
@@ -20,9 +20,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_symbols"
diff --git a/java/res/xml/kbd_emoji_category6.xml b/java/res/xml/kbd_emoji_category6.xml
index b47ebfec0..edb82fc64 100644
--- a/java/res/xml/kbd_emoji_category6.xml
+++ b/java/res/xml/kbd_emoji_category6.xml
@@ -20,10 +20,10 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
latin:keyLetterSize="90%p"
latin:keyLabelSize="60%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:textsArray="@array/emoji_emoticons"
diff --git a/java/res/xml/kbd_emoji_recents.xml b/java/res/xml/kbd_emoji_recents.xml
index 73926ecc0..edf3872c1 100644
--- a/java/res/xml/kbd_emoji_recents.xml
+++ b/java/res/xml/kbd_emoji_recents.xml
@@ -20,10 +20,10 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
- latin:keyWidth="@fraction/emoji_keyboard_key_width"
- latin:keyLetterSize="@fraction/emoji_keyboard_key_letter_size"
+ latin:keyWidth="@fraction/config_emoji_keyboard_key_width"
+ latin:keyLetterSize="@fraction/config_emoji_keyboard_key_letter_size"
latin:keyLabelSize="60%p"
- latin:rowHeight="@fraction/emoji_keyboard_row_height"
+ latin:rowHeight="@fraction/config_emoji_keyboard_row_height"
>
<GridRows
latin:codesArray="@array/emoji_recents"
diff --git a/java/res/xml/kbd_khmer.xml b/java/res/xml/kbd_khmer.xml
index 7a2337a48..d703e78f7 100644
--- a/java/res/xml/kbd_khmer.xml
+++ b/java/res/xml/kbd_khmer.xml
@@ -21,9 +21,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:rowHeight="20%p"
- latin:verticalGap="@fraction/key_bottom_gap_5row"
- latin:keyLetterSize="@fraction/key_letter_ratio_5row"
- latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+ latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+ latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+ latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
diff --git a/java/res/xml/kbd_lao.xml b/java/res/xml/kbd_lao.xml
index 2bba330de..6f7709562 100644
--- a/java/res/xml/kbd_lao.xml
+++ b/java/res/xml/kbd_lao.xml
@@ -21,9 +21,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:rowHeight="20%p"
- latin:verticalGap="@fraction/key_bottom_gap_5row"
- latin:keyLetterSize="@fraction/key_letter_ratio_5row"
- latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+ latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+ latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+ latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
diff --git a/java/res/xml/kbd_more_keys_keyboard_template.xml b/java/res/xml/kbd_more_keys_keyboard_template.xml
index 537973d03..7104ec7e0 100644
--- a/java/res/xml/kbd_more_keys_keyboard_template.xml
+++ b/java/res/xml/kbd_more_keys_keyboard_template.xml
@@ -20,7 +20,7 @@
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
- latin:rowHeight="@dimen/popup_key_height"
+ latin:rowHeight="@dimen/config_more_keys_keyboard_key_height"
style="?attr/moreKeysKeyboardStyle"
>
</Keyboard>
diff --git a/java/res/xml/kbd_pcqwerty.xml b/java/res/xml/kbd_pcqwerty.xml
index 5155bc510..045696451 100644
--- a/java/res/xml/kbd_pcqwerty.xml
+++ b/java/res/xml/kbd_pcqwerty.xml
@@ -21,9 +21,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:rowHeight="20%p"
- latin:verticalGap="@fraction/key_bottom_gap_5row"
- latin:keyLetterSize="@fraction/key_letter_ratio_5row"
- latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+ latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+ latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+ latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
diff --git a/java/res/xml/kbd_suggestions_pane_template.xml b/java/res/xml/kbd_suggestions_pane_template.xml
index 21316e6bb..5b4f60673 100644
--- a/java/res/xml/kbd_suggestions_pane_template.xml
+++ b/java/res/xml/kbd_suggestions_pane_template.xml
@@ -20,6 +20,6 @@
<Keyboard xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:keyWidth="10%p"
- latin:rowHeight="@dimen/more_suggestions_row_height"
+ latin:rowHeight="@dimen/config_more_suggestions_row_height"
>
</Keyboard>
diff --git a/java/res/xml/kbd_swiss.xml b/java/res/xml/kbd_swiss.xml
new file mode 100644
index 000000000..c64ad1103
--- /dev/null
+++ b/java/res/xml/kbd_swiss.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<Keyboard
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/rows_swiss" />
+</Keyboard>
diff --git a/java/res/xml/kbd_thai.xml b/java/res/xml/kbd_thai.xml
index 294bffb5b..7e65217f9 100644
--- a/java/res/xml/kbd_thai.xml
+++ b/java/res/xml/kbd_thai.xml
@@ -21,9 +21,9 @@
<Keyboard
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
latin:rowHeight="20%p"
- latin:verticalGap="@fraction/key_bottom_gap_5row"
- latin:keyLetterSize="@fraction/key_letter_ratio_5row"
- latin:keyShiftedLetterHintRatio="@fraction/key_uppercase_letter_ratio_5row"
+ latin:verticalGap="@fraction/config_key_vertical_gap_5row"
+ latin:keyLetterSize="@fraction/config_key_letter_ratio_5row"
+ latin:keyShiftedLetterHintRatio="@fraction/config_key_shifted_letter_hint_ratio_5row"
latin:touchPositionCorrectionData="@array/touch_position_correction_data_default"
>
<include
diff --git a/java/res/xml/key_f1.xml b/java/res/xml/key_f1.xml
index 455f9ef59..0e9d497b6 100644
--- a/java/res/xml/key_f1.xml
+++ b/java/res/xml/key_f1.xml
@@ -37,6 +37,16 @@
latin:keyStyle="f1MoreKeysStyle" />
</case>
<case
+ latin:supportsSwitchingToShortcutIme="false"
+ >
+ <Key
+ latin:keyLabel="!text/keylabel_for_comma"
+ latin:keyLabelFlags="hasPopupHint"
+ latin:additionalMoreKeys="!text/more_keys_for_comma"
+ latin:keyStyle="f1MoreKeysStyle" />
+ </case>
+ <!-- latin:supportsSwitchingToShortcutIme="true" -->
+ <case
latin:hasShortcutKey="true"
>
<Key
@@ -47,7 +57,7 @@
<Key
latin:keyLabel="!text/keylabel_for_comma"
latin:keyLabelFlags="hasPopupHint"
- latin:additionalMoreKeys="!text/more_keys_for_comma"
+ latin:additionalMoreKeys="!text/more_keys_for_comma,!text/shortcut_as_more_key"
latin:keyStyle="f1MoreKeysStyle" />
</default>
</switch>
diff --git a/java/res/xml/key_nepali_traditional_period.xml b/java/res/xml/key_period.xml
index 0f575c50b..838db25c3 100644
--- a/java/res/xml/key_nepali_traditional_period.xml
+++ b/java/res/xml/key_period.xml
@@ -18,22 +18,14 @@
*/
-->
-<!-- The code point U+25CC for key label is needed because the font rendering system prior to
- API version 16 can't automatically render dotted circle for incomplete combining letter
- of Hindi. The files named res/xml/{key,keys}_nepali*.xml have this U+25CC hack, although the
- counterpart files named res/xml-v16/{key,keys}_nepali*.xml don't have this hack. -->
<merge
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
>
<switch>
<case
- latin:keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted"
+ latin:languageCode="ne"
+ latin:keyboardLayoutSet="nepali_traditional"
>
- <Key
- latin:keyLabel=","
- latin:backgroundType="functional" />
- </case>
- <default>
<!-- Because the font rendering system prior to API version 16 can't automatically
render dotted circle for incomplete combining letter of some scripts, different
set of Key definitions are needed based on the API version. -->
@@ -42,7 +34,15 @@
<Key
latin:keyStyle="baseKeyDevanagariSignVirama"
latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!fixedColumnOrder!4,.,!text/more_keys_for_punctuation"
+ latin:moreKeys="!text/more_keys_for_punctuation"
+ latin:backgroundType="functional" />
+ </case>
+ <default>
+ <Key
+ latin:keyLabel="!text/keylabel_for_period"
+ latin:keyHintLabel="!text/keyhintlabel_for_period"
+ latin:keyLabelFlags="hasPopupHint|hasShiftedLetterHint"
+ latin:moreKeys="!text/more_keys_for_period"
latin:backgroundType="functional" />
</default>
</switch>
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index c9d87bfd4..d538eb8c3 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -160,27 +160,10 @@
latin:keyLabelFlags="preserveCase"
latin:keyActionFlags="noKeyPreview"
latin:backgroundType="functional" />
- <switch>
- <!-- When this qwerty keyboard has no shortcut keys but shortcut key is enabled, then symbol
- keyboard will have a shortcut key. That means we should use label_to_symbol_key label
- and shortcut_for_label icon. -->
- <case
- latin:shortcutKeyOnSymbols="true"
- >
- <key-style
- latin:styleName="baseForToSymbolKeyStyle"
- latin:keyIcon="!icon/shortcut_for_label"
- latin:keyLabel="!text/label_to_symbol_with_microphone_key"
- latin:keyLabelFlags="withIconRight|preserveCase"
- latin:parentStyle="baseForLayoutSwitchKeyStyle" />
- </case>
- <default>
- <key-style
- latin:styleName="baseForToSymbolKeyStyle"
- latin:keyLabel="!text/label_to_symbol_key"
- latin:parentStyle="baseForLayoutSwitchKeyStyle" />
- </default>
- </switch>
+ <key-style
+ latin:styleName="baseForToSymbolKeyStyle"
+ latin:keyLabel="!text/label_to_symbol_key"
+ latin:parentStyle="baseForLayoutSwitchKeyStyle" />
<key-style
latin:styleName="toSymbolKeyStyle"
latin:code="!code/key_switch_alpha_symbol"
@@ -200,12 +183,6 @@
latin:code="!code/key_shift"
latin:parentStyle="baseForToSymbolKeyStyle" />
<key-style
- latin:styleName="punctuationKeyStyle"
- latin:keyLabel="."
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_punctuation"
- latin:backgroundType="functional" />
- <key-style
latin:styleName="comKeyStyle"
latin:keyLabel="!text/keylabel_for_popular_domain"
latin:keyLabelFlags="autoXScale|fontNormal|hasPopupHint|preserveCase"
diff --git a/java/res/xml/key_styles_enter.xml b/java/res/xml/key_styles_enter.xml
index 568c60270..083e6a67d 100644
--- a/java/res/xml/key_styles_enter.xml
+++ b/java/res/xml/key_styles_enter.xml
@@ -190,6 +190,7 @@
>
<key-style
latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/emoji_key_as_more_key" />
</case>
<case
@@ -207,6 +208,7 @@
>
<key-style
latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/emoji_key_as_more_key" />
</case>
<case
@@ -242,6 +244,7 @@
>
<key-style
latin:styleName="navigateMoreKeysStyle"
+ latin:keyLabelFlags="hasPopupHint|preserveCase"
latin:moreKeys="!text/emoji_key_as_more_key" />
</case>
<default>
diff --git a/java/res/xml/key_symbols_period.xml b/java/res/xml/key_symbols_period.xml
deleted file mode 100644
index 6efc9dee3..000000000
--- a/java/res/xml/key_symbols_period.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <!-- U+2105: "℅" CARE OF
- U+2122: "™" TRADE MARK SIGN
- U+00AE: "®" REGISTERED SIGN
- U+00A9: "©" COPYRIGHT SIGN
- U+00A7: "§" SECTION SIGN
- U+00B6: "¶" PILCROW SIGN
- U+002C: "," COMMA
- U+2022: "•" BULLET -->
- <!-- U+00B0: "°" DEGREE SIGN
- U+2032: "′" PRIME
- U+2033: "″" DOUBLE PRIME
- U+2191: "↑" UPWARDS ARROW
- U+2193: "↓" DOWNWARDS ARROW
- U+2190: "←" LEFTWARDS ARROW
- U+2192: "→" RIGHTWARDS ARROW
- U+2026: "…" HORIZONTAL ELLIPSIS -->
- <!-- U+0394: "Δ" GREEK CAPITAL LETTER DELTA
- U+03A0: "Π" GREEK CAPITAL LETTER PI
- U+03C0: "π" GREEK SMALL LETTER PI -->
- <Key
- latin:keyLabel="."
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!fixedColumnOrder!8,&#x2105;,&#x2122;,&#x00AE;,&#x00A9;,&#x00A7;,&#x00B6;,\\,,&#x2022;,&#x00B0;,&#x2032;,&#x2033;,&#x2191;,&#x2193;,&#x2190;,&#x2192;,&#x2026;,!text/more_keys_for_bullet,&#x0394;,&#x03A0;,&#x03C0;" />
-</merge>
diff --git a/java/res/xml/keyboard_layout_set_swiss.xml b/java/res/xml/keyboard_layout_set_swiss.xml
new file mode 100644
index 000000000..e17a5ab8b
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_swiss.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<KeyboardLayoutSet
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+ <Element
+ latin:elementName="alphabet"
+ latin:elementKeyboard="@xml/kbd_swiss"
+ latin:enableProximityCharsCorrection="true" />
+ <Element
+ latin:elementName="symbols"
+ latin:elementKeyboard="@xml/kbd_symbols" />
+ <Element
+ latin:elementName="symbolsShifted"
+ latin:elementKeyboard="@xml/kbd_symbols_shift" />
+ <Element
+ latin:elementName="phone"
+ latin:elementKeyboard="@xml/kbd_phone" />
+ <Element
+ latin:elementName="phoneSymbols"
+ latin:elementKeyboard="@xml/kbd_phone_symbols" />
+ <Element
+ latin:elementName="number"
+ latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardLayoutSet>
diff --git a/java/res/xml/keys_comma_period.xml b/java/res/xml/keys_comma_period.xml
deleted file mode 100644
index 1b51e45ed..000000000
--- a/java/res/xml/keys_comma_period.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<merge
- xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
- <switch>
- <case
- latin:languageCode="ar"
- >
- <Key
- latin:keyLabel="!text/keylabel_for_apostrophe"
- latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
- latin:moreKeys="!text/more_keys_for_apostrophe"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_arabic_diacritics"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
- <case
- latin:languageCode="fa"
- >
- <Key
- latin:keyLabel="!text/keylabel_for_apostrophe"
- latin:keyHintLabel="!text/keyhintlabel_for_apostrophe"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_apostrophe"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
- latin:keyLabelFlags="hasPopupHint"
- latin:moreKeys="!text/more_keys_for_arabic_diacritics"
- latin:backgroundType="functional"
- latin:keyStyle="hasShiftedLetterHintStyle" />
- </case>
- <case
- latin:languageCode="hy"
- >
- <!-- U+055D: "՝" ARMENIAN COMMA -->
- <Key
- latin:keyLabel="&#x055D;"
- latin:backgroundType="functional" />
- <!-- U+0589: "։" ARMENIAN FULL STOP -->
- <Key
- latin:keyLabel="&#x0589;"
- latin:keyLabelFlags="hasPopupHint"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_punctuation" />
- </case>
- <default>
- <Key
- latin:keyLabel="!text/keylabel_for_tablet_comma"
- latin:keyHintLabel="!text/keyhintlabel_for_tablet_comma"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_tablet_comma" />
- <Key
- latin:keyLabel="."
- latin:keyHintLabel="!text/keyhintlabel_for_period"
- latin:backgroundType="functional"
- latin:moreKeys="!text/more_keys_for_period" />
- </default>
- </switch>
-</merge>
diff --git a/java/res/xml/keys_comma_period_symbols.xml b/java/res/xml/keys_comma_period_symbols.xml
new file mode 100644
index 000000000..6465fedd1
--- /dev/null
+++ b/java/res/xml/keys_comma_period_symbols.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <Key
+ latin:keyLabel=","
+ latin:backgroundType="functional" />
+ <!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
+ <Key
+ latin:keyLabel="."
+ latin:moreKeys="&#x2026;"
+ latin:backgroundType="functional" />
+</merge>
diff --git a/java/res/xml/keys_pcqwerty4_right3.xml b/java/res/xml/keys_pcqwerty4_right3.xml
index e6084cb45..a5d5a429c 100644
--- a/java/res/xml/keys_pcqwerty4_right3.xml
+++ b/java/res/xml/keys_pcqwerty4_right3.xml
@@ -34,7 +34,7 @@
<Key
latin:keyLabel="/"
latin:additionalMoreKeys="\?"
- latin:moreKeys="!text/more_keys_for_symbols_question" />
+ latin:moreKeys="!text/more_keys_for_question" />
</case>
<!-- keyboardLayoutSetElement="alphabetManualShifted|alphabetShiftLocked|alphabetShiftLockShifted" -->
<default>
@@ -52,7 +52,7 @@
latin:moreKeys="!fixedColumnOrder!3,&#x203A;,&#x2265;,&#x00BB;" />
<Key
latin:keyLabel="\?"
- latin:moreKeys="!text/more_keys_for_symbols_question" />
+ latin:moreKeys="!text/more_keys_for_question" />
</default>
</switch>
</merge>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index f0e04c220..78e771fda 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -24,14 +24,15 @@
keyboard_locale: script_name/keyboard_layout_set
af: Afrikaans/qwerty
ar: Arabic/arabic
- az: Azerbaijani/qwerty
- be: Belarusian/east_slavic
+ (az: Azerbaijani/qwerty) # disabled temporarily. waiting for string resources.
+ be_BY: Belarusian/east_slavic
bg: Bulgarian/bulgarian
bg: Bulgarian/bulgarian_bds
ca: Catalan/spanish
cs: Czech/qwertz
da: Danish/nordic
de: German/qwertz
+ de_CH: German Switzerland/swiss
el: Greek/greek
en_US: English United States/qwerty
en_GB: English Great Britain/qwerty
@@ -39,32 +40,33 @@
es: Spanish/spanish
es_US: Spanish United States/spanish
(es_419: Spanish Latin America/qwerty)
- et: Estonian/nordic
+ et_EE: Estonian/nordic
fa: Persian/arabic
fi: Finnish/nordic
fr: French/azerty
fr_CA: French Canada/qwerty
+ fr_CH: French Switzerland/swiss
hi: Hindi/hindi
hr: Croatian/qwertz
hu: Hungarian/qwertz
- hy: Armenian Phonetic/armenian_phonetic
+ hy_AM: Armenian Phonetic/armenian_phonetic
in: Indonesian/qwerty # "id" is official language code of Indonesian.
is: Icelandic/qwerty
it: Italian/qwerty
iw: Hebrew/hebrew # "he" is official language code of Hebrew.
- ka: Georgian/georgian
- (kk: Kazakh/east_slavic) # disabled temporarily. waiting for strnig resources.
- km: Khmer/khmer
+ ka_GE: Georgian/georgian
+ (kk: Kazakh/east_slavic) # disabled temporarily. waiting for string resources.
+ km_KH: Khmer/khmer
ky: Kyrgyz/east_slavic
- lo: Lao/lao
+ lo_LA: Lao/lao
lt: Lithuanian/qwerty
lv: Latvian/qwerty
mk: Macedonian/south_slavic
- mn: Mongolian/mongolian
- ms: Malay/qwerty
+ mn_MN: Mongolian/mongolian
+ ms_MY: Malay/qwerty
nb: Norwegian Bokmål/nordic
- ne: Nepali Romanized/nepali_romanized # disabled temporarily
- ne: Nepali Traditional/nepali_traditional # disabled temporarily
+ (ne: Nepali Romanized/nepali_romanized) # disabled temporarily
+ (ne: Nepali Traditional/nepali_traditional) # disabled temporarily
nl: Dutch/qwerty
nl_BE: Dutch Belgium/azerty
pl: Polish/qwerty
@@ -88,19 +90,22 @@
(zz: Emoji/emoji)
-->
<!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. -->
+<!-- TODO: Remove "AsciiCapable" from the extra values when we can stop supporting JB-MR1 -->
<!-- Note: SupportTouchPositionCorrection extra value is obsolete and maintained for backward
compatibility. -->
<!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default
subtype.-->
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.android.inputmethod.latin.settings.SettingsActivity"
- android:isDefault="@bool/im_is_default">
+ android:isDefault="@bool/im_is_default"
+ android:supportsSwitchingToNextInputMethod="true">
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_en_US"
android:subtypeId="0xc9194f98"
android:imeSubtypeLocale="en_US"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="TrySuppressingImeSwitcher,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_en_GB"
@@ -108,6 +113,7 @@
android:imeSubtypeLocale="en_GB"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="TrySuppressingImeSwitcher,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -115,6 +121,7 @@
android:imeSubtypeLocale="af"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -122,20 +129,25 @@
android:imeSubtypeLocale="ar"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="false"
/>
+ <!--
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x70b0f974"
android:imeSubtypeLocale="az"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
+ -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x1dc3a859"
- android:imeSubtypeLocale="be"
+ android:imeSubtypeLocale="be_BY"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -143,6 +155,7 @@
android:imeSubtypeLocale="bg"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_bulgarian_bds"
@@ -150,6 +163,7 @@
android:imeSubtypeLocale="bg"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=bulgarian_bds,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -157,6 +171,7 @@
android:imeSubtypeLocale="ca"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -164,6 +179,7 @@
android:imeSubtypeLocale="cs"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -171,6 +187,7 @@
android:imeSubtypeLocale="da"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -178,6 +195,15 @@
android:imeSubtypeLocale="de"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
+ />
+ <subtype android:icon="@drawable/ic_ime_switcher_dark"
+ android:label="@string/subtype_generic"
+ android:subtypeId="0x7acfd0aa"
+ android:imeSubtypeLocale="de_CH"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -185,6 +211,7 @@
android:imeSubtypeLocale="el"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=greek,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -192,6 +219,7 @@
android:imeSubtypeLocale="eo"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -199,6 +227,7 @@
android:imeSubtypeLocale="es"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_es_US"
@@ -206,6 +235,7 @@
android:imeSubtypeLocale="es_US"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<!--
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -214,14 +244,16 @@
android:imeSubtypeLocale="es_419"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
-->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0xec2d3955"
- android:imeSubtypeLocale="et"
+ android:imeSubtypeLocale="et_EE"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=nordic,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -229,6 +261,7 @@
android:imeSubtypeLocale="fa"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=farsi,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -236,6 +269,7 @@
android:imeSubtypeLocale="fi"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -243,6 +277,7 @@
android:imeSubtypeLocale="fr"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -250,6 +285,15 @@
android:imeSubtypeLocale="fr_CA"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
+ />
+ <subtype android:icon="@drawable/ic_ime_switcher_dark"
+ android:label="@string/subtype_generic"
+ android:subtypeId="0xeadc55f5"
+ android:imeSubtypeLocale="fr_CH"
+ android:imeSubtypeMode="keyboard"
+ android:imeSubtypeExtraValue="KeyboardLayoutSet=swiss,AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -257,6 +301,7 @@
android:imeSubtypeLocale="hi"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=hindi,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -264,6 +309,7 @@
android:imeSubtypeLocale="hr"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -271,13 +317,15 @@
android:imeSubtypeLocale="hu"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0xe39ac3ca"
- android:imeSubtypeLocale="hy"
+ android:imeSubtypeLocale="hy_AM"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=armenian_phonetic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<!-- Java uses the deprecated "in" code instead of the standard "id" code for Indonesian. -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -286,6 +334,7 @@
android:imeSubtypeLocale="in"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -293,6 +342,7 @@
android:imeSubtypeLocale="is"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -300,6 +350,7 @@
android:imeSubtypeLocale="it"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<!-- Java uses the deprecated "iw" code instead of the standard "he" code for Hebrew. -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -308,13 +359,15 @@
android:imeSubtypeLocale="iw"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x6e119e6a"
- android:imeSubtypeLocale="ka"
+ android:imeSubtypeLocale="ka_GE"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=georgian,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<!--
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -323,29 +376,32 @@
android:imeSubtypeLocale="kk"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
-->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x1365683a"
- android:imeSubtypeLocale="km"
+ android:imeSubtypeLocale="km_KH"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=khmer,EmojiCapable"
+ android:isAsciiCapable="false"
/>
- <!-- android:subtypeId="Need this for km" -->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x2e391c04"
android:imeSubtypeLocale="ky"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x8315772c"
- android:imeSubtypeLocale="lo"
+ android:imeSubtypeLocale="lo_LA"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=lao,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -353,6 +409,7 @@
android:imeSubtypeLocale="lt"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -360,6 +417,7 @@
android:imeSubtypeLocale="lv"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -367,20 +425,23 @@
android:imeSubtypeLocale="mk"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=south_slavic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0xcdcfc3ab"
- android:imeSubtypeLocale="mn"
+ android:imeSubtypeLocale="mn_MN"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=mongolian,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
android:subtypeId="0x84c87c61"
- android:imeSubtypeLocale="ms"
+ android:imeSubtypeLocale="ms_MY"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -388,6 +449,7 @@
android:imeSubtypeLocale="nb"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<!--
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -396,6 +458,7 @@
android:imeSubtypeLocale="ne"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=nepali_romanized,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_nepali_traditional"
@@ -403,6 +466,7 @@
android:imeSubtypeLocale="ne"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=nepali_traditional,EmojiCapable"
+ android:isAsciiCapable="false"
/>
-->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -411,6 +475,7 @@
android:imeSubtypeLocale="nl"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -418,6 +483,7 @@
android:imeSubtypeLocale="nl_BE"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=azerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -425,6 +491,7 @@
android:imeSubtypeLocale="pl"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -432,6 +499,7 @@
android:imeSubtypeLocale="pt_BR"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -439,6 +507,7 @@
android:imeSubtypeLocale="pt_PT"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -446,6 +515,7 @@
android:imeSubtypeLocale="ro"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -453,6 +523,7 @@
android:imeSubtypeLocale="ru"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -460,6 +531,7 @@
android:imeSubtypeLocale="sk"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -467,6 +539,7 @@
android:imeSubtypeLocale="sl"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -474,6 +547,7 @@
android:imeSubtypeLocale="sr"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<!-- TODO: Uncomment once we can handle IETF language tag with script name specified.
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -482,6 +556,7 @@
android:imeSubtypeLocale="sr"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_serbian_latin"
@@ -489,6 +564,7 @@
android:imeSubtypeLocale="sr-Latn"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
-->
<subtype android:icon="@drawable/ic_ime_switcher_dark"
@@ -497,6 +573,7 @@
android:imeSubtypeLocale="sv"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -504,6 +581,7 @@
android:imeSubtypeLocale="sw"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -511,6 +589,7 @@
android:imeSubtypeLocale="th"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=thai,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -518,6 +597,7 @@
android:imeSubtypeLocale="tl"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=spanish,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -525,6 +605,7 @@
android:imeSubtypeLocale="tr"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="AsciiCapable,SupportTouchPositionCorrection,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -532,6 +613,7 @@
android:imeSubtypeLocale="uk"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=east_slavic,EmojiCapable"
+ android:isAsciiCapable="false"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -539,6 +621,7 @@
android:imeSubtypeLocale="vi"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_generic"
@@ -546,6 +629,7 @@
android:imeSubtypeLocale="zu"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<subtype android:icon="@drawable/ic_ime_switcher_dark"
android:label="@string/subtype_no_language_qwerty"
@@ -553,6 +637,7 @@
android:imeSubtypeLocale="zz"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EnabledWhenDefaultIsNotAsciiCapable,EmojiCapable"
+ android:isAsciiCapable="true"
/>
<!-- Emoji subtype has to be an addtional subtype added at boot time because ICS doesn't
support Emoji. -->
@@ -563,6 +648,7 @@
android:imeSubtypeLocale="zz"
android:imeSubtypeMode="keyboard"
android:imeSubtypeExtraValue="KeyboardLayoutSet=emoji,EmojiCapable"
+ android:isAsciiCapable="false"
/>
-->
</input-method>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 6c36b0e89..bf3b62353 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -158,6 +158,13 @@
android:summary="@string/sliding_key_input_preview_summary"
android:persistent="true"
android:defaultValue="true" />
+ <ListPreference
+ android:key="pref_keyboard_layout_20110916"
+ android:title="@string/keyboard_color_scheme"
+ android:persistent="true"
+ android:entryValues="@array/keyboard_color_schemes_values"
+ android:entries="@array/keyboard_color_schemes"
+ android:defaultValue="@string/config_default_keyboard_theme_index" />
<PreferenceScreen
android:fragment="com.android.inputmethod.latin.settings.AdditionalSubtypeSettings"
android:key="custom_input_styles"
diff --git a/java/res/xml/prefs_for_debug.xml b/java/res/xml/prefs_for_debug.xml
index 5d89b9cb2..124c44388 100644
--- a/java/res/xml/prefs_for_debug.xml
+++ b/java/res/xml/prefs_for_debug.xml
@@ -28,6 +28,7 @@
<ListPreference
android:key="pref_keyboard_layout_20110916"
android:title="@string/keyboard_layout"
+ android:summary="%s"
android:persistent="true"
android:entryValues="@array/keyboard_layout_modes_values"
android:entries="@array/keyboard_layout_modes"
@@ -57,6 +58,12 @@
android:persistent="true"
android:title="@string/prefs_use_only_personalization_dictionary" />
+ <CheckBoxPreference
+ android:defaultValue="false"
+ android:key="boost_personalization_dictionary_for_debug"
+ android:persistent="true"
+ android:title="@string/prefs_boost_personalization_dictionary" />
+
<PreferenceScreen
android:key="read_external_dictionary"
android:title="@string/prefs_read_external_dictionary" />
diff --git a/java/res/xml/row_dvorak4.xml b/java/res/xml/row_dvorak4.xml
index 02a95acea..b78872fe4 100644
--- a/java/res/xml/row_dvorak4.xml
+++ b/java/res/xml/row_dvorak4.xml
@@ -27,42 +27,11 @@
<Key
latin:keyStyle="toSymbolKeyStyle"
latin:keyWidth="15%p" />
- <switch>
- <case
- latin:hasShortcutKey="true"
- latin:keyboardLayoutSetElement="alphabet"
- >
- <Key
- latin:keyLabel="q"
- latin:backgroundType="normal"
- latin:additionalMoreKeys="!text/shortcut_as_more_key"
- latin:keyStyle="f1MoreKeysStyle" />
- </case>
- <case
- latin:hasShortcutKey="true"
- >
- <Key
- latin:keyLabel="Q"
- latin:backgroundType="normal"
- latin:additionalMoreKeys="!text/shortcut_as_more_key"
- latin:keyStyle="f1MoreKeysStyle" />
- </case>
- <!-- latin:hasShortcutKey="false" -->
- <case
- latin:keyboardLayoutSetElement="alphabet"
- >
- <Key
- latin:keyLabel="q"
- latin:backgroundType="normal"
- latin:keyStyle="f1MoreKeysStyle" />
- </case>
- <default>
- <Key
- latin:keyLabel="Q"
- latin:backgroundType="normal"
- latin:keyStyle="f1MoreKeysStyle" />
- </default>
- </switch>
+ <Key
+ latin:keyLabel="q"
+ latin:backgroundType="normal"
+ latin:additionalMoreKeys="!text/shortcut_as_more_key"
+ latin:keyStyle="f1MoreKeysStyle" />
<include
latin:keyXPos="25%p"
latin:keyboardLayout="@xml/key_space_5kw" />
diff --git a/java/res/xml/row_pcqwerty5.xml b/java/res/xml/row_pcqwerty5.xml
index 4ec908ba1..0a3f4d289 100644
--- a/java/res/xml/row_pcqwerty5.xml
+++ b/java/res/xml/row_pcqwerty5.xml
@@ -28,7 +28,7 @@
latin:keyWidth="11.538%p" />
<switch>
<case
- latin:shortcutKeyEnabled="true"
+ latin:supportsSwitchingToShortcutIme="true"
>
<Key
latin:keyStyle="shortcutKeyStyle"
diff --git a/java/res/xml/row_qwerty4.xml b/java/res/xml/row_qwerty4.xml
index 578bc1234..509092d96 100644
--- a/java/res/xml/row_qwerty4.xml
+++ b/java/res/xml/row_qwerty4.xml
@@ -32,36 +32,8 @@
<include
latin:keyXPos="25%p"
latin:keyboardLayout="@xml/key_space_5kw" />
- <switch>
- <case
- latin:languageCode="ar|fa"
- >
- <Key
- latin:keyHintLabel="!text/keyhintlabel_for_arabic_diacritics"
- latin:keyLabelFlags="hasPopupHint|hasShiftedLetterHint"
- latin:moreKeys="!text/more_keys_for_arabic_diacritics"
- latin:keyStyle="punctuationKeyStyle" />
- </case>
- <case
- latin:languageCode="ne"
- latin:keyboardLayoutSet="nepali_traditional"
- >
- <include
- latin:keyboardLayout="@xml/key_nepali_traditional_period" />
- </case>
- <case
- latin:languageCode="hy"
- >
- <!-- U+0589: "։" ARMENIAN FULL STOP -->
- <Key
- latin:keyLabel="&#x0589;"
- latin:keyStyle="punctuationKeyStyle" />
- </case>
- <default>
- <Key
- latin:keyStyle="punctuationKeyStyle" />
- </default>
- </switch>
+ <include
+ latin:keyboardLayout="@xml/key_period" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
diff --git a/java/res/xml/row_symbols4.xml b/java/res/xml/row_symbols4.xml
index fbfdc5f72..09d2a1971 100644
--- a/java/res/xml/row_symbols4.xml
+++ b/java/res/xml/row_symbols4.xml
@@ -19,24 +19,12 @@
-->
<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin" >
-
<Key
- latin:backgroundType="functional"
latin:keyLabel="_" />
<Key
- latin:backgroundType="functional"
latin:keyLabel="/" />
-
- <switch>
- <case latin:hasShortcutKey="true" >
- <Key latin:keyStyle="shortcutKeyStyle" />
- </case>
- <!-- latin:hasShortcutKey="false" -->
- <default>
- </default>
- </switch>
-
- <include latin:keyboardLayout="@xml/key_space_symbols" />
- <include latin:keyboardLayout="@xml/keys_comma_period" />
-
+ <include
+ latin:keyboardLayout="@xml/key_space_symbols" />
+ <include
+ latin:keyboardLayout="@xml/keys_comma_period_symbols" />
</merge>
diff --git a/java/res/xml/row_symbols_shift4.xml b/java/res/xml/row_symbols_shift4.xml
index 72d24a321..f75575bc6 100644
--- a/java/res/xml/row_symbols_shift4.xml
+++ b/java/res/xml/row_symbols_shift4.xml
@@ -22,9 +22,5 @@
<include latin:keyboardLayout="@xml/keys_less_greater" />
<include
latin:keyboardLayout="@xml/key_space_symbols" />
- <include latin:keyboardLayout="@xml/keys_comma_period" />
-
- <include
- latin:keyboardLayout="@xml/key_f2" />
-
+ <include latin:keyboardLayout="@xml/keys_comma_period_symbols" />
</merge>
diff --git a/java/res/xml/rowkeys_khmer1.xml b/java/res/xml/rowkeys_khmer1.xml
index 25da66400..05d1a864a 100644
--- a/java/res/xml/rowkeys_khmer1.xml
+++ b/java/res/xml/rowkeys_khmer1.xml
@@ -64,6 +64,7 @@
<Key
latin:keyLabel="&#x17D0;"
latin:keyHintLabel="&#x17DA;"
+ latin:keyHintLabelVerticalAdjustment="-30%"
latin:moreKeys="&#x17DA;"
latin:keyLabelFlags="fontNormal" />
<!-- U+17CF: "៏" KHMER SIGN AHSDA -->
diff --git a/java/res/xml/rowkeys_khmer2.xml b/java/res/xml/rowkeys_khmer2.xml
index cba2d3b90..801f23ff6 100644
--- a/java/res/xml/rowkeys_khmer2.xml
+++ b/java/res/xml/rowkeys_khmer2.xml
@@ -31,12 +31,13 @@
latin:keyLabel="&#x1788;"
latin:keyHintLabel="&#x17DC;"
latin:moreKeys="&#x17DC;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+17BA: "ឺ" KHMER VOWEL SIGN YY
U+17DD: "៝" KHMER SIGN ATTHACAN -->
<Key
latin:keyLabel="&#x17BA;"
latin:keyHintLabel="&#x17DD;"
+ latin:keyHintLabelVerticalAdjustment="40%"
latin:moreKeys="&#x17DD;"
latin:keyLabelFlags="fontNormal" />
<!-- U+17C2: "ែ" KHMER VOWEL SIGN AE -->
@@ -69,7 +70,7 @@
<!-- U+17C5: "ៅ" KHMER VOWEL SIGN AU -->
<Key
latin:keyLabel="&#x17C5;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+1797: "ភ" KHMER LETTER PHO -->
<Key
latin:keyLabel="&#x1797;"
@@ -77,7 +78,7 @@
<!-- U+17BF: "ឿ" KHMER VOWEL SIGN YA -->
<Key
latin:keyLabel="&#x17BF;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+17B0: "ឰ" KHMER INDEPENDENT VOWEL QAI -->
<Key
latin:keyLabel="&#x17B0;"
@@ -119,7 +120,7 @@
<!-- U+17C4: "ោ" KHMER VOWEL SIGN OO -->
<Key
latin:keyLabel="&#x17C4;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+1795: "ផ" KHMER LETTER PHA -->
<Key
latin:keyLabel="&#x1795;"
@@ -127,7 +128,7 @@
<!-- U+17C0: "ៀ" KHMER VOWEL SIGN IE -->
<Key
latin:keyLabel="&#x17C0;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+17AA: "ឪ" KHMER INDEPENDENT VOWEL QUUV
U+17A7: "ឧ" KHMER INDEPENDENT VOWEL QU
U+17B1: "ឱ" KHMER INDEPENDENT VOWEL QOO TYPE ONE
diff --git a/java/res/xml/rowkeys_khmer3.xml b/java/res/xml/rowkeys_khmer3.xml
index ff6c9ca51..f35ba5c56 100644
--- a/java/res/xml/rowkeys_khmer3.xml
+++ b/java/res/xml/rowkeys_khmer3.xml
@@ -70,7 +70,7 @@
<!-- U+17C4/U+17C7: "ោះ" KHMER VOWEL SIGN OO/KHMER SIGN REAHMUK -->
<Key
latin:keyLabel="&#x17C4;&#x17C7;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|followKeyLetterRatio|autoScale" />
<!-- U+17C9: "៉" KHMER SIGN MUUSIKATOAN -->
<Key
latin:keyLabel="&#x17C9;"
diff --git a/java/res/xml/rowkeys_khmer4.xml b/java/res/xml/rowkeys_khmer4.xml
index fe6c59125..598aed8d5 100644
--- a/java/res/xml/rowkeys_khmer4.xml
+++ b/java/res/xml/rowkeys_khmer4.xml
@@ -40,7 +40,7 @@
<!-- U+17C1/U+17C7: "េះ" KHMER VOWEL SIGN E/KHMER SIGN REAHMUK -->
<Key
latin:keyLabel="&#x17C1;&#x17C7;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|followKeyLetterRatio|autoScale" />
<!-- U+1796: "ព" KHMER LETTER PO
U+179E: "ឞ" KHMER LETTER SSO -->
<Key
@@ -51,7 +51,7 @@
<!-- U+178E: "ណ" KHMER LETTER NNO -->
<Key
latin:keyLabel="&#x178E;"
- latin:keyLabelFlags="fontNormal" />
+ latin:keyLabelFlags="fontNormal|autoScale" />
<!-- U+17C6: "ំ" KHMER SIGN NIKAHIT -->
<Key
latin:keyLabel="&#x17C6;"
diff --git a/java/res/xml/rowkeys_pcqwerty1.xml b/java/res/xml/rowkeys_pcqwerty1.xml
index de548d0ba..1ac264afa 100644
--- a/java/res/xml/rowkeys_pcqwerty1.xml
+++ b/java/res/xml/rowkeys_pcqwerty1.xml
@@ -26,7 +26,7 @@
latin:additionalMoreKeys="~" />
<Key
latin:keyLabel="1"
- latin:additionalMoreKeys="!,!text/more_keys_for_symbols_exclamation"
+ latin:additionalMoreKeys="!,!text/more_keys_for_exclamation"
latin:moreKeys="!text/more_keys_for_symbols_1" />
<Key
latin:keyLabel="2"
diff --git a/java/res/xml/rowkeys_pcqwerty1_shift.xml b/java/res/xml/rowkeys_pcqwerty1_shift.xml
index bc39f944e..718acfd24 100644
--- a/java/res/xml/rowkeys_pcqwerty1_shift.xml
+++ b/java/res/xml/rowkeys_pcqwerty1_shift.xml
@@ -25,7 +25,7 @@
latin:keyLabel="~" />
<Key
latin:keyLabel="!"
- latin:additionalMoreKeys="!text/more_keys_for_symbols_exclamation" />
+ latin:additionalMoreKeys="!text/more_keys_for_exclamation" />
<Key
latin:keyLabel="\@" />
<Key
diff --git a/java/res/xml/rowkeys_swiss1.xml b/java/res/xml/rowkeys_swiss1.xml
new file mode 100644
index 000000000..e3b842619
--- /dev/null
+++ b/java/res/xml/rowkeys_swiss1.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz1" />
+ <Key
+ latin:keyLabel="!text/keylabel_for_swiss_row1_11"
+ latin:moreKeys="!text/more_keys_for_swiss_row1_11" />
+</merge>
diff --git a/java/res/xml/rowkeys_swiss2.xml b/java/res/xml/rowkeys_swiss2.xml
new file mode 100644
index 000000000..5364a448c
--- /dev/null
+++ b/java/res/xml/rowkeys_swiss2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwerty2" />
+ <Key
+ latin:keyLabel="!text/keylabel_for_swiss_row2_10"
+ latin:moreKeys="!text/more_keys_for_swiss_row2_10" />
+ <Key
+ latin:keyLabel="!text/keylabel_for_swiss_row2_11"
+ latin:moreKeys="!text/more_keys_for_swiss_row2_11" />
+</merge>
diff --git a/java/res/xml/rowkeys_symbols3.xml b/java/res/xml/rowkeys_symbols3.xml
index 074078cb6..e525dc480 100644
--- a/java/res/xml/rowkeys_symbols3.xml
+++ b/java/res/xml/rowkeys_symbols3.xml
@@ -55,8 +55,8 @@
latin:moreKeys="!text/more_keys_for_symbols_semicolon" />
<Key
latin:keyLabel="!"
- latin:moreKeys="!text/more_keys_for_symbols_exclamation" />
+ latin:moreKeys="!text/more_keys_for_exclamation" />
<Key
latin:keyLabel="!text/keylabel_for_symbols_question"
- latin:moreKeys="!text/more_keys_for_symbols_question" />
+ latin:moreKeys="!text/more_keys_for_question" />
</merge>
diff --git a/java/res/xml/rows_swiss.xml b/java/res/xml/rows_swiss.xml
new file mode 100644
index 000000000..03e412940
--- /dev/null
+++ b/java/res/xml/rows_swiss.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2013, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge
+ xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+ <include
+ latin:keyboardLayout="@xml/key_styles_common" />
+ <Row
+ latin:keyWidth="9.091%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_swiss1" />
+ </Row>
+ <Row
+ latin:keyWidth="9.091%p"
+ >
+ <include
+ latin:keyboardLayout="@xml/rowkeys_swiss2" />
+ </Row>
+ <Row
+ latin:keyWidth="9.2%p"
+ >
+ <Key
+ latin:keyStyle="shiftKeyStyle"
+ latin:keyWidth="15%p"
+ latin:visualInsetsRight="1%p" />
+ <Spacer
+ latin:keyWidth="2.8%p" />
+ <include
+ latin:keyboardLayout="@xml/rowkeys_qwertz3" />
+ <Key
+ latin:keyStyle="deleteKeyStyle"
+ latin:keyXPos="-15%p"
+ latin:keyWidth="fillRight"
+ latin:visualInsetsLeft="1%p" />
+ </Row>
+ <include
+ latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/rows_symbols_shift.xml b/java/res/xml/rows_symbols_shift.xml
index 45ada2a61..c4bdb9f38 100644
--- a/java/res/xml/rows_symbols_shift.xml
+++ b/java/res/xml/rows_symbols_shift.xml
@@ -60,5 +60,8 @@
latin:keyWidth="15%p" />
<include
latin:keyboardLayout="@xml/row_symbols_shift4" />
+ <Key
+ latin:keyStyle="enterKeyStyle"
+ latin:keyWidth="fillRight" />
</Row>
</merge>
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
index 73896dfd3..c601cf17e 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
@@ -82,7 +82,7 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
private void initInternal(final InputMethodService inputMethod) {
mInputMethod = inputMethod;
mEdgeSlop = inputMethod.getResources().getDimensionPixelSize(
- R.dimen.accessibility_edge_slop);
+ R.dimen.config_accessibility_edge_slop);
}
/**
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiCategoryPageIndicatorView.java b/java/src/com/android/inputmethod/keyboard/EmojiCategoryPageIndicatorView.java
index e23131a30..d56a3cf25 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiCategoryPageIndicatorView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiCategoryPageIndicatorView.java
@@ -31,17 +31,17 @@ public class EmojiCategoryPageIndicatorView extends LinearLayout {
private int mCurrentCategoryPageId = 0;
private float mOffset = 0.0f;
- public EmojiCategoryPageIndicatorView(Context context) {
+ public EmojiCategoryPageIndicatorView(final Context context) {
this(context, null /* attrs */);
}
- public EmojiCategoryPageIndicatorView(Context context, AttributeSet attrs) {
+ public EmojiCategoryPageIndicatorView(final Context context, final AttributeSet attrs) {
super(context, attrs);
mPaint.setColor(context.getResources().getColor(
R.color.emoji_category_page_id_view_foreground));
}
- public void setCategoryPageId(int size, int id, float offset) {
+ public void setCategoryPageId(final int size, final int id, final float offset) {
mCategoryPageSize = size;
mCurrentCategoryPageId = id;
mOffset = offset;
@@ -49,7 +49,7 @@ public class EmojiCategoryPageIndicatorView extends LinearLayout {
}
@Override
- protected void onDraw(Canvas canvas) {
+ protected void onDraw(final Canvas canvas) {
if (mCategoryPageSize <= 1) {
// If the category is not set yet or contains only one category,
// just clear and return.
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
index 9779c683c..ff0d53865 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
@@ -44,8 +44,8 @@ import android.widget.TabHost.OnTabChangeListener;
import android.widget.TextView;
import com.android.inputmethod.keyboard.internal.DynamicGridKeyboard;
-import com.android.inputmethod.keyboard.internal.ScrollKeyboardView;
-import com.android.inputmethod.keyboard.internal.ScrollViewWithNotifier;
+import com.android.inputmethod.keyboard.internal.EmojiLayoutParams;
+import com.android.inputmethod.keyboard.internal.EmojiPageKeyboardView;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SubtypeSwitcher;
@@ -72,15 +72,15 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public final class EmojiPalettesView extends LinearLayout implements OnTabChangeListener,
ViewPager.OnPageChangeListener, View.OnClickListener,
- ScrollKeyboardView.OnKeyClickListener {
- private static final String TAG = EmojiPalettesView.class.getSimpleName();
+ EmojiPageKeyboardView.OnKeyClickListener {
+ static final String TAG = EmojiPalettesView.class.getSimpleName();
private static final boolean DEBUG_PAGER = false;
private final int mKeyBackgroundId;
private final int mEmojiFunctionalKeyBackgroundId;
- private final KeyboardLayoutSet mLayoutSet;
private final ColorStateList mTabLabelColor;
private final DeleteKeyOnTouchListener mDeleteKeyOnTouchListener;
private EmojiPalettesAdapter mEmojiPalettesAdapter;
+ private final EmojiLayoutParams mEmojiLayoutParams;
private TabHost mTabHost;
private ViewPager mEmojiPager;
@@ -149,7 +149,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
public EmojiCategory(final SharedPreferences prefs, final Resources res,
final KeyboardLayoutSet layoutSet) {
mPrefs = prefs;
- mMaxPageKeyCount = res.getInteger(R.integer.emoji_keyboard_max_key_count);
+ mMaxPageKeyCount = res.getInteger(R.integer.config_emoji_keyboard_max_page_key_count);
mLayoutSet = layoutSet;
for (int i = 0; i < sCategoryName.length; ++i) {
mCategoryNameToIdMap.put(sCategoryName[i], i);
@@ -162,9 +162,11 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
addShownCategoryId(CATEGORY_ID_OBJECTS);
addShownCategoryId(CATEGORY_ID_NATURE);
addShownCategoryId(CATEGORY_ID_PLACES);
- mCurrentCategoryId = CATEGORY_ID_PEOPLE;
+ mCurrentCategoryId =
+ Settings.readLastShownEmojiCategoryId(mPrefs, CATEGORY_ID_PEOPLE);
} else {
- mCurrentCategoryId = CATEGORY_ID_SYMBOLS;
+ mCurrentCategoryId =
+ Settings.readLastShownEmojiCategoryId(mPrefs, CATEGORY_ID_SYMBOLS);
}
addShownCategoryId(CATEGORY_ID_SYMBOLS);
addShownCategoryId(CATEGORY_ID_EMOTICONS);
@@ -172,7 +174,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
.loadRecentKeys(mCategoryKeyboardMap.values());
}
- private void addShownCategoryId(int categoryId) {
+ private void addShownCategoryId(final int categoryId) {
// Load a keyboard of categoryId
getKeyboard(categoryId, 0 /* cagetoryPageId */);
final CategoryProperties properties =
@@ -180,20 +182,20 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
mShownCategories.add(properties);
}
- public String getCategoryName(int categoryId, int categoryPageId) {
+ public String getCategoryName(final int categoryId, final int categoryPageId) {
return sCategoryName[categoryId] + "-" + categoryPageId;
}
- public int getCategoryId(String name) {
+ public int getCategoryId(final String name) {
final String[] strings = name.split("-");
return mCategoryNameToIdMap.get(strings[0]);
}
- public int getCategoryIcon(int categoryId) {
+ public int getCategoryIcon(final int categoryId) {
return sCategoryIcon[categoryId];
}
- public String getCategoryLabel(int categoryId) {
+ public String getCategoryLabel(final int categoryId) {
return sCategoryLabel[categoryId];
}
@@ -209,7 +211,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return getCategoryPageSize(mCurrentCategoryId);
}
- public int getCategoryPageSize(int categoryId) {
+ public int getCategoryPageSize(final int categoryId) {
for (final CategoryProperties prop : mShownCategories) {
if (prop.mCategoryId == categoryId) {
return prop.mPageCount;
@@ -220,11 +222,12 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return 0;
}
- public void setCurrentCategoryId(int categoryId) {
+ public void setCurrentCategoryId(final int categoryId) {
mCurrentCategoryId = categoryId;
+ Settings.writeLastShownEmojiCategoryId(mPrefs, categoryId);
}
- public void setCurrentCategoryPageId(int id) {
+ public void setCurrentCategoryPageId(final int id) {
mCurrentCategoryPageId = id;
}
@@ -233,7 +236,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
public void saveLastTypedCategoryPage() {
- Settings.writeEmojiCategoryLastTypedId(
+ Settings.writeLastTypedEmojiCategoryPageId(
mPrefs, mCurrentCategoryId, mCurrentCategoryPageId);
}
@@ -241,7 +244,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return mCurrentCategoryId == CATEGORY_ID_RECENTS;
}
- public int getTabIdFromCategoryId(int categoryId) {
+ public int getTabIdFromCategoryId(final int categoryId) {
for (int i = 0; i < mShownCategories.size(); ++i) {
if (mShownCategories.get(i).mCategoryId == categoryId) {
return i;
@@ -252,9 +255,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
// Returns the view pager's page position for the categoryId
- public int getPageIdFromCategoryId(int categoryId) {
+ public int getPageIdFromCategoryId(final int categoryId) {
final int lastSavedCategoryPageId =
- Settings.readEmojiCategoryLastTypedId(mPrefs, categoryId);
+ Settings.readLastTypedEmojiCategoryPageId(mPrefs, categoryId);
int sum = 0;
for (int i = 0; i < mShownCategories.size(); ++i) {
final CategoryProperties props = mShownCategories.get(i);
@@ -271,7 +274,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return getTabIdFromCategoryId(CATEGORY_ID_RECENTS);
}
- private int getCategoryPageCount(int categoryId) {
+ private int getCategoryPageCount(final int categoryId) {
final Keyboard keyboard = mLayoutSet.getKeyboard(sCategoryElementId[categoryId]);
return (keyboard.getKeys().length - 1) / mMaxPageKeyCount + 1;
}
@@ -280,9 +283,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
// position. The category page id is numbered in each category. And the view page position
// is the position of the current shown page in the view pager which contains all pages of
// all categories.
- public Pair<Integer, Integer> getCategoryIdAndPageIdFromPagePosition(int position) {
+ public Pair<Integer, Integer> getCategoryIdAndPageIdFromPagePosition(final int position) {
int sum = 0;
- for (CategoryProperties properties : mShownCategories) {
+ for (final CategoryProperties properties : mShownCategories) {
final int temp = sum;
sum += properties.mPageCount;
if (sum > position) {
@@ -293,7 +296,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
// Returns a keyboard from the view pager's page position.
- public DynamicGridKeyboard getKeyboardFromPagePosition(int position) {
+ public DynamicGridKeyboard getKeyboardFromPagePosition(final int position) {
final Pair<Integer, Integer> categoryAndId =
getCategoryIdAndPageIdFromPagePosition(position);
if (categoryAndId != null) {
@@ -302,39 +305,41 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return null;
}
- public DynamicGridKeyboard getKeyboard(int categoryId, int id) {
- synchronized(mCategoryKeyboardMap) {
- final long key = (((long) categoryId) << Constants.MAX_INT_BIT_COUNT) | id;
- final DynamicGridKeyboard kbd;
- if (!mCategoryKeyboardMap.containsKey(key)) {
- if (categoryId != CATEGORY_ID_RECENTS) {
- final Keyboard keyboard =
- mLayoutSet.getKeyboard(sCategoryElementId[categoryId]);
- final Key[][] sortedKeys = sortKeys(keyboard.getKeys(), mMaxPageKeyCount);
- for (int i = 0; i < sortedKeys.length; ++i) {
- final DynamicGridKeyboard tempKbd = new DynamicGridKeyboard(mPrefs,
- mLayoutSet.getKeyboard(KeyboardId.ELEMENT_EMOJI_RECENTS),
- mMaxPageKeyCount, categoryId, i /* categoryPageId */);
- for (Key emojiKey : sortedKeys[i]) {
- if (emojiKey == null) {
- break;
- }
- tempKbd.addKeyLast(emojiKey);
- }
- mCategoryKeyboardMap.put((((long) categoryId)
- << Constants.MAX_INT_BIT_COUNT) | i, tempKbd);
+ private static final Long getCategoryKeyboardMapKey(final int categoryId, final int id) {
+ return (((long) categoryId) << Constants.MAX_INT_BIT_COUNT) | id;
+ }
+
+ public DynamicGridKeyboard getKeyboard(final int categoryId, final int id) {
+ synchronized (mCategoryKeyboardMap) {
+ final Long categotyKeyboardMapKey = getCategoryKeyboardMapKey(categoryId, id);
+ if (mCategoryKeyboardMap.containsKey(categotyKeyboardMapKey)) {
+ return mCategoryKeyboardMap.get(categotyKeyboardMapKey);
+ }
+
+ if (categoryId == CATEGORY_ID_RECENTS) {
+ final DynamicGridKeyboard kbd = new DynamicGridKeyboard(mPrefs,
+ mLayoutSet.getKeyboard(KeyboardId.ELEMENT_EMOJI_RECENTS),
+ mMaxPageKeyCount, categoryId);
+ mCategoryKeyboardMap.put(categotyKeyboardMapKey, kbd);
+ return kbd;
+ }
+
+ final Keyboard keyboard = mLayoutSet.getKeyboard(sCategoryElementId[categoryId]);
+ final Key[][] sortedKeys = sortKeysIntoPages(keyboard.getKeys(), mMaxPageKeyCount);
+ for (int pageId = 0; pageId < sortedKeys.length; ++pageId) {
+ final DynamicGridKeyboard tempKeyboard = new DynamicGridKeyboard(mPrefs,
+ mLayoutSet.getKeyboard(KeyboardId.ELEMENT_EMOJI_RECENTS),
+ mMaxPageKeyCount, categoryId);
+ for (final Key emojiKey : sortedKeys[pageId]) {
+ if (emojiKey == null) {
+ break;
}
- kbd = mCategoryKeyboardMap.get(key);
- } else {
- kbd = new DynamicGridKeyboard(mPrefs,
- mLayoutSet.getKeyboard(KeyboardId.ELEMENT_EMOJI_RECENTS),
- mMaxPageKeyCount, categoryId, 0 /* categoryPageId */);
- mCategoryKeyboardMap.put(key, kbd);
+ tempKeyboard.addKeyLast(emojiKey);
}
- } else {
- kbd = mCategoryKeyboardMap.get(key);
+ mCategoryKeyboardMap.put(
+ getCategoryKeyboardMapKey(categoryId, pageId), tempKeyboard);
}
- return kbd;
+ return mCategoryKeyboardMap.get(categotyKeyboardMapKey);
}
}
@@ -346,29 +351,31 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
return sum;
}
- private Key[][] sortKeys(Key[] inKeys, int maxPageCount) {
- Key[] keys = Arrays.copyOf(inKeys, inKeys.length);
- Arrays.sort(keys, 0, keys.length, new Comparator<Key>() {
- @Override
- public int compare(Key lhs, Key rhs) {
- final Rect lHitBox = lhs.getHitBox();
- final Rect rHitBox = rhs.getHitBox();
- if (lHitBox.top < rHitBox.top) {
- return -1;
- } else if (lHitBox.top > rHitBox.top) {
- return 1;
- }
- if (lHitBox.left < rHitBox.left) {
- return -1;
- } else if (lHitBox.left > rHitBox.left) {
- return 1;
- }
- if (lhs.getCode() == rhs.getCode()) {
- return 0;
- }
- return lhs.getCode() < rhs.getCode() ? -1 : 1;
+ private static Comparator<Key> EMOJI_KEY_COMPARATOR = new Comparator<Key>() {
+ @Override
+ public int compare(final Key lhs, final Key rhs) {
+ final Rect lHitBox = lhs.getHitBox();
+ final Rect rHitBox = rhs.getHitBox();
+ if (lHitBox.top < rHitBox.top) {
+ return -1;
+ } else if (lHitBox.top > rHitBox.top) {
+ return 1;
+ }
+ if (lHitBox.left < rHitBox.left) {
+ return -1;
+ } else if (lHitBox.left > rHitBox.left) {
+ return 1;
+ }
+ if (lhs.getCode() == rhs.getCode()) {
+ return 0;
}
- });
+ return lhs.getCode() < rhs.getCode() ? -1 : 1;
+ }
+ };
+
+ private static Key[][] sortKeysIntoPages(final Key[] inKeys, final int maxPageCount) {
+ final Key[] keys = Arrays.copyOf(inKeys, inKeys.length);
+ Arrays.sort(keys, 0, keys.length, EMOJI_KEY_COMPARATOR);
final int pageCount = (keys.length - 1) / maxPageCount + 1;
final Key[][] retval = new Key[pageCount][maxPageCount];
for (int i = 0; i < keys.length; ++i) {
@@ -401,12 +408,12 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
final KeyboardLayoutSet.Builder builder = new KeyboardLayoutSet.Builder(
context, null /* editorInfo */);
final Resources res = context.getResources();
- final EmojiLayoutParams emojiLp = new EmojiLayoutParams(res);
+ mEmojiLayoutParams = new EmojiLayoutParams(res);
builder.setSubtype(SubtypeSwitcher.getInstance().getEmojiSubtype());
builder.setKeyboardGeometry(ResourceUtils.getDefaultKeyboardWidth(res),
- emojiLp.mEmojiKeyboardHeight);
- builder.setOptions(false, false, false /* lanuageSwitchKeyEnabled */);
- mLayoutSet = builder.build();
+ mEmojiLayoutParams.mEmojiKeyboardHeight);
+ builder.setOptions(false /* shortcutImeEnabled */, false /* showsVoiceInputKey */,
+ false /* languageSwitchKeyEnabled */);
mEmojiCategory = new EmojiCategory(PreferenceManager.getDefaultSharedPreferences(context),
context.getResources(), builder.build());
mDeleteKeyOnTouchListener = new DeleteKeyOnTouchListener(context);
@@ -420,7 +427,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
final int width = ResourceUtils.getDefaultKeyboardWidth(res)
+ getPaddingLeft() + getPaddingRight();
final int height = ResourceUtils.getDefaultKeyboardHeight(res)
- + res.getDimensionPixelSize(R.dimen.suggestions_strip_height)
+ + res.getDimensionPixelSize(R.dimen.config_suggestions_strip_height)
+ getPaddingTop() + getPaddingBottom();
setMeasuredDimension(width, height);
}
@@ -455,25 +462,23 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
mTabHost.setOnTabChangedListener(this);
mTabHost.getTabWidget().setStripEnabled(true);
- mEmojiPalettesAdapter = new EmojiPalettesAdapter(mEmojiCategory, mLayoutSet, this);
+ mEmojiPalettesAdapter = new EmojiPalettesAdapter(mEmojiCategory, this);
mEmojiPager = (ViewPager)findViewById(R.id.emoji_keyboard_pager);
mEmojiPager.setAdapter(mEmojiPalettesAdapter);
mEmojiPager.setOnPageChangeListener(this);
mEmojiPager.setOffscreenPageLimit(0);
- mEmojiPager.setPersistentDrawingCache(ViewPager.PERSISTENT_NO_CACHE);
- final Resources res = getResources();
- final EmojiLayoutParams emojiLp = new EmojiLayoutParams(res);
- emojiLp.setPagerProperties(mEmojiPager);
+ mEmojiPager.setPersistentDrawingCache(PERSISTENT_NO_CACHE);
+ mEmojiLayoutParams.setPagerProperties(mEmojiPager);
mEmojiCategoryPageIndicatorView =
(EmojiCategoryPageIndicatorView)findViewById(R.id.emoji_category_page_id_view);
- emojiLp.setCategoryPageIdViewProperties(mEmojiCategoryPageIndicatorView);
+ mEmojiLayoutParams.setCategoryPageIdViewProperties(mEmojiCategoryPageIndicatorView);
setCurrentCategoryId(mEmojiCategory.getCurrentCategoryId(), true /* force */);
final LinearLayout actionBar = (LinearLayout)findViewById(R.id.emoji_action_bar);
- emojiLp.setActionBarProperties(actionBar);
+ mEmojiLayoutParams.setActionBarProperties(actionBar);
final ImageView deleteKey = (ImageView)findViewById(R.id.emoji_keyboard_delete);
deleteKey.setTag(Constants.CODE_DELETE);
@@ -486,7 +491,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
spaceKey.setBackgroundResource(mKeyBackgroundId);
spaceKey.setTag(Constants.CODE_SPACE);
spaceKey.setOnClickListener(this);
- emojiLp.setKeyProperties(spaceKey);
+ mEmojiLayoutParams.setKeyProperties(spaceKey);
final ImageView alphabetKey2 = (ImageView)findViewById(R.id.emoji_keyboard_alphabet2);
alphabetKey2.setBackgroundResource(mEmojiFunctionalKeyBackgroundId);
alphabetKey2.setTag(Constants.CODE_SWITCH_ALPHA_SYMBOL);
@@ -625,16 +630,15 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
private static class EmojiPalettesAdapter extends PagerAdapter {
- private final ScrollKeyboardView.OnKeyClickListener mListener;
+ private final EmojiPageKeyboardView.OnKeyClickListener mListener;
private final DynamicGridKeyboard mRecentsKeyboard;
- private final SparseArray<ScrollKeyboardView> mActiveKeyboardViews =
+ private final SparseArray<EmojiPageKeyboardView> mActiveKeyboardViews =
CollectionUtils.newSparseArray();
private final EmojiCategory mEmojiCategory;
private int mActivePosition = 0;
public EmojiPalettesAdapter(final EmojiCategory emojiCategory,
- final KeyboardLayoutSet layoutSet,
- final ScrollKeyboardView.OnKeyClickListener listener) {
+ final EmojiPageKeyboardView.OnKeyClickListener listener) {
mEmojiCategory = emojiCategory;
mListener = listener;
mRecentsKeyboard = mEmojiCategory.getKeyboard(CATEGORY_ID_RECENTS, 0);
@@ -668,11 +672,12 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
@Override
- public void setPrimaryItem(final View container, final int position, final Object object) {
+ public void setPrimaryItem(final ViewGroup container, final int position,
+ final Object object) {
if (mActivePosition == position) {
return;
}
- final ScrollKeyboardView oldKeyboardView = mActiveKeyboardViews.get(mActivePosition);
+ final EmojiPageKeyboardView oldKeyboardView = mActiveKeyboardViews.get(mActivePosition);
if (oldKeyboardView != null) {
oldKeyboardView.releaseCurrentKey();
oldKeyboardView.deallocateMemory();
@@ -685,7 +690,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
if (DEBUG_PAGER) {
Log.d(TAG, "instantiate item: " + position);
}
- final ScrollKeyboardView oldKeyboardView = mActiveKeyboardViews.get(position);
+ final EmojiPageKeyboardView oldKeyboardView = mActiveKeyboardViews.get(position);
if (oldKeyboardView != null) {
oldKeyboardView.deallocateMemory();
// This may be redundant but wanted to be safer..
@@ -694,18 +699,13 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
final Keyboard keyboard =
mEmojiCategory.getKeyboardFromPagePosition(position);
final LayoutInflater inflater = LayoutInflater.from(container.getContext());
- final View view = inflater.inflate(
+ final EmojiPageKeyboardView keyboardView = (EmojiPageKeyboardView)inflater.inflate(
R.layout.emoji_keyboard_page, container, false /* attachToRoot */);
- final ScrollKeyboardView keyboardView = (ScrollKeyboardView)view.findViewById(
- R.id.emoji_keyboard_page);
keyboardView.setKeyboard(keyboard);
keyboardView.setOnKeyClickListener(mListener);
- final ScrollViewWithNotifier scrollView = (ScrollViewWithNotifier)view.findViewById(
- R.id.emoji_keyboard_scroller);
- keyboardView.setScrollView(scrollView);
- container.addView(view);
+ container.addView(keyboardView);
mActiveKeyboardViews.put(position, keyboardView);
- return view;
+ return keyboardView;
}
@Override
@@ -719,7 +719,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
if (DEBUG_PAGER) {
Log.d(TAG, "destroy item: " + position + ", " + object.getClass().getSimpleName());
}
- final ScrollKeyboardView keyboardView = mActiveKeyboardViews.get(position);
+ final EmojiPageKeyboardView keyboardView = mActiveKeyboardViews.get(position);
if (keyboardView != null) {
keyboardView.deallocateMemory();
mActiveKeyboardViews.remove(position);
@@ -792,7 +792,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
}
- public void pressDelete(int repeatCount) {
+ public void pressDelete(final int repeatCount) {
mKeyboardActionListener.onPressKey(
Constants.CODE_DELETE, repeatCount, true /* isSinglePointer */);
mKeyboardActionListener.onCodeInput(
@@ -801,22 +801,22 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
Constants.CODE_DELETE, false /* withSliding */);
}
- public void setKeyboardActionListener(KeyboardActionListener listener) {
+ public void setKeyboardActionListener(final KeyboardActionListener listener) {
mKeyboardActionListener = listener;
}
@Override
- public boolean onTouch(View v, MotionEvent event) {
+ public boolean onTouch(final View v, final MotionEvent event) {
switch(event.getAction()) {
- case MotionEvent.ACTION_DOWN:
- v.setBackgroundColor(mDeleteKeyPressedBackgroundColor);
- pressDelete(0 /* repeatCount */);
- startRepeat();
- return true;
- case MotionEvent.ACTION_UP:
- v.setBackgroundColor(0);
- abortRepeat();
- return true;
+ case MotionEvent.ACTION_DOWN:
+ v.setBackgroundColor(mDeleteKeyPressedBackgroundColor);
+ pressDelete(0 /* repeatCount */);
+ startRepeat();
+ return true;
+ case MotionEvent.ACTION_UP:
+ v.setBackgroundColor(0);
+ abortRepeat();
+ return true;
}
return false;
}
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index f7ec9509d..b975b9c70 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -28,7 +28,6 @@ import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
-import android.util.Log;
import android.util.Xml;
import com.android.inputmethod.keyboard.internal.KeyDrawParams;
@@ -53,8 +52,6 @@ import java.util.Locale;
* Class for describing the position and characteristics of a single key in the keyboard.
*/
public class Key implements Comparable<Key> {
- private static final String TAG = Key.class.getSimpleName();
-
/**
* The key code (unicode or custom code) that this key generates.
*/
@@ -84,10 +81,16 @@ public class Key implements Comparable<Key> {
private static final int LABEL_FLAGS_HAS_HINT_LABEL = 0x800;
private static final int LABEL_FLAGS_WITH_ICON_LEFT = 0x1000;
private static final int LABEL_FLAGS_WITH_ICON_RIGHT = 0x2000;
+ // The bit to calculate the ratio of key label width against key width. If autoXScale bit is on
+ // and autoYScale bit is off, the key label may be shrunk only for X-direction.
+ // If both autoXScale and autoYScale bits are on, the key label text size may be auto scaled.
private static final int LABEL_FLAGS_AUTO_X_SCALE = 0x4000;
- private static final int LABEL_FLAGS_PRESERVE_CASE = 0x8000;
- private static final int LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED = 0x10000;
- private static final int LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL = 0x20000;
+ private static final int LABEL_FLAGS_AUTO_Y_SCALE = 0x8000;
+ private static final int LABEL_FLAGS_AUTO_SCALE = LABEL_FLAGS_AUTO_X_SCALE
+ | LABEL_FLAGS_AUTO_Y_SCALE;
+ private static final int LABEL_FLAGS_PRESERVE_CASE = 0x10000;
+ private static final int LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED = 0x20000;
+ private static final int LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL = 0x40000;
private static final int LABEL_FLAGS_DISABLE_HINT_LABEL = 0x40000000;
private static final int LABEL_FLAGS_DISABLE_ADDITIONAL_MORE_KEYS = 0x80000000;
@@ -376,9 +379,6 @@ public class Key implements Comparable<Key> {
mKeyVisualAttributes = KeyVisualAttributes.newInstance(keyAttr);
keyAttr.recycle();
mHashCode = computeHashCode(this);
- if (hasShiftedLetterHint() && TextUtils.isEmpty(mHintLabel)) {
- Log.w(TAG, "hasShiftedLetterHint specified without keyHintLabel: " + this);
- }
}
/**
@@ -702,10 +702,14 @@ public class Key implements Comparable<Key> {
return (mLabelFlags & LABEL_FLAGS_WITH_ICON_RIGHT) != 0;
}
- public final boolean needsXScale() {
+ public final boolean needsAutoXScale() {
return (mLabelFlags & LABEL_FLAGS_AUTO_X_SCALE) != 0;
}
+ public final boolean needsAutoScale() {
+ return (mLabelFlags & LABEL_FLAGS_AUTO_SCALE) == LABEL_FLAGS_AUTO_SCALE;
+ }
+
public final boolean isShiftedLetterActivated() {
return (mLabelFlags & LABEL_FLAGS_SHIFTED_LETTER_ACTIVATED) != 0;
}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyDetector.java b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
index befb6fa92..149f10fd7 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyDetector.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
@@ -81,7 +81,7 @@ public class KeyDetector {
return mKeyboard;
}
- public boolean alwaysAllowsSlidingInput() {
+ public boolean alwaysAllowsKeySelectionByDraggingFinger() {
return false;
}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardId.java b/java/src/com/android/inputmethod/keyboard/KeyboardId.java
index 736f13ed6..02beb3f11 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardId.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardId.java
@@ -70,8 +70,7 @@ public final class KeyboardId {
public final int mElementId;
private final EditorInfo mEditorInfo;
public final boolean mClobberSettingsKey;
- public final boolean mShortcutKeyEnabled;
- public final boolean mShortcutKeyOnSymbols;
+ public final boolean mSupportsSwitchingToShortcutIme;
public final boolean mLanguageSwitchKeyEnabled;
public final String mCustomActionLabel;
public final boolean mHasShortcutKey;
@@ -87,17 +86,11 @@ public final class KeyboardId {
mElementId = elementId;
mEditorInfo = params.mEditorInfo;
mClobberSettingsKey = params.mNoSettingsKey;
- mShortcutKeyEnabled = params.mVoiceKeyEnabled;
- mShortcutKeyOnSymbols = mShortcutKeyEnabled && !params.mVoiceKeyOnMain;
+ mSupportsSwitchingToShortcutIme = params.mSupportsSwitchingToShortcutIme;
mLanguageSwitchKeyEnabled = params.mLanguageSwitchKeyEnabled;
mCustomActionLabel = (mEditorInfo.actionLabel != null)
? mEditorInfo.actionLabel.toString() : null;
- final boolean alphabetMayHaveShortcutKey = isAlphabetKeyboard(elementId)
- && !mShortcutKeyOnSymbols;
- final boolean symbolsMayHaveShortcutKey = (elementId == KeyboardId.ELEMENT_SYMBOLS)
- && mShortcutKeyOnSymbols;
- mHasShortcutKey = mShortcutKeyEnabled
- && (alphabetMayHaveShortcutKey || symbolsMayHaveShortcutKey);
+ mHasShortcutKey = mSupportsSwitchingToShortcutIme && params.mShowsVoiceInputKey;
mHashCode = computeHashCode(this);
}
@@ -110,8 +103,8 @@ public final class KeyboardId {
id.mHeight,
id.passwordInput(),
id.mClobberSettingsKey,
- id.mShortcutKeyEnabled,
- id.mShortcutKeyOnSymbols,
+ id.mSupportsSwitchingToShortcutIme,
+ id.mHasShortcutKey,
id.mLanguageSwitchKeyEnabled,
id.isMultiLine(),
id.imeAction(),
@@ -131,8 +124,8 @@ public final class KeyboardId {
&& other.mHeight == mHeight
&& other.passwordInput() == passwordInput()
&& other.mClobberSettingsKey == mClobberSettingsKey
- && other.mShortcutKeyEnabled == mShortcutKeyEnabled
- && other.mShortcutKeyOnSymbols == mShortcutKeyOnSymbols
+ && other.mSupportsSwitchingToShortcutIme == mSupportsSwitchingToShortcutIme
+ && other.mHasShortcutKey == mHasShortcutKey
&& other.mLanguageSwitchKeyEnabled == mLanguageSwitchKeyEnabled
&& other.isMultiLine() == isMultiLine()
&& other.imeAction() == imeAction()
@@ -186,21 +179,20 @@ public final class KeyboardId {
@Override
public String toString() {
- return String.format(Locale.ROOT, "[%s %s:%s %dx%d %s %s %s%s%s%s%s%s%s%s%s]",
+ return String.format(Locale.ROOT, "[%s %s:%s %dx%d %s %s%s%s%s%s%s%s%s%s]",
elementIdToName(mElementId),
mLocale, mSubtype.getExtraValueOf(KEYBOARD_LAYOUT_SET),
mWidth, mHeight,
modeName(mMode),
- imeAction(),
- (navigateNext() ? "navigateNext" : ""),
- (navigatePrevious() ? "navigatePrevious" : ""),
+ actionName(imeAction()),
+ (navigateNext() ? " navigateNext" : ""),
+ (navigatePrevious() ? " navigatePrevious" : ""),
(mClobberSettingsKey ? " clobberSettingsKey" : ""),
(passwordInput() ? " passwordInput" : ""),
- (mShortcutKeyEnabled ? " shortcutKeyEnabled" : ""),
- (mShortcutKeyOnSymbols ? " shortcutKeyOnSymbols" : ""),
+ (mSupportsSwitchingToShortcutIme ? " supportsSwitchingToShortcutIme" : ""),
(mHasShortcutKey ? " hasShortcutKey" : ""),
(mLanguageSwitchKeyEnabled ? " languageSwitchKeyEnabled" : ""),
- (isMultiLine() ? "isMultiLine" : "")
+ (isMultiLine() ? " isMultiLine" : "")
);
}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
index 1eccdf341..e5b814faf 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java
@@ -105,10 +105,10 @@ public final class KeyboardLayoutSet {
int mMode;
EditorInfo mEditorInfo;
boolean mDisableTouchPositionCorrectionDataForTest;
- boolean mVoiceKeyEnabled;
- // TODO: Remove mVoiceKeyOnMain when it's certainly confirmed that we no longer show
- // the voice input key on the symbol layout
- boolean mVoiceKeyOnMain;
+ boolean mIsPasswordField;
+ boolean mSupportsSwitchingToShortcutIme;
+ boolean mShowsVoiceInputKey;
+ boolean mNoMicrophoneKey;
boolean mNoSettingsKey;
boolean mLanguageSwitchKeyEnabled;
InputMethodSubtype mSubtype;
@@ -221,16 +221,24 @@ public final class KeyboardLayoutSet {
private static final EditorInfo EMPTY_EDITOR_INFO = new EditorInfo();
- public Builder(final Context context, final EditorInfo editorInfo) {
+ public Builder(final Context context, final EditorInfo ei) {
mContext = context;
mPackageName = context.getPackageName();
mResources = context.getResources();
final Params params = mParams;
+ final EditorInfo editorInfo = (ei != null) ? ei : EMPTY_EDITOR_INFO;
params.mMode = getKeyboardMode(editorInfo);
- params.mEditorInfo = (editorInfo != null) ? editorInfo : EMPTY_EDITOR_INFO;
+ params.mEditorInfo = editorInfo;
+ params.mIsPasswordField = InputTypeUtils.isPasswordInputType(editorInfo.inputType);
+ @SuppressWarnings("deprecation")
+ final boolean deprecatedNoMicrophone = InputAttributes.inPrivateImeOptions(
+ null, NO_MICROPHONE_COMPAT, editorInfo);
+ params.mNoMicrophoneKey = InputAttributes.inPrivateImeOptions(
+ mPackageName, NO_MICROPHONE, editorInfo)
+ || deprecatedNoMicrophone;
params.mNoSettingsKey = InputAttributes.inPrivateImeOptions(
- mPackageName, NO_SETTINGS_KEY, params.mEditorInfo);
+ mPackageName, NO_SETTINGS_KEY, editorInfo);
}
public Builder setKeyboardGeometry(final int keyboardWidth, final int keyboardHeight) {
@@ -261,18 +269,11 @@ public final class KeyboardLayoutSet {
return this;
}
- // TODO: Remove mVoiceKeyOnMain when it's certainly confirmed that we no longer show
- // the voice input key on the symbol layout
- public Builder setOptions(final boolean voiceKeyEnabled, final boolean voiceKeyOnMain,
- final boolean languageSwitchKeyEnabled) {
- @SuppressWarnings("deprecation")
- final boolean deprecatedNoMicrophone = InputAttributes.inPrivateImeOptions(
- null, NO_MICROPHONE_COMPAT, mParams.mEditorInfo);
- final boolean noMicrophone = InputAttributes.inPrivateImeOptions(
- mPackageName, NO_MICROPHONE, mParams.mEditorInfo)
- || deprecatedNoMicrophone;
- mParams.mVoiceKeyEnabled = voiceKeyEnabled && !noMicrophone;
- mParams.mVoiceKeyOnMain = voiceKeyOnMain;
+ public Builder setOptions(final boolean isShortcutImeEnabled,
+ final boolean showsVoiceInputKey, final boolean languageSwitchKeyEnabled) {
+ mParams.mSupportsSwitchingToShortcutIme =
+ isShortcutImeEnabled && !mParams.mNoMicrophoneKey && !mParams.mIsPasswordField;
+ mParams.mShowsVoiceInputKey = showsVoiceInputKey;
mParams.mLanguageSwitchKeyEnabled = languageSwitchKeyEnabled;
return this;
}
@@ -368,9 +369,6 @@ public final class KeyboardLayoutSet {
}
private static int getKeyboardMode(final EditorInfo editorInfo) {
- if (editorInfo == null)
- return KeyboardId.MODE_TEXT;
-
final int inputType = editorInfo.inputType;
final int variation = inputType & InputType.TYPE_MASK_VARIATION;
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 97609837e..fb84f1d73 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -27,6 +27,7 @@ import android.view.View;
import android.view.inputmethod.EditorInfo;
import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy;
+import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException;
import com.android.inputmethod.keyboard.internal.KeyboardState;
import com.android.inputmethod.latin.InputView;
@@ -43,8 +44,6 @@ import com.android.inputmethod.latin.utils.ResourceUtils;
public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
private static final String TAG = KeyboardSwitcher.class.getSimpleName();
- public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20110916";
-
static final class KeyboardTheme {
public final int mThemeId;
public final int mStyleId;
@@ -57,9 +56,14 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
}
- private static final KeyboardTheme[] KEYBOARD_THEMES = {
- new KeyboardTheme(0, R.style.KeyboardTheme_ICS),
- new KeyboardTheme(1, R.style.KeyboardTheme_GB),
+ public static final int THEME_INDEX_ICS = 0;
+ public static final int THEME_INDEX_GB = 1;
+ public static final int THEME_INDEX_KLP = 2;
+ public static final int THEME_INDEX_DEFAULT = THEME_INDEX_KLP;
+ public static final KeyboardTheme[] KEYBOARD_THEMES = {
+ new KeyboardTheme(THEME_INDEX_ICS, R.style.KeyboardTheme_ICS),
+ new KeyboardTheme(THEME_INDEX_GB, R.style.KeyboardTheme_GB),
+ new KeyboardTheme(THEME_INDEX_KLP, R.style.KeyboardTheme_KLP),
};
private SubtypeSwitcher mSubtypeSwitcher;
@@ -71,6 +75,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
private EmojiPalettesView mEmojiPalettesView;
private LatinIME mLatinIME;
private Resources mResources;
+ private boolean mIsHardwareAcceleratedDrawingEnabled;
private KeyboardState mState;
@@ -80,7 +85,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
* what user actually typed. */
private boolean mIsAutoCorrectionActive;
- private KeyboardTheme mKeyboardTheme = KEYBOARD_THEMES[0];
+ private KeyboardTheme mKeyboardTheme = KEYBOARD_THEMES[THEME_INDEX_DEFAULT];
private Context mThemeContext;
private static final KeyboardSwitcher sInstance = new KeyboardSwitcher();
@@ -104,32 +109,40 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
mPrefs = prefs;
mSubtypeSwitcher = SubtypeSwitcher.getInstance();
mState = new KeyboardState(this);
- setContextThemeWrapper(latinIme, getKeyboardTheme(latinIme, prefs));
+ mIsHardwareAcceleratedDrawingEnabled =
+ InputMethodServiceCompatUtils.enableHardwareAcceleration(mLatinIME);
+ }
+
+ public void updateKeyboardTheme() {
+ final boolean themeUpdated = updateKeyboardThemeAndContextThemeWrapper(
+ mLatinIME, getKeyboardTheme(mLatinIME, mPrefs));
+ if (themeUpdated && mKeyboardView != null) {
+ mLatinIME.setInputView(onCreateInputView(mIsHardwareAcceleratedDrawingEnabled));
+ }
}
private static KeyboardTheme getKeyboardTheme(final Context context,
final SharedPreferences prefs) {
- final String defaultIndex = context.getString(R.string.config_default_keyboard_theme_index);
- final String themeIndex = prefs.getString(PREF_KEYBOARD_LAYOUT, defaultIndex);
- try {
- final int index = Integer.valueOf(themeIndex);
- if (index >= 0 && index < KEYBOARD_THEMES.length) {
- return KEYBOARD_THEMES[index];
- }
- } catch (NumberFormatException e) {
- // Format error, keyboard theme is default to 0.
+ final Resources res = context.getResources();
+ final int index = Settings.readKeyboardThemeIndex(prefs, res);
+ if (index >= 0 && index < KEYBOARD_THEMES.length) {
+ return KEYBOARD_THEMES[index];
}
- Log.w(TAG, "Illegal keyboard theme in preference: " + themeIndex + ", default to "
- + defaultIndex);
- return KEYBOARD_THEMES[Integer.valueOf(defaultIndex)];
+ final int defaultThemeIndex = Settings.resetAndGetDefaultKeyboardThemeIndex(prefs, res);
+ Log.w(TAG, "Illegal keyboard theme in preference: " + index + ", default to "
+ + defaultThemeIndex);
+ return KEYBOARD_THEMES[defaultThemeIndex];
}
- private void setContextThemeWrapper(final Context context, final KeyboardTheme keyboardTheme) {
+ private boolean updateKeyboardThemeAndContextThemeWrapper(final Context context,
+ final KeyboardTheme keyboardTheme) {
if (mThemeContext == null || mKeyboardTheme.mThemeId != keyboardTheme.mThemeId) {
mKeyboardTheme = keyboardTheme;
mThemeContext = new ContextThemeWrapper(context, keyboardTheme.mStyleId);
KeyboardLayoutSet.clearKeyboardCache();
+ return true;
}
+ return false;
}
public void loadKeyboard(final EditorInfo editorInfo, final SettingsValues settingsValues) {
@@ -141,8 +154,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
builder.setKeyboardGeometry(keyboardWidth, keyboardHeight);
builder.setSubtype(mSubtypeSwitcher.getCurrentSubtype());
builder.setOptions(
- settingsValues.isVoiceKeyEnabled(editorInfo),
- true /* always show a voice key on the main keyboard */,
+ mSubtypeSwitcher.isShortcutImeEnabled(),
+ settingsValues.mShowsVoiceInputKey,
settingsValues.isLanguageSwitchKeyEnabled());
mKeyboardLayoutSet = builder.build();
try {
@@ -155,7 +168,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
public void saveKeyboardState() {
- if (getKeyboard() != null || isShowingEmojiKeyboard()) {
+ if (getKeyboard() != null || isShowingEmojiPalettes()) {
mState.onSaveKeyboardState();
}
}
@@ -316,19 +329,23 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
mState.onCodeInput(code, mLatinIME.getCurrentAutoCapsState());
}
- public boolean isShowingEmojiKeyboard() {
- return mEmojiPalettesView != null && mEmojiPalettesView.getVisibility() == View.VISIBLE;
+ private boolean isShowingMainKeyboard() {
+ return null != mKeyboardView && mKeyboardView.isShown();
+ }
+
+ public boolean isShowingEmojiPalettes() {
+ return mEmojiPalettesView != null && mEmojiPalettesView.isShown();
}
public boolean isShowingMoreKeysPanel() {
- if (isShowingEmojiKeyboard()) {
+ if (isShowingEmojiPalettes()) {
return false;
}
return mKeyboardView.isShowingMoreKeysPanel();
}
public View getVisibleKeyboardView() {
- if (isShowingEmojiKeyboard()) {
+ if (isShowingEmojiPalettes()) {
return mEmojiPalettesView;
}
return mKeyboardView;
@@ -348,12 +365,16 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
}
}
+ public boolean isShowingMainKeyboardOrEmojiPalettes() {
+ return isShowingMainKeyboard() || isShowingEmojiPalettes();
+ }
+
public View onCreateInputView(final boolean isHardwareAcceleratedDrawingEnabled) {
if (mKeyboardView != null) {
mKeyboardView.closing();
}
- setContextThemeWrapper(mLatinIME, mKeyboardTheme);
+ updateKeyboardThemeAndContextThemeWrapper(mLatinIME, mKeyboardTheme);
mCurrentInputView = (InputView)LayoutInflater.from(mThemeContext).inflate(
R.layout.input_view, null);
mMainKeyboardFrame = mCurrentInputView.findViewById(R.id.main_keyboard_frame);
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 5578713a0..422bd12a3 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -113,9 +113,6 @@ public class KeyboardView extends View {
private final Canvas mOffscreenCanvas = new Canvas();
private final Paint mPaint = new Paint();
private final Paint.FontMetrics mFontMetrics = new Paint.FontMetrics();
- private static final char[] KEY_LABEL_REFERENCE_CHAR = { 'M' };
- private static final char[] KEY_NUMERIC_HINT_LABEL_REFERENCE_CHAR = { '8' };
-
public KeyboardView(final Context context, final AttributeSet attrs) {
this(context, attrs, R.attr.keyboardViewStyle);
}
@@ -322,7 +319,7 @@ public class KeyboardView extends View {
params.mAnimAlpha = Constants.Color.ALPHA_OPAQUE;
if (!key.isSpacer()) {
- onDrawKeyBackground(key, canvas);
+ onDrawKeyBackground(key, canvas, mKeyBackground);
}
onDrawKeyTopVisuals(key, canvas, paint, params);
@@ -330,14 +327,14 @@ public class KeyboardView extends View {
}
// Draw key background.
- protected void onDrawKeyBackground(final Key key, final Canvas canvas) {
+ protected void onDrawKeyBackground(final Key key, final Canvas canvas,
+ final Drawable background) {
final Rect padding = mKeyBackgroundPadding;
final int bgWidth = key.getDrawWidth() + padding.left + padding.right;
final int bgHeight = key.getHeight() + padding.top + padding.bottom;
final int bgX = -padding.left;
final int bgY = -padding.top;
final int[] drawableState = key.getCurrentDrawableState();
- final Drawable background = mKeyBackground;
background.setState(drawableState);
final Rect bounds = background.getBounds();
if (bgWidth != bounds.right || bgHeight != bounds.bottom) {
@@ -370,10 +367,8 @@ public class KeyboardView extends View {
if (label != null) {
paint.setTypeface(key.selectTypeface(params));
paint.setTextSize(key.selectTextSize(params));
- final float labelCharHeight = TypefaceUtils.getCharHeight(
- KEY_LABEL_REFERENCE_CHAR, paint);
- final float labelCharWidth = TypefaceUtils.getCharWidth(
- KEY_LABEL_REFERENCE_CHAR, paint);
+ final float labelCharHeight = TypefaceUtils.getReferenceCharHeight(paint);
+ final float labelCharWidth = TypefaceUtils.getReferenceCharWidth(paint);
// Vertical label text alignment.
final float baseline = centerY + labelCharHeight / 2.0f;
@@ -391,12 +386,12 @@ public class KeyboardView extends View {
positionX = centerX - labelCharWidth * 7.0f / 4.0f;
paint.setTextAlign(Align.LEFT);
} else if (key.hasLabelWithIconLeft() && icon != null) {
- labelWidth = TypefaceUtils.getLabelWidth(label, paint) + icon.getIntrinsicWidth()
+ labelWidth = TypefaceUtils.getStringWidth(label, paint) + icon.getIntrinsicWidth()
+ LABEL_ICON_MARGIN * keyWidth;
positionX = centerX + labelWidth / 2.0f;
paint.setTextAlign(Align.RIGHT);
} else if (key.hasLabelWithIconRight() && icon != null) {
- labelWidth = TypefaceUtils.getLabelWidth(label, paint) + icon.getIntrinsicWidth()
+ labelWidth = TypefaceUtils.getStringWidth(label, paint) + icon.getIntrinsicWidth()
+ LABEL_ICON_MARGIN * keyWidth;
positionX = centerX - labelWidth / 2.0f;
paint.setTextAlign(Align.LEFT);
@@ -404,9 +399,15 @@ public class KeyboardView extends View {
positionX = centerX;
paint.setTextAlign(Align.CENTER);
}
- if (key.needsXScale()) {
- paint.setTextScaleX(Math.min(1.0f,
- (keyWidth * MAX_LABEL_RATIO) / TypefaceUtils.getLabelWidth(label, paint)));
+ if (key.needsAutoXScale()) {
+ final float ratio = Math.min(1.0f, (keyWidth * MAX_LABEL_RATIO) /
+ TypefaceUtils.getStringWidth(label, paint));
+ if (key.needsAutoScale()) {
+ final float autoSize = paint.getTextSize() * ratio;
+ paint.setTextSize(autoSize);
+ } else {
+ paint.setTextScaleX(ratio);
+ }
}
paint.setColor(key.selectTextColor(params));
@@ -451,36 +452,35 @@ public class KeyboardView extends View {
// TODO: Should add a way to specify type face for hint letters
paint.setTypeface(Typeface.DEFAULT_BOLD);
blendAlpha(paint, params.mAnimAlpha);
+ final float labelCharHeight = TypefaceUtils.getReferenceCharHeight(paint);
+ final float labelCharWidth = TypefaceUtils.getReferenceCharWidth(paint);
+ final KeyVisualAttributes visualAttr = key.getVisualAttributes();
+ final float adjustmentY = (visualAttr == null) ? 0.0f
+ : visualAttr.mHintLabelVerticalAdjustment * labelCharHeight;
final float hintX, hintY;
if (key.hasHintLabel()) {
// The hint label is placed just right of the key label. Used mainly on
// "phone number" layout.
// TODO: Generalize the following calculations.
- hintX = positionX
- + TypefaceUtils.getCharWidth(KEY_LABEL_REFERENCE_CHAR, paint) * 2.0f;
- hintY = centerY
- + TypefaceUtils.getCharHeight(KEY_LABEL_REFERENCE_CHAR, paint) / 2.0f;
+ hintX = positionX + labelCharWidth * 2.0f;
+ hintY = centerY + labelCharHeight / 2.0f;
paint.setTextAlign(Align.LEFT);
} else if (key.hasShiftedLetterHint()) {
// The hint label is placed at top-right corner of the key. Used mainly on tablet.
- hintX = keyWidth - mKeyShiftedLetterHintPadding
- - TypefaceUtils.getCharWidth(KEY_LABEL_REFERENCE_CHAR, paint) / 2.0f;
+ hintX = keyWidth - mKeyShiftedLetterHintPadding - labelCharWidth / 2.0f;
paint.getFontMetrics(mFontMetrics);
hintY = -mFontMetrics.top;
paint.setTextAlign(Align.CENTER);
} else { // key.hasHintLetter()
// The hint letter is placed at top-right corner of the key. Used mainly on phone.
- final float keyNumericHintLabelReferenceCharWidth =
- TypefaceUtils.getCharWidth(KEY_NUMERIC_HINT_LABEL_REFERENCE_CHAR, paint);
- final float keyHintLabelStringWidth =
- TypefaceUtils.getStringWidth(hintLabel, paint);
+ final float hintDigitWidth = TypefaceUtils.getReferenceDigitWidth(paint);
+ final float hintLabelWidth = TypefaceUtils.getStringWidth(hintLabel, paint);
hintX = keyWidth - mKeyHintLetterPadding
- - Math.max(keyNumericHintLabelReferenceCharWidth, keyHintLabelStringWidth)
- / 2.0f;
+ - Math.max(hintDigitWidth, hintLabelWidth) / 2.0f;
hintY = -paint.ascent();
paint.setTextAlign(Align.CENTER);
}
- canvas.drawText(hintLabel, 0, hintLabel.length(), hintX, hintY, paint);
+ canvas.drawText(hintLabel, 0, hintLabel.length(), hintX, hintY + adjustmentY, paint);
if (LatinImeLogger.sVISUALDEBUG) {
final Paint line = new Paint();
@@ -530,7 +530,7 @@ public class KeyboardView extends View {
paint.setColor(params.mHintLabelColor);
paint.setTextAlign(Align.CENTER);
final float hintX = keyWidth - mKeyHintLetterPadding
- - TypefaceUtils.getCharWidth(KEY_LABEL_REFERENCE_CHAR, paint) / 2.0f;
+ - TypefaceUtils.getReferenceCharWidth(paint) / 2.0f;
final float hintY = keyHeight - mKeyPopupHintLetterPadding;
canvas.drawText(POPUP_HINT_CHAR, hintX, hintY, paint);
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 13db47004..1400e05c8 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -16,7 +16,10 @@
package com.android.inputmethod.keyboard;
+import android.animation.Animator;
import android.animation.AnimatorInflater;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.SharedPreferences;
@@ -28,27 +31,24 @@ import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
-import android.os.Message;
-import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
-import android.util.SparseArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewConfiguration;
import android.view.ViewGroup;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
import android.view.inputmethod.InputMethodSubtype;
import android.widget.TextView;
import com.android.inputmethod.accessibility.AccessibilityUtils;
import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy;
import com.android.inputmethod.annotations.ExternallyReferenced;
-import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
-import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
+import com.android.inputmethod.keyboard.internal.DrawingHandler;
import com.android.inputmethod.keyboard.internal.GestureFloatingPreviewText;
import com.android.inputmethod.keyboard.internal.GestureTrailsPreview;
import com.android.inputmethod.keyboard.internal.KeyDrawParams;
@@ -56,6 +56,7 @@ import com.android.inputmethod.keyboard.internal.KeyPreviewDrawParams;
import com.android.inputmethod.keyboard.internal.NonDistinctMultitouchHelper;
import com.android.inputmethod.keyboard.internal.PreviewPlacerView;
import com.android.inputmethod.keyboard.internal.SlidingKeyInputPreview;
+import com.android.inputmethod.keyboard.internal.TimerHandler;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
@@ -64,13 +65,15 @@ import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.settings.DebugSettings;
import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.CoordinateUtils;
-import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
import com.android.inputmethod.latin.utils.UsabilityStudyLogUtils;
import com.android.inputmethod.latin.utils.ViewLayoutUtils;
import com.android.inputmethod.research.ResearchLogger;
+import java.util.ArrayDeque;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.WeakHashMap;
/**
@@ -78,9 +81,10 @@ import java.util.WeakHashMap;
*
* @attr ref R.styleable#MainKeyboardView_autoCorrectionSpacebarLedEnabled
* @attr ref R.styleable#MainKeyboardView_autoCorrectionSpacebarLedIcon
- * @attr ref R.styleable#MainKeyboardView_spacebarTextRatio
- * @attr ref R.styleable#MainKeyboardView_spacebarTextColor
- * @attr ref R.styleable#MainKeyboardView_spacebarTextShadowColor
+ * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextRatio
+ * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextColor
+ * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextShadowColor
+ * @attr ref R.styleable#MainKeyboardView_spacebarBackground
* @attr ref R.styleable#MainKeyboardView_languageOnSpacebarFinalAlpha
* @attr ref R.styleable#MainKeyboardView_languageOnSpacebarFadeoutAnimator
* @attr ref R.styleable#MainKeyboardView_altCodeKeyWhileTypingFadeoutAnimator
@@ -88,7 +92,7 @@ import java.util.WeakHashMap;
* @attr ref R.styleable#MainKeyboardView_keyHysteresisDistance
* @attr ref R.styleable#MainKeyboardView_touchNoiseThresholdTime
* @attr ref R.styleable#MainKeyboardView_touchNoiseThresholdDistance
- * @attr ref R.styleable#MainKeyboardView_slidingKeyInputEnable
+ * @attr ref R.styleable#MainKeyboardView_keySelectionByDraggingFinger
* @attr ref R.styleable#MainKeyboardView_keyRepeatStartTimeout
* @attr ref R.styleable#MainKeyboardView_keyRepeatInterval
* @attr ref R.styleable#MainKeyboardView_longPressKeyTimeout
@@ -114,26 +118,27 @@ import java.util.WeakHashMap;
* @attr ref R.styleable#MainKeyboardView_gestureRecognitionSpeedThreshold
* @attr ref R.styleable#MainKeyboardView_suppressKeyPreviewAfterBatchInputDuration
*/
-public final class MainKeyboardView extends KeyboardView implements PointerTracker.KeyEventHandler,
- PointerTracker.DrawingProxy, MoreKeysPanel.Controller {
+public final class MainKeyboardView extends KeyboardView implements PointerTracker.DrawingProxy,
+ MoreKeysPanel.Controller, DrawingHandler.Callbacks, TimerHandler.Callbacks {
private static final String TAG = MainKeyboardView.class.getSimpleName();
/** Listener for {@link KeyboardActionListener}. */
private KeyboardActionListener mKeyboardActionListener;
- /* Space key and its icons */
+ /* Space key and its icon and background. */
private Key mSpaceKey;
- private Drawable mSpaceIcon;
+ private Drawable mSpacebarIcon;
+ private final Drawable mSpacebarBackground;
// Stuff to draw language name on spacebar.
private final int mLanguageOnSpacebarFinalAlpha;
private ObjectAnimator mLanguageOnSpacebarFadeoutAnimator;
private boolean mNeedsToDisplayLanguage;
private boolean mHasMultipleEnabledIMEsOrSubtypes;
private int mLanguageOnSpacebarAnimAlpha = Constants.Color.ALPHA_OPAQUE;
- private final float mSpacebarTextRatio;
- private float mSpacebarTextSize;
- private final int mSpacebarTextColor;
- private final int mSpacebarTextShadowColor;
+ private final float mLanguageOnSpacebarTextRatio;
+ private float mLanguageOnSpacebarTextSize;
+ private final int mLanguageOnSpacebarTextColor;
+ private final int mLanguageOnSpacebarTextShadowColor;
// The minimum x-scale to fit the language name on spacebar.
private static final float MINIMUM_XSCALE_OF_LANGUAGE_NAME = 0.8f;
// Stuff to draw auto correction LED on spacebar.
@@ -143,8 +148,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private static final int SPACE_LED_LENGTH_PERCENT = 80;
// Stuff to draw altCodeWhileTyping keys.
- private ObjectAnimator mAltCodeKeyWhileTypingFadeoutAnimator;
- private ObjectAnimator mAltCodeKeyWhileTypingFadeinAnimator;
+ private final ObjectAnimator mAltCodeKeyWhileTypingFadeoutAnimator;
+ private final ObjectAnimator mAltCodeKeyWhileTypingFadeinAnimator;
private int mAltCodeKeyWhileTypingAnimAlpha = Constants.Color.ALPHA_OPAQUE;
// Preview placer view
@@ -155,13 +160,26 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private final SlidingKeyInputPreview mSlidingKeyInputPreview;
// Key preview
+ private static final boolean FADE_OUT_KEY_TOP_LETTER_WHEN_KEY_IS_PRESSED = false;
private final int mKeyPreviewLayoutId;
private final int mKeyPreviewOffset;
private final int mKeyPreviewHeight;
- private final SparseArray<TextView> mKeyPreviewTexts = CollectionUtils.newSparseArray();
+ // Free {@link TextView} pool that can be used for key preview.
+ private final ArrayDeque<TextView> mFreeKeyPreviewTextViews = CollectionUtils.newArrayDeque();
+ // Map from {@link Key} to {@link TextView} that is currently being displayed as key preview.
+ private final HashMap<Key,TextView> mShowingKeyPreviewTextViews = CollectionUtils.newHashMap();
private final KeyPreviewDrawParams mKeyPreviewDrawParams = new KeyPreviewDrawParams();
private boolean mShowKeyPreviewPopup = true;
private int mKeyPreviewLingerTimeout;
+ private int mKeyPreviewZoomInDuration;
+ private int mKeyPreviewZoomOutDuration;
+ private static final float KEY_PREVIEW_START_ZOOM_IN_SCALE = 0.7f;
+ private static final float KEY_PREVIEW_END_ZOOM_IN_SCALE = 1.0f;
+ private static final float KEY_PREVIEW_END_ZOOM_OUT_SCALE = 0.7f;
+ private static final AccelerateInterpolator ACCELERATE_INTERPOLATOR =
+ new AccelerateInterpolator();
+ private static final DecelerateInterpolator DECELERATE_INTERPOLATOR =
+ new DecelerateInterpolator();
// More keys keyboard
private final Paint mBackgroundDimAlphaPaint = new Paint();
@@ -178,244 +196,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
// TODO: Make this parameter customizable by user via settings.
private int mGestureFloatingPreviewTextLingerTimeout;
- private KeyDetector mKeyDetector;
+ private final KeyDetector mKeyDetector;
private final NonDistinctMultitouchHelper mNonDistinctMultitouchHelper;
- private final KeyTimerHandler mKeyTimerHandler;
+ private final TimerHandler mKeyTimerHandler;
private final int mLanguageOnSpacebarHorizontalMargin;
- private static final class KeyTimerHandler extends StaticInnerHandlerWrapper<MainKeyboardView>
- implements TimerProxy {
- private static final int MSG_TYPING_STATE_EXPIRED = 0;
- private static final int MSG_REPEAT_KEY = 1;
- private static final int MSG_LONGPRESS_KEY = 2;
- private static final int MSG_DOUBLE_TAP_SHIFT_KEY = 3;
- private static final int MSG_UPDATE_BATCH_INPUT = 4;
-
- private final int mIgnoreAltCodeKeyTimeout;
- private final int mGestureRecognitionUpdateTime;
-
- public KeyTimerHandler(final MainKeyboardView outerInstance,
- final TypedArray mainKeyboardViewAttr) {
- super(outerInstance);
-
- mIgnoreAltCodeKeyTimeout = mainKeyboardViewAttr.getInt(
- R.styleable.MainKeyboardView_ignoreAltCodeKeyTimeout, 0);
- mGestureRecognitionUpdateTime = mainKeyboardViewAttr.getInt(
- R.styleable.MainKeyboardView_gestureRecognitionUpdateTime, 0);
- }
-
- @Override
- public void handleMessage(final Message msg) {
- final MainKeyboardView keyboardView = getOuterInstance();
- if (keyboardView == null) {
- return;
- }
- final PointerTracker tracker = (PointerTracker) msg.obj;
- switch (msg.what) {
- case MSG_TYPING_STATE_EXPIRED:
- startWhileTypingFadeinAnimation(keyboardView);
- break;
- case MSG_REPEAT_KEY:
- tracker.onKeyRepeat(msg.arg1 /* code */, msg.arg2 /* repeatCount */);
- break;
- case MSG_LONGPRESS_KEY:
- keyboardView.onLongPress(tracker);
- break;
- case MSG_UPDATE_BATCH_INPUT:
- tracker.updateBatchInputByTimer(SystemClock.uptimeMillis());
- startUpdateBatchInputTimer(tracker);
- break;
- }
- }
-
- @Override
- public void startKeyRepeatTimer(final PointerTracker tracker, final int repeatCount,
- final int delay) {
- final Key key = tracker.getKey();
- if (key == null || delay == 0) {
- return;
- }
- sendMessageDelayed(
- obtainMessage(MSG_REPEAT_KEY, key.getCode(), repeatCount, tracker), delay);
- }
-
- public void cancelKeyRepeatTimer() {
- removeMessages(MSG_REPEAT_KEY);
- }
-
- // TODO: Suppress layout changes in key repeat mode
- public boolean isInKeyRepeat() {
- return hasMessages(MSG_REPEAT_KEY);
- }
-
- @Override
- public void startLongPressTimer(final PointerTracker tracker, final int delay) {
- cancelLongPressTimer();
- if (delay <= 0) return;
- sendMessageDelayed(obtainMessage(MSG_LONGPRESS_KEY, tracker), delay);
- }
-
- @Override
- public void cancelLongPressTimer() {
- removeMessages(MSG_LONGPRESS_KEY);
- }
-
- private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
- final ObjectAnimator animatorToStart) {
- if (animatorToCancel == null || animatorToStart == null) {
- // TODO: Stop using null as a no-operation animator.
- return;
- }
- float startFraction = 0.0f;
- if (animatorToCancel.isStarted()) {
- animatorToCancel.cancel();
- startFraction = 1.0f - animatorToCancel.getAnimatedFraction();
- }
- final long startTime = (long)(animatorToStart.getDuration() * startFraction);
- animatorToStart.start();
- animatorToStart.setCurrentPlayTime(startTime);
- }
-
- private static void startWhileTypingFadeinAnimation(final MainKeyboardView keyboardView) {
- cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator,
- keyboardView.mAltCodeKeyWhileTypingFadeinAnimator);
- }
-
- private static void startWhileTypingFadeoutAnimation(final MainKeyboardView keyboardView) {
- cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeinAnimator,
- keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator);
- }
-
- @Override
- public void startTypingStateTimer(final Key typedKey) {
- if (typedKey.isModifier() || typedKey.altCodeWhileTyping()) {
- return;
- }
-
- final boolean isTyping = isTypingState();
- removeMessages(MSG_TYPING_STATE_EXPIRED);
- final MainKeyboardView keyboardView = getOuterInstance();
-
- // When user hits the space or the enter key, just cancel the while-typing timer.
- final int typedCode = typedKey.getCode();
- if (typedCode == Constants.CODE_SPACE || typedCode == Constants.CODE_ENTER) {
- if (isTyping) {
- startWhileTypingFadeinAnimation(keyboardView);
- }
- return;
- }
-
- sendMessageDelayed(
- obtainMessage(MSG_TYPING_STATE_EXPIRED), mIgnoreAltCodeKeyTimeout);
- if (isTyping) {
- return;
- }
- startWhileTypingFadeoutAnimation(keyboardView);
- }
-
- @Override
- public boolean isTypingState() {
- return hasMessages(MSG_TYPING_STATE_EXPIRED);
- }
-
- @Override
- public void startDoubleTapShiftKeyTimer() {
- sendMessageDelayed(obtainMessage(MSG_DOUBLE_TAP_SHIFT_KEY),
- ViewConfiguration.getDoubleTapTimeout());
- }
-
- @Override
- public void cancelDoubleTapShiftKeyTimer() {
- removeMessages(MSG_DOUBLE_TAP_SHIFT_KEY);
- }
-
- @Override
- public boolean isInDoubleTapShiftKeyTimeout() {
- return hasMessages(MSG_DOUBLE_TAP_SHIFT_KEY);
- }
-
- @Override
- public void cancelKeyTimers() {
- cancelKeyRepeatTimer();
- cancelLongPressTimer();
- }
-
- @Override
- public void startUpdateBatchInputTimer(final PointerTracker tracker) {
- if (mGestureRecognitionUpdateTime <= 0) {
- return;
- }
- removeMessages(MSG_UPDATE_BATCH_INPUT, tracker);
- sendMessageDelayed(obtainMessage(MSG_UPDATE_BATCH_INPUT, tracker),
- mGestureRecognitionUpdateTime);
- }
-
- @Override
- public void cancelUpdateBatchInputTimer(final PointerTracker tracker) {
- removeMessages(MSG_UPDATE_BATCH_INPUT, tracker);
- }
-
- @Override
- public void cancelAllUpdateBatchInputTimers() {
- removeMessages(MSG_UPDATE_BATCH_INPUT);
- }
-
- public void cancelAllMessages() {
- cancelKeyTimers();
- cancelAllUpdateBatchInputTimers();
- }
- }
-
- private final DrawingHandler mDrawingHandler = new DrawingHandler(this);
-
- public static class DrawingHandler extends StaticInnerHandlerWrapper<MainKeyboardView> {
- private static final int MSG_DISMISS_KEY_PREVIEW = 0;
- private static final int MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;
-
- public DrawingHandler(final MainKeyboardView outerInstance) {
- super(outerInstance);
- }
-
- @Override
- public void handleMessage(final Message msg) {
- final MainKeyboardView mainKeyboardView = getOuterInstance();
- if (mainKeyboardView == null) return;
- final PointerTracker tracker = (PointerTracker) msg.obj;
- switch (msg.what) {
- case MSG_DISMISS_KEY_PREVIEW:
- final TextView previewText = mainKeyboardView.mKeyPreviewTexts.get(
- tracker.mPointerId);
- if (previewText != null) {
- previewText.setVisibility(INVISIBLE);
- }
- break;
- case MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT:
- mainKeyboardView.showGestureFloatingPreviewText(SuggestedWords.EMPTY);
- break;
- }
- }
-
- public void dismissKeyPreview(final long delay, final PointerTracker tracker) {
- sendMessageDelayed(obtainMessage(MSG_DISMISS_KEY_PREVIEW, tracker), delay);
- }
-
- public void cancelDismissKeyPreview(final PointerTracker tracker) {
- removeMessages(MSG_DISMISS_KEY_PREVIEW, tracker);
- }
-
- private void cancelAllDismissKeyPreviews() {
- removeMessages(MSG_DISMISS_KEY_PREVIEW);
- }
-
- public void dismissGestureFloatingPreviewText(final long delay) {
- sendMessageDelayed(obtainMessage(MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT), delay);
- }
-
- public void cancelAllMessages() {
- cancelAllDismissKeyPreviews();
- }
- }
+ private final DrawingHandler mDrawingHandler =
+ new DrawingHandler(this);
public MainKeyboardView(final Context context, final AttributeSet attrs) {
this(context, attrs, R.attr.mainKeyboardViewStyle);
@@ -424,7 +212,27 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
public MainKeyboardView(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
- PointerTracker.init(getResources());
+ mPreviewPlacerView = new PreviewPlacerView(context, attrs);
+
+ final TypedArray mainKeyboardViewAttr = context.obtainStyledAttributes(
+ attrs, R.styleable.MainKeyboardView, defStyle, R.style.MainKeyboardView);
+ final int ignoreAltCodeKeyTimeout = mainKeyboardViewAttr.getInt(
+ R.styleable.MainKeyboardView_ignoreAltCodeKeyTimeout, 0);
+ final int gestureRecognitionUpdateTime = mainKeyboardViewAttr.getInt(
+ R.styleable.MainKeyboardView_gestureRecognitionUpdateTime, 0);
+ mKeyTimerHandler = new TimerHandler(
+ this, ignoreAltCodeKeyTimeout, gestureRecognitionUpdateTime);
+
+ final float keyHysteresisDistance = mainKeyboardViewAttr.getDimension(
+ R.styleable.MainKeyboardView_keyHysteresisDistance, 0.0f);
+ final float keyHysteresisDistanceForSlidingModifier = mainKeyboardViewAttr.getDimension(
+ R.styleable.MainKeyboardView_keyHysteresisDistanceForSlidingModifier, 0.0f);
+ mKeyDetector = new KeyDetector(
+ keyHysteresisDistance, keyHysteresisDistanceForSlidingModifier);
+
+ PointerTracker.init(mainKeyboardViewAttr, mKeyTimerHandler, this /* DrawingProxy */,
+ mKeyDetector);
+
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
final boolean forceNonDistinctMultitouch = prefs.getBoolean(
DebugSettings.PREF_FORCE_NON_DISTINCT_MULTITOUCH, false);
@@ -432,26 +240,24 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)
&& !forceNonDistinctMultitouch;
mNonDistinctMultitouchHelper = hasDistinctMultitouch ? null
- : new NonDistinctMultitouchHelper();
-
- mPreviewPlacerView = new PreviewPlacerView(context, attrs);
+ : new NonDistinctMultitouchHelper(PointerTracker.getPointerTracker(0));
- final TypedArray mainKeyboardViewAttr = context.obtainStyledAttributes(
- attrs, R.styleable.MainKeyboardView, defStyle, R.style.MainKeyboardView);
final int backgroundDimAlpha = mainKeyboardViewAttr.getInt(
R.styleable.MainKeyboardView_backgroundDimAlpha, 0);
mBackgroundDimAlphaPaint.setColor(Color.BLACK);
mBackgroundDimAlphaPaint.setAlpha(backgroundDimAlpha);
+ mSpacebarBackground = mainKeyboardViewAttr.getDrawable(
+ R.styleable.MainKeyboardView_spacebarBackground);
mAutoCorrectionSpacebarLedEnabled = mainKeyboardViewAttr.getBoolean(
R.styleable.MainKeyboardView_autoCorrectionSpacebarLedEnabled, false);
mAutoCorrectionSpacebarLedIcon = mainKeyboardViewAttr.getDrawable(
R.styleable.MainKeyboardView_autoCorrectionSpacebarLedIcon);
- mSpacebarTextRatio = mainKeyboardViewAttr.getFraction(
- R.styleable.MainKeyboardView_spacebarTextRatio, 1, 1, 1.0f);
- mSpacebarTextColor = mainKeyboardViewAttr.getColor(
- R.styleable.MainKeyboardView_spacebarTextColor, 0);
- mSpacebarTextShadowColor = mainKeyboardViewAttr.getColor(
- R.styleable.MainKeyboardView_spacebarTextShadowColor, 0);
+ mLanguageOnSpacebarTextRatio = mainKeyboardViewAttr.getFraction(
+ R.styleable.MainKeyboardView_languageOnSpacebarTextRatio, 1, 1, 1.0f);
+ mLanguageOnSpacebarTextColor = mainKeyboardViewAttr.getColor(
+ R.styleable.MainKeyboardView_languageOnSpacebarTextColor, 0);
+ mLanguageOnSpacebarTextShadowColor = mainKeyboardViewAttr.getColor(
+ R.styleable.MainKeyboardView_languageOnSpacebarTextShadowColor, 0);
mLanguageOnSpacebarFinalAlpha = mainKeyboardViewAttr.getInt(
R.styleable.MainKeyboardView_languageOnSpacebarFinalAlpha,
Constants.Color.ALPHA_OPAQUE);
@@ -462,13 +268,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
final int altCodeKeyWhileTypingFadeinAnimatorResId = mainKeyboardViewAttr.getResourceId(
R.styleable.MainKeyboardView_altCodeKeyWhileTypingFadeinAnimator, 0);
- final float keyHysteresisDistance = mainKeyboardViewAttr.getDimension(
- R.styleable.MainKeyboardView_keyHysteresisDistance, 0.0f);
- final float keyHysteresisDistanceForSlidingModifier = mainKeyboardViewAttr.getDimension(
- R.styleable.MainKeyboardView_keyHysteresisDistanceForSlidingModifier, 0.0f);
- mKeyDetector = new KeyDetector(
- keyHysteresisDistance, keyHysteresisDistanceForSlidingModifier);
- mKeyTimerHandler = new KeyTimerHandler(this, mainKeyboardViewAttr);
mKeyPreviewOffset = mainKeyboardViewAttr.getDimensionPixelOffset(
R.styleable.MainKeyboardView_keyPreviewOffset, 0);
mKeyPreviewHeight = mainKeyboardViewAttr.getDimensionPixelSize(
@@ -480,6 +279,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (mKeyPreviewLayoutId == 0) {
mShowKeyPreviewPopup = false;
}
+ mKeyPreviewZoomInDuration = mainKeyboardViewAttr.getInt(
+ R.styleable.MainKeyboardView_keyPreviewZoomInDuration, 0);
+ mKeyPreviewZoomOutDuration = mainKeyboardViewAttr.getInt(
+ R.styleable.MainKeyboardView_keyPreviewZoomOutDuration, 0);
final int moreKeysKeyboardLayoutId = mainKeyboardViewAttr.getResourceId(
R.styleable.MainKeyboardView_moreKeysKeyboardLayout, 0);
mConfigShowMoreKeysKeyboardAtTouchedPoint = mainKeyboardViewAttr.getBoolean(
@@ -487,7 +290,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
mGestureFloatingPreviewTextLingerTimeout = mainKeyboardViewAttr.getInt(
R.styleable.MainKeyboardView_gestureFloatingPreviewTextLingerTimeout, 0);
- PointerTracker.setParameters(mainKeyboardViewAttr);
mGestureFloatingPreviewText = new GestureFloatingPreviewText(
mPreviewPlacerView, mainKeyboardViewAttr);
@@ -513,8 +315,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
mKeyboardActionListener = KeyboardActionListener.EMPTY_LISTENER;
- mLanguageOnSpacebarHorizontalMargin =
- (int) getResources().getDimension(R.dimen.language_on_spacebar_horizontal_margin);
+ mLanguageOnSpacebarHorizontalMargin = (int)getResources().getDimension(
+ R.dimen.config_language_on_spacebar_horizontal_margin);
}
@Override
@@ -536,6 +338,35 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
return animator;
}
+ private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
+ final ObjectAnimator animatorToStart) {
+ if (animatorToCancel == null || animatorToStart == null) {
+ // TODO: Stop using null as a no-operation animator.
+ return;
+ }
+ float startFraction = 0.0f;
+ if (animatorToCancel.isStarted()) {
+ animatorToCancel.cancel();
+ startFraction = 1.0f - animatorToCancel.getAnimatedFraction();
+ }
+ final long startTime = (long)(animatorToStart.getDuration() * startFraction);
+ animatorToStart.start();
+ animatorToStart.setCurrentPlayTime(startTime);
+ }
+
+ // Implements {@link TimerHander.Callbacks} method.
+ @Override
+ public void startWhileTypingFadeinAnimation() {
+ cancelAndStartAnimators(
+ mAltCodeKeyWhileTypingFadeoutAnimator, mAltCodeKeyWhileTypingFadeinAnimator);
+ }
+
+ @Override
+ public void startWhileTypingFadeoutAnimation() {
+ cancelAndStartAnimators(
+ mAltCodeKeyWhileTypingFadeinAnimator, mAltCodeKeyWhileTypingFadeoutAnimator);
+ }
+
@ExternallyReferenced
public int getLanguageOnSpacebarAnimAlpha() {
return mLanguageOnSpacebarAnimAlpha;
@@ -573,28 +404,16 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
PointerTracker.setKeyboardActionListener(listener);
}
- /**
- * Returns the {@link KeyboardActionListener} object.
- * @return the listener attached to this keyboard
- */
- @Override
- public KeyboardActionListener getKeyboardActionListener() {
- return mKeyboardActionListener;
+ // TODO: We should reconsider which coordinate system should be used to represent keyboard
+ // event.
+ public int getKeyX(final int x) {
+ return Constants.isValidCoordinate(x) ? mKeyDetector.getTouchX(x) : x;
}
- @Override
- public KeyDetector getKeyDetector() {
- return mKeyDetector;
- }
-
- @Override
- public DrawingProxy getDrawingProxy() {
- return this;
- }
-
- @Override
- public TimerProxy getTimerProxy() {
- return mKeyTimerHandler;
+ // TODO: We should reconsider which coordinate system should be used to represent keyboard
+ // event.
+ public int getKeyY(final int y) {
+ return Constants.isValidCoordinate(y) ? mKeyDetector.getTouchY(y) : y;
}
/**
@@ -606,19 +425,20 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
*/
@Override
public void setKeyboard(final Keyboard keyboard) {
- // Remove any pending messages, except dismissing preview and key repeat.
- mKeyTimerHandler.cancelLongPressTimer();
+ // Remove any pending messages.
+ mKeyTimerHandler.cancelAllKeyTimers();
super.setKeyboard(keyboard);
mKeyDetector.setKeyboard(
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());
PointerTracker.setKeyDetector(mKeyDetector);
+ PointerTracker.setKeyboardActionListener(mKeyboardActionListener);
mMoreKeysKeyboardCache.clear();
mSpaceKey = keyboard.getKey(Constants.CODE_SPACE);
- mSpaceIcon = (mSpaceKey != null)
+ mSpacebarIcon = (mSpaceKey != null)
? mSpaceKey.getIcon(keyboard.mIconsSet, Constants.Color.ALPHA_OPAQUE) : null;
final int keyHeight = keyboard.mMostCommonKeyHeight - keyboard.mVerticalGap;
- mSpacebarTextSize = keyHeight * mSpacebarTextRatio;
+ mLanguageOnSpacebarTextSize = keyHeight * mLanguageOnSpacebarTextRatio;
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
final int orientation = getContext().getResources().getConfiguration().orientation;
ResearchLogger.mainKeyboardView_setKeyboard(keyboard, orientation);
@@ -681,34 +501,33 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
return mShowKeyPreviewPopup;
}
- private void addKeyPreview(final TextView keyPreview) {
- locatePreviewPlacerView();
- mPreviewPlacerView.addView(
- keyPreview, ViewLayoutUtils.newLayoutParam(mPreviewPlacerView, 0, 0));
- }
-
- private TextView getKeyPreviewText(final int pointerId) {
- TextView previewText = mKeyPreviewTexts.get(pointerId);
- if (previewText != null) {
- return previewText;
+ private TextView getKeyPreviewTextView(final Key key) {
+ TextView previewTextView = mShowingKeyPreviewTextViews.remove(key);
+ if (previewTextView != null) {
+ return previewTextView;
+ }
+ previewTextView = mFreeKeyPreviewTextViews.poll();
+ if (previewTextView != null) {
+ return previewTextView;
}
final Context context = getContext();
if (mKeyPreviewLayoutId != 0) {
- previewText = (TextView)LayoutInflater.from(context).inflate(mKeyPreviewLayoutId, null);
+ previewTextView = (TextView)LayoutInflater.from(context)
+ .inflate(mKeyPreviewLayoutId, null);
} else {
- previewText = new TextView(context);
+ previewTextView = new TextView(context);
}
- mKeyPreviewTexts.put(pointerId, previewText);
- return previewText;
+ locatePreviewPlacerView();
+ mPreviewPlacerView.addView(
+ previewTextView, ViewLayoutUtils.newLayoutParam(mPreviewPlacerView, 0, 0));
+ return previewTextView;
}
- private void dismissAllKeyPreviews() {
- final int pointerCount = mKeyPreviewTexts.size();
- for (int id = 0; id < pointerCount; id++) {
- final TextView previewText = mKeyPreviewTexts.get(id);
- if (previewText != null) {
- previewText.setVisibility(INVISIBLE);
- }
+ // Implements {@link DrawingHandler.Callbacks} method.
+ @Override
+ public void dismissAllKeyPreviews() {
+ for (final Key key : new HashSet<Key>(mShowingKeyPreviewTextViews.keySet())) {
+ dismissKeyPreviewWithoutDelay(key);
}
PointerTracker.setReleasedKeyGraphicsToAllKeys();
}
@@ -734,24 +553,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private static final int STATE_NORMAL = 0;
private static final int STATE_HAS_MOREKEYS = 1;
+ // TODO: Take this method out of this class.
@Override
- public void showKeyPreview(final PointerTracker tracker) {
- final KeyPreviewDrawParams previewParams = mKeyPreviewDrawParams;
- final Keyboard keyboard = getKeyboard();
- if (!mShowKeyPreviewPopup) {
- previewParams.mPreviewVisibleOffset = -keyboard.mVerticalGap;
- return;
- }
-
- final TextView previewText = getKeyPreviewText(tracker.mPointerId);
- // If the key preview has no parent view yet, add it to the ViewGroup which can place
- // key preview absolutely in SoftInputWindow.
- if (previewText.getParent() == null) {
- addKeyPreview(previewText);
- }
-
- mDrawingHandler.cancelDismissKeyPreview(tracker);
- final Key key = tracker.getKey();
+ public void showKeyPreview(final Key key) {
// If key is invalid or IME is already closed, we must not show key preview.
// Trying to show key preview while root window is closed causes
// WindowManager.BadTokenException.
@@ -759,38 +563,47 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
return;
}
+ final KeyPreviewDrawParams previewParams = mKeyPreviewDrawParams;
+ final Keyboard keyboard = getKeyboard();
+ if (!mShowKeyPreviewPopup) {
+ previewParams.mPreviewVisibleOffset = -keyboard.mVerticalGap;
+ return;
+ }
+
+ final TextView previewTextView = getKeyPreviewTextView(key);
final KeyDrawParams drawParams = mKeyDrawParams;
- previewText.setTextColor(drawParams.mPreviewTextColor);
- final Drawable background = previewText.getBackground();
+ previewTextView.setTextColor(drawParams.mPreviewTextColor);
+ final Drawable background = previewTextView.getBackground();
final String label = key.getPreviewLabel();
// What we show as preview should match what we show on a key top in onDraw().
if (label != null) {
// TODO Should take care of temporaryShiftLabel here.
- previewText.setCompoundDrawables(null, null, null, null);
- previewText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+ previewTextView.setCompoundDrawables(null, null, null, null);
+ previewTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX,
key.selectPreviewTextSize(drawParams));
- previewText.setTypeface(key.selectPreviewTypeface(drawParams));
- previewText.setText(label);
+ previewTextView.setTypeface(key.selectPreviewTypeface(drawParams));
+ previewTextView.setText(label);
} else {
- previewText.setCompoundDrawables(null, null, null,
+ previewTextView.setCompoundDrawables(null, null, null,
key.getPreviewIcon(keyboard.mIconsSet));
- previewText.setText(null);
+ previewTextView.setText(null);
}
- previewText.measure(
+ previewTextView.measure(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
final int keyDrawWidth = key.getDrawWidth();
- final int previewWidth = previewText.getMeasuredWidth();
+ final int previewWidth = previewTextView.getMeasuredWidth();
final int previewHeight = mKeyPreviewHeight;
// The width and height of visible part of the key preview background. The content marker
// of the background 9-patch have to cover the visible part of the background.
- previewParams.mPreviewVisibleWidth = previewWidth - previewText.getPaddingLeft()
- - previewText.getPaddingRight();
- previewParams.mPreviewVisibleHeight = previewHeight - previewText.getPaddingTop()
- - previewText.getPaddingBottom();
+ previewParams.mPreviewVisibleWidth = previewWidth - previewTextView.getPaddingLeft()
+ - previewTextView.getPaddingRight();
+ previewParams.mPreviewVisibleHeight = previewHeight - previewTextView.getPaddingTop()
+ - previewTextView.getPaddingBottom();
// The distance between the top edge of the parent key and the bottom of the visible part
// of the key preview background.
- previewParams.mPreviewVisibleOffset = mKeyPreviewOffset - previewText.getPaddingBottom();
+ previewParams.mPreviewVisibleOffset =
+ mKeyPreviewOffset - previewTextView.getPaddingBottom();
getLocationInWindow(mOriginCoords);
// The key preview is horizontally aligned with the center of the visible part of the
// parent key. If it doesn't fit in this {@link KeyboardView}, it is moved inward to fit and
@@ -817,13 +630,132 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
background.setState(KEY_PREVIEW_BACKGROUND_STATE_TABLE[statePosition][hasMoreKeys]);
}
ViewLayoutUtils.placeViewAt(
- previewText, previewX, previewY, previewWidth, previewHeight);
- previewText.setVisibility(VISIBLE);
+ previewTextView, previewX, previewY, previewWidth, previewHeight);
+
+ if (!isHardwareAccelerated()) {
+ previewTextView.setVisibility(VISIBLE);
+ mShowingKeyPreviewTextViews.put(key, previewTextView);
+ return;
+ }
+ previewTextView.setPivotX(previewWidth / 2.0f);
+ previewTextView.setPivotY(previewHeight);
+
+ final Animator zoomIn = createZoomInAniation(key, previewTextView);
+ final Animator zoomOut = createZoomOutAnimation(key, previewTextView);
+ final KeyPreviewAnimations animation = new KeyPreviewAnimations(zoomIn, zoomOut);
+ previewTextView.setTag(animation);
+ animation.startZoomIn();
}
+ // TODO: Move this internal class out to a separate external class.
+ private static class KeyPreviewAnimations extends AnimatorListenerAdapter {
+ private final Animator mZoomIn;
+ private final Animator mZoomOut;
+
+ public KeyPreviewAnimations(final Animator zoomIn, final Animator zoomOut) {
+ mZoomIn = zoomIn;
+ mZoomOut = zoomOut;
+ }
+
+ public void startZoomIn() {
+ mZoomIn.start();
+ }
+
+ public void startZoomOut() {
+ if (mZoomIn.isRunning()) {
+ mZoomIn.addListener(this);
+ return;
+ }
+ mZoomOut.start();
+ }
+
+ @Override
+ public void onAnimationEnd(final Animator animation) {
+ mZoomOut.start();
+ }
+ }
+
+ // TODO: Take this method out of this class.
+ private Animator createZoomInAniation(final Key key, final TextView previewTextView) {
+ final ObjectAnimator scaleXAnimation = ObjectAnimator.ofFloat(
+ previewTextView, SCALE_X, KEY_PREVIEW_START_ZOOM_IN_SCALE,
+ KEY_PREVIEW_END_ZOOM_IN_SCALE);
+ final ObjectAnimator scaleYAnimation = ObjectAnimator.ofFloat(
+ previewTextView, SCALE_Y, KEY_PREVIEW_START_ZOOM_IN_SCALE,
+ KEY_PREVIEW_END_ZOOM_IN_SCALE);
+ final AnimatorSet zoomInAnimation = new AnimatorSet();
+ zoomInAnimation.play(scaleXAnimation).with(scaleYAnimation);
+ // TODO: Implement preference option to control key preview animation duration.
+ zoomInAnimation.setDuration(mKeyPreviewZoomInDuration);
+ zoomInAnimation.setInterpolator(DECELERATE_INTERPOLATOR);
+ zoomInAnimation.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationStart(final Animator animation) {
+ previewTextView.setVisibility(VISIBLE);
+ mShowingKeyPreviewTextViews.put(key, previewTextView);
+ }
+ });
+ return zoomInAnimation;
+ }
+
+ // TODO: Take this method out of this class.
+ private Animator createZoomOutAnimation(final Key key, final TextView previewTextView) {
+ final ObjectAnimator scaleXAnimation = ObjectAnimator.ofFloat(
+ previewTextView, SCALE_X, KEY_PREVIEW_END_ZOOM_OUT_SCALE);
+ final ObjectAnimator scaleYAnimation = ObjectAnimator.ofFloat(
+ previewTextView, SCALE_Y, KEY_PREVIEW_END_ZOOM_OUT_SCALE);
+ final AnimatorSet zoomOutAnimation = new AnimatorSet();
+ zoomOutAnimation.play(scaleXAnimation).with(scaleYAnimation);
+ // TODO: Implement preference option to control key preview animation duration.
+ zoomOutAnimation.setDuration(mKeyPreviewZoomOutDuration);
+ zoomOutAnimation.setInterpolator(ACCELERATE_INTERPOLATOR);
+ zoomOutAnimation.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(final Animator animation) {
+ dismissKeyPreviewWithoutDelay(key);
+ }
+ });
+ return zoomOutAnimation;
+ }
+
+ // Implements {@link TimerHandler.Callbacks} method.
+ // TODO: Take this method out of this class.
@Override
- public void dismissKeyPreview(final PointerTracker tracker) {
- mDrawingHandler.dismissKeyPreview(mKeyPreviewLingerTimeout, tracker);
+ public void dismissKeyPreviewWithoutDelay(final Key key) {
+ if (key == null) {
+ return;
+ }
+ final TextView previewTextView = mShowingKeyPreviewTextViews.remove(key);
+ if (previewTextView != null) {
+ final Object tag = previewTextView.getTag();
+ if (tag instanceof Animator) {
+ ((Animator)tag).cancel();
+ }
+ previewTextView.setTag(null);
+ previewTextView.setVisibility(INVISIBLE);
+ mFreeKeyPreviewTextViews.add(previewTextView);
+ }
+ // To redraw key top letter.
+ invalidateKey(key);
+ }
+
+ // TODO: Take this method out of this class.
+ @Override
+ public void dismissKeyPreview(final Key key) {
+ final TextView previewTextView = mShowingKeyPreviewTextViews.get(key);
+ if (previewTextView == null) {
+ return;
+ }
+ if (!isHardwareAccelerated()) {
+ // TODO: Implement preference option to control key preview method and duration.
+ mDrawingHandler.dismissKeyPreview(mKeyPreviewLingerTimeout, key);
+ return;
+ }
+ final Object tag = previewTextView.getTag();
+ if (tag instanceof KeyPreviewAnimations) {
+ final KeyPreviewAnimations animation = (KeyPreviewAnimations)tag;
+ animation.startZoomOut();
+ }
}
public void setSlidingKeyInputPreviewEnabled(final boolean enabled) {
@@ -847,6 +779,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
mGestureTrailsPreview.setPreviewEnabled(isGestureTrailEnabled);
}
+ // Implements {@link DrawingHandler.Callbacks} method.
+ @Override
public void showGestureFloatingPreviewText(final SuggestedWords suggestedWords) {
locatePreviewPlacerView();
mGestureFloatingPreviewText.setSuggetedWords(suggestedWords);
@@ -922,11 +856,13 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
return moreKeysKeyboardView;
}
+ // Implements {@link TimerHandler.Callbacks} method.
/**
* Called when a key is long pressed.
* @param tracker the pointer tracker which pressed the parent key
*/
- private void onLongPress(final PointerTracker tracker) {
+ @Override
+ public void onLongPress(final PointerTracker tracker) {
if (isShowingMoreKeysPanel()) {
return;
}
@@ -982,13 +918,15 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
final int pointY = key.getY() + mKeyPreviewDrawParams.mPreviewVisibleOffset;
moreKeysPanel.showMoreKeysPanel(this, this, pointX, pointY, mKeyboardActionListener);
tracker.onShowMoreKeysPanel(moreKeysPanel);
+ // TODO: Implement zoom in animation of more keys panel.
+ dismissKeyPreviewWithoutDelay(key);
}
- public boolean isInSlidingKeyInput() {
+ public boolean isInDraggingFinger() {
if (isShowingMoreKeysPanel()) {
return true;
}
- return PointerTracker.isAnyInSlidingKeyInput();
+ return PointerTracker.isAnyInDraggingFinger();
}
@Override
@@ -1049,10 +987,10 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (mNonDistinctMultitouchHelper != null) {
if (me.getPointerCount() > 1 && mKeyTimerHandler.isInKeyRepeat()) {
// Key repeating timer will be canceled if 2 or more keys are in action.
- mKeyTimerHandler.cancelKeyRepeatTimer();
+ mKeyTimerHandler.cancelKeyRepeatTimers();
}
// Non distinct multitouch screen support
- mNonDistinctMultitouchHelper.processMotionEvent(me, this);
+ mNonDistinctMultitouchHelper.processMotionEvent(me, mKeyDetector);
return true;
}
return processMotionEvent(me);
@@ -1069,8 +1007,14 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
final int index = me.getActionIndex();
final int id = me.getPointerId(index);
- final PointerTracker tracker = PointerTracker.getPointerTracker(id, this);
- tracker.processMotionEvent(me, this);
+ final PointerTracker tracker = PointerTracker.getPointerTracker(id);
+ // When a more keys panel is showing, we should ignore other fingers' single touch events
+ // other than the finger that is showing the more keys panel.
+ if (isShowingMoreKeysPanel() && !tracker.isShowingMoreKeysPanel()
+ && PointerTracker.getActivePointerTrackerCount() == 1) {
+ return true;
+ }
+ tracker.processMotionEvent(me, mKeyDetector);
return true;
}
@@ -1099,7 +1043,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
@Override
public boolean dispatchHoverEvent(final MotionEvent event) {
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
- final PointerTracker tracker = PointerTracker.getPointerTracker(0, this);
+ final PointerTracker tracker = PointerTracker.getPointerTracker(0);
return AccessibleKeyboardViewProxy.getInstance().dispatchHoverEvent(event, tracker);
}
@@ -1169,12 +1113,30 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
}
}
+ // Draw key background.
+ @Override
+ protected void onDrawKeyBackground(final Key key, final Canvas canvas,
+ final Drawable background) {
+ if (key.getCode() == Constants.CODE_SPACE) {
+ super.onDrawKeyBackground(key, canvas, mSpacebarBackground);
+ return;
+ }
+ super.onDrawKeyBackground(key, canvas, background);
+ }
+
@Override
protected void onDrawKeyTopVisuals(final Key key, final Canvas canvas, final Paint paint,
final KeyDrawParams params) {
if (key.altCodeWhileTyping() && key.isEnabled()) {
params.mAnimAlpha = mAltCodeKeyWhileTypingAnimAlpha;
}
+ // Don't draw key top letter when key preview is showing.
+ if (FADE_OUT_KEY_TOP_LETTER_WHEN_KEY_IS_PRESSED
+ && mShowingKeyPreviewTextViews.containsKey(key)) {
+ // TODO: Fade out animation for the key top letter, and fade in animation for the key
+ // background color when the user presses the key.
+ return;
+ }
final int code = key.getCode();
if (code == Constants.CODE_SPACE) {
drawSpacebar(key, canvas, paint);
@@ -1193,7 +1155,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private boolean fitsTextIntoWidth(final int width, final String text, final Paint paint) {
final int maxTextWidth = width - mLanguageOnSpacebarHorizontalMargin * 2;
paint.setTextScaleX(1.0f);
- final float textWidth = TypefaceUtils.getLabelWidth(text, paint);
+ final float textWidth = TypefaceUtils.getStringWidth(text, paint);
if (textWidth < width) {
return true;
}
@@ -1204,7 +1166,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
}
paint.setTextScaleX(scaleX);
- return TypefaceUtils.getLabelWidth(text, paint) < maxTextWidth;
+ return TypefaceUtils.getStringWidth(text, paint) < maxTextWidth;
}
// Layout language name on spacebar.
@@ -1238,17 +1200,17 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (mNeedsToDisplayLanguage) {
paint.setTextAlign(Align.CENTER);
paint.setTypeface(Typeface.DEFAULT);
- paint.setTextSize(mSpacebarTextSize);
+ paint.setTextSize(mLanguageOnSpacebarTextSize);
final InputMethodSubtype subtype = getKeyboard().mId.mSubtype;
final String language = layoutLanguageOnSpacebar(paint, subtype, width);
// Draw language text with shadow
final float descent = paint.descent();
final float textHeight = -paint.ascent() + descent;
final float baseline = height / 2 + textHeight / 2;
- paint.setColor(mSpacebarTextShadowColor);
+ paint.setColor(mLanguageOnSpacebarTextShadowColor);
paint.setAlpha(mLanguageOnSpacebarAnimAlpha);
canvas.drawText(language, width / 2, baseline - descent - 1, paint);
- paint.setColor(mSpacebarTextColor);
+ paint.setColor(mLanguageOnSpacebarTextColor);
paint.setAlpha(mLanguageOnSpacebarAnimAlpha);
canvas.drawText(language, width / 2, baseline - descent, paint);
}
@@ -1260,12 +1222,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
int x = (width - iconWidth) / 2;
int y = height - iconHeight;
drawIcon(canvas, mAutoCorrectionSpacebarLedIcon, x, y, iconWidth, iconHeight);
- } else if (mSpaceIcon != null) {
- final int iconWidth = mSpaceIcon.getIntrinsicWidth();
- final int iconHeight = mSpaceIcon.getIntrinsicHeight();
+ } else if (mSpacebarIcon != null) {
+ final int iconWidth = mSpacebarIcon.getIntrinsicWidth();
+ final int iconHeight = mSpacebarIcon.getIntrinsicHeight();
int x = (width - iconWidth) / 2;
int y = height - iconHeight;
- drawIcon(canvas, mSpaceIcon, x, y, iconWidth, iconHeight);
+ drawIcon(canvas, mSpacebarIcon, x, y, iconWidth, iconHeight);
}
}
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java b/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java
index 6b76e2461..81b8f0428 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysDetector.java
@@ -28,7 +28,7 @@ public final class MoreKeysDetector extends KeyDetector {
}
@Override
- public boolean alwaysAllowsSlidingInput() {
+ public boolean alwaysAllowsKeySelectionByDraggingFinger() {
return true;
}
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
index 8256d4623..670524380 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
@@ -223,7 +223,7 @@ public final class MoreKeysKeyboard extends Keyboard {
}
public int getDefaultKeyCoordX() {
- return mLeftKeys * mColumnWidth;
+ return mLeftKeys * mColumnWidth + mLeftPadding;
}
public int getX(final int n, final int row) {
@@ -298,7 +298,7 @@ public final class MoreKeysKeyboard extends Keyboard {
height = keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap;
} else {
final float padding = context.getResources().getDimension(
- R.dimen.more_keys_keyboard_key_horizontal_padding)
+ R.dimen.config_more_keys_keyboard_key_horizontal_padding)
+ (parentKey.hasLabelsInMoreKeys()
? mParams.mDefaultKeyWidth * LABEL_PADDING_RATIO : 0.0f);
width = getMaxKeyWidth(parentKey, mParams.mDefaultKeyWidth, padding,
@@ -327,7 +327,7 @@ public final class MoreKeysKeyboard extends Keyboard {
// If the label is single letter, minKeyWidth is enough to hold the label.
if (label != null && StringUtils.codePointCount(label) > 1) {
maxWidth = Math.max(maxWidth,
- (int)(TypefaceUtils.getLabelWidth(label, paint) + padding));
+ (int)(TypefaceUtils.getStringWidth(label, paint) + padding));
}
}
return maxWidth;
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
index 973128d36..a7c468538 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
@@ -52,7 +52,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
final Resources res = context.getResources();
mKeyDetector = new MoreKeysDetector(
- res.getDimension(R.dimen.more_keys_keyboard_slide_allowance));
+ res.getDimension(R.dimen.config_more_keys_keyboard_slide_allowance));
}
@Override
@@ -81,11 +81,13 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
mListener = listener;
final View container = getContainerView();
// The coordinates of panel's left-top corner in parentView's coordinate system.
- final int x = pointX - getDefaultCoordX() - container.getPaddingLeft();
- final int y = pointY - container.getMeasuredHeight() + container.getPaddingBottom();
+ // We need to consider background drawable paddings.
+ final int x = pointX - getDefaultCoordX() - container.getPaddingLeft() - getPaddingLeft();
+ final int y = pointY - container.getMeasuredHeight() + container.getPaddingBottom()
+ + getPaddingBottom();
parentView.getLocationInWindow(mCoordinates);
- // Ensure the horizontal position of the panel does not extend past the screen edges.
+ // Ensure the horizontal position of the panel does not extend past the parentView edges.
final int maxX = parentView.getMeasuredWidth() - container.getMeasuredWidth();
final int panelX = Math.max(0, Math.min(maxX, x)) + CoordinateUtils.x(mCoordinates);
final int panelY = y + CoordinateUtils.y(mCoordinates);
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index 52f190e77..f9e78bfd9 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -55,37 +55,10 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
private static boolean sGestureHandlingEnabledByInputField = false;
private static boolean sGestureHandlingEnabledByUser = false;
- public interface KeyEventHandler {
- /**
- * Get KeyDetector object that is used for this PointerTracker.
- * @return the KeyDetector object that is used for this PointerTracker
- */
- public KeyDetector getKeyDetector();
-
- /**
- * Get KeyboardActionListener object that is used to register key code and so on.
- * @return the KeyboardActionListner for this PointerTracke
- */
- public KeyboardActionListener getKeyboardActionListener();
-
- /**
- * Get DrawingProxy object that is used for this PointerTracker.
- * @return the DrawingProxy object that is used for this PointerTracker
- */
- public DrawingProxy getDrawingProxy();
-
- /**
- * Get TimerProxy object that handles key repeat and long press timer event for this
- * PointerTracker.
- * @return the TimerProxy object that handles key repeat and long press timer event.
- */
- public TimerProxy getTimerProxy();
- }
-
public interface DrawingProxy {
public void invalidateKey(Key key);
- public void showKeyPreview(PointerTracker tracker);
- public void dismissKeyPreview(PointerTracker tracker);
+ public void showKeyPreview(Key key);
+ public void dismissKeyPreview(Key key);
public void showSlidingKeyInputPreview(PointerTracker tracker);
public void dismissSlidingKeyInputPreview();
public void showGestureTrail(PointerTracker tracker, boolean showsFloatingPreviewText);
@@ -94,13 +67,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
public interface TimerProxy {
public void startTypingStateTimer(Key typedKey);
public boolean isTypingState();
- public void startKeyRepeatTimer(PointerTracker tracker, int repeatCount, int delay);
- public void startLongPressTimer(PointerTracker tracker, int delay);
- public void cancelLongPressTimer();
+ public void startKeyRepeatTimerOf(PointerTracker tracker, int repeatCount, int delay);
+ public void startLongPressTimerOf(PointerTracker tracker, int delay);
+ public void cancelLongPressTimerOf(PointerTracker tracker);
+ public void cancelKeyTimersOf(PointerTracker tracker);
public void startDoubleTapShiftKeyTimer();
public void cancelDoubleTapShiftKeyTimer();
public boolean isInDoubleTapShiftKeyTimeout();
- public void cancelKeyTimers();
public void startUpdateBatchInputTimer(PointerTracker tracker);
public void cancelUpdateBatchInputTimer(PointerTracker tracker);
public void cancelAllUpdateBatchInputTimers();
@@ -111,11 +84,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
@Override
public boolean isTypingState() { return false; }
@Override
- public void startKeyRepeatTimer(PointerTracker tracker, int repeatCount, int delay) {}
+ public void startKeyRepeatTimerOf(PointerTracker tracker, int repeatCount, int delay) {}
+ @Override
+ public void startLongPressTimerOf(PointerTracker tracker, int delay) {}
@Override
- public void startLongPressTimer(PointerTracker tracker, int delay) {}
+ public void cancelLongPressTimerOf(PointerTracker tracker) {}
@Override
- public void cancelLongPressTimer() {}
+ public void cancelKeyTimersOf(PointerTracker tracker) {}
@Override
public void startDoubleTapShiftKeyTimer() {}
@Override
@@ -123,8 +98,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
@Override
public boolean isInDoubleTapShiftKeyTimeout() { return false; }
@Override
- public void cancelKeyTimers() {}
- @Override
public void startUpdateBatchInputTimer(PointerTracker tracker) {}
@Override
public void cancelUpdateBatchInputTimer(PointerTracker tracker) {}
@@ -134,7 +107,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
static final class PointerTrackerParams {
- public final boolean mSlidingKeyInputEnabled;
+ public final boolean mKeySelectionByDraggingFinger;
public final int mTouchNoiseThresholdTime;
public final int mTouchNoiseThresholdDistance;
public final int mSuppressKeyPreviewAfterBatchInputDuration;
@@ -142,21 +115,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
public final int mKeyRepeatInterval;
public final int mLongPressShiftLockTimeout;
- public static final PointerTrackerParams DEFAULT = new PointerTrackerParams();
-
- private PointerTrackerParams() {
- mSlidingKeyInputEnabled = false;
- mTouchNoiseThresholdTime = 0;
- mTouchNoiseThresholdDistance = 0;
- mSuppressKeyPreviewAfterBatchInputDuration = 0;
- mKeyRepeatStartTimeout = 0;
- mKeyRepeatInterval = 0;
- mLongPressShiftLockTimeout = 0;
- }
-
public PointerTrackerParams(final TypedArray mainKeyboardViewAttr) {
- mSlidingKeyInputEnabled = mainKeyboardViewAttr.getBoolean(
- R.styleable.MainKeyboardView_slidingKeyInputEnable, false);
+ mKeySelectionByDraggingFinger = mainKeyboardViewAttr.getBoolean(
+ R.styleable.MainKeyboardView_keySelectionByDraggingFinger, false);
mTouchNoiseThresholdTime = mainKeyboardViewAttr.getInt(
R.styleable.MainKeyboardView_touchNoiseThresholdTime, 0);
mTouchNoiseThresholdDistance = mainKeyboardViewAttr.getDimensionPixelSize(
@@ -189,13 +150,14 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
public final int mPointerId;
- private DrawingProxy mDrawingProxy;
- private TimerProxy mTimerProxy;
+ private static DrawingProxy sDrawingProxy;
+ private static TimerProxy sTimerProxy;
+ private static KeyDetector sDefaultKeyDetector;
private KeyDetector mKeyDetector;
- private KeyboardActionListener mListener = KeyboardActionListener.EMPTY_LISTENER;
+ private static KeyboardActionListener sListener = KeyboardActionListener.EMPTY_LISTENER;
private Keyboard mKeyboard;
- private int mPhantonSuddenMoveThreshold;
+ private int mPhantomSuddenMoveThreshold;
private final BogusMoveEventDetector mBogusMoveEventDetector = new BogusMoveEventDetector();
private boolean mIsDetectingGesture = false; // per PointerTracker.
@@ -341,16 +303,16 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
private MoreKeysPanel mMoreKeysPanel;
private static final int MULTIPLIER_FOR_LONG_PRESS_TIMEOUT_IN_SLIDING_INPUT = 3;
- // true if this pointer is in a sliding key input.
- boolean mIsInSlidingKeyInput;
- // true if this pointer is in a sliding key input from a modifier key,
+ // true if this pointer is in the dragging finger mode.
+ boolean mIsInDraggingFinger;
+ // true if this pointer is sliding from a modifier key and in the sliding key input mode,
// so that further modifier keys should be ignored.
- boolean mIsInSlidingKeyInputFromModifier;
+ boolean mIsInSlidingKeyInput;
// if not a NOT_A_CODE, the key of this code is repeating
private int mCurrentRepeatingKeyCode = Constants.NOT_A_CODE;
- // true if a sliding key input is allowed.
- private boolean mIsAllowedSlidingKeyInput;
+ // true if dragging finger is allowed.
+ private boolean mIsAllowedDraggingFinger;
private final GestureStrokeWithPreviewPoints mGestureStrokeWithPreviewPoints;
@@ -377,22 +339,26 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return needsTheHack;
}
- public static void init(final Resources res) {
+ // TODO: Add PointerTrackerFactory singleton and move some class static methods into it.
+ public static void init(final TypedArray mainKeyboardViewAttr, final TimerProxy timerProxy,
+ final DrawingProxy drawingProxy, final KeyDetector defaultKeyDetector) {
+ sParams = new PointerTrackerParams(mainKeyboardViewAttr);
+ sGestureStrokeParams = new GestureStrokeParams(mainKeyboardViewAttr);
+ sGesturePreviewParams = new GestureStrokePreviewParams(mainKeyboardViewAttr);
+ sTimeRecorder = new TimeRecorder(sParams, sGestureStrokeParams);
+
+ final Resources res = mainKeyboardViewAttr.getResources();
sNeedsPhantomSuddenMoveEventHack = Boolean.parseBoolean(
ResourceUtils.getDeviceOverrideValue(
res, R.array.phantom_sudden_move_event_device_list));
sNeedsProximateBogusDownMoveUpEventHack = needsProximateBogusDownMoveUpEventHack(res);
- sParams = PointerTrackerParams.DEFAULT;
sGestureStrokeParams = GestureStrokeParams.DEFAULT;
sGesturePreviewParams = GestureStrokePreviewParams.DEFAULT;
sTimeRecorder = new TimeRecorder(sParams, sGestureStrokeParams);
- }
- public static void setParameters(final TypedArray mainKeyboardViewAttr) {
- sParams = new PointerTrackerParams(mainKeyboardViewAttr);
- sGestureStrokeParams = new GestureStrokeParams(mainKeyboardViewAttr);
- sGesturePreviewParams = new GestureStrokePreviewParams(mainKeyboardViewAttr);
- sTimeRecorder = new TimeRecorder(sParams, sGestureStrokeParams);
+ sTimerProxy = timerProxy;
+ sDrawingProxy = drawingProxy;
+ sDefaultKeyDetector = defaultKeyDetector;
}
private static void updateGestureHandlingMode() {
@@ -413,20 +379,20 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
updateGestureHandlingMode();
}
- public static PointerTracker getPointerTracker(final int id, final KeyEventHandler handler) {
+ public static PointerTracker getPointerTracker(final int id) {
final ArrayList<PointerTracker> trackers = sTrackers;
// Create pointer trackers until we can get 'id+1'-th tracker, if needed.
for (int i = trackers.size(); i <= id; i++) {
- final PointerTracker tracker = new PointerTracker(i, handler);
+ final PointerTracker tracker = new PointerTracker(i);
trackers.add(tracker);
}
return trackers.get(id);
}
- public static boolean isAnyInSlidingKeyInput() {
- return sPointerTrackerQueue.isAnyInSlidingKeyInput();
+ public static boolean isAnyInDraggingFinger() {
+ return sPointerTrackerQueue.isAnyInDraggingFinger();
}
public static void cancelAllPointerTrackers() {
@@ -434,11 +400,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
public static void setKeyboardActionListener(final KeyboardActionListener listener) {
- final int trackersSize = sTrackers.size();
- for (int i = 0; i < trackersSize; ++i) {
- final PointerTracker tracker = sTrackers.get(i);
- tracker.mListener = listener;
- }
+ sListener = listener;
}
public static void setKeyDetector(final KeyDetector keyDetector) {
@@ -446,8 +408,6 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
for (int i = 0; i < trackersSize; ++i) {
final PointerTracker tracker = sTrackers.get(i);
tracker.setKeyDetectorInner(keyDetector);
- // Mark that keyboard layout has been changed.
- tracker.mKeyboardLayoutHasBeenChanged = true;
}
final Keyboard keyboard = keyDetector.getKeyboard();
sGestureHandlingEnabledByInputField = !keyboard.mId.passwordInput();
@@ -458,7 +418,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
final int trackersSize = sTrackers.size();
for (int i = 0; i < trackersSize; ++i) {
final PointerTracker tracker = sTrackers.get(i);
- tracker.setReleasedKeyGraphics(tracker.mCurrentKey);
+ tracker.setReleasedKeyGraphics(tracker.getKey());
}
}
@@ -466,28 +426,15 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
final int trackersSize = sTrackers.size();
for (int i = 0; i < trackersSize; ++i) {
final PointerTracker tracker = sTrackers.get(i);
- if (tracker.isShowingMoreKeysPanel()) {
- tracker.mMoreKeysPanel.dismissMoreKeysPanel();
- tracker.mMoreKeysPanel = null;
- }
+ tracker.dismissMoreKeysPanel();
}
}
- private PointerTracker(final int id, final KeyEventHandler handler) {
- if (handler == null) {
- throw new NullPointerException();
- }
+ private PointerTracker(final int id) {
mPointerId = id;
mGestureStrokeWithPreviewPoints = new GestureStrokeWithPreviewPoints(
id, sGestureStrokeParams, sGesturePreviewParams);
- setKeyEventHandler(handler);
- }
-
- private void setKeyEventHandler(final KeyEventHandler handler) {
- setKeyDetectorInner(handler.getKeyDetector());
- mListener = handler.getKeyboardActionListener();
- mDrawingProxy = handler.getDrawingProxy();
- mTimerProxy = handler.getTimerProxy();
+ setKeyDetectorInner(sDefaultKeyDetector);
}
// Returns true if keyboard has been changed by this callback.
@@ -500,7 +447,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (sInGesture || mIsDetectingGesture || mIsTrackingForActionDisabled) {
return false;
}
- final boolean ignoreModifierKey = mIsInSlidingKeyInput && key.isModifier();
+ final boolean ignoreModifierKey = mIsInDraggingFinger && key.isModifier();
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onPress : %s%s%s%s", mPointerId,
KeyDetector.printableCode(key),
@@ -512,10 +459,10 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return false;
}
if (key.isEnabled()) {
- mListener.onPressKey(key.getCode(), repeatCount, getActivePointerTrackerCount() == 1);
+ sListener.onPressKey(key.getCode(), repeatCount, getActivePointerTrackerCount() == 1);
final boolean keyboardLayoutHasBeenChanged = mKeyboardLayoutHasBeenChanged;
mKeyboardLayoutHasBeenChanged = false;
- mTimerProxy.startTypingStateTimer(key);
+ sTimerProxy.startTypingStateTimer(key);
return keyboardLayoutHasBeenChanged;
}
return false;
@@ -525,8 +472,8 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
// primaryCode is different from {@link Key#mCode}.
private void callListenerOnCodeInput(final Key key, final int primaryCode, final int x,
final int y, final long eventTime) {
- final boolean ignoreModifierKey = mIsInSlidingKeyInput && key.isModifier();
- final boolean altersCode = key.altCodeWhileTyping() && mTimerProxy.isTypingState();
+ final boolean ignoreModifierKey = mIsInDraggingFinger && key.isModifier();
+ final boolean altersCode = key.altCodeWhileTyping() && sTimerProxy.isTypingState();
final int code = altersCode ? key.getAltCode() : primaryCode;
if (DEBUG_LISTENER) {
final String output = code == Constants.CODE_OUTPUT_TEXT
@@ -546,9 +493,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (key.isEnabled() || altersCode) {
sTimeRecorder.onCodeInput(code, eventTime);
if (code == Constants.CODE_OUTPUT_TEXT) {
- mListener.onTextInput(key.getOutputText());
+ sListener.onTextInput(key.getOutputText());
} else if (code != Constants.CODE_UNSPECIFIED) {
- mListener.onCodeInput(code, x, y);
+ sListener.onCodeInput(code, x, y);
}
}
}
@@ -561,7 +508,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (sInGesture || mIsDetectingGesture || mIsTrackingForActionDisabled) {
return;
}
- final boolean ignoreModifierKey = mIsInSlidingKeyInput && key.isModifier();
+ final boolean ignoreModifierKey = mIsInDraggingFinger && key.isModifier();
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onRelease : %s%s%s%s", mPointerId,
Constants.printableCode(primaryCode),
@@ -576,7 +523,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return;
}
if (key.isEnabled()) {
- mListener.onReleaseKey(primaryCode, withSliding);
+ sListener.onReleaseKey(primaryCode, withSliding);
}
}
@@ -584,7 +531,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onFinishSlidingInput", mPointerId));
}
- mListener.onFinishSlidingInput();
+ sListener.onFinishSlidingInput();
}
private void callListenerOnCancelInput() {
@@ -594,7 +541,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.pointerTracker_callListenerOnCancelInput();
}
- mListener.onCancelInput();
+ sListener.onCancelInput();
}
private void setKeyDetectorInner(final KeyDetector keyDetector) {
@@ -604,23 +551,25 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
mKeyDetector = keyDetector;
mKeyboard = keyDetector.getKeyboard();
+ // Mark that keyboard layout has been changed.
+ mKeyboardLayoutHasBeenChanged = true;
final int keyWidth = mKeyboard.mMostCommonKeyWidth;
final int keyHeight = mKeyboard.mMostCommonKeyHeight;
mGestureStrokeWithPreviewPoints.setKeyboardGeometry(keyWidth, mKeyboard.mOccupiedHeight);
final Key newKey = mKeyDetector.detectHitKey(mKeyX, mKeyY);
if (newKey != mCurrentKey) {
- if (mDrawingProxy != null) {
+ if (sDrawingProxy != null) {
setReleasedKeyGraphics(mCurrentKey);
}
// Keep {@link #mCurrentKey} that comes from previous keyboard.
}
- mPhantonSuddenMoveThreshold = (int)(keyWidth * PHANTOM_SUDDEN_MOVE_THRESHOLD);
+ mPhantomSuddenMoveThreshold = (int)(keyWidth * PHANTOM_SUDDEN_MOVE_THRESHOLD);
mBogusMoveEventDetector.setKeyboardGeometry(keyWidth, keyHeight);
}
@Override
- public boolean isInSlidingKeyInput() {
- return mIsInSlidingKeyInput;
+ public boolean isInDraggingFinger() {
+ return mIsInDraggingFinger;
}
public Key getKey() {
@@ -637,7 +586,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
private void setReleasedKeyGraphics(final Key key) {
- mDrawingProxy.dismissKeyPreview(this);
+ sDrawingProxy.dismissKeyPreview(key);
if (key == null) {
return;
}
@@ -678,14 +627,14 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
// Even if the key is disabled, it should respond if it is in the altCodeWhileTyping state.
- final boolean altersCode = key.altCodeWhileTyping() && mTimerProxy.isTypingState();
+ final boolean altersCode = key.altCodeWhileTyping() && sTimerProxy.isTypingState();
final boolean needsToUpdateGraphics = key.isEnabled() || altersCode;
if (!needsToUpdateGraphics) {
return;
}
if (!key.noKeyPreview() && !sInGesture && !needsToSuppressKeyPreviewPopup(eventTime)) {
- mDrawingProxy.showKeyPreview(this);
+ sDrawingProxy.showKeyPreview(key);
}
updatePressKeyGraphics(key);
@@ -697,7 +646,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
}
- if (key.altCodeWhileTyping() && mTimerProxy.isTypingState()) {
+ if (key.altCodeWhileTyping() && sTimerProxy.isTypingState()) {
final int altCode = key.getAltCode();
final Key altKey = mKeyboard.getKey(altCode);
if (altKey != null) {
@@ -711,14 +660,14 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
}
- private void updateReleaseKeyGraphics(final Key key) {
+ private static void updateReleaseKeyGraphics(final Key key) {
key.onReleased();
- mDrawingProxy.invalidateKey(key);
+ sDrawingProxy.invalidateKey(key);
}
- private void updatePressKeyGraphics(final Key key) {
+ private static void updatePressKeyGraphics(final Key key) {
key.onPressed();
- mDrawingProxy.invalidateKey(key);
+ sDrawingProxy.invalidateKey(key);
}
public GestureStrokeWithPreviewPoints getGestureStrokeWithPreviewPoints() {
@@ -766,7 +715,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return newKey;
}
- private static int getActivePointerTrackerCount() {
+ /* package */ static int getActivePointerTrackerCount() {
return sPointerTrackerQueue.size();
}
@@ -789,12 +738,12 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
sAggregratedPointers.reset();
sLastRecognitionPointSize = 0;
sLastRecognitionTime = 0;
- mListener.onStartBatchInput();
+ sListener.onStartBatchInput();
dismissAllMoreKeysPanels();
}
- mTimerProxy.cancelLongPressTimer();
+ sTimerProxy.cancelLongPressTimerOf(this);
// A gesture floating preview text will be shown at the oldest pointer/finger on the screen.
- mDrawingProxy.showGestureTrail(
+ sDrawingProxy.showGestureTrail(
this, isOldestTrackerInQueue() /* showsFloatingPreviewText */);
}
@@ -812,7 +761,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return;
}
// A gesture floating preview text will be shown at the oldest pointer/finger on the screen.
- mDrawingProxy.showGestureTrail(
+ sDrawingProxy.showGestureTrail(
this, isOldestTrackerInQueue() /* showsFloatingPreviewText */);
}
@@ -827,8 +776,8 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
Log.d(TAG, String.format("[%d] onUpdateBatchInput: batchPoints=%d", mPointerId,
size));
}
- mTimerProxy.startUpdateBatchInputTimer(this);
- mListener.onUpdateBatchInput(sAggregratedPointers);
+ sTimerProxy.startUpdateBatchInputTimer(this);
+ sListener.onUpdateBatchInput(sAggregratedPointers);
// The listener may change the size of the pointers (when auto-committing
// for example), so we need to get the size from the pointers again.
sLastRecognitionPointSize = sAggregratedPointers.getPointerSize();
@@ -843,13 +792,13 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (getActivePointerTrackerCount() == 1) {
sInGesture = false;
sTimeRecorder.onEndBatchInput(eventTime);
- mTimerProxy.cancelAllUpdateBatchInputTimers();
+ sTimerProxy.cancelAllUpdateBatchInputTimers();
if (!mIsTrackingForActionDisabled) {
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onEndBatchInput : batchPoints=%d",
mPointerId, sAggregratedPointers.getPointerSize()));
}
- mListener.onEndBatchInput(sAggregratedPointers);
+ sListener.onEndBatchInput(sAggregratedPointers);
}
}
}
@@ -857,7 +806,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return;
}
// A gesture floating preview text will be shown at the oldest pointer/finger on the screen.
- mDrawingProxy.showGestureTrail(
+ sDrawingProxy.showGestureTrail(
this, isOldestTrackerInQueue() /* showsFloatingPreviewText */);
}
@@ -871,19 +820,26 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (DEBUG_LISTENER) {
Log.d(TAG, String.format("[%d] onCancelBatchInput", mPointerId));
}
- mListener.onCancelBatchInput();
+ sListener.onCancelBatchInput();
}
- public void processMotionEvent(final MotionEvent me, final KeyEventHandler handler) {
+ public void processMotionEvent(final MotionEvent me, final KeyDetector keyDetector) {
final int action = me.getActionMasked();
final long eventTime = me.getEventTime();
if (action == MotionEvent.ACTION_MOVE) {
+ // When this pointer is the only active pointer and is showing a more keys panel,
+ // we should ignore other pointers' motion event.
+ final boolean shouldIgnoreOtherPointers =
+ isShowingMoreKeysPanel() && getActivePointerTrackerCount() == 1;
final int pointerCount = me.getPointerCount();
for (int index = 0; index < pointerCount; index++) {
final int id = me.getPointerId(index);
- final PointerTracker tracker = getPointerTracker(id, handler);
+ if (shouldIgnoreOtherPointers && id != mPointerId) {
+ continue;
+ }
final int x = (int)me.getX(index);
final int y = (int)me.getY(index);
+ final PointerTracker tracker = getPointerTracker(id);
tracker.onMoveEvent(x, y, eventTime, me);
}
return;
@@ -894,7 +850,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
switch (action) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_POINTER_DOWN:
- onDownEvent(x, y, eventTime, handler);
+ onDownEvent(x, y, eventTime, keyDetector);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
@@ -907,11 +863,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
private void onDownEvent(final int x, final int y, final long eventTime,
- final KeyEventHandler handler) {
+ final KeyDetector keyDetector) {
if (DEBUG_EVENT) {
printTouchEvent("onDownEvent:", x, y, eventTime);
}
- setKeyEventHandler(handler);
+ setKeyDetectorInner(keyDetector);
// Naive up-to-down noise filter.
final long deltaT = eventTime - mUpTime;
if (deltaT < sParams.mTouchNoiseThresholdTime) {
@@ -954,20 +910,29 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
}
- private boolean isShowingMoreKeysPanel() {
+ /* package */ boolean isShowingMoreKeysPanel() {
return (mMoreKeysPanel != null);
}
+ private void dismissMoreKeysPanel() {
+ if (isShowingMoreKeysPanel()) {
+ mMoreKeysPanel.dismissMoreKeysPanel();
+ mMoreKeysPanel = null;
+ }
+ }
+
private void onDownEventInternal(final int x, final int y, final long eventTime) {
Key key = onDownKey(x, y, eventTime);
- // Sliding key is allowed when 1) enabled by configuration, 2) this pointer starts sliding
- // from modifier key, or 3) this pointer's KeyDetector always allows sliding input.
- mIsAllowedSlidingKeyInput = sParams.mSlidingKeyInputEnabled
+ // Key selection by dragging finger is allowed when 1) key selection by dragging finger is
+ // enabled by configuration, 2) this pointer starts dragging from modifier key, or 3) this
+ // pointer's KeyDetector always allows key selection by dragging finger, such as
+ // {@link MoreKeysKeyboard}.
+ mIsAllowedDraggingFinger = sParams.mKeySelectionByDraggingFinger
|| (key != null && key.isModifier())
- || mKeyDetector.alwaysAllowsSlidingInput();
+ || mKeyDetector.alwaysAllowsKeySelectionByDraggingFinger();
mKeyboardLayoutHasBeenChanged = false;
mIsTrackingForActionDisabled = false;
- resetSlidingKeyInput();
+ resetKeySelectionByDraggingFinger();
if (key != null) {
// This onPress call may have changed keyboard layout. Those cases are detected at
// {@link #setKeyboard}. In those cases, we should update key according to the new
@@ -982,17 +947,17 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
}
- private void startSlidingKeyInput(final Key key) {
- if (!mIsInSlidingKeyInput) {
- mIsInSlidingKeyInputFromModifier = key.isModifier();
+ private void startKeySelectionByDraggingFinger(final Key key) {
+ if (!mIsInDraggingFinger) {
+ mIsInSlidingKeyInput = key.isModifier();
}
- mIsInSlidingKeyInput = true;
+ mIsInDraggingFinger = true;
}
- private void resetSlidingKeyInput() {
+ private void resetKeySelectionByDraggingFinger() {
+ mIsInDraggingFinger = false;
mIsInSlidingKeyInput = false;
- mIsInSlidingKeyInputFromModifier = false;
- mDrawingProxy.dismissSlidingKeyInputPreview();
+ sDrawingProxy.dismissSlidingKeyInputPreview();
}
private void onGestureMoveEvent(final int x, final int y, final long eventTime,
@@ -1003,7 +968,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
final boolean onValidArea = mGestureStrokeWithPreviewPoints.addPointOnKeyboard(
x, y, gestureTime, isMajorEvent);
if (mGestureStrokeWithPreviewPoints.getLength() > beforeLength) {
- mTimerProxy.startUpdateBatchInputTimer(this);
+ sTimerProxy.startUpdateBatchInputTimer(this);
}
// If the move event goes out from valid batch input area, cancel batch input.
if (!onValidArea) {
@@ -1048,15 +1013,15 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
final int translatedY = mMoreKeysPanel.translateY(y);
mMoreKeysPanel.onMoveEvent(translatedX, translatedY, mPointerId, eventTime);
onMoveKey(x, y);
- if (mIsInSlidingKeyInputFromModifier) {
- mDrawingProxy.showSlidingKeyInputPreview(this);
+ if (mIsInSlidingKeyInput) {
+ sDrawingProxy.showSlidingKeyInputPreview(this);
}
return;
}
onMoveEventInternal(x, y, eventTime);
}
- private void processSlidingKeyInput(final Key newKey, final int x, final int y,
+ private void processDraggingFingerInToNewKey(final Key newKey, final int x, final int y,
final long eventTime) {
// This onPress call may have changed keyboard layout. Those cases are detected
// at {@link #setKeyboard}. In those cases, we should update key according
@@ -1110,29 +1075,29 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
onDownEventInternal(x, y, eventTime);
}
- private void processSildeOutFromOldKey(final Key oldKey) {
+ private void processDraggingFingerOutFromOldKey(final Key oldKey) {
setReleasedKeyGraphics(oldKey);
callListenerOnRelease(oldKey, oldKey.getCode(), true /* withSliding */);
- startSlidingKeyInput(oldKey);
- mTimerProxy.cancelKeyTimers();
+ startKeySelectionByDraggingFinger(oldKey);
+ sTimerProxy.cancelKeyTimersOf(this);
}
- private void slideFromOldKeyToNewKey(final Key key, final int x, final int y,
+ private void dragFingerFromOldKeyToNewKey(final Key key, final int x, final int y,
final long eventTime, final Key oldKey, final int lastX, final int lastY) {
// The pointer has been slid in to the new key from the previous key, we must call
// onRelease() first to notify that the previous key has been released, then call
// onPress() to notify that the new key is being pressed.
- processSildeOutFromOldKey(oldKey);
+ processDraggingFingerOutFromOldKey(oldKey);
startRepeatKey(key);
- if (mIsAllowedSlidingKeyInput) {
- processSlidingKeyInput(key, x, y, eventTime);
+ if (mIsAllowedDraggingFinger) {
+ processDraggingFingerInToNewKey(key, x, y, eventTime);
}
// HACK: On some devices, quick successive touches may be reported as a sudden move by
// touch panel firmware. This hack detects such cases and translates the move event to
// successive up and down events.
// TODO: Should find a way to balance gesture detection and this hack.
else if (sNeedsPhantomSuddenMoveEventHack
- && getDistance(x, y, lastX, lastY) >= mPhantonSuddenMoveThreshold) {
+ && getDistance(x, y, lastX, lastY) >= mPhantomSuddenMoveThreshold) {
processPhantomSuddenMoveHack(key, x, y, eventTime, oldKey, lastX, lastY);
}
// HACK: On some devices, quick successive proximate touches may be reported as a bogus
@@ -1163,11 +1128,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
}
- private void slideOutFromOldKey(final Key oldKey, final int x, final int y) {
+ private void dragFingerOutFromOldKey(final Key oldKey, final int x, final int y) {
// The pointer has been slid out from the previous key, we must call onRelease() to
// notify that the previous key has been released.
- processSildeOutFromOldKey(oldKey);
- if (mIsAllowedSlidingKeyInput) {
+ processDraggingFingerOutFromOldKey(oldKey);
+ if (mIsAllowedDraggingFinger) {
onMoveToNewKey(null, x, y);
} else {
if (!mIsDetectingGesture) {
@@ -1194,19 +1159,19 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (newKey != null) {
if (oldKey != null && isMajorEnoughMoveToBeOnNewKey(x, y, eventTime, newKey)) {
- slideFromOldKeyToNewKey(newKey, x, y, eventTime, oldKey, lastX, lastY);
+ dragFingerFromOldKeyToNewKey(newKey, x, y, eventTime, oldKey, lastX, lastY);
} else if (oldKey == null) {
// The pointer has been slid in to the new key, but the finger was not on any keys.
// In this case, we must call onPress() to notify that the new key is being pressed.
- processSlidingKeyInput(newKey, x, y, eventTime);
+ processDraggingFingerInToNewKey(newKey, x, y, eventTime);
}
} else { // newKey == null
if (oldKey != null && isMajorEnoughMoveToBeOnNewKey(x, y, eventTime, newKey)) {
- slideOutFromOldKey(oldKey, x, y);
+ dragFingerOutFromOldKey(oldKey, x, y);
}
}
- if (mIsInSlidingKeyInputFromModifier) {
- mDrawingProxy.showSlidingKeyInputPreview(this);
+ if (mIsInSlidingKeyInput) {
+ sDrawingProxy.showSlidingKeyInputPreview(this);
}
}
@@ -1215,7 +1180,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
printTouchEvent("onUpEvent :", x, y, eventTime);
}
- mTimerProxy.cancelUpdateBatchInputTimer(this);
+ sTimerProxy.cancelUpdateBatchInputTimer(this);
if (!sInGesture) {
if (mCurrentKey != null && mCurrentKey.isModifier()) {
// Before processing an up event of modifier key, all pointers already being
@@ -1237,18 +1202,15 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (DEBUG_EVENT) {
printTouchEvent("onPhntEvent:", mLastX, mLastY, eventTime);
}
- if (isShowingMoreKeysPanel()) {
- return;
- }
onUpEventInternal(mLastX, mLastY, eventTime);
cancelTrackingForAction();
}
private void onUpEventInternal(final int x, final int y, final long eventTime) {
- mTimerProxy.cancelKeyTimers();
+ sTimerProxy.cancelKeyTimersOf(this);
+ final boolean isInDraggingFinger = mIsInDraggingFinger;
final boolean isInSlidingKeyInput = mIsInSlidingKeyInput;
- final boolean isInSlidingKeyInputFromModifier = mIsInSlidingKeyInputFromModifier;
- resetSlidingKeyInput();
+ resetKeySelectionByDraggingFinger();
mIsDetectingGesture = false;
final Key currentKey = mCurrentKey;
mCurrentKey = null;
@@ -1280,11 +1242,11 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
return;
}
if (currentKey != null && currentKey.isRepeatable()
- && (currentKey.getCode() == currentRepeatingKeyCode) && !isInSlidingKeyInput) {
+ && (currentKey.getCode() == currentRepeatingKeyCode) && !isInDraggingFinger) {
return;
}
detectAndSendKey(currentKey, mKeyX, mKeyY, eventTime);
- if (isInSlidingKeyInputFromModifier) {
+ if (isInSlidingKeyInput) {
callListenerOnFinishSlidingInput();
}
}
@@ -1306,7 +1268,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
public void onLongPressed() {
- resetSlidingKeyInput();
+ resetKeySelectionByDraggingFinger();
cancelTrackingForAction();
setReleasedKeyGraphics(mCurrentKey);
sPointerTrackerQueue.remove(this);
@@ -1324,9 +1286,9 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
private void onCancelEventInternal() {
- mTimerProxy.cancelKeyTimers();
+ sTimerProxy.cancelKeyTimersOf(this);
setReleasedKeyGraphics(mCurrentKey);
- resetSlidingKeyInput();
+ resetKeySelectionByDraggingFinger();
if (isShowingMoreKeysPanel()) {
mMoreKeysPanel.dismissMoreKeysPanel();
mMoreKeysPanel = null;
@@ -1347,7 +1309,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
// Here curKey points to the different key from newKey.
final int keyHysteresisDistanceSquared = mKeyDetector.getKeyHysteresisDistanceSquared(
- mIsInSlidingKeyInputFromModifier);
+ mIsInSlidingKeyInput);
final int distanceFromKeyEdgeSquared = curKey.squaredDistanceToEdge(x, y);
if (distanceFromKeyEdgeSquared >= keyHysteresisDistanceSquared) {
if (DEBUG_MODE) {
@@ -1358,7 +1320,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
}
return true;
}
- if (sNeedsProximateBogusDownMoveUpEventHack && !mIsAllowedSlidingKeyInput
+ if (sNeedsProximateBogusDownMoveUpEventHack && !mIsAllowedDraggingFinger
&& sTimeRecorder.isInFastTyping(eventTime)
&& mBogusMoveEventDetector.hasTraveledLongDistance(x, y)) {
if (DEBUG_MODE) {
@@ -1380,26 +1342,26 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (key == null) return;
if (!key.isLongPressEnabled()) return;
// Caveat: Please note that isLongPressEnabled() can be true even if the current key
- // doesn't have its more keys. (e.g. spacebar, globe key)
+ // doesn't have its more keys. (e.g. spacebar, globe key) If we are in the dragging finger
+ // mode, we will disable long press timer of such key.
// We always need to start the long press timer if the key has its more keys regardless of
- // whether or not we are in the sliding input mode.
- if (mIsInSlidingKeyInput && key.getMoreKeys() == null) return;
- final int delay;
- switch (key.getCode()) {
- case Constants.CODE_SHIFT:
- delay = sParams.mLongPressShiftLockTimeout;
- break;
- default:
- final int longpressTimeout = Settings.getInstance().getCurrent().mKeyLongpressTimeout;
- if (mIsInSlidingKeyInputFromModifier) {
- // We use longer timeout for sliding finger input started from the modifier key.
- delay = longpressTimeout * MULTIPLIER_FOR_LONG_PRESS_TIMEOUT_IN_SLIDING_INPUT;
- } else {
- delay = longpressTimeout;
- }
- break;
+ // whether or not we are in the dragging finger mode.
+ if (mIsInDraggingFinger && key.getMoreKeys() == null) return;
+
+ final int delay = getLongPressTimeout(key.getCode());
+ sTimerProxy.startLongPressTimerOf(this, delay);
+ }
+
+ private int getLongPressTimeout(final int code) {
+ if (code == Constants.CODE_SHIFT) {
+ return sParams.mLongPressShiftLockTimeout;
+ }
+ final int longpressTimeout = Settings.getInstance().getCurrent().mKeyLongpressTimeout;
+ if (mIsInSlidingKeyInput) {
+ // We use longer timeout for sliding finger input started from the modifier key.
+ return longpressTimeout * MULTIPLIER_FOR_LONG_PRESS_TIMEOUT_IN_SLIDING_INPUT;
}
- mTimerProxy.startLongPressTimer(this, delay);
+ return longpressTimeout;
}
private void detectAndSendKey(final Key key, final int x, final int y, final long eventTime) {
@@ -1417,10 +1379,10 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
if (sInGesture) return;
if (key == null) return;
if (!key.isRepeatable()) return;
- // Don't start key repeat when we are in sliding input mode.
- if (mIsInSlidingKeyInput) return;
+ // Don't start key repeat when we are in the dragging finger mode.
+ if (mIsInDraggingFinger) return;
final int startRepeatCount = 1;
- mTimerProxy.startKeyRepeatTimer(this, startRepeatCount, sParams.mKeyRepeatStartTimeout);
+ startKeyRepeatTimer(startRepeatCount);
}
public void onKeyRepeat(final int code, final int repeatCount) {
@@ -1432,11 +1394,17 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
mCurrentRepeatingKeyCode = code;
mIsDetectingGesture = false;
final int nextRepeatCount = repeatCount + 1;
- mTimerProxy.startKeyRepeatTimer(this, nextRepeatCount, sParams.mKeyRepeatInterval);
+ startKeyRepeatTimer(nextRepeatCount);
callListenerOnPressAndCheckKeyboardLayoutChange(key, repeatCount);
callListenerOnCodeInput(key, code, mKeyX, mKeyY, SystemClock.uptimeMillis());
}
+ private void startKeyRepeatTimer(final int repeatCount) {
+ final int delay =
+ (repeatCount == 1) ? sParams.mKeyRepeatStartTimeout : sParams.mKeyRepeatInterval;
+ sTimerProxy.startKeyRepeatTimerOf(this, repeatCount, delay);
+ }
+
private void printTouchEvent(final String title, final int x, final int y,
final long eventTime) {
final Key key = mKeyDetector.detectHitKey(x, y);
diff --git a/java/src/com/android/inputmethod/keyboard/internal/CustomViewPager.java b/java/src/com/android/inputmethod/keyboard/internal/CustomViewPager.java
new file mode 100644
index 000000000..f5cc45ca7
--- /dev/null
+++ b/java/src/com/android/inputmethod/keyboard/internal/CustomViewPager.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.internal;
+
+import android.content.Context;
+import android.support.v4.view.ViewPager;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.MotionEvent;
+
+/**
+ * Custom view pager to prevent {@link ViewPager} from crashing while handling multi-touch
+ * event.
+ */
+public class CustomViewPager extends ViewPager {
+ private static final String TAG = CustomViewPager.class.getSimpleName();
+
+ public CustomViewPager(final Context context, final AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(final MotionEvent event) {
+ // This only happens when you multi-touch, take the first finger off and move.
+ // Unfortunately this causes {@link ViewPager} to crash, so we will ignore such events.
+ if (event.getAction() == MotionEvent.ACTION_MOVE && event.getPointerId(0) != 0) {
+ Log.w(TAG, "Ignored multi-touch move event to prevent ViewPager from crashing");
+ return false;
+ }
+
+ return super.onInterceptTouchEvent(event);
+ }
+}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/DrawingHandler.java b/java/src/com/android/inputmethod/keyboard/internal/DrawingHandler.java
new file mode 100644
index 000000000..df82becae
--- /dev/null
+++ b/java/src/com/android/inputmethod/keyboard/internal/DrawingHandler.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.internal;
+
+import android.os.Message;
+
+import com.android.inputmethod.keyboard.Key;
+import com.android.inputmethod.keyboard.internal.DrawingHandler.Callbacks;
+import com.android.inputmethod.latin.SuggestedWords;
+import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
+
+// TODO: Separate this class into KeyPreviewHandler and BatchInputPreviewHandler or so.
+public class DrawingHandler extends LeakGuardHandlerWrapper<Callbacks> {
+ public interface Callbacks {
+ public void dismissKeyPreviewWithoutDelay(Key key);
+ public void dismissAllKeyPreviews();
+ public void showGestureFloatingPreviewText(SuggestedWords suggestedWords);
+ }
+
+ private static final int MSG_DISMISS_KEY_PREVIEW = 0;
+ private static final int MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;
+
+ public DrawingHandler(final Callbacks ownerInstance) {
+ super(ownerInstance);
+ }
+
+ @Override
+ public void handleMessage(final Message msg) {
+ final Callbacks callbacks = getOwnerInstance();
+ if (callbacks == null) {
+ return;
+ }
+ switch (msg.what) {
+ case MSG_DISMISS_KEY_PREVIEW:
+ callbacks.dismissKeyPreviewWithoutDelay((Key)msg.obj);
+ break;
+ case MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT:
+ callbacks.showGestureFloatingPreviewText(SuggestedWords.EMPTY);
+ break;
+ }
+ }
+
+ public void dismissKeyPreview(final long delay, final Key key) {
+ sendMessageDelayed(obtainMessage(MSG_DISMISS_KEY_PREVIEW, key), delay);
+ }
+
+ private void cancelAllDismissKeyPreviews() {
+ removeMessages(MSG_DISMISS_KEY_PREVIEW);
+ final Callbacks callbacks = getOwnerInstance();
+ if (callbacks == null) {
+ return;
+ }
+ callbacks.dismissAllKeyPreviews();
+ }
+
+ public void dismissGestureFloatingPreviewText(final long delay) {
+ sendMessageDelayed(obtainMessage(MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT), delay);
+ }
+
+ public void cancelAllMessages() {
+ cancelAllDismissKeyPreviews();
+ }
+}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/DynamicGridKeyboard.java b/java/src/com/android/inputmethod/keyboard/internal/DynamicGridKeyboard.java
index 3133e54be..e2fd39017 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/DynamicGridKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/DynamicGridKeyboard.java
@@ -25,7 +25,7 @@ import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.utils.CollectionUtils;
-import com.android.inputmethod.latin.utils.StringUtils;
+import com.android.inputmethod.latin.utils.JsonUtils;
import java.util.ArrayDeque;
import java.util.ArrayList;
@@ -53,7 +53,7 @@ public class DynamicGridKeyboard extends Keyboard {
private Key[] mCachedGridKeys;
public DynamicGridKeyboard(final SharedPreferences prefs, final Keyboard templateKeyboard,
- final int maxKeyCount, final int categoryId, final int categoryPageId) {
+ final int maxKeyCount, final int categoryId) {
super(templateKeyboard);
final Key key0 = getTemplateKey(TEMPLATE_KEY_CODE_0);
final Key key1 = getTemplateKey(TEMPLATE_KEY_CODE_1);
@@ -124,7 +124,7 @@ public class DynamicGridKeyboard extends Keyboard {
final int keyY0 = getKeyY0(index);
final int keyX1 = getKeyX1(index);
final int keyY1 = getKeyY1(index);
- gridKey.updateCorrdinates(keyX0, keyY0, keyX1, keyY1);
+ gridKey.updateCoordinates(keyX0, keyY0, keyX1, keyY1);
index++;
}
}
@@ -139,36 +139,48 @@ public class DynamicGridKeyboard extends Keyboard {
keys.add(key.getCode());
}
}
- final String jsonStr = StringUtils.listToJsonStr(keys);
+ final String jsonStr = JsonUtils.listToJsonStr(keys);
Settings.writeEmojiRecentKeys(mPrefs, jsonStr);
}
- private static Key getKey(final Collection<DynamicGridKeyboard> keyboards, final Object o) {
+ private static Key getKeyByCode(final Collection<DynamicGridKeyboard> keyboards,
+ final int code) {
+ for (final DynamicGridKeyboard keyboard : keyboards) {
+ final Key key = keyboard.getKey(code);
+ if (key != null) {
+ return key;
+ }
+ }
+ return null;
+ }
+
+ private static Key getKeyByOutputText(final Collection<DynamicGridKeyboard> keyboards,
+ final String outputText) {
for (final DynamicGridKeyboard kbd : keyboards) {
- if (o instanceof Integer) {
- final int code = (Integer) o;
- final Key key = kbd.getKey(code);
- if (key != null) {
- return key;
- }
- } else if (o instanceof String) {
- final String outputText = (String) o;
- final Key key = kbd.getKeyFromOutputText(outputText);
- if (key != null) {
- return key;
- }
- } else {
- Log.w(TAG, "Invalid object: " + o);
+ final Key key = kbd.getKeyFromOutputText(outputText);
+ if (key != null) {
+ return key;
}
}
return null;
}
- public void loadRecentKeys(Collection<DynamicGridKeyboard> keyboards) {
+ public void loadRecentKeys(final Collection<DynamicGridKeyboard> keyboards) {
final String str = Settings.readEmojiRecentKeys(mPrefs);
- final List<Object> keys = StringUtils.jsonStrToList(str);
+ final List<Object> keys = JsonUtils.jsonStrToList(str);
for (final Object o : keys) {
- addKeyLast(getKey(keyboards, o));
+ final Key key;
+ if (o instanceof Integer) {
+ final int code = (Integer)o;
+ key = getKeyByCode(keyboards, code);
+ } else if (o instanceof String) {
+ final String outputText = (String)o;
+ key = getKeyByOutputText(keyboards, outputText);
+ } else {
+ Log.w(TAG, "Invalid object: " + o);
+ continue;
+ }
+ addKeyLast(key);
}
}
@@ -217,7 +229,7 @@ public class DynamicGridKeyboard extends Keyboard {
super(originalKey);
}
- public void updateCorrdinates(final int x0, final int y0, final int x1, final int y1) {
+ public void updateCoordinates(final int x0, final int y0, final int x1, final int y1) {
mCurrentX = x0;
mCurrentY = y0;
getHitBox().set(x0, y0, x1, y1);
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiLayoutParams.java b/java/src/com/android/inputmethod/keyboard/internal/EmojiLayoutParams.java
index ceb44e79f..12e063261 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiLayoutParams.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/EmojiLayoutParams.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.inputmethod.keyboard;
+package com.android.inputmethod.keyboard.internal;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.utils.ResourceUtils;
@@ -37,22 +37,22 @@ public class EmojiLayoutParams {
private final int mBottomPadding;
private final int mTopPadding;
- public EmojiLayoutParams(Resources res) {
+ public EmojiLayoutParams(final Resources res) {
final int defaultKeyboardHeight = ResourceUtils.getDefaultKeyboardHeight(res);
final int defaultKeyboardWidth = ResourceUtils.getDefaultKeyboardWidth(res);
- mKeyVerticalGap = (int) res.getFraction(R.fraction.key_bottom_gap_ics,
- (int) defaultKeyboardHeight, (int) defaultKeyboardHeight);
- mBottomPadding = (int) res.getFraction(R.fraction.keyboard_bottom_padding_ics,
- (int) defaultKeyboardHeight, (int) defaultKeyboardHeight);
- mTopPadding = (int) res.getFraction(R.fraction.keyboard_top_padding_ics,
- (int) defaultKeyboardHeight, (int) defaultKeyboardHeight);
- mKeyHorizontalGap = (int) (res.getFraction(R.fraction.key_horizontal_gap_ics,
+ mKeyVerticalGap = (int) res.getFraction(R.fraction.config_key_vertical_gap_holo,
+ defaultKeyboardHeight, defaultKeyboardHeight);
+ mBottomPadding = (int) res.getFraction(R.fraction.config_keyboard_bottom_padding_holo,
+ defaultKeyboardHeight, defaultKeyboardHeight);
+ mTopPadding = (int) res.getFraction(R.fraction.config_keyboard_top_padding_holo,
+ defaultKeyboardHeight, defaultKeyboardHeight);
+ mKeyHorizontalGap = (int) (res.getFraction(R.fraction.config_key_horizontal_gap_holo,
defaultKeyboardWidth, defaultKeyboardWidth));
mEmojiCategoryPageIdViewHeight =
- (int) (res.getDimension(R.dimen.emoji_category_page_id_height));
+ (int) (res.getDimension(R.dimen.config_emoji_category_page_id_height));
final int baseheight = defaultKeyboardHeight - mBottomPadding - mTopPadding
+ mKeyVerticalGap;
- mEmojiActionBarHeight = ((int) baseheight) / DEFAULT_KEYBOARD_ROWS
+ mEmojiActionBarHeight = baseheight / DEFAULT_KEYBOARD_ROWS
- (mKeyVerticalGap - mBottomPadding) / 2;
mEmojiPagerHeight = defaultKeyboardHeight - mEmojiActionBarHeight
- mEmojiCategoryPageIdViewHeight;
@@ -60,26 +60,26 @@ public class EmojiLayoutParams {
mEmojiKeyboardHeight = mEmojiPagerHeight - mEmojiPagerBottomMargin - 1;
}
- public void setPagerProperties(ViewPager vp) {
+ public void setPagerProperties(final ViewPager vp) {
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) vp.getLayoutParams();
lp.height = mEmojiKeyboardHeight;
lp.bottomMargin = mEmojiPagerBottomMargin;
vp.setLayoutParams(lp);
}
- public void setCategoryPageIdViewProperties(LinearLayout ll) {
+ public void setCategoryPageIdViewProperties(final LinearLayout ll) {
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ll.getLayoutParams();
lp.height = mEmojiCategoryPageIdViewHeight;
ll.setLayoutParams(lp);
}
- public void setActionBarProperties(LinearLayout ll) {
+ public void setActionBarProperties(final LinearLayout ll) {
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ll.getLayoutParams();
lp.height = mEmojiActionBarHeight - mBottomPadding;
ll.setLayoutParams(lp);
}
- public void setKeyProperties(ImageView ib) {
+ public void setKeyProperties(final ImageView ib) {
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ib.getLayoutParams();
lp.leftMargin = mKeyHorizontalGap / 2;
lp.rightMargin = mKeyHorizontalGap / 2;
diff --git a/java/src/com/android/inputmethod/keyboard/internal/ScrollKeyboardView.java b/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java
index 9cf68d43d..5a996ff53 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/ScrollKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/EmojiPageKeyboardView.java
@@ -20,25 +20,21 @@ import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
-import android.widget.ScrollView;
-import android.widget.Scroller;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardView;
+import com.android.inputmethod.keyboard.PointerTracker;
import com.android.inputmethod.latin.R;
/**
- * This is an extended {@link KeyboardView} class that hosts a vertical scroll keyboard.
+ * This is an extended {@link KeyboardView} class that hosts an emoji page keyboard.
* Multi-touch unsupported. No {@link PointerTracker}s. No gesture support.
- * TODO: Vertical scroll capability should be removed from this class because it's no longer used.
*/
// TODO: Implement key popup preview.
-public final class ScrollKeyboardView extends KeyboardView implements
- ScrollViewWithNotifier.ScrollListener, GestureDetector.OnGestureListener {
- private static final boolean PAGINATION = false;
-
+public final class EmojiPageKeyboardView extends KeyboardView implements
+ GestureDetector.OnGestureListener {
public interface OnKeyClickListener {
public void onKeyClick(Key key);
}
@@ -52,63 +48,15 @@ public final class ScrollKeyboardView extends KeyboardView implements
private final KeyDetector mKeyDetector = new KeyDetector(0.0f /*keyHysteresisDistance */);
private final GestureDetector mGestureDetector;
- private final Scroller mScroller;
- private ScrollViewWithNotifier mScrollView;
-
- public ScrollKeyboardView(final Context context, final AttributeSet attrs) {
+ public EmojiPageKeyboardView(final Context context, final AttributeSet attrs) {
this(context, attrs, R.attr.keyboardViewStyle);
}
- public ScrollKeyboardView(final Context context, final AttributeSet attrs, final int defStyle) {
+ public EmojiPageKeyboardView(final Context context, final AttributeSet attrs,
+ final int defStyle) {
super(context, attrs, defStyle);
mGestureDetector = new GestureDetector(context, this);
mGestureDetector.setIsLongpressEnabled(false /* isLongpressEnabled */);
- mScroller = new Scroller(context);
- }
-
- public void setScrollView(final ScrollViewWithNotifier scrollView) {
- mScrollView = scrollView;
- scrollView.setScrollListener(this);
- }
-
- private final Runnable mScrollTask = new Runnable() {
- @Override
- public void run() {
- final Scroller scroller = mScroller;
- final ScrollView scrollView = mScrollView;
- scroller.computeScrollOffset();
- scrollView.scrollTo(0, scroller.getCurrY());
- if (!scroller.isFinished()) {
- scrollView.post(this);
- }
- }
- };
-
- // {@link ScrollViewWithNotified#ScrollListener} methods.
- @Override
- public void notifyScrollChanged(final int scrollX, final int scrollY, final int oldX,
- final int oldY) {
- if (PAGINATION) {
- mScroller.forceFinished(true /* finished */);
- mScrollView.removeCallbacks(mScrollTask);
- final int currentTop = mScrollView.getScrollY();
- final int pageHeight = getKeyboard().mBaseHeight;
- final int lastPageNo = currentTop / pageHeight;
- final int lastPageTop = lastPageNo * pageHeight;
- final int nextPageNo = lastPageNo + 1;
- final int nextPageTop = Math.min(nextPageNo * pageHeight, getHeight() - pageHeight);
- final int scrollTo = (currentTop - lastPageTop) < (nextPageTop - currentTop)
- ? lastPageTop : nextPageTop;
- final int deltaY = scrollTo - currentTop;
- mScroller.startScroll(0, currentTop, 0, deltaY, 300);
- mScrollView.post(mScrollTask);
- }
- }
-
- @Override
- public void notifyOverScrolled(final int scrollX, final int scrollY, final boolean clampedX,
- final boolean clampedY) {
- releaseCurrentKey();
}
public void setOnKeyClickListener(final OnKeyClickListener listener) {
diff --git a/java/src/com/android/inputmethod/keyboard/internal/GestureTrailsPreview.java b/java/src/com/android/inputmethod/keyboard/internal/GestureTrailsPreview.java
index 19e995548..8b413e5e2 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/GestureTrailsPreview.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/GestureTrailsPreview.java
@@ -31,7 +31,7 @@ import android.view.View;
import com.android.inputmethod.keyboard.PointerTracker;
import com.android.inputmethod.keyboard.internal.GestureTrail.Params;
import com.android.inputmethod.latin.utils.CollectionUtils;
-import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
+import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
/**
* Draw gesture trail preview graphics during gesture.
@@ -52,21 +52,23 @@ public final class GestureTrailsPreview extends AbstractDrawingPreview {
private final DrawingHandler mDrawingHandler;
private static final class DrawingHandler
- extends StaticInnerHandlerWrapper<GestureTrailsPreview> {
+ extends LeakGuardHandlerWrapper<GestureTrailsPreview> {
private static final int MSG_UPDATE_GESTURE_TRAIL = 0;
private final Params mGestureTrailParams;
- public DrawingHandler(final GestureTrailsPreview outerInstance,
+ public DrawingHandler(final GestureTrailsPreview ownerInstance,
final Params gestureTrailParams) {
- super(outerInstance);
+ super(ownerInstance);
mGestureTrailParams = gestureTrailParams;
}
@Override
public void handleMessage(final Message msg) {
- final GestureTrailsPreview preview = getOuterInstance();
- if (preview == null) return;
+ final GestureTrailsPreview preview = getOwnerInstance();
+ if (preview == null) {
+ return;
+ }
switch (msg.what) {
case MSG_UPDATE_GESTURE_TRAIL:
preview.getDrawingView().invalidate();
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java
index 22f5b3dd1..accfaedcb 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeySpecParser.java
@@ -78,10 +78,10 @@ public final class KeySpecParser {
* or has no key specifications.
*/
public static String[] splitKeySpecs(final String text) {
- final int size = text.length();
- if (size == 0) {
+ if (TextUtils.isEmpty(text)) {
return null;
}
+ final int size = text.length();
// Optimization for one-letter key specification.
if (size == 1) {
return text.charAt(0) == COMMA ? null : new String[] { text };
@@ -380,6 +380,9 @@ public final class KeySpecParser {
public static String resolveTextReference(final String rawText,
final KeyboardTextsSet textsSet) {
+ if (TextUtils.isEmpty(rawText)) {
+ return null;
+ }
int level = 0;
String text = rawText;
StringBuilder sb;
@@ -392,7 +395,7 @@ public final class KeySpecParser {
final int prefixLen = PREFIX_TEXT.length();
final int size = text.length();
if (size < prefixLen) {
- return text;
+ return TextUtils.isEmpty(text) ? null : text;
}
sb = null;
@@ -421,7 +424,7 @@ public final class KeySpecParser {
text = sb.toString();
}
} while (sb != null);
- return text;
+ return TextUtils.isEmpty(text) ? null : text;
}
private static int searchTextNameEnd(final String text, final int start) {
@@ -483,7 +486,7 @@ public final class KeySpecParser {
public static int toUpperCaseOfCodeForLocale(final int code, final boolean needsToUpperCase,
final Locale locale) {
if (!Constants.isLetterCode(code) || !needsToUpperCase) return code;
- final String text = new String(new int[] { code } , 0, 1);
+ final String text = StringUtils.newSingleCodePointString(code);
final String casedText = KeySpecParser.toUpperCaseOfStringForLocale(
text, needsToUpperCase, locale);
return StringUtils.codePointCount(casedText) == 1
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java
index 05d855e31..f7e43a6c2 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java
@@ -27,6 +27,7 @@ import com.android.inputmethod.latin.utils.XmlParseUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import java.util.Arrays;
import java.util.HashMap;
public final class KeyStylesSet {
@@ -90,7 +91,8 @@ public final class KeyStylesSet {
}
final Object value = mStyleAttributes.get(index);
if (value != null) {
- return (String[])value;
+ final String[] array = (String[])value;
+ return Arrays.copyOf(array, array.length);
}
final KeyStyle parentStyle = mStyles.get(mParentStyleName);
return parentStyle.getStringArray(a, index);
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
index 8bdad364c..c3e0aa685 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
@@ -47,6 +47,8 @@ public final class KeyVisualAttributes {
public final int mShiftedLetterHintActivatedColor;
public final int mPreviewTextColor;
+ public final float mHintLabelVerticalAdjustment;
+
private static final int[] VISUAL_ATTRIBUTE_IDS = {
R.styleable.Keyboard_Key_keyTypeface,
R.styleable.Keyboard_Key_keyLetterSize,
@@ -65,6 +67,7 @@ public final class KeyVisualAttributes {
R.styleable.Keyboard_Key_keyShiftedLetterHintInactivatedColor,
R.styleable.Keyboard_Key_keyShiftedLetterHintActivatedColor,
R.styleable.Keyboard_Key_keyPreviewTextColor,
+ R.styleable.Keyboard_Key_keyHintLabelVerticalAdjustment,
};
private static final SparseIntArray sVisualAttributeIds = new SparseIntArray();
private static final int ATTR_DEFINED = 1;
@@ -127,5 +130,8 @@ public final class KeyVisualAttributes {
mShiftedLetterHintActivatedColor = keyAttr.getColor(
R.styleable.Keyboard_Key_keyShiftedLetterHintActivatedColor, 0);
mPreviewTextColor = keyAttr.getColor(R.styleable.Keyboard_Key_keyPreviewTextColor, 0);
+
+ mHintLabelVerticalAdjustment = ResourceUtils.getFraction(keyAttr,
+ R.styleable.Keyboard_Key_keyHintLabelVerticalAdjustment, 0.0f);
}
}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
index c1ae65695..b31358f3c 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
@@ -459,7 +459,7 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
final int x = (int)row.getKeyX(null);
final int y = row.getKeyY();
final Key key = new Key(mParams, label, null /* hintLabel */, 0 /* iconId */,
- code, outputText, x, y, (int)keyWidth, (int)row.getRowHeight(),
+ code, outputText, x, y, (int)keyWidth, row.getRowHeight(),
row.getDefaultKeyLabelFlags(), row.getDefaultBackgroundType());
endKey(key);
row.advanceXPos(keyWidth);
@@ -649,10 +649,9 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
R.styleable.Keyboard_Case_passwordInput, id.passwordInput());
final boolean clobberSettingsKeyMatched = matchBoolean(caseAttr,
R.styleable.Keyboard_Case_clobberSettingsKey, id.mClobberSettingsKey);
- final boolean shortcutKeyEnabledMatched = matchBoolean(caseAttr,
- R.styleable.Keyboard_Case_shortcutKeyEnabled, id.mShortcutKeyEnabled);
- final boolean shortcutKeyOnSymbolsMatched = matchBoolean(caseAttr,
- R.styleable.Keyboard_Case_shortcutKeyOnSymbols, id.mShortcutKeyOnSymbols);
+ final boolean supportsSwitchingToShortcutImeMatched = matchBoolean(caseAttr,
+ R.styleable.Keyboard_Case_supportsSwitchingToShortcutIme,
+ id.mSupportsSwitchingToShortcutIme);
final boolean hasShortcutKeyMatched = matchBoolean(caseAttr,
R.styleable.Keyboard_Case_hasShortcutKey, id.mHasShortcutKey);
final boolean languageSwitchKeyEnabledMatched = matchBoolean(caseAttr,
@@ -671,13 +670,12 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
final boolean selected = keyboardLayoutSetMatched && keyboardLayoutSetElementMatched
&& modeMatched && navigateNextMatched && navigatePreviousMatched
&& passwordInputMatched && clobberSettingsKeyMatched
- && shortcutKeyEnabledMatched && shortcutKeyOnSymbolsMatched
- && hasShortcutKeyMatched && languageSwitchKeyEnabledMatched
- && isMultiLineMatched && imeActionMatched && localeCodeMatched
- && languageCodeMatched && countryCodeMatched;
+ && supportsSwitchingToShortcutImeMatched && hasShortcutKeyMatched
+ && languageSwitchKeyEnabledMatched && isMultiLineMatched && imeActionMatched
+ && localeCodeMatched && languageCodeMatched && countryCodeMatched;
if (DEBUG) {
- startTag("<%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s>%s", TAG_CASE,
+ startTag("<%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s>%s", TAG_CASE,
textAttr(caseAttr.getString(
R.styleable.Keyboard_Case_keyboardLayoutSet), "keyboardLayoutSet"),
textAttr(caseAttr.getString(
@@ -694,10 +692,9 @@ public class KeyboardBuilder<KP extends KeyboardParams> {
"clobberSettingsKey"),
booleanAttr(caseAttr, R.styleable.Keyboard_Case_passwordInput,
"passwordInput"),
- booleanAttr(caseAttr, R.styleable.Keyboard_Case_shortcutKeyEnabled,
- "shortcutKeyEnabled"),
- booleanAttr(caseAttr, R.styleable.Keyboard_Case_shortcutKeyOnSymbols,
- "shortcutKeyOnSymbols"),
+ booleanAttr(
+ caseAttr, R.styleable.Keyboard_Case_supportsSwitchingToShortcutIme,
+ "supportsSwitchingToShortcutIme"),
booleanAttr(caseAttr, R.styleable.Keyboard_Case_hasShortcutKey,
"hasShortcutKey"),
booleanAttr(caseAttr, R.styleable.Keyboard_Case_languageSwitchKeyEnabled,
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
index 336db186e..0ee935f60 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java
@@ -48,7 +48,6 @@ public final class KeyboardIconsSet {
"search_key", R.styleable.Keyboard_iconSearchKey,
"tab_key", R.styleable.Keyboard_iconTabKey,
"shortcut_key", R.styleable.Keyboard_iconShortcutKey,
- "shortcut_for_label", R.styleable.Keyboard_iconShortcutForLabel,
"space_key_for_number_layout", R.styleable.Keyboard_iconSpaceKeyForNumberLayout,
"shift_key_shifted", R.styleable.Keyboard_iconShiftKeyShifted,
"shortcut_key_disabled", R.styleable.Keyboard_iconShortcutKeyDisabled,
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
index 9f9fdaa6f..dd98c1703 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
@@ -327,6 +327,9 @@ public final class KeyboardState {
}
mIsAlphabetMode = false;
mIsEmojiMode = true;
+ // Remember caps lock mode and reset alphabet shift state.
+ mPrevMainKeyboardWasShiftLocked = mAlphabetShiftState.isShiftLocked();
+ mAlphabetShiftState.setShiftLocked(false);
mSwitchActions.setEmojiKeyboard();
}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
index e769e3cdd..1b722c5ce 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsSet.java
@@ -87,11 +87,11 @@ public final class KeyboardTextsSet {
return (text == null) ? LANGUAGE_DEFAULT[id] : text;
}
+ // These texts' name should be aligned with the @string/<name> in
+ // values*/strings-action-keys.xml.
private static final String[] RESOURCE_NAMES = {
- // These texts' name should be aligned with the @string/<name> in values/strings.xml.
// Labels for action.
"label_go_key",
- // "label_search_key",
"label_send_key",
"label_next_key",
"label_done_key",
@@ -147,111 +147,118 @@ public final class KeyboardTextsSet {
/* 42 */ "keylabel_for_south_slavic_row3_8",
/* 43 */ "more_keys_for_cyrillic_ie",
/* 44 */ "more_keys_for_cyrillic_i",
- /* 45 */ "label_to_alpha_key",
- /* 46 */ "single_quotes",
- /* 47 */ "double_quotes",
- /* 48 */ "single_angle_quotes",
- /* 49 */ "double_angle_quotes",
- /* 50 */ "more_keys_for_currency_dollar",
- /* 51 */ "keylabel_for_currency",
- /* 52 */ "more_keys_for_currency",
- /* 53 */ "more_keys_for_punctuation",
- /* 54 */ "more_keys_for_star",
- /* 55 */ "more_keys_for_bullet",
- /* 56 */ "more_keys_for_plus",
- /* 57 */ "more_keys_for_left_parenthesis",
- /* 58 */ "more_keys_for_right_parenthesis",
- /* 59 */ "more_keys_for_less_than",
- /* 60 */ "more_keys_for_greater_than",
- /* 61 */ "more_keys_for_arabic_diacritics",
- /* 62 */ "keyhintlabel_for_arabic_diacritics",
- /* 63 */ "keylabel_for_symbols_1",
- /* 64 */ "keylabel_for_symbols_2",
- /* 65 */ "keylabel_for_symbols_3",
- /* 66 */ "keylabel_for_symbols_4",
- /* 67 */ "keylabel_for_symbols_5",
- /* 68 */ "keylabel_for_symbols_6",
- /* 69 */ "keylabel_for_symbols_7",
- /* 70 */ "keylabel_for_symbols_8",
- /* 71 */ "keylabel_for_symbols_9",
- /* 72 */ "keylabel_for_symbols_0",
- /* 73 */ "label_to_symbol_key",
- /* 74 */ "label_to_symbol_with_microphone_key",
- /* 75 */ "additional_more_keys_for_symbols_1",
- /* 76 */ "additional_more_keys_for_symbols_2",
- /* 77 */ "additional_more_keys_for_symbols_3",
- /* 78 */ "additional_more_keys_for_symbols_4",
- /* 79 */ "additional_more_keys_for_symbols_5",
- /* 80 */ "additional_more_keys_for_symbols_6",
- /* 81 */ "additional_more_keys_for_symbols_7",
- /* 82 */ "additional_more_keys_for_symbols_8",
- /* 83 */ "additional_more_keys_for_symbols_9",
- /* 84 */ "additional_more_keys_for_symbols_0",
- /* 85 */ "more_keys_for_symbols_1",
- /* 86 */ "more_keys_for_symbols_2",
- /* 87 */ "more_keys_for_symbols_3",
- /* 88 */ "more_keys_for_symbols_4",
- /* 89 */ "more_keys_for_symbols_5",
- /* 90 */ "more_keys_for_symbols_6",
- /* 91 */ "more_keys_for_symbols_7",
- /* 92 */ "more_keys_for_symbols_8",
- /* 93 */ "more_keys_for_symbols_9",
- /* 94 */ "more_keys_for_symbols_0",
- /* 95 */ "keylabel_for_comma",
- /* 96 */ "more_keys_for_comma",
- /* 97 */ "keylabel_for_symbols_question",
- /* 98 */ "keylabel_for_symbols_semicolon",
- /* 99 */ "keylabel_for_symbols_percent",
- /* 100 */ "more_keys_for_symbols_exclamation",
- /* 101 */ "more_keys_for_symbols_question",
- /* 102 */ "more_keys_for_symbols_semicolon",
- /* 103 */ "more_keys_for_symbols_percent",
- /* 104 */ "keylabel_for_tablet_comma",
- /* 105 */ "keyhintlabel_for_tablet_comma",
- /* 106 */ "more_keys_for_tablet_comma",
+ /* 45 */ "keylabel_for_swiss_row1_11",
+ /* 46 */ "keylabel_for_swiss_row2_10",
+ /* 47 */ "keylabel_for_swiss_row2_11",
+ /* 48 */ "more_keys_for_swiss_row1_11",
+ /* 49 */ "more_keys_for_swiss_row2_10",
+ /* 50 */ "more_keys_for_swiss_row2_11",
+ /* 51 */ "label_to_alpha_key",
+ /* 52 */ "single_quotes",
+ /* 53 */ "double_quotes",
+ /* 54 */ "single_angle_quotes",
+ /* 55 */ "double_angle_quotes",
+ /* 56 */ "more_keys_for_currency_dollar",
+ /* 57 */ "keylabel_for_currency",
+ /* 58 */ "more_keys_for_currency",
+ /* 59 */ "more_keys_for_punctuation",
+ /* 60 */ "more_keys_for_tablet_punctuation",
+ /* 61 */ "more_keys_for_star",
+ /* 62 */ "more_keys_for_bullet",
+ /* 63 */ "more_keys_for_plus",
+ /* 64 */ "more_keys_for_left_parenthesis",
+ /* 65 */ "more_keys_for_right_parenthesis",
+ /* 66 */ "more_keys_for_less_than",
+ /* 67 */ "more_keys_for_greater_than",
+ /* 68 */ "more_keys_for_arabic_diacritics",
+ /* 69 */ "keylabel_for_symbols_1",
+ /* 70 */ "keylabel_for_symbols_2",
+ /* 71 */ "keylabel_for_symbols_3",
+ /* 72 */ "keylabel_for_symbols_4",
+ /* 73 */ "keylabel_for_symbols_5",
+ /* 74 */ "keylabel_for_symbols_6",
+ /* 75 */ "keylabel_for_symbols_7",
+ /* 76 */ "keylabel_for_symbols_8",
+ /* 77 */ "keylabel_for_symbols_9",
+ /* 78 */ "keylabel_for_symbols_0",
+ /* 79 */ "label_to_symbol_key",
+ /* 80 */ "label_to_symbol_with_microphone_key",
+ /* 81 */ "additional_more_keys_for_symbols_1",
+ /* 82 */ "additional_more_keys_for_symbols_2",
+ /* 83 */ "additional_more_keys_for_symbols_3",
+ /* 84 */ "additional_more_keys_for_symbols_4",
+ /* 85 */ "additional_more_keys_for_symbols_5",
+ /* 86 */ "additional_more_keys_for_symbols_6",
+ /* 87 */ "additional_more_keys_for_symbols_7",
+ /* 88 */ "additional_more_keys_for_symbols_8",
+ /* 89 */ "additional_more_keys_for_symbols_9",
+ /* 90 */ "additional_more_keys_for_symbols_0",
+ /* 91 */ "more_keys_for_symbols_1",
+ /* 92 */ "more_keys_for_symbols_2",
+ /* 93 */ "more_keys_for_symbols_3",
+ /* 94 */ "more_keys_for_symbols_4",
+ /* 95 */ "more_keys_for_symbols_5",
+ /* 96 */ "more_keys_for_symbols_6",
+ /* 97 */ "more_keys_for_symbols_7",
+ /* 98 */ "more_keys_for_symbols_8",
+ /* 99 */ "more_keys_for_symbols_9",
+ /* 100 */ "more_keys_for_symbols_0",
+ /* 101 */ "keylabel_for_comma",
+ /* 102 */ "more_keys_for_comma",
+ /* 103 */ "keylabel_for_tablet_comma",
+ /* 104 */ "keyhintlabel_for_tablet_comma",
+ /* 105 */ "more_keys_for_tablet_comma",
+ /* 106 */ "keylabel_for_period",
/* 107 */ "keyhintlabel_for_period",
/* 108 */ "more_keys_for_period",
- /* 109 */ "keylabel_for_apostrophe",
- /* 110 */ "keyhintlabel_for_apostrophe",
- /* 111 */ "more_keys_for_apostrophe",
- /* 112 */ "more_keys_for_q",
- /* 113 */ "more_keys_for_x",
- /* 114 */ "keylabel_for_q",
- /* 115 */ "keylabel_for_w",
- /* 116 */ "keylabel_for_y",
- /* 117 */ "keylabel_for_x",
- /* 118 */ "keylabel_for_spanish_row2_10",
- /* 119 */ "more_keys_for_am_pm",
- /* 120 */ "settings_as_more_key",
- /* 121 */ "shortcut_as_more_key",
- /* 122 */ "action_next_as_more_key",
- /* 123 */ "action_previous_as_more_key",
- /* 124 */ "label_to_more_symbol_key",
- /* 125 */ "label_to_more_symbol_for_tablet_key",
- /* 126 */ "label_tab_key",
- /* 127 */ "label_to_phone_numeric_key",
- /* 128 */ "label_to_phone_symbols_key",
- /* 129 */ "label_time_am",
- /* 130 */ "label_time_pm",
- /* 131 */ "keylabel_for_popular_domain",
- /* 132 */ "more_keys_for_popular_domain",
- /* 133 */ "more_keys_for_smiley",
- /* 134 */ "single_laqm_raqm",
- /* 135 */ "single_laqm_raqm_rtl",
- /* 136 */ "single_raqm_laqm",
- /* 137 */ "double_laqm_raqm",
- /* 138 */ "double_laqm_raqm_rtl",
- /* 139 */ "double_raqm_laqm",
- /* 140 */ "single_lqm_rqm",
- /* 141 */ "single_9qm_lqm",
- /* 142 */ "single_9qm_rqm",
- /* 143 */ "double_lqm_rqm",
- /* 144 */ "double_9qm_lqm",
- /* 145 */ "double_9qm_rqm",
- /* 146 */ "more_keys_for_single_quote",
- /* 147 */ "more_keys_for_double_quote",
- /* 148 */ "more_keys_for_tablet_double_quote",
- /* 149 */ "emoji_key_as_more_key",
+ /* 109 */ "keylabel_for_tablet_period",
+ /* 110 */ "keyhintlabel_for_tablet_period",
+ /* 111 */ "more_keys_for_tablet_period",
+ /* 112 */ "keylabel_for_symbols_question",
+ /* 113 */ "keylabel_for_symbols_semicolon",
+ /* 114 */ "keylabel_for_symbols_percent",
+ /* 115 */ "more_keys_for_exclamation",
+ /* 116 */ "more_keys_for_question",
+ /* 117 */ "more_keys_for_symbols_semicolon",
+ /* 118 */ "more_keys_for_symbols_percent",
+ /* 119 */ "more_keys_for_q",
+ /* 120 */ "more_keys_for_x",
+ /* 121 */ "keylabel_for_q",
+ /* 122 */ "keylabel_for_w",
+ /* 123 */ "keylabel_for_y",
+ /* 124 */ "keylabel_for_x",
+ /* 125 */ "keylabel_for_spanish_row2_10",
+ /* 126 */ "more_keys_for_am_pm",
+ /* 127 */ "settings_as_more_key",
+ /* 128 */ "shortcut_as_more_key",
+ /* 129 */ "action_next_as_more_key",
+ /* 130 */ "action_previous_as_more_key",
+ /* 131 */ "label_to_more_symbol_key",
+ /* 132 */ "label_to_more_symbol_for_tablet_key",
+ /* 133 */ "label_tab_key",
+ /* 134 */ "label_to_phone_numeric_key",
+ /* 135 */ "label_to_phone_symbols_key",
+ /* 136 */ "label_time_am",
+ /* 137 */ "label_time_pm",
+ /* 138 */ "keylabel_for_popular_domain",
+ /* 139 */ "more_keys_for_popular_domain",
+ /* 140 */ "more_keys_for_smiley",
+ /* 141 */ "single_laqm_raqm",
+ /* 142 */ "single_laqm_raqm_rtl",
+ /* 143 */ "single_raqm_laqm",
+ /* 144 */ "double_laqm_raqm",
+ /* 145 */ "double_laqm_raqm_rtl",
+ /* 146 */ "double_raqm_laqm",
+ /* 147 */ "single_lqm_rqm",
+ /* 148 */ "single_9qm_lqm",
+ /* 149 */ "single_9qm_rqm",
+ /* 150 */ "double_lqm_rqm",
+ /* 151 */ "double_9qm_lqm",
+ /* 152 */ "double_9qm_rqm",
+ /* 153 */ "more_keys_for_single_quote",
+ /* 154 */ "more_keys_for_double_quote",
+ /* 155 */ "more_keys_for_tablet_double_quote",
+ /* 156 */ "emoji_key_as_more_key",
};
private static final String EMPTY = "";
@@ -262,145 +269,148 @@ public final class KeyboardTextsSet {
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- /* ~44 */
+ EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
+ /* ~50 */
// Label for "switch to alphabetic" key.
- /* 45 */ "ABC",
- /* 46 */ "!text/single_lqm_rqm",
- /* 47 */ "!text/double_lqm_rqm",
- /* 48 */ "!text/single_laqm_raqm",
- /* 49 */ "!text/double_laqm_raqm",
+ /* 51 */ "ABC",
+ /* 52 */ "!text/single_lqm_rqm",
+ /* 53 */ "!text/double_lqm_rqm",
+ /* 54 */ "!text/single_laqm_raqm",
+ /* 55 */ "!text/double_laqm_raqm",
// U+00A2: "¢" CENT SIGN
// U+00A3: "£" POUND SIGN
// U+20AC: "€" EURO SIGN
// U+00A5: "¥" YEN SIGN
// U+20B1: "₱" PESO SIGN
- /* 50 */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
- /* 51 */ "$",
- /* 52 */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1",
- /* 53 */ "!fixedColumnOrder!4,#,!,\\,,?,-,:,',@",
+ /* 56 */ "\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
+ /* 57 */ "$",
+ /* 58 */ "$,\u00A2,\u20AC,\u00A3,\u00A5,\u20B1",
+ /* 59 */ "!fixedColumnOrder!8,;,/,(,),#,!,\\,,?,&,\\%,+,\",-,:,',@",
+ /* 60 */ "!fixedColumnOrder!7,;,/,(,),#,',\\,,&,\\%,+,\",-,:,@",
// U+2020: "†" DAGGER
// U+2021: "‡" DOUBLE DAGGER
// U+2605: "★" BLACK STAR
- /* 54 */ "\u2020,\u2021,\u2605",
+ /* 61 */ "\u2020,\u2021,\u2605",
// U+266A: "♪" EIGHTH NOTE
// U+2665: "♥" BLACK HEART SUIT
// U+2660: "♠" BLACK SPADE SUIT
// U+2666: "♦" BLACK DIAMOND SUIT
// U+2663: "♣" BLACK CLUB SUIT
- /* 55 */ "\u266A,\u2665,\u2660,\u2666,\u2663",
+ /* 62 */ "\u266A,\u2665,\u2660,\u2666,\u2663",
// U+00B1: "±" PLUS-MINUS SIGN
- /* 56 */ "\u00B1",
+ /* 63 */ "\u00B1",
// The all letters need to be mirrored are found at
// http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
- /* 57 */ "!fixedColumnOrder!3,<,{,[",
- /* 58 */ "!fixedColumnOrder!3,>,},]",
+ /* 64 */ "!fixedColumnOrder!3,<,{,[",
+ /* 65 */ "!fixedColumnOrder!3,>,},]",
// U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
// U+2264: "≤" LESS-THAN OR EQUAL TO
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- /* 59 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB",
- /* 60 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB",
- /* 61 */ EMPTY,
- /* 62 */ EMPTY,
- /* 63 */ "1",
- /* 64 */ "2",
- /* 65 */ "3",
- /* 66 */ "4",
- /* 67 */ "5",
- /* 68 */ "6",
- /* 69 */ "7",
- /* 70 */ "8",
- /* 71 */ "9",
- /* 72 */ "0",
+ /* 66 */ "!fixedColumnOrder!3,\u2039,\u2264,\u00AB",
+ /* 67 */ "!fixedColumnOrder!3,\u203A,\u2265,\u00BB",
+ /* 68 */ EMPTY,
+ /* 69 */ "1",
+ /* 70 */ "2",
+ /* 71 */ "3",
+ /* 72 */ "4",
+ /* 73 */ "5",
+ /* 74 */ "6",
+ /* 75 */ "7",
+ /* 76 */ "8",
+ /* 77 */ "9",
+ /* 78 */ "0",
// Label for "switch to symbols" key.
- /* 73 */ "?123",
+ /* 79 */ "?123",
// Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
// part because it'll be appended by the code.
- /* 74 */ "123",
- /* 75~ */
+ /* 80 */ "123",
+ /* 81~ */
EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
- /* ~84 */
+ /* ~90 */
// U+00B9: "¹" SUPERSCRIPT ONE
// U+00BD: "½" VULGAR FRACTION ONE HALF
// U+2153: "⅓" VULGAR FRACTION ONE THIRD
// U+00BC: "¼" VULGAR FRACTION ONE QUARTER
// U+215B: "⅛" VULGAR FRACTION ONE EIGHTH
- /* 85 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B",
+ /* 91 */ "\u00B9,\u00BD,\u2153,\u00BC,\u215B",
// U+00B2: "²" SUPERSCRIPT TWO
// U+2154: "⅔" VULGAR FRACTION TWO THIRDS
- /* 86 */ "\u00B2,\u2154",
+ /* 92 */ "\u00B2,\u2154",
// U+00B3: "³" SUPERSCRIPT THREE
// U+00BE: "¾" VULGAR FRACTION THREE QUARTERS
// U+215C: "⅜" VULGAR FRACTION THREE EIGHTHS
- /* 87 */ "\u00B3,\u00BE,\u215C",
+ /* 93 */ "\u00B3,\u00BE,\u215C",
// U+2074: "⁴" SUPERSCRIPT FOUR
- /* 88 */ "\u2074",
+ /* 94 */ "\u2074",
// U+215D: "⅝" VULGAR FRACTION FIVE EIGHTHS
- /* 89 */ "\u215D",
- /* 90 */ EMPTY,
+ /* 95 */ "\u215D",
+ /* 96 */ EMPTY,
// U+215E: "⅞" VULGAR FRACTION SEVEN EIGHTHS
- /* 91 */ "\u215E",
- /* 92 */ EMPTY,
- /* 93 */ EMPTY,
+ /* 97 */ "\u215E",
+ /* 98 */ EMPTY,
+ /* 99 */ EMPTY,
// U+207F: "ⁿ" SUPERSCRIPT LATIN SMALL LETTER N
// U+2205: "∅" EMPTY SET
- /* 94 */ "\u207F,\u2205",
- /* 95 */ ",",
- /* 96 */ EMPTY,
- /* 97 */ "?",
- /* 98 */ ";",
- /* 99 */ "%",
+ /* 100 */ "\u207F,\u2205",
+ // Comma key
+ /* 101 */ ",",
+ /* 102 */ EMPTY,
+ /* 103 */ ",",
+ /* 104 */ EMPTY,
+ /* 105 */ EMPTY,
+ // Period key
+ /* 106 */ ".",
+ /* 107 */ EMPTY,
+ /* 108 */ "!text/more_keys_for_punctuation",
+ /* 109 */ ".",
+ /* 110 */ EMPTY,
+ /* 111 */ "!text/more_keys_for_tablet_punctuation",
+ /* 112 */ "?",
+ /* 113 */ ";",
+ /* 114 */ "%",
// U+00A1: "¡" INVERTED EXCLAMATION MARK
- /* 100 */ "\u00A1",
+ /* 115 */ "\u00A1",
// U+00BF: "¿" INVERTED QUESTION MARK
- /* 101 */ "\u00BF",
- /* 102 */ EMPTY,
+ /* 116 */ "\u00BF",
+ /* 117 */ EMPTY,
// U+2030: "‰" PER MILLE SIGN
- /* 103 */ "\u2030",
- /* 104 */ ",",
- /* 105~ */
- EMPTY, EMPTY, EMPTY,
- /* ~107 */
- // U+2026: "…" HORIZONTAL ELLIPSIS
- /* 108 */ "\u2026",
- /* 109 */ "\'",
- /* 110 */ "\"",
- /* 111 */ "\"",
- /* 112 */ EMPTY,
- /* 113 */ EMPTY,
- /* 114 */ "q",
- /* 115 */ "w",
- /* 116 */ "y",
- /* 117 */ "x",
- /* 118 */ EMPTY,
- /* 119 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm",
- /* 120 */ "!icon/settings_key|!code/key_settings",
- /* 121 */ "!icon/shortcut_key|!code/key_shortcut",
- /* 122 */ "!hasLabels!,!text/label_next_key|!code/key_action_next",
- /* 123 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous",
+ /* 118 */ "\u2030",
+ /* 119 */ EMPTY,
+ /* 120 */ EMPTY,
+ /* 121 */ "q",
+ /* 122 */ "w",
+ /* 123 */ "y",
+ /* 124 */ "x",
+ // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
+ /* 125 */ "\u00F1",
+ /* 126 */ "!fixedColumnOrder!2,!hasLabels!,!text/label_time_am,!text/label_time_pm",
+ /* 127 */ "!icon/settings_key|!code/key_settings",
+ /* 128 */ "!icon/shortcut_key|!code/key_shortcut",
+ /* 129 */ "!hasLabels!,!text/label_next_key|!code/key_action_next",
+ /* 130 */ "!hasLabels!,!text/label_previous_key|!code/key_action_previous",
// Label for "switch to more symbol" modifier key. Must be short to fit on key!
- /* 124 */ "= \\ <",
+ /* 131 */ "= \\ <",
// Label for "switch to more symbol" modifier key on tablets. Must be short to fit on key!
- /* 125 */ "~ [ <",
+ /* 132 */ "~ [ <",
// Label for "Tab" key. Must be short to fit on key!
- /* 126 */ "Tab",
+ /* 133 */ "Tab",
// Label for "switch to phone numeric" key. Must be short to fit on key!
- /* 127 */ "123",
+ /* 134 */ "123",
// Label for "switch to phone symbols" key. Must be short to fit on key!
// U+FF0A: "*" FULLWIDTH ASTERISK
// U+FF03: "#" FULLWIDTH NUMBER SIGN
- /* 128 */ "\uFF0A\uFF03",
+ /* 135 */ "\uFF0A\uFF03",
// Key label for "ante meridiem"
- /* 129 */ "AM",
+ /* 136 */ "AM",
// Key label for "post meridiem"
- /* 130 */ "PM",
- /* 131 */ ".com",
+ /* 137 */ "PM",
+ /* 138 */ ".com",
// popular web domains for the locale - most popular, displayed on the keyboard
- /* 132 */ "!hasLabels!,.net,.org,.gov,.edu",
- /* 133 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ",
+ /* 139 */ "!hasLabels!,.net,.org,.gov,.edu",
+ /* 140 */ "!fixedColumnOrder!5,!hasLabels!,=-O|=-O ,:-P|:-P ,;-)|;-) ,:-(|:-( ,:-)|:-) ,:-!|:-! ,:-$|:-$ ,B-)|B-) ,:O|:O ,:-*|:-* ,:-D|:-D ,:\'(|:\'( ,:-\\\\|:-\\\\ ,O:-)|O:-) ,:-[|:-[ ",
// U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
@@ -422,25 +432,25 @@ public final class KeyboardTextsSet {
// The following each quotation mark pair consist of
// <opening quotation mark>, <closing quotation mark>
// and is named after (single|double)_<opening quotation mark>_<closing quotation mark>.
- /* 134 */ "\u2039,\u203A",
- /* 135 */ "\u2039|\u203A,\u203A|\u2039",
- /* 136 */ "\u203A,\u2039",
- /* 137 */ "\u00AB,\u00BB",
- /* 138 */ "\u00AB|\u00BB,\u00BB|\u00AB",
- /* 139 */ "\u00BB,\u00AB",
+ /* 141 */ "\u2039,\u203A",
+ /* 142 */ "\u2039|\u203A,\u203A|\u2039",
+ /* 143 */ "\u203A,\u2039",
+ /* 144 */ "\u00AB,\u00BB",
+ /* 145 */ "\u00AB|\u00BB,\u00BB|\u00AB",
+ /* 146 */ "\u00BB,\u00AB",
// The following each quotation mark triplet consists of
// <another quotation mark>, <opening quotation mark>, <closing quotation mark>
// and is named after (single|double)_<opening quotation mark>_<closing quotation mark>.
- /* 140 */ "\u201A,\u2018,\u2019",
- /* 141 */ "\u2019,\u201A,\u2018",
- /* 142 */ "\u2018,\u201A,\u2019",
- /* 143 */ "\u201E,\u201C,\u201D",
- /* 144 */ "\u201D,\u201E,\u201C",
- /* 145 */ "\u201C,\u201E,\u201D",
- /* 146 */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes",
- /* 147 */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes",
- /* 148 */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes",
- /* 149 */ "!icon/emoji_key|!code/key_emoji",
+ /* 147 */ "\u201A,\u2018,\u2019",
+ /* 148 */ "\u2019,\u201A,\u2018",
+ /* 149 */ "\u2018,\u201A,\u2019",
+ /* 150 */ "\u201E,\u201C,\u201D",
+ /* 151 */ "\u201D,\u201E,\u201C",
+ /* 152 */ "\u201C,\u201E,\u201D",
+ /* 153 */ "!fixedColumnOrder!5,!text/single_quotes,!text/single_angle_quotes",
+ /* 154 */ "!fixedColumnOrder!5,!text/double_quotes,!text/double_angle_quotes",
+ /* 155 */ "!fixedColumnOrder!6,!text/double_quotes,!text/single_quotes,!text/double_angle_quotes,!text/single_angle_quotes",
+ /* 156 */ "!icon/emoji_key|!code/key_emoji",
};
/* Language af: Afrikaans */
@@ -502,44 +512,43 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0623: "ا" ARABIC LETTER ALEF
// U+200C: ZERO WIDTH NON-JOINER
// U+0628: "ب" ARABIC LETTER BEH
// U+062C: "پ" ARABIC LETTER PEH
- /* 45 */ "\u0623\u200C\u0628\u200C\u062C",
- /* 46 */ null,
- /* 47 */ null,
- /* 48 */ "!text/single_laqm_raqm_rtl",
- /* 49 */ "!text/double_laqm_raqm_rtl",
- /* 50~ */
+ /* 51 */ "\u0623\u200C\u0628\u200C\u062C",
+ /* 52 */ null,
+ /* 53 */ null,
+ /* 54 */ "!text/single_laqm_raqm_rtl",
+ /* 55 */ "!text/double_laqm_raqm_rtl",
+ /* 56~ */
null, null, null,
- /* ~52 */
- // U+061F: "؟" ARABIC QUESTION MARK
- // U+060C: "،" ARABIC COMMA
- // U+061B: "؛" ARABIC SEMICOLON
- /* 53 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
+ /* ~58 */
+ /* 59 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
+ /* 60 */ null,
// U+2605: "★" BLACK STAR
// U+066D: "٭" ARABIC FIVE POINTED STAR
- /* 54 */ "\u2605,\u066D",
+ /* 61 */ "\u2605,\u066D",
// U+266A: "♪" EIGHTH NOTE
- /* 55 */ "\u266A",
- /* 56 */ null,
+ /* 62 */ "\u266A",
+ /* 63 */ null,
// The all letters need to be mirrored are found at
// http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
// U+FD3E: "﴾" ORNATE LEFT PARENTHESIS
// U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS
- /* 57 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
- /* 58 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
+ /* 64 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
+ /* 65 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
// U+2264: "≤" LESS-THAN OR EQUAL TO
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
- /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
+ /* 66 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
+ /* 67 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
// U+0655: "ٕ" ARABIC HAMZA BELOW
// U+0654: "ٔ" ARABIC HAMZA ABOVE
// U+0652: "ْ" ARABIC SUKUN
@@ -556,70 +565,74 @@ public final class KeyboardTextsSet {
// U+0640: "ـ" ARABIC TATWEEL
// In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
// Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly.
- /* 61 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
- /* 62 */ "\u0651",
+ /* 68 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0654|\u0654, \u0652|\u0652, \u064D|\u064D, \u064C|\u064C, \u064B|\u064B, \u0651|\u0651, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u0650|\u0650, \u064F|\u064F, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
// U+0661: "١" ARABIC-INDIC DIGIT ONE
- /* 63 */ "\u0661",
+ /* 69 */ "\u0661",
// U+0662: "٢" ARABIC-INDIC DIGIT TWO
- /* 64 */ "\u0662",
+ /* 70 */ "\u0662",
// U+0663: "٣" ARABIC-INDIC DIGIT THREE
- /* 65 */ "\u0663",
+ /* 71 */ "\u0663",
// U+0664: "٤" ARABIC-INDIC DIGIT FOUR
- /* 66 */ "\u0664",
+ /* 72 */ "\u0664",
// U+0665: "٥" ARABIC-INDIC DIGIT FIVE
- /* 67 */ "\u0665",
+ /* 73 */ "\u0665",
// U+0666: "٦" ARABIC-INDIC DIGIT SIX
- /* 68 */ "\u0666",
+ /* 74 */ "\u0666",
// U+0667: "٧" ARABIC-INDIC DIGIT SEVEN
- /* 69 */ "\u0667",
+ /* 75 */ "\u0667",
// U+0668: "٨" ARABIC-INDIC DIGIT EIGHT
- /* 70 */ "\u0668",
+ /* 76 */ "\u0668",
// U+0669: "٩" ARABIC-INDIC DIGIT NINE
- /* 71 */ "\u0669",
+ /* 77 */ "\u0669",
// U+0660: "٠" ARABIC-INDIC DIGIT ZERO
- /* 72 */ "\u0660",
+ /* 78 */ "\u0660",
// Label for "switch to symbols" key.
// U+061F: "؟" ARABIC QUESTION MARK
- /* 73 */ "\u0663\u0662\u0661\u061F",
+ /* 79 */ "\u0663\u0662\u0661\u061F",
// Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
// part because it'll be appended by the code.
- /* 74 */ "\u0663\u0662\u0661",
- /* 75 */ "1",
- /* 76 */ "2",
- /* 77 */ "3",
- /* 78 */ "4",
- /* 79 */ "5",
- /* 80 */ "6",
- /* 81 */ "7",
- /* 82 */ "8",
- /* 83 */ "9",
+ /* 80 */ "\u0663\u0662\u0661",
+ /* 81 */ "1",
+ /* 82 */ "2",
+ /* 83 */ "3",
+ /* 84 */ "4",
+ /* 85 */ "5",
+ /* 86 */ "6",
+ /* 87 */ "7",
+ /* 88 */ "8",
+ /* 89 */ "9",
// U+066B: "٫" ARABIC DECIMAL SEPARATOR
// U+066C: "٬" ARABIC THOUSANDS SEPARATOR
- /* 84 */ "0,\u066B,\u066C",
- /* 85~ */
+ /* 90 */ "0,\u066B,\u066C",
+ /* 91~ */
null, null, null, null, null, null, null, null, null, null,
- /* ~94 */
+ /* ~100 */
// U+060C: "،" ARABIC COMMA
- /* 95 */ "\u060C",
- /* 96 */ "\\,",
- /* 97 */ "\u061F",
- /* 98 */ "\u061B",
- // U+066A: "٪" ARABIC PERCENT SIGN
- /* 99 */ "\u066A",
- /* 100 */ null,
- /* 101 */ "?",
- /* 102 */ ";",
- // U+2030: "‰" PER MILLE SIGN
- /* 103 */ "\\%,\u2030",
- /* 104~ */
- null, null, null, null, null,
- /* ~108 */
+ /* 101 */ "\u060C",
+ /* 102 */ "\\,",
+ // U+061F: "؟" ARABIC QUESTION MARK
// U+060C: "،" ARABIC COMMA
// U+061B: "؛" ARABIC SEMICOLON
- // U+061F: "؟" ARABIC QUESTION MARK
- /* 109 */ "\u060C",
- /* 110 */ "\u061F",
- /* 111 */ "\u061F,\u061B,!,:,-,/,\',\"",
+ /* 103 */ "\u060C",
+ /* 104 */ "\u061F",
+ /* 105 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\",\'",
+ /* 106 */ null,
+ // U+0651: "ّ" ARABIC SHADDA
+ /* 107 */ "\u0651",
+ /* 108 */ "!text/more_keys_for_arabic_diacritics",
+ /* 109 */ null,
+ /* 110 */ "\u0651",
+ /* 111 */ "!text/more_keys_for_arabic_diacritics",
+ /* 112 */ "\u061F",
+ /* 113 */ "\u061B",
+ // U+066A: "٪" ARABIC PERCENT SIGN
+ /* 114 */ "\u066A",
+ /* 115 */ null,
+ // U+00BF: "¿" INVERTED QUESTION MARK
+ /* 116 */ "?,\u00BF",
+ /* 117 */ ";",
+ // U+2030: "‰" PER MILLE SIGN
+ /* 118 */ "\\%,\u2030",
};
/* Language az: Azerbaijani */
@@ -668,8 +681,8 @@ public final class KeyboardTextsSet {
/* 15 */ "\u011F",
};
- /* Language be: Belarusian */
- private static final String[] LANGUAGE_be = {
+ /* Language be_BY: Belarusian (Belarus) */
+ private static final String[] LANGUAGE_be_BY = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null,
@@ -694,14 +707,16 @@ public final class KeyboardTextsSet {
/* ~42 */
// U+0451: "ё" CYRILLIC SMALL LETTER IO
/* 43 */ "\u0451",
- /* 44 */ null,
+ /* 44~ */
+ null, null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language bg: Bulgarian */
@@ -710,15 +725,16 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ null,
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ null,
// single_quotes of Bulgarian is default single_quotes_right_left.
- /* 47 */ "!text/double_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language ca: Catalan */
@@ -782,22 +798,20 @@ public final class KeyboardTextsSet {
/* 15~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
- /* ~52 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~58 */
// U+00B7: "·" MIDDLE DOT
- /* 53 */ "!fixedColumnOrder!4,\u00B7,!,\\,,?,:,;,@",
- /* 54~ */
+ /* 59 */ "!fixedColumnOrder!9,;,/,(,),#,\u00B7,!,\\,,?,&,\\%,+,\",-,:,',@",
+ /* 60 */ "!fixedColumnOrder!8,;,/,(,),#,\u00B7,',\\,,&,\\%,+,\",-,:,@",
+ /* 61~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null,
- /* ~107 */
- /* 108 */ "?,\u00B7",
- /* 109~ */
- null, null, null, null, null, null, null, null, null,
- /* ~117 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null,
+ /* ~124 */
// U+00E7: "ç" LATIN SMALL LETTER C WITH CEDILLA
- /* 118 */ "\u00E7",
+ /* 125 */ "\u00E7",
};
/* Language cs: Czech */
@@ -871,12 +885,12 @@ public final class KeyboardTextsSet {
/* 13~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language da: Danish */
@@ -940,12 +954,12 @@ public final class KeyboardTextsSet {
/* 24 */ "\u00F6",
/* 25~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language de: German */
@@ -991,12 +1005,25 @@ public final class KeyboardTextsSet {
/* 7~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null,
+ /* ~44 */
+ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ /* 45 */ "\u00FC",
+ // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ /* 46 */ "\u00F6",
+ // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ /* 47 */ "\u00E4",
+ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ /* 48 */ "\u00E8",
+ // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ /* 49 */ "\u00E9",
+ // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ /* 50 */ "\u00E0",
+ /* 51 */ null,
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language el: Greek */
@@ -1005,12 +1032,13 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0391: "Α" GREEK CAPITAL LETTER ALPHA
// U+0392: "Β" GREEK CAPITAL LETTER BETA
// U+0393: "Γ" GREEK CAPITAL LETTER GAMMA
- /* 45 */ "\u0391\u0392\u0393",
+ /* 51 */ "\u0391\u0392\u0393",
};
/* Language en: English */
@@ -1182,20 +1210,20 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null,
- /* ~111 */
- /* 112 */ "q",
- /* 113 */ "x",
+ null, null, null, null, null, null, null, null, null,
+ /* ~118 */
+ /* 119 */ "q",
+ /* 120 */ "x",
// U+015D: "ŝ" LATIN SMALL LETTER S WITH CIRCUMFLEX
- /* 114 */ "\u015D",
+ /* 121 */ "\u015D",
// U+011D: "ĝ" LATIN SMALL LETTER G WITH CIRCUMFLEX
- /* 115 */ "\u011D",
+ /* 122 */ "\u011D",
// U+016D: "ŭ" LATIN SMALL LETTER U WITH BREVE
- /* 116 */ "\u016D",
+ /* 123 */ "\u016D",
// U+0109: "ĉ" LATIN SMALL LETTER C WITH CIRCUMFLEX
- /* 117 */ "\u0109",
+ /* 124 */ "\u0109",
// U+0135: "ĵ" LATIN SMALL LETTER J WITH CIRCUMFLEX
- /* 118 */ "\u0135",
+ /* 125 */ "\u0135",
};
/* Language es: Spanish */
@@ -1254,33 +1282,15 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~52 */
- // U+00A1: "¡" INVERTED EXCLAMATION MARK
- // U+00BF: "¿" INVERTED QUESTION MARK
- /* 53 */ "!fixedColumnOrder!4,;,!,\\,,?,:,\u00A1,@,\u00BF",
- /* 54~ */
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
- /* ~105 */
+ null, null, null, null, null, null,
+ /* ~58 */
// U+00A1: "¡" INVERTED EXCLAMATION MARK
- /* 106 */ "!,\u00A1",
- /* 107 */ null,
// U+00BF: "¿" INVERTED QUESTION MARK
- /* 108 */ "?,\u00BF",
- /* 109 */ "\"",
- /* 110 */ "\'",
- /* 111 */ "\'",
- /* 112~ */
- null, null, null, null, null, null,
- /* ~117 */
- // U+00F1: "ñ" LATIN SMALL LETTER N WITH TILDE
- /* 118 */ "\u00F1",
+ /* 59 */ "!fixedColumnOrder!9,\u00A1,;,/,(,),#,!,\\,,?,\u00BF,&,\\%,+,\",-,:,',@",
};
- /* Language et: Estonian */
- private static final String[] LANGUAGE_et = {
+ /* Language et_EE: Estonian (Estonia) */
+ private static final String[] LANGUAGE_et_EE = {
// U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
// U+0101: "ā" LATIN SMALL LETTER A WITH MACRON
// U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
@@ -1379,10 +1389,10 @@ public final class KeyboardTextsSet {
/* 23 */ "\u00F5",
/* 24~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language fa: Persian */
@@ -1391,45 +1401,47 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0627: "ا" ARABIC LETTER ALEF
// U+200C: ZERO WIDTH NON-JOINER
// U+0628: "ب" ARABIC LETTER BEH
// U+067E: "پ" ARABIC LETTER PEH
- /* 45 */ "\u0627\u200C\u0628\u200C\u067E",
- /* 46 */ null,
- /* 47 */ null,
- /* 48 */ "!text/single_laqm_raqm_rtl",
- /* 49 */ "!text/double_laqm_raqm_rtl",
- /* 50 */ null,
- // U+FDFC: "﷼" RIAL SIGN
- /* 51 */ "\uFDFC",
+ /* 51 */ "\u0627\u200C\u0628\u200C\u067E",
/* 52 */ null,
+ /* 53 */ null,
+ /* 54 */ "!text/single_laqm_raqm_rtl",
+ /* 55 */ "!text/double_laqm_raqm_rtl",
+ /* 56 */ null,
+ // U+FDFC: "﷼" RIAL SIGN
+ /* 57 */ "\uFDFC",
+ /* 58 */ null,
// U+061F: "؟" ARABIC QUESTION MARK
// U+060C: "،" ARABIC COMMA
// U+061B: "؛" ARABIC SEMICOLON
- /* 53 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
+ /* 59 */ "!fixedColumnOrder!8,\",\',#,-,:,!,\u060C,\u061F,@,&,\\%,+,\u061B,/,(|),)|(",
+ /* 60 */ null,
// U+2605: "★" BLACK STAR
// U+066D: "٭" ARABIC FIVE POINTED STAR
- /* 54 */ "\u2605,\u066D",
+ /* 61 */ "\u2605,\u066D",
// U+266A: "♪" EIGHTH NOTE
- /* 55 */ "\u266A",
- /* 56 */ null,
+ /* 62 */ "\u266A",
+ /* 63 */ null,
// The all letters need to be mirrored are found at
// http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
// U+FD3E: "﴾" ORNATE LEFT PARENTHESIS
// U+FD3F: "﴿" ORNATE RIGHT PARENTHESIS
- /* 57 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
- /* 58 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
+ /* 64 */ "!fixedColumnOrder!4,\uFD3E|\uFD3F,<|>,{|},[|]",
+ /* 65 */ "!fixedColumnOrder!4,\uFD3F|\uFD3E,>|<,}|{,]|[",
// U+2264: "≤" LESS-THAN OR EQUAL TO
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,<|>",
- /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,>|<",
+ /* 66 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,<|>",
+ /* 67 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,>|<",
// U+0655: "ٕ" ARABIC HAMZA BELOW
// U+0652: "ْ" ARABIC SUKUN
// U+0651: "ّ" ARABIC SHADDA
@@ -1446,74 +1458,75 @@ public final class KeyboardTextsSet {
// U+0640: "ـ" ARABIC TATWEEL
// In order to make Tatweel easily distinguishable from other punctuations, we use consecutive Tatweels only for its displayed label.
// Note: The space character is needed as a preceding letter to draw Arabic diacritics characters correctly.
- /* 61 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
- /* 62 */ "\u064B",
+ /* 68 */ "!fixedColumnOrder!7, \u0655|\u0655, \u0652|\u0652, \u0651|\u0651, \u064C|\u064C, \u064D|\u064D, \u064B|\u064B, \u0654|\u0654, \u0656|\u0656, \u0670|\u0670, \u0653|\u0653, \u064F|\u064F, \u0650|\u0650, \u064E|\u064E,\u0640\u0640\u0640|\u0640",
// U+06F1: "۱" EXTENDED ARABIC-INDIC DIGIT ONE
- /* 63 */ "\u06F1",
+ /* 69 */ "\u06F1",
// U+06F2: "۲" EXTENDED ARABIC-INDIC DIGIT TWO
- /* 64 */ "\u06F2",
+ /* 70 */ "\u06F2",
// U+06F3: "۳" EXTENDED ARABIC-INDIC DIGIT THREE
- /* 65 */ "\u06F3",
+ /* 71 */ "\u06F3",
// U+06F4: "۴" EXTENDED ARABIC-INDIC DIGIT FOUR
- /* 66 */ "\u06F4",
+ /* 72 */ "\u06F4",
// U+06F5: "۵" EXTENDED ARABIC-INDIC DIGIT FIVE
- /* 67 */ "\u06F5",
+ /* 73 */ "\u06F5",
// U+06F6: "۶" EXTENDED ARABIC-INDIC DIGIT SIX
- /* 68 */ "\u06F6",
+ /* 74 */ "\u06F6",
// U+06F7: "۷" EXTENDED ARABIC-INDIC DIGIT SEVEN
- /* 69 */ "\u06F7",
+ /* 75 */ "\u06F7",
// U+06F8: "۸" EXTENDED ARABIC-INDIC DIGIT EIGHT
- /* 70 */ "\u06F8",
+ /* 76 */ "\u06F8",
// U+06F9: "۹" EXTENDED ARABIC-INDIC DIGIT NINE
- /* 71 */ "\u06F9",
+ /* 77 */ "\u06F9",
// U+06F0: "۰" EXTENDED ARABIC-INDIC DIGIT ZERO
- /* 72 */ "\u06F0",
+ /* 78 */ "\u06F0",
// Label for "switch to symbols" key.
// U+061F: "؟" ARABIC QUESTION MARK
- /* 73 */ "\u06F3\u06F2\u06F1\u061F",
+ /* 79 */ "\u06F3\u06F2\u06F1\u061F",
// Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
// part because it'll be appended by the code.
- /* 74 */ "\u06F3\u06F2\u06F1",
- /* 75 */ "1",
- /* 76 */ "2",
- /* 77 */ "3",
- /* 78 */ "4",
- /* 79 */ "5",
- /* 80 */ "6",
- /* 81 */ "7",
- /* 82 */ "8",
- /* 83 */ "9",
+ /* 80 */ "\u06F3\u06F2\u06F1",
+ /* 81 */ "1",
+ /* 82 */ "2",
+ /* 83 */ "3",
+ /* 84 */ "4",
+ /* 85 */ "5",
+ /* 86 */ "6",
+ /* 87 */ "7",
+ /* 88 */ "8",
+ /* 89 */ "9",
// U+066B: "٫" ARABIC DECIMAL SEPARATOR
// U+066C: "٬" ARABIC THOUSANDS SEPARATOR
- /* 84 */ "0,\u066B,\u066C",
- /* 85~ */
+ /* 90 */ "0,\u066B,\u066C",
+ /* 91~ */
null, null, null, null, null, null, null, null, null, null,
- /* ~94 */
+ /* ~100 */
// U+060C: "،" ARABIC COMMA
- /* 95 */ "\u060C",
- /* 96 */ "\\,",
- /* 97 */ "\u061F",
- /* 98 */ "\u061B",
- // U+066A: "٪" ARABIC PERCENT SIGN
- /* 99 */ "\u066A",
- /* 100 */ null,
- /* 101 */ "?",
- /* 102 */ ";",
- // U+2030: "‰" PER MILLE SIGN
- /* 103 */ "\\%,\u2030",
+ /* 101 */ "\u060C",
+ /* 102 */ "\\,",
// U+060C: "،" ARABIC COMMA
// U+061B: "؛" ARABIC SEMICOLON
// U+061F: "؟" ARABIC QUESTION MARK
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- /* 104 */ "\u060C",
- /* 105 */ "!",
- /* 106 */ "!,\\,",
+ /* 103 */ "\u060C",
+ /* 104 */ "\u061F",
+ /* 105 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB",
+ /* 106 */ null,
/* 107 */ "\u061F",
- /* 108 */ "\u061F,?",
- /* 109 */ "\u060C",
- /* 110 */ "\u061F",
- /* 111 */ "!fixedColumnOrder!4,:,!,\u061F,\u061B,-,/,\u00AB|\u00BB,\u00BB|\u00AB",
+ /* 108 */ "!text/more_keys_for_arabic_diacritics",
+ /* 109 */ null,
+ /* 110 */ "\u064B",
+ /* 111 */ "!text/more_keys_for_arabic_diacritics",
+ /* 112 */ "\u061F",
+ /* 113 */ "\u061B",
+ // U+066A: "٪" ARABIC PERCENT SIGN
+ /* 114 */ "\u066A",
+ /* 115 */ null,
+ // U+00BF: "¿" INVERTED QUESTION MARK
+ /* 116 */ "?,\u00BF",
+ /* 117 */ ";",
+ // U+2030: "‰" PER MILLE SIGN
+ /* 118 */ "\\%,\u2030",
};
/* Language fi: Finnish */
@@ -1614,6 +1627,23 @@ public final class KeyboardTextsSet {
/* 7 */ "\u00E7,\u0107,\u010D",
// U+00FF: "ÿ" LATIN SMALL LETTER Y WITH DIAERESIS
/* 8 */ "%,\u00FF",
+ /* 9~ */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null,
+ /* ~44 */
+ // U+00E8: "è" LATIN SMALL LETTER E WITH GRAVE
+ /* 45 */ "\u00E8",
+ // U+00E9: "é" LATIN SMALL LETTER E WITH ACUTE
+ /* 46 */ "\u00E9",
+ // U+00E0: "à" LATIN SMALL LETTER A WITH GRAVE
+ /* 47 */ "\u00E0",
+ // U+00FC: "ü" LATIN SMALL LETTER U WITH DIAERESIS
+ /* 48 */ "\u00FC",
+ // U+00F6: "ö" LATIN SMALL LETTER O WITH DIAERESIS
+ /* 49 */ "\u00F6",
+ // U+00E4: "ä" LATIN SMALL LETTER A WITH DIAERESIS
+ /* 50 */ "\u00E4",
};
/* Language hi: Hindi */
@@ -1622,55 +1652,56 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0915: "क" DEVANAGARI LETTER KA
// U+0916: "ख" DEVANAGARI LETTER KHA
// U+0917: "ग" DEVANAGARI LETTER GA
- /* 45 */ "\u0915\u0916\u0917",
- /* 46~ */
+ /* 51 */ "\u0915\u0916\u0917",
+ /* 52~ */
null, null, null, null, null,
- /* ~50 */
+ /* ~56 */
// U+20B9: "₹" INDIAN RUPEE SIGN
- /* 51 */ "\u20B9",
- /* 52~ */
+ /* 57 */ "\u20B9",
+ /* 58~ */
null, null, null, null, null, null, null, null, null, null, null,
- /* ~62 */
+ /* ~68 */
// U+0967: "१" DEVANAGARI DIGIT ONE
- /* 63 */ "\u0967",
+ /* 69 */ "\u0967",
// U+0968: "२" DEVANAGARI DIGIT TWO
- /* 64 */ "\u0968",
+ /* 70 */ "\u0968",
// U+0969: "३" DEVANAGARI DIGIT THREE
- /* 65 */ "\u0969",
+ /* 71 */ "\u0969",
// U+096A: "४" DEVANAGARI DIGIT FOUR
- /* 66 */ "\u096A",
+ /* 72 */ "\u096A",
// U+096B: "५" DEVANAGARI DIGIT FIVE
- /* 67 */ "\u096B",
+ /* 73 */ "\u096B",
// U+096C: "६" DEVANAGARI DIGIT SIX
- /* 68 */ "\u096C",
+ /* 74 */ "\u096C",
// U+096D: "७" DEVANAGARI DIGIT SEVEN
- /* 69 */ "\u096D",
+ /* 75 */ "\u096D",
// U+096E: "८" DEVANAGARI DIGIT EIGHT
- /* 70 */ "\u096E",
+ /* 76 */ "\u096E",
// U+096F: "९" DEVANAGARI DIGIT NINE
- /* 71 */ "\u096F",
+ /* 77 */ "\u096F",
// U+0966: "०" DEVANAGARI DIGIT ZERO
- /* 72 */ "\u0966",
+ /* 78 */ "\u0966",
// Label for "switch to symbols" key.
- /* 73 */ "?\u0967\u0968\u0969",
+ /* 79 */ "?\u0967\u0968\u0969",
// Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
// part because it'll be appended by the code.
- /* 74 */ "\u0967\u0968\u0969",
- /* 75 */ "1",
- /* 76 */ "2",
- /* 77 */ "3",
- /* 78 */ "4",
- /* 79 */ "5",
- /* 80 */ "6",
- /* 81 */ "7",
- /* 82 */ "8",
- /* 83 */ "9",
- /* 84 */ "0",
+ /* 80 */ "\u0967\u0968\u0969",
+ /* 81 */ "1",
+ /* 82 */ "2",
+ /* 83 */ "3",
+ /* 84 */ "4",
+ /* 85 */ "5",
+ /* 86 */ "6",
+ /* 87 */ "7",
+ /* 88 */ "8",
+ /* 89 */ "9",
+ /* 90 */ "0",
};
/* Language hr: Croatian */
@@ -1701,12 +1732,12 @@ public final class KeyboardTextsSet {
/* 13~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language hu: Hungarian */
@@ -1755,22 +1786,23 @@ public final class KeyboardTextsSet {
/* 5~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
- /* Language hy: Armenian */
- private static final String[] LANGUAGE_hy = {
+ /* Language hy_AM: Armenian (Armenia) */
+ private static final String[] LANGUAGE_hy_AM = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
- /* ~52 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~58 */
// U+058A: "֊" ARMENIAN HYPHEN
// U+055C: "՜" ARMENIAN EXCLAMATION MARK
// U+055D: "՝" ARMENIAN COMMA
@@ -1779,19 +1811,36 @@ public final class KeyboardTextsSet {
// U+055A: "՚" ARMENIAN APOSTROPHE
// U+055B: "՛" ARMENIAN EMPHASIS MARK
// U+055F: "՟" ARMENIAN ABBREVIATION MARK
- /* 53 */ "!fixedColumnOrder!8,!,?,\\,,.,\u058A,\u055C,\u055D,\u055E,:,;,@,\u0559,\u055A,\u055B,\u055F",
- /* 54~ */
+ /* 59 */ "!fixedColumnOrder!8,!,?,\\,,.,\u058A,\u055C,\u055D,\u055E,:,;,@,\u0559,\u055A,\u055B,\u055F",
+ /* 60~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null,
- /* ~99 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~102 */
+ // U+058F: "֏" ARMENIAN DRAM SIGN
+ // TODO: Enable this when we have glyph for the following letter
+ // <string name="keylabel_for_currency">&#x058F;</string>
+ //
+ // U+055D: "՝" ARMENIAN COMMA
+ /* 103 */ "\u055D",
+ /* 104 */ null,
+ /* 105 */ null,
+ // U+0589: "։" ARMENIAN FULL STOP
+ /* 106 */ "\u0589",
+ /* 107 */ null,
+ /* 108 */ null,
+ /* 109 */ "\u0589",
+ /* 110 */ null,
+ /* 111 */ "!text/more_keys_for_punctuation",
+ /* 112~ */
+ null, null, null,
+ /* ~114 */
// U+055C: "՜" ARMENIAN EXCLAMATION MARK
// U+00A1: "¡" INVERTED EXCLAMATION MARK
- /* 100 */ "\u055C,\u00A1",
+ /* 115 */ "\u055C,\u00A1",
// U+055E: "՞" ARMENIAN QUESTION MARK
// U+00BF: "¿" INVERTED QUESTION MARK
- /* 101 */ "\u055E,\u00BF",
+ /* 116 */ "\u055E,\u00BF",
};
/* Language is: Icelandic */
@@ -1857,10 +1906,10 @@ public final class KeyboardTextsSet {
/* 22 */ "\u00FE",
/* 23~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language it: Italian */
@@ -1914,12 +1963,13 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+05D0: "א" HEBREW LETTER ALEF
// U+05D1: "ב" HEBREW LETTER BET
// U+05D2: "ג" HEBREW LETTER GIMEL
- /* 45 */ "\u05D0\u05D1\u05D2",
+ /* 51 */ "\u05D0\u05D1\u05D2",
// The following characters don't need BIDI mirroring.
// U+2018: "‘" LEFT SINGLE QUOTATION MARK
// U+2019: "’" RIGHT SINGLE QUOTATION MARK
@@ -1927,58 +1977,51 @@ public final class KeyboardTextsSet {
// U+201C: "“" LEFT DOUBLE QUOTATION MARK
// U+201D: "”" RIGHT DOUBLE QUOTATION MARK
// U+201E: "„" DOUBLE LOW-9 QUOTATION MARK
- /* 46 */ "\u2018,\u2019,\u201A",
- /* 47 */ "\u201C,\u201D,\u201E",
- /* 48 */ "!text/single_laqm_raqm_rtl",
- /* 49 */ "!text/double_laqm_raqm_rtl",
- /* 50 */ null,
+ /* 52 */ "\u2018,\u2019,\u201A",
+ /* 53 */ "\u201C,\u201D,\u201E",
+ /* 54 */ "!text/single_laqm_raqm_rtl",
+ /* 55 */ "!text/double_laqm_raqm_rtl",
+ /* 56 */ null,
// U+20AA: "₪" NEW SHEQEL SIGN
- /* 51 */ "\u20AA",
- /* 52 */ null,
- /* 53 */ null,
+ /* 57 */ "\u20AA",
+ /* 58 */ null,
+ /* 59 */ "!fixedColumnOrder!8,;,/,(|),)|(,#,!,\\,,?,&,\\%,+,\",-,:,',@",
+ /* 60 */ "!fixedColumnOrder!7,;,/,(|),)|(,#,',\\,,&,\\%,+,\",-,:,@",
// U+2605: "★" BLACK STAR
- /* 54 */ "\u2605",
- /* 55 */ null,
+ /* 61 */ "\u2605",
+ /* 62 */ null,
// U+00B1: "±" PLUS-MINUS SIGN
// U+FB29: "﬩" HEBREW LETTER ALTERNATIVE PLUS SIGN
- /* 56 */ "\u00B1,\uFB29",
+ /* 63 */ "\u00B1,\uFB29",
// The all letters need to be mirrored are found at
// http://www.unicode.org/Public/6.1.0/ucd/BidiMirroring.txt
- /* 57 */ "!fixedColumnOrder!3,<|>,{|},[|]",
- /* 58 */ "!fixedColumnOrder!3,>|<,}|{,]|[",
+ /* 64 */ "!fixedColumnOrder!3,<|>,{|},[|]",
+ /* 65 */ "!fixedColumnOrder!3,>|<,}|{,]|[",
// U+2264: "≤" LESS-THAN OR EQUAL TO
// U+2265: "≥" GREATER-THAN EQUAL TO
// U+00AB: "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+00BB: "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
// U+2039: "‹" SINGLE LEFT-POINTING ANGLE QUOTATION MARK
// U+203A: "›" SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- /* 59 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
- /* 60 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
- /* 61~ */
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~104 */
- /* 105 */ "!",
- /* 106 */ "!",
- /* 107 */ "?",
- /* 108 */ "?",
+ /* 66 */ "!fixedColumnOrder!3,\u2039|\u203A,\u2264|\u2265,\u00AB|\u00BB",
+ /* 67 */ "!fixedColumnOrder!3,\u203A|\u2039,\u2265|\u2264,\u00BB|\u00AB",
};
- /* Language ka: Georgian */
- private static final String[] LANGUAGE_ka = {
+ /* Language ka_GE: Georgian (Georgia) */
+ private static final String[] LANGUAGE_ka_GE = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+10D0: "ა" GEORGIAN LETTER AN
// U+10D1: "ბ" GEORGIAN LETTER BAN
// U+10D2: "გ" GEORGIAN LETTER GAN
- /* 45 */ "\u10D0\u10D1\u10D2",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ /* 51 */ "\u10D0\u10D1\u10D2",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language kk: Kazakh */
@@ -2021,31 +2064,34 @@ public final class KeyboardTextsSet {
/* ~42 */
// U+0451: "ё" CYRILLIC SMALL LETTER IO
/* 43 */ "\u0451",
- /* 44 */ null,
+ /* 44~ */
+ null, null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
+ /* 51 */ "\u0410\u0411\u0412",
};
- /* Language km: Khmer */
- private static final String[] LANGUAGE_km = {
+ /* Language km_KH: Khmer (Cambodia) */
+ private static final String[] LANGUAGE_km_KH = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+1780: "ក" KHMER LETTER KA
// U+1781: "ខ" KHMER LETTER KHA
// U+1782: "គ" KHMER LETTER KO
- /* 45 */ "\u1780\u1781\u1782",
- /* 46~ */
+ /* 51 */ "\u1780\u1781\u1782",
+ /* 52~ */
null, null, null, null,
- /* ~49 */
+ /* ~55 */
// U+17DB: "៛" KHMER CURRENCY SYMBOL RIEL
- /* 50 */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
+ /* 56 */ "\u17DB,\u00A2,\u00A3,\u20AC,\u00A5,\u20B1",
};
/* Language ky: Kirghiz */
@@ -2081,31 +2127,34 @@ public final class KeyboardTextsSet {
/* ~42 */
// U+0451: "ё" CYRILLIC SMALL LETTER IO
/* 43 */ "\u0451",
- /* 44 */ null,
+ /* 44~ */
+ null, null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
+ /* 51 */ "\u0410\u0411\u0412",
};
- /* Language lo: Lao */
- private static final String[] LANGUAGE_lo = {
+ /* Language lo_LA: Lao (Laos) */
+ private static final String[] LANGUAGE_lo_LA = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0E81: "ກ" LAO LETTER KO
// U+0E82: "ຂ" LAO LETTER KHO SUNG
// U+0E84: "ຄ" LAO LETTER KHO TAM
- /* 45 */ "\u0E81\u0E82\u0E84",
- /* 46~ */
+ /* 51 */ "\u0E81\u0E82\u0E84",
+ /* 52~ */
null, null, null, null, null,
- /* ~50 */
+ /* ~56 */
// U+20AD: "₭" KIP SIGN
- /* 51 */ "\u20AD",
+ /* 57 */ "\u20AD",
};
/* Language lt: Lithuanian */
@@ -2199,9 +2248,10 @@ public final class KeyboardTextsSet {
/* 16~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language lv: Latvian */
@@ -2294,9 +2344,10 @@ public final class KeyboardTextsSet {
/* 16~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language mk: Macedonian */
@@ -2318,32 +2369,36 @@ public final class KeyboardTextsSet {
/* 43 */ "\u0450",
// U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE
/* 44 */ "\u045D",
+ /* 45~ */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
- /* Language mn: Mongolian */
- private static final String[] LANGUAGE_mn = {
+ /* Language mn_MN: Mongolian (Mongolia) */
+ private static final String[] LANGUAGE_mn_MN = {
/* 0~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46~ */
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52~ */
null, null, null, null, null,
- /* ~50 */
+ /* ~56 */
// U+20AE: "₮" TUGRIK SIGN
- /* 51 */ "\u20AE",
+ /* 57 */ "\u20AE",
};
/* Language nb: Norwegian Bokmål */
@@ -2393,10 +2448,10 @@ public final class KeyboardTextsSet {
/* 24 */ "\u00E4",
/* 25~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
+ null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
};
/* Language ne: Nepali */
@@ -2405,55 +2460,56 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0915: "क" DEVANAGARI LETTER KA
// U+0916: "ख" DEVANAGARI LETTER KHA
// U+0917: "ग" DEVANAGARI LETTER GA
- /* 45 */ "\u0915\u0916\u0917",
- /* 46~ */
+ /* 51 */ "\u0915\u0916\u0917",
+ /* 52~ */
null, null, null, null, null,
- /* ~50 */
+ /* ~56 */
// U+0930/U+0941/U+002E "रु." NEPALESE RUPEE SIGN
- /* 51 */ "\u0930\u0941.",
- /* 52~ */
+ /* 57 */ "\u0930\u0941.",
+ /* 58~ */
null, null, null, null, null, null, null, null, null, null, null,
- /* ~62 */
+ /* ~68 */
// U+0967: "१" DEVANAGARI DIGIT ONE
- /* 63 */ "\u0967",
+ /* 69 */ "\u0967",
// U+0968: "२" DEVANAGARI DIGIT TWO
- /* 64 */ "\u0968",
+ /* 70 */ "\u0968",
// U+0969: "३" DEVANAGARI DIGIT THREE
- /* 65 */ "\u0969",
+ /* 71 */ "\u0969",
// U+096A: "४" DEVANAGARI DIGIT FOUR
- /* 66 */ "\u096A",
+ /* 72 */ "\u096A",
// U+096B: "५" DEVANAGARI DIGIT FIVE
- /* 67 */ "\u096B",
+ /* 73 */ "\u096B",
// U+096C: "६" DEVANAGARI DIGIT SIX
- /* 68 */ "\u096C",
+ /* 74 */ "\u096C",
// U+096D: "७" DEVANAGARI DIGIT SEVEN
- /* 69 */ "\u096D",
+ /* 75 */ "\u096D",
// U+096E: "८" DEVANAGARI DIGIT EIGHT
- /* 70 */ "\u096E",
+ /* 76 */ "\u096E",
// U+096F: "९" DEVANAGARI DIGIT NINE
- /* 71 */ "\u096F",
+ /* 77 */ "\u096F",
// U+0966: "०" DEVANAGARI DIGIT ZERO
- /* 72 */ "\u0966",
+ /* 78 */ "\u0966",
// Label for "switch to symbols" key.
- /* 73 */ "?\u0967\u0968\u0969",
+ /* 79 */ "?\u0967\u0968\u0969",
// Label for "switch to symbols with microphone" key. This string shouldn't include the "mic"
// part because it'll be appended by the code.
- /* 74 */ "\u0967\u0968\u0969",
- /* 75 */ "1",
- /* 76 */ "2",
- /* 77 */ "3",
- /* 78 */ "4",
- /* 79 */ "5",
- /* 80 */ "6",
- /* 81 */ "7",
- /* 82 */ "8",
- /* 83 */ "9",
- /* 84 */ "0",
+ /* 80 */ "\u0967\u0968\u0969",
+ /* 81 */ "1",
+ /* 82 */ "2",
+ /* 83 */ "3",
+ /* 84 */ "4",
+ /* 85 */ "5",
+ /* 86 */ "6",
+ /* 87 */ "7",
+ /* 88 */ "8",
+ /* 89 */ "9",
+ /* 90 */ "0",
};
/* Language nl: Dutch */
@@ -2508,10 +2564,10 @@ public final class KeyboardTextsSet {
/* 9~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
};
/* Language pl: Polish */
@@ -2569,10 +2625,10 @@ public final class KeyboardTextsSet {
/* 15~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
+ null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
};
/* Language pt: Portuguese */
@@ -2675,10 +2731,10 @@ public final class KeyboardTextsSet {
/* 12~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_rqm",
- /* 47 */ "!text/double_9qm_rqm",
+ null, null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_rqm",
+ /* 53 */ "!text/double_9qm_rqm",
};
/* Language ru: Russian */
@@ -2707,14 +2763,16 @@ public final class KeyboardTextsSet {
/* ~42 */
// U+0451: "ё" CYRILLIC SMALL LETTER IO
/* 43 */ "\u0451",
- /* 44 */ null,
+ /* 44~ */
+ null, null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
};
/* Language sk: Slovak */
@@ -2808,11 +2866,12 @@ public final class KeyboardTextsSet {
/* 16~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language sl: Slovenian */
@@ -2836,12 +2895,12 @@ public final class KeyboardTextsSet {
/* 13~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null,
- /* ~45 */
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null,
+ /* ~51 */
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language sr: Serbian */
@@ -2881,16 +2940,19 @@ public final class KeyboardTextsSet {
/* 43 */ "\u0450",
// U+045D: "ѝ" CYRILLIC SMALL LETTER I WITH GRAVE
/* 44 */ "\u045D",
+ /* 45~ */
+ null, null, null, null, null, null,
+ /* ~50 */
// END: More keys definitions for Serbian (Cyrillic)
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language sv: Swedish */
@@ -2972,10 +3034,10 @@ public final class KeyboardTextsSet {
/* 24 */ "\u00E6",
/* 25~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null,
- /* ~47 */
- /* 48 */ "!text/single_raqm_laqm",
- /* 49 */ "!text/double_raqm_laqm",
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~53 */
+ /* 54 */ "!text/single_raqm_laqm",
+ /* 55 */ "!text/double_raqm_laqm",
};
/* Language sw: Swahili */
@@ -3035,17 +3097,18 @@ public final class KeyboardTextsSet {
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0E01: "ก" THAI CHARACTER KO KAI
// U+0E02: "ข" THAI CHARACTER KHO KHAI
// U+0E04: "ค" THAI CHARACTER KHO KHWAI
- /* 45 */ "\u0E01\u0E02\u0E04",
- /* 46~ */
+ /* 51 */ "\u0E01\u0E02\u0E04",
+ /* 52~ */
null, null, null, null, null,
- /* ~50 */
+ /* ~56 */
// U+0E3F: "฿" THAI CURRENCY SYMBOL BAHT
- /* 51 */ "\u0E3F",
+ /* 57 */ "\u0E3F",
};
/* Language tl: Tagalog */
@@ -3175,20 +3238,20 @@ public final class KeyboardTextsSet {
// U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN
/* 37 */ "\u044A",
/* 38~ */
- null, null, null, null, null, null, null,
- /* ~44 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null,
+ /* ~50 */
// Label for "switch to alphabetic" key.
// U+0410: "А" CYRILLIC CAPITAL LETTER A
// U+0411: "Б" CYRILLIC CAPITAL LETTER BE
// U+0412: "В" CYRILLIC CAPITAL LETTER VE
- /* 45 */ "\u0410\u0411\u0412",
- /* 46 */ "!text/single_9qm_lqm",
- /* 47 */ "!text/double_9qm_lqm",
- /* 48~ */
+ /* 51 */ "\u0410\u0411\u0412",
+ /* 52 */ "!text/single_9qm_lqm",
+ /* 53 */ "!text/double_9qm_lqm",
+ /* 54~ */
null, null, null,
- /* ~50 */
+ /* ~56 */
// U+20B4: "₴" HRYVNIA SIGN
- /* 51 */ "\u20B4",
+ /* 57 */ "\u20B4",
};
/* Language vi: Vietnamese */
@@ -3273,10 +3336,11 @@ public final class KeyboardTextsSet {
/* 10~ */
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null, null,
- /* ~50 */
+ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null,
+ /* ~56 */
// U+20AB: "₫" DONG SIGN
- /* 51 */ "\u20AB",
+ /* 57 */ "\u20AB",
};
/* Language zu: Zulu */
@@ -3449,12 +3513,14 @@ public final class KeyboardTextsSet {
/* 19 */ "\u0175",
};
+ // TODO: Use the language + "_" + region representation for the locale string key.
+ // Currently we are dropping the region from the key.
private static final Object[] LANGUAGES_AND_TEXTS = {
"DEFAULT", LANGUAGE_DEFAULT, /* default */
"af", LANGUAGE_af, /* Afrikaans */
"ar", LANGUAGE_ar, /* Arabic */
"az", LANGUAGE_az, /* Azerbaijani */
- "be", LANGUAGE_be, /* Belarusian */
+ "be" /* "be_BY" */, LANGUAGE_be_BY, /* Belarusian (Belarus) */
"bg", LANGUAGE_bg, /* Bulgarian */
"ca", LANGUAGE_ca, /* Catalan */
"cs", LANGUAGE_cs, /* Czech */
@@ -3464,26 +3530,26 @@ public final class KeyboardTextsSet {
"en", LANGUAGE_en, /* English */
"eo", LANGUAGE_eo, /* Esperanto */
"es", LANGUAGE_es, /* Spanish */
- "et", LANGUAGE_et, /* Estonian */
+ "et" /* "et_EE" */, LANGUAGE_et_EE, /* Estonian (Estonia) */
"fa", LANGUAGE_fa, /* Persian */
"fi", LANGUAGE_fi, /* Finnish */
"fr", LANGUAGE_fr, /* French */
"hi", LANGUAGE_hi, /* Hindi */
"hr", LANGUAGE_hr, /* Croatian */
"hu", LANGUAGE_hu, /* Hungarian */
- "hy", LANGUAGE_hy, /* Armenian */
+ "hy" /* "hy_AM" */, LANGUAGE_hy_AM, /* Armenian (Armenia) */
"is", LANGUAGE_is, /* Icelandic */
"it", LANGUAGE_it, /* Italian */
"iw", LANGUAGE_iw, /* Hebrew */
- "ka", LANGUAGE_ka, /* Georgian */
+ "ka" /* "ka_GE" */, LANGUAGE_ka_GE, /* Georgian (Georgia) */
"kk", LANGUAGE_kk, /* Kazakh */
- "km", LANGUAGE_km, /* Khmer */
+ "km" /* "km_KH" */, LANGUAGE_km_KH, /* Khmer (Cambodia) */
"ky", LANGUAGE_ky, /* Kirghiz */
- "lo", LANGUAGE_lo, /* Lao */
+ "lo" /* "lo_LA" */, LANGUAGE_lo_LA, /* Lao (Laos) */
"lt", LANGUAGE_lt, /* Lithuanian */
"lv", LANGUAGE_lv, /* Latvian */
"mk", LANGUAGE_mk, /* Macedonian */
- "mn", LANGUAGE_mn, /* Mongolian */
+ "mn" /* "mn_MN" */, LANGUAGE_mn_MN, /* Mongolian (Mongolia) */
"nb", LANGUAGE_nb, /* Norwegian Bokmål */
"ne", LANGUAGE_ne, /* Nepali */
"nl", LANGUAGE_nl, /* Dutch */
diff --git a/java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java b/java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java
index a0935b985..111eb6db6 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/NonDistinctMultitouchHelper.java
@@ -20,18 +20,24 @@ import android.util.Log;
import android.view.MotionEvent;
import com.android.inputmethod.keyboard.Key;
+import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.PointerTracker;
-import com.android.inputmethod.keyboard.PointerTracker.KeyEventHandler;
import com.android.inputmethod.latin.utils.CoordinateUtils;
public final class NonDistinctMultitouchHelper {
private static final String TAG = NonDistinctMultitouchHelper.class.getSimpleName();
+ // Use only main (id=0) pointer tracker.
+ private final PointerTracker mMainTracker;
private int mOldPointerCount = 1;
private Key mOldKey;
private int[] mLastCoords = CoordinateUtils.newInstance();
- public void processMotionEvent(final MotionEvent me, final KeyEventHandler keyEventHandler) {
+ public NonDistinctMultitouchHelper(final PointerTracker mainTracker) {
+ mMainTracker = mainTracker;
+ }
+
+ public void processMotionEvent(final MotionEvent me, final KeyDetector keyDetector) {
final int pointerCount = me.getPointerCount();
final int oldPointerCount = mOldPointerCount;
mOldPointerCount = pointerCount;
@@ -41,8 +47,7 @@ public final class NonDistinctMultitouchHelper {
return;
}
- // Use only main (id=0) pointer tracker.
- final PointerTracker mainTracker = PointerTracker.getPointerTracker(0, keyEventHandler);
+ final PointerTracker mainTracker = mMainTracker;
final int action = me.getActionMasked();
final int index = me.getActionIndex();
final long eventTime = me.getEventTime();
@@ -51,12 +56,12 @@ public final class NonDistinctMultitouchHelper {
// In single-touch.
if (oldPointerCount == 1 && pointerCount == 1) {
if (me.getPointerId(index) == mainTracker.mPointerId) {
- mainTracker.processMotionEvent(me, keyEventHandler);
+ mainTracker.processMotionEvent(me, keyDetector);
return;
}
// Inject a copied event.
injectMotionEvent(action, me.getX(index), me.getY(index), downTime, eventTime,
- mainTracker, keyEventHandler);
+ mainTracker, keyDetector);
return;
}
@@ -70,7 +75,7 @@ public final class NonDistinctMultitouchHelper {
mOldKey = mainTracker.getKeyOn(x, y);
// Inject an artifact up event for the old key.
injectMotionEvent(MotionEvent.ACTION_UP, x, y, downTime, eventTime,
- mainTracker, keyEventHandler);
+ mainTracker, keyDetector);
return;
}
@@ -85,11 +90,11 @@ public final class NonDistinctMultitouchHelper {
// Inject an artifact down event for the new key.
// An artifact up event for the new key will usually be injected as a single-touch.
injectMotionEvent(MotionEvent.ACTION_DOWN, x, y, downTime, eventTime,
- mainTracker, keyEventHandler);
+ mainTracker, keyDetector);
if (action == MotionEvent.ACTION_UP) {
// Inject an artifact up event for the new key also.
injectMotionEvent(MotionEvent.ACTION_UP, x, y, downTime, eventTime,
- mainTracker, keyEventHandler);
+ mainTracker, keyDetector);
}
}
return;
@@ -101,11 +106,11 @@ public final class NonDistinctMultitouchHelper {
private static void injectMotionEvent(final int action, final float x, final float y,
final long downTime, final long eventTime, final PointerTracker tracker,
- final KeyEventHandler handler) {
+ final KeyDetector keyDetector) {
final MotionEvent me = MotionEvent.obtain(
downTime, eventTime, action, x, y, 0 /* metaState */);
try {
- tracker.processMotionEvent(me, handler);
+ tracker.processMotionEvent(me, keyDetector);
} finally {
me.recycle();
}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java b/java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java
index 7ee45e8f6..5ac34188c 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/PointerTrackerQueue.java
@@ -28,7 +28,7 @@ public final class PointerTrackerQueue {
public interface Element {
public boolean isModifier();
- public boolean isInSlidingKeyInput();
+ public boolean isInDraggingFinger();
public void onPhantomUpEvent(long eventTime);
public void cancelTrackingForAction();
}
@@ -193,13 +193,13 @@ public final class PointerTrackerQueue {
}
}
- public boolean isAnyInSlidingKeyInput() {
+ public boolean isAnyInDraggingFinger() {
synchronized (mExpandableArrayOfActivePointers) {
final ArrayList<Element> expandableArray = mExpandableArrayOfActivePointers;
final int arraySize = mArraySize;
for (int index = 0; index < arraySize; index++) {
final Element element = expandableArray.get(index);
- if (element.isInSlidingKeyInput()) {
+ if (element.isInDraggingFinger()) {
return true;
}
}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/ScrollViewWithNotifier.java b/java/src/com/android/inputmethod/keyboard/internal/ScrollViewWithNotifier.java
deleted file mode 100644
index d1ccdc7b5..000000000
--- a/java/src/com/android/inputmethod/keyboard/internal/ScrollViewWithNotifier.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.keyboard.internal;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.ScrollView;
-
-/**
- * This is an extended {@link ScrollView} that can notify
- * {@link ScrollView#onScrollChanged(int,int,int,int} and
- * {@link ScrollView#onOverScrolled(int,int,int,int)} to a content view.
- */
-public class ScrollViewWithNotifier extends ScrollView {
- private ScrollListener mScrollListener = EMPTY_LISTER;
-
- public interface ScrollListener {
- public void notifyScrollChanged(int scrollX, int scrollY, int oldX, int oldY);
- public void notifyOverScrolled(int scrollX, int scrollY, boolean clampedX,
- boolean clampedY);
- }
-
- private static final ScrollListener EMPTY_LISTER = new ScrollListener() {
- @Override
- public void notifyScrollChanged(int scrollX, int scrollY, int oldX, int oldY) {}
- @Override
- public void notifyOverScrolled(int scrollX, int scrollY, boolean clampedX,
- boolean clampedY) {}
- };
-
- public ScrollViewWithNotifier(final Context context, final AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- protected void onScrollChanged(final int scrollX, final int scrollY, final int oldX,
- final int oldY) {
- super.onScrollChanged(scrollX, scrollY, oldX, oldY);
- mScrollListener.notifyScrollChanged(scrollX, scrollY, oldX, oldY);
- }
-
- @Override
- protected void onOverScrolled(final int scrollX, final int scrollY, final boolean clampedX,
- final boolean clampedY) {
- super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
- mScrollListener.notifyOverScrolled(scrollX, scrollY, clampedX, clampedY);
- }
-
- public void setScrollListener(final ScrollListener listener) {
- mScrollListener = listener;
- }
-}
diff --git a/java/src/com/android/inputmethod/keyboard/internal/TimerHandler.java b/java/src/com/android/inputmethod/keyboard/internal/TimerHandler.java
new file mode 100644
index 000000000..88d0878d1
--- /dev/null
+++ b/java/src/com/android/inputmethod/keyboard/internal/TimerHandler.java
@@ -0,0 +1,206 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.internal;
+
+import android.os.Message;
+import android.os.SystemClock;
+import android.view.ViewConfiguration;
+
+import com.android.inputmethod.keyboard.Key;
+import com.android.inputmethod.keyboard.PointerTracker;
+import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
+import com.android.inputmethod.keyboard.internal.TimerHandler.Callbacks;
+import com.android.inputmethod.latin.Constants;
+import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
+
+// TODO: Separate this class into KeyTimerHandler and BatchInputTimerHandler or so.
+public final class TimerHandler extends LeakGuardHandlerWrapper<Callbacks> implements TimerProxy {
+ public interface Callbacks {
+ public void startWhileTypingFadeinAnimation();
+ public void startWhileTypingFadeoutAnimation();
+ public void onLongPress(PointerTracker tracker);
+ }
+
+ private static final int MSG_TYPING_STATE_EXPIRED = 0;
+ private static final int MSG_REPEAT_KEY = 1;
+ private static final int MSG_LONGPRESS_KEY = 2;
+ private static final int MSG_DOUBLE_TAP_SHIFT_KEY = 3;
+ private static final int MSG_UPDATE_BATCH_INPUT = 4;
+
+ private final int mIgnoreAltCodeKeyTimeout;
+ private final int mGestureRecognitionUpdateTime;
+
+ public TimerHandler(final Callbacks ownerInstance, final int ignoreAltCodeKeyTimeout,
+ final int gestureRecognitionUpdateTime) {
+ super(ownerInstance);
+ mIgnoreAltCodeKeyTimeout = ignoreAltCodeKeyTimeout;
+ mGestureRecognitionUpdateTime = gestureRecognitionUpdateTime;
+ }
+
+ @Override
+ public void handleMessage(final Message msg) {
+ final Callbacks callbacks = getOwnerInstance();
+ if (callbacks == null) {
+ return;
+ }
+ final PointerTracker tracker = (PointerTracker) msg.obj;
+ switch (msg.what) {
+ case MSG_TYPING_STATE_EXPIRED:
+ callbacks.startWhileTypingFadeinAnimation();
+ break;
+ case MSG_REPEAT_KEY:
+ tracker.onKeyRepeat(msg.arg1 /* code */, msg.arg2 /* repeatCount */);
+ break;
+ case MSG_LONGPRESS_KEY:
+ cancelLongPressTimers();
+ callbacks.onLongPress(tracker);
+ break;
+ case MSG_UPDATE_BATCH_INPUT:
+ tracker.updateBatchInputByTimer(SystemClock.uptimeMillis());
+ startUpdateBatchInputTimer(tracker);
+ break;
+ }
+ }
+
+ @Override
+ public void startKeyRepeatTimerOf(final PointerTracker tracker, final int repeatCount,
+ final int delay) {
+ final Key key = tracker.getKey();
+ if (key == null || delay == 0) {
+ return;
+ }
+ sendMessageDelayed(
+ obtainMessage(MSG_REPEAT_KEY, key.getCode(), repeatCount, tracker), delay);
+ }
+
+ private void cancelKeyRepeatTimerOf(final PointerTracker tracker) {
+ removeMessages(MSG_REPEAT_KEY, tracker);
+ }
+
+ public void cancelKeyRepeatTimers() {
+ removeMessages(MSG_REPEAT_KEY);
+ }
+
+ // TODO: Suppress layout changes in key repeat mode
+ public boolean isInKeyRepeat() {
+ return hasMessages(MSG_REPEAT_KEY);
+ }
+
+ @Override
+ public void startLongPressTimerOf(final PointerTracker tracker, final int delay) {
+ if (delay <= 0) {
+ return;
+ }
+ sendMessageDelayed(obtainMessage(MSG_LONGPRESS_KEY, tracker), delay);
+ }
+
+ @Override
+ public void cancelLongPressTimerOf(final PointerTracker tracker) {
+ removeMessages(MSG_LONGPRESS_KEY, tracker);
+ }
+
+ private void cancelLongPressTimers() {
+ removeMessages(MSG_LONGPRESS_KEY);
+ }
+
+ @Override
+ public void startTypingStateTimer(final Key typedKey) {
+ if (typedKey.isModifier() || typedKey.altCodeWhileTyping()) {
+ return;
+ }
+
+ final boolean isTyping = isTypingState();
+ removeMessages(MSG_TYPING_STATE_EXPIRED);
+ final Callbacks callbacks = getOwnerInstance();
+ if (callbacks == null) {
+ return;
+ }
+
+ // When user hits the space or the enter key, just cancel the while-typing timer.
+ final int typedCode = typedKey.getCode();
+ if (typedCode == Constants.CODE_SPACE || typedCode == Constants.CODE_ENTER) {
+ if (isTyping) {
+ callbacks.startWhileTypingFadeinAnimation();
+ }
+ return;
+ }
+
+ sendMessageDelayed(
+ obtainMessage(MSG_TYPING_STATE_EXPIRED), mIgnoreAltCodeKeyTimeout);
+ if (isTyping) {
+ return;
+ }
+ callbacks.startWhileTypingFadeoutAnimation();
+ }
+
+ @Override
+ public boolean isTypingState() {
+ return hasMessages(MSG_TYPING_STATE_EXPIRED);
+ }
+
+ @Override
+ public void startDoubleTapShiftKeyTimer() {
+ sendMessageDelayed(obtainMessage(MSG_DOUBLE_TAP_SHIFT_KEY),
+ ViewConfiguration.getDoubleTapTimeout());
+ }
+
+ @Override
+ public void cancelDoubleTapShiftKeyTimer() {
+ removeMessages(MSG_DOUBLE_TAP_SHIFT_KEY);
+ }
+
+ @Override
+ public boolean isInDoubleTapShiftKeyTimeout() {
+ return hasMessages(MSG_DOUBLE_TAP_SHIFT_KEY);
+ }
+
+ @Override
+ public void cancelKeyTimersOf(final PointerTracker tracker) {
+ cancelKeyRepeatTimerOf(tracker);
+ cancelLongPressTimerOf(tracker);
+ }
+
+ public void cancelAllKeyTimers() {
+ cancelKeyRepeatTimers();
+ cancelLongPressTimers();
+ }
+
+ @Override
+ public void startUpdateBatchInputTimer(final PointerTracker tracker) {
+ if (mGestureRecognitionUpdateTime <= 0) {
+ return;
+ }
+ removeMessages(MSG_UPDATE_BATCH_INPUT, tracker);
+ sendMessageDelayed(obtainMessage(MSG_UPDATE_BATCH_INPUT, tracker),
+ mGestureRecognitionUpdateTime);
+ }
+
+ @Override
+ public void cancelUpdateBatchInputTimer(final PointerTracker tracker) {
+ removeMessages(MSG_UPDATE_BATCH_INPUT, tracker);
+ }
+
+ @Override
+ public void cancelAllUpdateBatchInputTimers() {
+ removeMessages(MSG_UPDATE_BATCH_INPUT);
+ }
+
+ public void cancelAllMessages() {
+ cancelAllKeyTimers();
+ cancelAllUpdateBatchInputTimers();
+ }
+}
diff --git a/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
index 463d09344..e6fb9807e 100644
--- a/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
+++ b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
@@ -27,15 +27,13 @@ import java.io.File;
import java.io.IOException;
import java.util.Map;
-// TODO: Quit extending Dictionary after implementing dynamic binary dictionary.
-abstract public class AbstractDictionaryWriter extends Dictionary {
+abstract public class AbstractDictionaryWriter {
/** Used for Log actions from this class */
private static final String TAG = AbstractDictionaryWriter.class.getSimpleName();
private final Context mContext;
- public AbstractDictionaryWriter(final Context context, final String dictType) {
- super(dictType);
+ public AbstractDictionaryWriter(final Context context) {
mContext = context;
}
@@ -55,18 +53,16 @@ abstract public class AbstractDictionaryWriter extends Dictionary {
// TODO: Remove lastModifiedTime after making binary dictionary support forgetting curve.
abstract public void addBigramWords(final String word0, final String word1,
- final int frequency, final boolean isValid,
- final long lastModifiedTime);
+ final int frequency, final boolean isValid, final long lastModifiedTime);
abstract public void removeBigramWords(final String word0, final String word1);
abstract protected void writeDictionary(final DictEncoder dictEncoder,
final Map<String, String> attributeMap) throws IOException, UnsupportedFormatException;
- public void write(final String fileName, final Map<String, String> attributeMap) {
- final String tempFileName = fileName + ".temp";
- final File file = new File(mContext.getFilesDir(), fileName);
- final File tempFile = new File(mContext.getFilesDir(), tempFileName);
+ public void write(final File file, final Map<String, String> attributeMap) {
+ final String tempFilePath = file.getAbsolutePath() + ".temp";
+ final File tempFile = new File(tempFilePath);
try {
final DictEncoder dictEncoder = new Ver3DictEncoder(tempFile);
writeDictionary(dictEncoder, attributeMap);
diff --git a/java/src/com/android/inputmethod/latin/AssetFileAddress.java b/java/src/com/android/inputmethod/latin/AssetFileAddress.java
index 875192554..fd6c24dfe 100644
--- a/java/src/com/android/inputmethod/latin/AssetFileAddress.java
+++ b/java/src/com/android/inputmethod/latin/AssetFileAddress.java
@@ -16,6 +16,8 @@
package com.android.inputmethod.latin;
+import com.android.inputmethod.latin.utils.FileUtils;
+
import java.io.File;
/**
@@ -52,4 +54,12 @@ public final class AssetFileAddress {
if (!f.isFile()) return null;
return new AssetFileAddress(filename, offset, length);
}
+
+ public boolean pointsToPhysicalFile() {
+ return 0 == mOffset;
+ }
+
+ public void deleteUnderlyingFile() {
+ FileUtils.deleteRecursively(new File(mFilename));
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index fd296988e..db4234c63 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -26,6 +26,7 @@ import com.android.inputmethod.latin.settings.NativeSuggestOptions;
import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.JniUtils;
import com.android.inputmethod.latin.utils.StringUtils;
+import com.android.inputmethod.latin.utils.UnigramProperty;
import java.io.File;
import java.util.ArrayList;
@@ -57,6 +58,21 @@ public final class BinaryDictionary extends Dictionary {
@UsedForTesting
public static final String MAX_BIGRAM_COUNT_QUERY = "MAX_BIGRAM_COUNT";
+ public static final int NOT_A_VALID_TIMESTAMP = -1;
+
+ // Format to get unigram flags from native side via getUnigramPropertyNative().
+ private static final int FORMAT_UNIGRAM_PROPERTY_OUTPUT_FLAG_COUNT = 4;
+ private static final int FORMAT_UNIGRAM_PROPERTY_IS_NOT_A_WORD_INDEX = 0;
+ private static final int FORMAT_UNIGRAM_PROPERTY_IS_BLACKLISTED_INDEX = 1;
+ private static final int FORMAT_UNIGRAM_PROPERTY_HAS_BIGRAMS_INDEX = 2;
+ private static final int FORMAT_UNIGRAM_PROPERTY_HAS_SHORTCUTS_INDEX = 3;
+
+ // Format to get unigram historical info from native side via getUnigramPropertyNative().
+ private static final int FORMAT_UNIGRAM_PROPERTY_OUTPUT_HISTORICAL_INFO_COUNT = 3;
+ private static final int FORMAT_UNIGRAM_PROPERTY_TIMESTAMP_INDEX = 0;
+ private static final int FORMAT_UNIGRAM_PROPERTY_LEVEL_INDEX = 1;
+ private static final int FORMAT_UNIGRAM_PROPERTY_COUNT_INDEX = 2;
+
private long mNativeDict;
private final Locale mLocale;
private final long mDictSize;
@@ -123,8 +139,13 @@ public final class BinaryDictionary extends Dictionary {
private static native boolean needsToRunGCNative(long dict, boolean mindsBlockByGC);
private static native void flushWithGCNative(long dict, String filePath);
private static native void closeNative(long dict);
+ private static native int getFormatVersionNative(long dict);
private static native int getProbabilityNative(long dict, int[] word);
private static native int getBigramProbabilityNative(long dict, int[] word0, int[] word1);
+ private static native void getUnigramPropertyNative(long dict, int[] word,
+ int[] outCodePoints, boolean[] outFlags, int[] outProbability,
+ int[] outHistoricalInfo, ArrayList<int[]> outShortcutTargets,
+ ArrayList<Integer> outShortcutProbabilities);
private static native int getSuggestionsNative(long dict, long proximityInfo,
long traverseSession, int[] xCoordinates, int[] yCoordinates, int[] times,
int[] pointerIds, int[] inputCodePoints, int inputSize, int commitPoint,
@@ -133,10 +154,14 @@ public final class BinaryDictionary extends Dictionary {
int[] outputAutoCommitFirstWordConfidence);
private static native float calcNormalizedScoreNative(int[] before, int[] after, int score);
private static native int editDistanceNative(int[] before, int[] after);
- private static native void addUnigramWordNative(long dict, int[] word, int probability);
+ private static native void addUnigramWordNative(long dict, int[] word, int probability,
+ int[] shortcutTarget, int shortcutProbability, boolean isNotAWord,
+ boolean isBlacklisted, int timestamp);
private static native void addBigramWordsNative(long dict, int[] word0, int[] word1,
- int probability);
+ int probability, int timestamp);
private static native void removeBigramWordsNative(long dict, int[] word0, int[] word1);
+ private static native int addMultipleDictionaryEntriesNative(long dict,
+ LanguageModelParam[] languageModelParams, int startIndex);
private static native int calculateProbabilityNative(long dict, int unigramProbability,
int bigramProbability);
private static native String getPropertyNative(long dict, String query);
@@ -235,6 +260,10 @@ public final class BinaryDictionary extends Dictionary {
return mNativeDict != 0;
}
+ public int getFormatVersion() {
+ return getFormatVersionNative(mNativeDict);
+ }
+
public static float calcNormalizedScore(final String before, final String after,
final int score) {
return calcNormalizedScoreNative(StringUtils.toCodePointArray(before),
@@ -274,23 +303,55 @@ public final class BinaryDictionary extends Dictionary {
return getBigramProbabilityNative(mNativeDict, codePoints0, codePoints1);
}
- // Add a unigram entry to binary dictionary in native code.
- public void addUnigramWord(final String word, final int probability) {
+ @UsedForTesting
+ public UnigramProperty getUnigramProperty(final String word) {
+ if (TextUtils.isEmpty(word)) {
+ return null;
+ }
+ final int[] codePoints = StringUtils.toCodePointArray(word);
+ final int[] outCodePoints = new int[MAX_WORD_LENGTH];
+ final boolean[] outFlags = new boolean[FORMAT_UNIGRAM_PROPERTY_OUTPUT_FLAG_COUNT];
+ final int[] outProbability = new int[1];
+ final int[] outHistoricalInfo =
+ new int[FORMAT_UNIGRAM_PROPERTY_OUTPUT_HISTORICAL_INFO_COUNT];
+ final ArrayList<int[]> outShortcutTargets = CollectionUtils.newArrayList();
+ final ArrayList<Integer> outShortcutProbabilities = CollectionUtils.newArrayList();
+ getUnigramPropertyNative(mNativeDict, codePoints, outCodePoints, outFlags, outProbability,
+ outHistoricalInfo, outShortcutTargets, outShortcutProbabilities);
+ return new UnigramProperty(codePoints,
+ outFlags[FORMAT_UNIGRAM_PROPERTY_IS_NOT_A_WORD_INDEX],
+ outFlags[FORMAT_UNIGRAM_PROPERTY_IS_BLACKLISTED_INDEX],
+ outFlags[FORMAT_UNIGRAM_PROPERTY_HAS_BIGRAMS_INDEX],
+ outFlags[FORMAT_UNIGRAM_PROPERTY_HAS_SHORTCUTS_INDEX], outProbability[0],
+ outHistoricalInfo[FORMAT_UNIGRAM_PROPERTY_TIMESTAMP_INDEX],
+ outHistoricalInfo[FORMAT_UNIGRAM_PROPERTY_LEVEL_INDEX],
+ outHistoricalInfo[FORMAT_UNIGRAM_PROPERTY_COUNT_INDEX],
+ outShortcutTargets, outShortcutProbabilities);
+ }
+
+ // Add a unigram entry to binary dictionary with unigram attributes in native code.
+ public void addUnigramWord(final String word, final int probability,
+ final String shortcutTarget, final int shortcutProbability, final boolean isNotAWord,
+ final boolean isBlacklisted, final int timestamp) {
if (TextUtils.isEmpty(word)) {
return;
}
final int[] codePoints = StringUtils.toCodePointArray(word);
- addUnigramWordNative(mNativeDict, codePoints, probability);
+ final int[] shortcutTargetCodePoints = (shortcutTarget != null) ?
+ StringUtils.toCodePointArray(shortcutTarget) : null;
+ addUnigramWordNative(mNativeDict, codePoints, probability, shortcutTargetCodePoints,
+ shortcutProbability, isNotAWord, isBlacklisted, timestamp);
}
- // Add a bigram entry to binary dictionary in native code.
- public void addBigramWords(final String word0, final String word1, final int probability) {
+ // Add a bigram entry to binary dictionary with timestamp in native code.
+ public void addBigramWords(final String word0, final String word1, final int probability,
+ final int timestamp) {
if (TextUtils.isEmpty(word0) || TextUtils.isEmpty(word1)) {
return;
}
final int[] codePoints0 = StringUtils.toCodePointArray(word0);
final int[] codePoints1 = StringUtils.toCodePointArray(word1);
- addBigramWordsNative(mNativeDict, codePoints0, codePoints1, probability);
+ addBigramWordsNative(mNativeDict, codePoints0, codePoints1, probability, timestamp);
}
// Remove a bigram entry form binary dictionary in native code.
@@ -303,10 +364,70 @@ public final class BinaryDictionary extends Dictionary {
removeBigramWordsNative(mNativeDict, codePoints0, codePoints1);
}
+ public static class LanguageModelParam {
+ public final int[] mWord0;
+ public final int[] mWord1;
+ public final int[] mShortcutTarget;
+ public final int mUnigramProbability;
+ public final int mBigramProbability;
+ public final int mShortcutProbability;
+ public final boolean mIsNotAWord;
+ public final boolean mIsBlacklisted;
+ public final int mTimestamp;
+
+ // Constructor for unigram.
+ public LanguageModelParam(final String word, final int unigramProbability,
+ final int timestamp) {
+ mWord0 = null;
+ mWord1 = StringUtils.toCodePointArray(word);
+ mShortcutTarget = null;
+ mUnigramProbability = unigramProbability;
+ mBigramProbability = NOT_A_PROBABILITY;
+ mShortcutProbability = NOT_A_PROBABILITY;
+ mIsNotAWord = false;
+ mIsBlacklisted = false;
+ mTimestamp = timestamp;
+ }
+
+ // Constructor for unigram and bigram.
+ public LanguageModelParam(final String word0, final String word1,
+ final int unigramProbability, final int bigramProbability,
+ final int timestamp) {
+ mWord0 = StringUtils.toCodePointArray(word0);
+ mWord1 = StringUtils.toCodePointArray(word1);
+ mShortcutTarget = null;
+ mUnigramProbability = unigramProbability;
+ mBigramProbability = bigramProbability;
+ mShortcutProbability = NOT_A_PROBABILITY;
+ mIsNotAWord = false;
+ mIsBlacklisted = false;
+ mTimestamp = timestamp;
+ }
+ }
+
+ public void addMultipleDictionaryEntries(final LanguageModelParam[] languageModelParams) {
+ if (!isValidDictionary()) return;
+ int processedParamCount = 0;
+ while (processedParamCount < languageModelParams.length) {
+ if (needsToRunGC(true /* mindsBlockByGC */)) {
+ flushWithGC();
+ }
+ processedParamCount = addMultipleDictionaryEntriesNative(mNativeDict,
+ languageModelParams, processedParamCount);
+ if (processedParamCount <= 0) {
+ return;
+ }
+ }
+
+ }
+
private void reopen() {
close();
final File dictFile = new File(mDictFilePath);
- mNativeDict = openNative(dictFile.getAbsolutePath(), 0 /* startOffset */,
+ // WARNING: Because we pass 0 as the offset and file.length() as the length, this can
+ // only be called for actual files. Right now it's only called by the flush() family of
+ // functions, which require an updatable dictionary, so it's okay. But beware.
+ loadDictionary(dictFile.getAbsolutePath(), 0 /* startOffset */,
dictFile.length(), true /* isUpdatable */);
}
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
index 722a82961..b4382bc2c 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
@@ -98,7 +98,7 @@ public final class BinaryDictionaryFileDumper {
* This creates a URI builder able to build a URI pointing to the dictionary
* pack content provider for a specific dictionary id.
*/
- private static Uri.Builder getProviderUriBuilder(final String path) {
+ public static Uri.Builder getProviderUriBuilder(final String path) {
return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)
.authority(DictionaryPackConstants.AUTHORITY).appendPath(path);
}
@@ -339,15 +339,25 @@ public final class BinaryDictionaryFileDumper {
Log.e(TAG, "Could not copy a word list. Will not be able to use it.");
// If we can't copy it we should warn the dictionary provider so that it can mark it
// as invalid.
- wordListUriBuilder.appendQueryParameter(QUERY_PARAMETER_DELETE_RESULT,
- QUERY_PARAMETER_FAILURE);
+ reportBrokenFileToDictionaryProvider(providerClient, clientId, wordlistId);
+ }
+
+ public static boolean reportBrokenFileToDictionaryProvider(
+ final ContentProviderClient providerClient, final String clientId,
+ final String wordlistId) {
try {
+ final Uri.Builder wordListUriBuilder = getContentUriBuilderForType(clientId,
+ providerClient, QUERY_PATH_DATAFILE, wordlistId /* extraPath */);
+ wordListUriBuilder.appendQueryParameter(QUERY_PARAMETER_DELETE_RESULT,
+ QUERY_PARAMETER_FAILURE);
if (0 >= providerClient.delete(wordListUriBuilder.build(), null, null)) {
- Log.e(TAG, "In addition, we were unable to delete it.");
+ Log.e(TAG, "Unable to delete a word list.");
}
} catch (RemoteException e) {
- Log.e(TAG, "In addition, communication with the dictionary provider was cut", e);
+ Log.e(TAG, "Communication with the dictionary provider was cut", e);
+ return false;
}
+ return true;
}
// Ideally the two following methods should be merged, but AssetFileDescriptor does not
@@ -432,8 +442,9 @@ public final class BinaryDictionaryFileDumper {
// Actually copy the file
final byte[] buffer = new byte[FILE_READ_BUFFER_SIZE];
- for (int readBytes = input.read(buffer); readBytes >= 0; readBytes = input.read(buffer))
+ for (int readBytes = input.read(buffer); readBytes >= 0; readBytes = input.read(buffer)) {
output.write(buffer, 0, readBytes);
+ }
input.close();
}
@@ -478,8 +489,7 @@ public final class BinaryDictionaryFileDumper {
* @param context the context for resources and providers.
* @param clientId the client ID to use.
*/
- public static void initializeClientRecordHelper(final Context context,
- final String clientId) {
+ public static void initializeClientRecordHelper(final Context context, final String clientId) {
try {
final ContentProviderClient client = context.getContentResolver().
acquireContentProviderClient(getProviderUriBuilder("").build());
diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/java/src/com/android/inputmethod/latin/Constants.java
index c4f96016c..c260434d5 100644
--- a/java/src/com/android/inputmethod/latin/Constants.java
+++ b/java/src/com/android/inputmethod/latin/Constants.java
@@ -70,38 +70,47 @@ public final class Constants {
public static final class ExtraValue {
/**
- * The subtype extra value used to indicate that the subtype keyboard layout is capable
- * for typing ASCII characters.
+ * The subtype extra value used to indicate that this subtype is capable of
+ * entering ASCII characters.
*/
public static final String ASCII_CAPABLE = "AsciiCapable";
/**
- * The subtype extra value used to indicate that the subtype keyboard layout is capable
- * for typing EMOJI characters.
+ * The subtype extra value used to indicate that this subtype is enabled
+ * when the default subtype is not marked as ascii capable.
+ */
+ public static final String ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE =
+ "EnabledWhenDefaultIsNotAsciiCapable";
+
+ /**
+ * The subtype extra value used to indicate that this subtype is capable of
+ * entering emoji characters.
*/
public static final String EMOJI_CAPABLE = "EmojiCapable";
+
/**
- * The subtype extra value used to indicate that the subtype require network connection
- * to work.
+ * The subtype extra value used to indicate that this subtype requires a network
+ * connection to work.
*/
public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity";
/**
- * The subtype extra value used to indicate that the subtype display name contains "%s"
- * for replacement mark and it should be replaced by this extra value.
+ * The subtype extra value used to indicate that the display name of this subtype
+ * contains a "%s" for printf-like replacement and it should be replaced by
+ * this extra value.
* This extra value is supported on JellyBean and later.
*/
public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME =
"UntranslatableReplacementStringInSubtypeName";
/**
- * The subtype extra value used to indicate that the subtype keyboard layout set name.
+ * The subtype extra value used to indicate this subtype keyboard layout set name.
* This extra value is private to LatinIME.
*/
public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet";
/**
- * The subtype extra value used to indicate that the subtype is additional subtype
+ * The subtype extra value used to indicate that this subtype is an additional subtype
* that the user defined. This extra value is private to LatinIME.
*/
public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype";
@@ -174,6 +183,7 @@ public final class Constants {
public static final int CODE_SLASH = '/';
public static final int CODE_COMMERCIAL_AT = '@';
public static final int CODE_PLUS = '+';
+ public static final int CODE_PERCENT = '%';
public static final int CODE_CLOSING_PARENTHESIS = ')';
public static final int CODE_CLOSING_SQUARE_BRACKET = ']';
public static final int CODE_CLOSING_CURLY_BRACKET = '}';
diff --git a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
index 47891c6b7..b6cfcd064 100644
--- a/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ContactsBinaryDictionary.java
@@ -44,7 +44,8 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
private static final String TAG = ContactsBinaryDictionary.class.getSimpleName();
private static final String NAME = "contacts";
- private static boolean DEBUG = false;
+ private static final boolean DEBUG = false;
+ private static final boolean DEBUG_DUMP = false;
/**
* Frequency for contacts information into the dictionary
@@ -71,8 +72,8 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
private final boolean mUseFirstLastBigrams;
public ContactsBinaryDictionary(final Context context, final Locale locale) {
- super(context, getFilenameWithLocale(NAME, locale.toString()), Dictionary.TYPE_CONTACTS,
- false /* isUpdatable */);
+ super(context, getDictNameWithLocale(NAME, locale), locale,
+ Dictionary.TYPE_CONTACTS, false /* isUpdatable */);
mLocale = locale;
mUseFirstLastBigrams = useFirstLastBigramsForLocale(locale);
registerObserver(context);
@@ -168,6 +169,10 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
if (isValidName(name)) {
addName(name);
++count;
+ } else {
+ if (DEBUG_DUMP) {
+ Log.d(TAG, "Invalid name: " + name);
+ }
}
cursor.moveToNext();
}
@@ -204,6 +209,9 @@ public class ContactsBinaryDictionary extends ExpandableBinaryDictionary {
if (Character.isLetter(name.codePointAt(i))) {
int end = getWordEndPosition(name, len, i);
String word = name.substring(i, end);
+ if (DEBUG_DUMP) {
+ Log.d(TAG, "addName word = " + word);
+ }
i = end - 1;
// Don't add single letter words, possibly confuses
// capitalization of i.
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index fa79f5af7..e04524843 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -52,13 +52,10 @@ public abstract class Dictionary {
public static final String TYPE_CONTACTS = "contacts";
// User dictionary, the system-managed one.
public static final String TYPE_USER = "user";
- // User history dictionary internal to LatinIME. This assumes bigram prediction for now.
+ // User history dictionary internal to LatinIME.
public static final String TYPE_USER_HISTORY = "history";
- // Personalization binary dictionary internal to LatinIME.
+ // Personalization dictionary.
public static final String TYPE_PERSONALIZATION = "personalization";
- // Personalization prediction dictionary internal to LatinIME's Java code.
- public static final String TYPE_PERSONALIZATION_PREDICTION_IN_JAVA =
- "personalization_prediction_in_java";
public final String mDictType;
public Dictionary(final String dictType) {
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 828e54f14..e09c309ea 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -16,6 +16,7 @@
package com.android.inputmethod.latin;
+import android.content.ContentProviderClient;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
@@ -64,6 +65,10 @@ public final class DictionaryFactory {
useFullEditDistance, locale, Dictionary.TYPE_MAIN);
if (readOnlyBinaryDictionary.isValidDictionary()) {
dictList.add(readOnlyBinaryDictionary);
+ } else {
+ readOnlyBinaryDictionary.close();
+ // Prevent this dictionary to do any further harm.
+ killDictionary(context, f);
}
}
}
@@ -75,6 +80,51 @@ public final class DictionaryFactory {
}
/**
+ * Kills a dictionary so that it is never used again, if possible.
+ * @param context The context to contact the dictionary provider, if possible.
+ * @param f A file address to the dictionary to kill.
+ */
+ private static void killDictionary(final Context context, final AssetFileAddress f) {
+ if (f.pointsToPhysicalFile()) {
+ f.deleteUnderlyingFile();
+ // Warn the dictionary provider if the dictionary came from there.
+ final ContentProviderClient providerClient;
+ try {
+ providerClient = context.getContentResolver().acquireContentProviderClient(
+ BinaryDictionaryFileDumper.getProviderUriBuilder("").build());
+ } catch (final SecurityException e) {
+ Log.e(TAG, "No permission to communicate with the dictionary provider", e);
+ return;
+ }
+ if (null == providerClient) {
+ Log.e(TAG, "Can't establish communication with the dictionary provider");
+ return;
+ }
+ final String wordlistId =
+ DictionaryInfoUtils.getWordListIdFromFileName(new File(f.mFilename).getName());
+ if (null != wordlistId) {
+ // TODO: this is a reasonable last resort, but it is suboptimal.
+ // The following will remove the entry for this dictionary with the dictionary
+ // provider. When the metadata is downloaded again, we will try downloading it
+ // again.
+ // However, in the practice that will mean the user will find themselves without
+ // the new dictionary. That's fine for languages where it's included in the APK,
+ // but for other languages it will leave the user without a dictionary at all until
+ // the next update, which may be a few days away.
+ // Ideally, we would trigger a new download right away, and use increasing retry
+ // delays for this particular id/version combination.
+ // Then again, this is expected to only ever happen in case of human mistake. If
+ // the wrong file is on the server, the following is still doing the right thing.
+ // If it's a file left over from the last version however, it's not great.
+ BinaryDictionaryFileDumper.reportBrokenFileToDictionaryProvider(
+ providerClient,
+ context.getString(R.string.dictionary_pack_client_id),
+ wordlistId);
+ }
+ }
+ }
+
+ /**
* Initializes a main dictionary collection from a dictionary pack, with default flags.
*
* This searches for a content provider providing a dictionary pack for the specified
diff --git a/java/src/com/android/inputmethod/latin/DictionaryWriter.java b/java/src/com/android/inputmethod/latin/DictionaryWriter.java
index 3df2a2b63..89ef96d7f 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryWriter.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryWriter.java
@@ -18,8 +18,6 @@ package com.android.inputmethod.latin;
import android.content.Context;
-import com.android.inputmethod.keyboard.ProximityInfo;
-import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.makedict.DictEncoder;
import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.makedict.FusionDictionary;
@@ -37,14 +35,14 @@ import java.util.Map;
* An in memory dictionary for memorizing entries and writing a binary dictionary.
*/
public class DictionaryWriter extends AbstractDictionaryWriter {
- private static final int BINARY_DICT_VERSION = 3;
+ private static final int BINARY_DICT_VERSION = 2;
private static final FormatSpec.FormatOptions FORMAT_OPTIONS =
- new FormatSpec.FormatOptions(BINARY_DICT_VERSION, true /* supportsDynamicUpdate */);
+ new FormatSpec.FormatOptions(BINARY_DICT_VERSION, false /* supportsDynamicUpdate */);
private FusionDictionary mFusionDictionary;
- public DictionaryWriter(final Context context, final String dictType) {
- super(context, dictType);
+ public DictionaryWriter(final Context context) {
+ super(context);
clear();
}
@@ -52,7 +50,7 @@ public class DictionaryWriter extends AbstractDictionaryWriter {
public void clear() {
final HashMap<String, String> attributes = CollectionUtils.newHashMap();
mFusionDictionary = new FusionDictionary(new PtNodeArray(),
- new FusionDictionary.DictionaryOptions(attributes, false, false));
+ new FusionDictionary.DictionaryOptions(attributes));
}
/**
@@ -92,18 +90,4 @@ public class DictionaryWriter extends AbstractDictionaryWriter {
}
dictEncoder.writeDictionary(mFusionDictionary, FORMAT_OPTIONS);
}
-
- @Override
- public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
- final String prevWord, final ProximityInfo proximityInfo,
- boolean blockOffensiveWords, final int[] additionalFeaturesOptions) {
- // This class doesn't support suggestion.
- return null;
- }
-
- @Override
- public boolean isValidWord(String word) {
- // This class doesn't support dictionary retrieval.
- return false;
- }
}
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index eb8650e6f..9f5cd162f 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -22,18 +22,22 @@ import android.util.Log;
import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.keyboard.ProximityInfo;
+import com.android.inputmethod.latin.BinaryDictionary.LanguageModelParam;
import com.android.inputmethod.latin.makedict.FormatSpec;
-import com.android.inputmethod.latin.personalization.DynamicPersonalizationDictionaryWriter;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.utils.AsyncResultHolder;
import com.android.inputmethod.latin.utils.CollectionUtils;
+import com.android.inputmethod.latin.utils.FileUtils;
import com.android.inputmethod.latin.utils.PrioritizedSerialExecutor;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
@@ -52,10 +56,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
/** Whether to print debug output to log */
private static boolean DEBUG = false;
-
- // TODO: Remove.
- /** Whether to call binary dictionary dynamically updating methods. */
- public static boolean ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE = true;
+ private static final boolean DBG_STRESS_TEST = false;
private static final int TIMEOUT_FOR_READ_OPS_IN_MILLISECONDS = 100;
@@ -64,22 +65,19 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
protected static final int MAX_WORD_LENGTH = Constants.DICTIONARY_MAX_WORD_LENGTH;
- private static final int DICTIONARY_FORMAT_VERSION = 3;
-
- private static final String SUPPORTS_DYNAMIC_UPDATE =
- FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE;
+ private static final int DICTIONARY_FORMAT_VERSION = FormatSpec.VERSION4;
/**
* A static map of update controllers, each of which records the time of accesses to a single
* binary dictionary file and tracks whether the file is regenerating. The key for this map is
- * the filename and the value is the shared dictionary time recorder associated with that
- * filename.
+ * the dictionary name and the value is the shared dictionary time recorder associated with
+ * that dictionary name.
*/
private static final ConcurrentHashMap<String, DictionaryUpdateController>
- sFilenameDictionaryUpdateControllerMap = CollectionUtils.newConcurrentHashMap();
+ sDictNameDictionaryUpdateControllerMap = CollectionUtils.newConcurrentHashMap();
private static final ConcurrentHashMap<String, PrioritizedSerialExecutor>
- sFilenameExecutorMap = CollectionUtils.newConcurrentHashMap();
+ sDictNameExecutorMap = CollectionUtils.newConcurrentHashMap();
/** The application context. */
protected final Context mContext;
@@ -95,18 +93,24 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected AbstractDictionaryWriter mDictionaryWriter;
/**
- * The name of this dictionary, used as the filename for storing the binary dictionary. Multiple
- * dictionary instances with the same filename is supported, with access controlled by
- * DictionaryTimeRecorder.
+ * The name of this dictionary, used as a part of the filename for storing the binary
+ * dictionary. Multiple dictionary instances with the same name is supported, with access
+ * controlled by DictionaryUpdateController.
*/
- private final String mFilename;
+ private final String mDictName;
+
+ /** Dictionary locale */
+ private final Locale mLocale;
/** Whether to support dynamically updating the dictionary */
private final boolean mIsUpdatable;
+ /** Dictionary file */
+ private final File mDictFile;
+
// TODO: remove, once dynamic operations is serialized
/** Controls updating the shared binary dictionary file across multiple instances. */
- private final DictionaryUpdateController mFilenameDictionaryUpdateController;
+ private final DictionaryUpdateController mDictNameDictionaryUpdateController;
// TODO: remove, once dynamic operations is serialized
/** Controls updating the local binary dictionary for this instance. */
@@ -132,45 +136,57 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
protected abstract boolean hasContentChanged();
+ protected boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) {
+ // This class is using format 2 because it's used by the User and Contacts dictionary
+ // only, which right now use format 2 (dicts using format 4 use Decaying*, which overrides
+ // this method).
+ // TODO: Migrate these dicts to ver4 format, and remove this function.
+ return formatVersion == 2;
+ }
+
+ public boolean isValidDictionary() {
+ return mBinaryDictionary.isValidDictionary();
+ }
+
+ private File getDictFile() {
+ return mDictFile;
+ }
+
/**
- * Gets the dictionary update controller for the given filename.
+ * Gets the dictionary update controller for the given dictionary name.
*/
private static DictionaryUpdateController getDictionaryUpdateController(
- String filename) {
- DictionaryUpdateController recorder = sFilenameDictionaryUpdateControllerMap.get(filename);
+ final String dictName) {
+ DictionaryUpdateController recorder = sDictNameDictionaryUpdateControllerMap.get(dictName);
if (recorder == null) {
- synchronized(sFilenameDictionaryUpdateControllerMap) {
+ synchronized(sDictNameDictionaryUpdateControllerMap) {
recorder = new DictionaryUpdateController();
- sFilenameDictionaryUpdateControllerMap.put(filename, recorder);
+ sDictNameDictionaryUpdateControllerMap.put(dictName, recorder);
}
}
return recorder;
}
/**
- * Gets the executor for the given filename.
+ * Gets the executor for the given dictionary name.
*/
- private static PrioritizedSerialExecutor getExecutor(final String filename) {
- PrioritizedSerialExecutor executor = sFilenameExecutorMap.get(filename);
+ private static PrioritizedSerialExecutor getExecutor(final String dictName) {
+ PrioritizedSerialExecutor executor = sDictNameExecutorMap.get(dictName);
if (executor == null) {
- synchronized(sFilenameExecutorMap) {
+ synchronized(sDictNameExecutorMap) {
executor = new PrioritizedSerialExecutor();
- sFilenameExecutorMap.put(filename, executor);
+ sDictNameExecutorMap.put(dictName, executor);
}
}
return executor;
}
private static AbstractDictionaryWriter getDictionaryWriter(final Context context,
- final String dictType, final boolean isDynamicPersonalizationDictionary) {
+ final boolean isDynamicPersonalizationDictionary) {
if (isDynamicPersonalizationDictionary) {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- return null;
- } else {
- return new DynamicPersonalizationDictionaryWriter(context, dictType);
- }
+ return null;
} else {
- return new DictionaryWriter(context, dictType);
+ return new DictionaryWriter(context);
}
}
@@ -178,26 +194,37 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
* Creates a new expandable binary dictionary.
*
* @param context The application context of the parent.
- * @param filename The filename for this binary dictionary. Multiple dictionaries with the same
- * filename is supported.
+ * @param dictName The name of the dictionary. Multiple instances with the same
+ * name is supported.
+ * @param locale the dictionary locale.
* @param dictType the dictionary type, as a human-readable string
* @param isUpdatable whether to support dynamically updating the dictionary. Please note that
* dynamic dictionary has negative effects on memory space and computation time.
*/
- public ExpandableBinaryDictionary(final Context context, final String filename,
- final String dictType, final boolean isUpdatable) {
+ public ExpandableBinaryDictionary(final Context context, final String dictName,
+ final Locale locale, final String dictType, final boolean isUpdatable) {
+ this(context, dictName, locale, dictType, isUpdatable,
+ new File(context.getFilesDir(), dictName + DICT_FILE_EXTENSION));
+ }
+
+ // Creates an instance that uses a given dictionary file.
+ public ExpandableBinaryDictionary(final Context context, final String dictName,
+ final Locale locale, final String dictType, final boolean isUpdatable,
+ final File dictFile) {
super(dictType);
- mFilename = filename;
+ mDictName = dictName;
mContext = context;
+ mLocale = locale;
mIsUpdatable = isUpdatable;
+ mDictFile = dictFile;
mBinaryDictionary = null;
- mFilenameDictionaryUpdateController = getDictionaryUpdateController(filename);
+ mDictNameDictionaryUpdateController = getDictionaryUpdateController(dictName);
// Currently, only dynamic personalization dictionary is updatable.
- mDictionaryWriter = getDictionaryWriter(context, dictType, isUpdatable);
+ mDictionaryWriter = getDictionaryWriter(context, isUpdatable);
}
- protected static String getFilenameWithLocale(final String name, final String localeStr) {
- return name + "." + localeStr + DICT_FILE_EXTENSION;
+ protected static String getDictNameWithLocale(final String name, final Locale locale) {
+ return name + "." + locale.toString();
}
/**
@@ -205,23 +232,20 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
@Override
public void close() {
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
if (mBinaryDictionary!= null) {
mBinaryDictionary.close();
mBinaryDictionary = null;
}
- if (mDictionaryWriter != null) {
- mDictionaryWriter.close();
- }
}
});
}
protected void closeBinaryDictionary() {
// Ensure that no other threads are accessing the local binary dictionary.
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
if (mBinaryDictionary != null) {
@@ -234,19 +258,23 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected Map<String, String> getHeaderAttributeMap() {
HashMap<String, String> attributeMap = new HashMap<String, String>();
- attributeMap.put(FormatSpec.FileHeader.SUPPORTS_DYNAMIC_UPDATE_ATTRIBUTE,
- SUPPORTS_DYNAMIC_UPDATE);
- attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, mFilename);
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, mDictName);
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, mLocale.toString());
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_VERSION_ATTRIBUTE,
+ String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
return attributeMap;
}
protected void clear() {
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE && mDictionaryWriter == null) {
+ if (mDictionaryWriter == null) {
mBinaryDictionary.close();
- final File file = new File(mContext.getFilesDir(), mFilename);
+ final File file = getDictFile();
+ if (file.exists() && !FileUtils.deleteRecursively(file)) {
+ Log.e(TAG, "Can't remove a file: " + file.getName());
+ }
BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
DICTIONARY_FORMAT_VERSION, getHeaderAttributeMap());
mBinaryDictionary = new BinaryDictionary(
@@ -286,8 +314,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
* Check whether GC is needed and run GC if required.
*/
protected void runGCIfRequired(final boolean mindsBlockByGC) {
- if (!ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) return;
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
runGCIfRequiredInternalLocked(mindsBlockByGC);
@@ -296,18 +323,17 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
private void runGCIfRequiredInternalLocked(final boolean mindsBlockByGC) {
- if (!ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) return;
// Calls to needsToRunGC() need to be serialized.
if (mBinaryDictionary.needsToRunGC(mindsBlockByGC)) {
- if (setIsRegeneratingIfNotRegenerating()) {
+ if (setProcessingLargeTaskIfNot()) {
// Run GC after currently existing time sensitive operations.
- getExecutor(mFilename).executePrioritized(new Runnable() {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
@Override
public void run() {
try {
mBinaryDictionary.flushWithGC();
} finally {
- mFilenameDictionaryUpdateController.mIsRegenerating.set(false);
+ mDictNameDictionaryUpdateController.mProcessingLargeTask.set(false);
}
}
});
@@ -318,23 +344,19 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
/**
* Dynamically adds a word unigram to the dictionary. May overwrite an existing entry.
*/
- protected void addWordDynamically(final String word, final String shortcutTarget,
- final int frequency, final int shortcutFreq, final boolean isNotAWord) {
+ protected void addWordDynamically(final String word, final int frequency,
+ final String shortcutTarget, final int shortcutFreq, final boolean isNotAWord,
+ final boolean isBlacklisted, final int timestamp) {
if (!mIsUpdatable) {
- Log.w(TAG, "addWordDynamically is called for non-updatable dictionary: " + mFilename);
+ Log.w(TAG, "addWordDynamically is called for non-updatable dictionary: " + mDictName);
return;
}
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
- mBinaryDictionary.addUnigramWord(word, frequency);
- } else {
- // TODO: Remove.
- mDictionaryWriter.addUnigramWord(word, shortcutTarget, frequency, shortcutFreq,
- isNotAWord);
- }
+ runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
+ mBinaryDictionary.addUnigramWord(word, frequency, shortcutTarget, shortcutFreq,
+ isNotAWord, isBlacklisted, timestamp);
}
});
}
@@ -343,23 +365,17 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
* Dynamically adds a word bigram in the dictionary. May overwrite an existing entry.
*/
protected void addBigramDynamically(final String word0, final String word1,
- final int frequency, final boolean isValid) {
+ final int frequency, final int timestamp) {
if (!mIsUpdatable) {
Log.w(TAG, "addBigramDynamically is called for non-updatable dictionary: "
- + mFilename);
+ + mDictName);
return;
}
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
- mBinaryDictionary.addBigramWords(word0, word1, frequency);
- } else {
- // TODO: Remove.
- mDictionaryWriter.addBigramWords(word0, word1, frequency, isValid,
- 0 /* lastTouchedTime */);
- }
+ runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
+ mBinaryDictionary.addBigramWords(word0, word1, frequency, timestamp);
}
});
}
@@ -370,18 +386,48 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected void removeBigramDynamically(final String word0, final String word1) {
if (!mIsUpdatable) {
Log.w(TAG, "removeBigramDynamically is called for non-updatable dictionary: "
- + mFilename);
+ + mDictName);
return;
}
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
- mBinaryDictionary.removeBigramWords(word0, word1);
- } else {
- // TODO: Remove.
- mDictionaryWriter.removeBigramWords(word0, word1);
+ runGCIfRequiredInternalLocked(true /* mindsBlockByGC */);
+ mBinaryDictionary.removeBigramWords(word0, word1);
+ }
+ });
+ }
+
+ public interface AddMultipleDictionaryEntriesCallback {
+ public void onFinished();
+ }
+
+ /**
+ * Dynamically add multiple entries to the dictionary.
+ */
+ protected void addMultipleDictionaryEntriesDynamically(
+ final ArrayList<LanguageModelParam> languageModelParams,
+ final AddMultipleDictionaryEntriesCallback callback) {
+ if (!mIsUpdatable) {
+ Log.w(TAG, "addMultipleDictionaryEntriesDynamically is called for non-updatable " +
+ "dictionary: " + mDictName);
+ return;
+ }
+ getExecutor(mDictName).execute(new Runnable() {
+ @Override
+ public void run() {
+ final boolean locked = setProcessingLargeTaskIfNot();
+ try {
+ mBinaryDictionary.addMultipleDictionaryEntries(
+ languageModelParams.toArray(
+ new LanguageModelParam[languageModelParams.size()]));
+ } finally {
+ if (callback != null) {
+ callback.onFinished();
+ }
+ if (locked) {
+ mDictNameDictionaryUpdateController.mProcessingLargeTask.set(false);
+ }
}
}
});
@@ -393,49 +439,23 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
final boolean blockOffensiveWords, final int[] additionalFeaturesOptions,
final int sessionId) {
reloadDictionaryIfRequired();
- if (isRegenerating()) {
+ if (processingLargeTask()) {
return null;
}
- final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
final AsyncResultHolder<ArrayList<SuggestedWordInfo>> holder =
new AsyncResultHolder<ArrayList<SuggestedWordInfo>>();
- getExecutor(mFilename).executePrioritized(new Runnable() {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
@Override
public void run() {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- if (mBinaryDictionary == null) {
- holder.set(null);
- return;
- }
- final ArrayList<SuggestedWordInfo> binarySuggestion =
- mBinaryDictionary.getSuggestionsWithSessionId(composer, prevWord,
- proximityInfo, blockOffensiveWords, additionalFeaturesOptions,
- sessionId);
- holder.set(binarySuggestion);
- } else {
- final ArrayList<SuggestedWordInfo> inMemDictSuggestion =
- composer.isBatchMode() ? null :
- mDictionaryWriter.getSuggestionsWithSessionId(composer,
- prevWord, proximityInfo, blockOffensiveWords,
- additionalFeaturesOptions, sessionId);
- // TODO: Remove checking mIsUpdatable and use native suggestion.
- if (mBinaryDictionary != null && !mIsUpdatable) {
- final ArrayList<SuggestedWordInfo> binarySuggestion =
- mBinaryDictionary.getSuggestionsWithSessionId(composer, prevWord,
- proximityInfo, blockOffensiveWords,
- additionalFeaturesOptions, sessionId);
- if (inMemDictSuggestion == null) {
- holder.set(binarySuggestion);
- } else if (binarySuggestion == null) {
- holder.set(inMemDictSuggestion);
- } else {
- binarySuggestion.addAll(inMemDictSuggestion);
- holder.set(binarySuggestion);
- }
- } else {
- holder.set(inMemDictSuggestion);
- }
+ if (mBinaryDictionary == null) {
+ holder.set(null);
+ return;
}
+ final ArrayList<SuggestedWordInfo> binarySuggestion =
+ mBinaryDictionary.getSuggestionsWithSessionId(composer, prevWord,
+ proximityInfo, blockOffensiveWords, additionalFeaturesOptions,
+ sessionId);
+ holder.set(binarySuggestion);
}
});
return holder.get(null, TIMEOUT_FOR_READ_OPS_IN_MILLISECONDS);
@@ -456,11 +476,11 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
protected boolean isValidWordInner(final String word) {
- if (isRegenerating()) {
+ if (processingLargeTask()) {
return false;
}
final AsyncResultHolder<Boolean> holder = new AsyncResultHolder<Boolean>();
- getExecutor(mFilename).executePrioritized(new Runnable() {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
@Override
public void run() {
holder.set(isValidWordLocked(word));
@@ -494,12 +514,22 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
private void loadBinaryDictionary() {
if (DEBUG) {
- Log.d(TAG, "Loading binary dictionary: " + mFilename + " request="
- + mFilenameDictionaryUpdateController.mLastUpdateRequestTime + " update="
- + mFilenameDictionaryUpdateController.mLastUpdateTime);
+ Log.d(TAG, "Loading binary dictionary: " + mDictName + " request="
+ + mDictNameDictionaryUpdateController.mLastUpdateRequestTime + " update="
+ + mDictNameDictionaryUpdateController.mLastUpdateTime);
+ }
+ if (DBG_STRESS_TEST) {
+ // Test if this class does not cause problems when it takes long time to load binary
+ // dictionary.
+ try {
+ Log.w(TAG, "Start stress in loading: " + mDictName);
+ Thread.sleep(15000);
+ Log.w(TAG, "End stress in loading");
+ } catch (InterruptedException e) {
+ }
}
- final File file = new File(mContext.getFilesDir(), mFilename);
+ final File file = getDictFile();
final String filename = file.getAbsolutePath();
final long length = file.length();
@@ -511,7 +541,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
// swapping in the new one.
// TODO: Ensure multi-thread assignment of mBinaryDictionary.
final BinaryDictionary oldBinaryDictionary = mBinaryDictionary;
- getExecutor(mFilename).executePrioritized(new Runnable() {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
@Override
public void run() {
mBinaryDictionary = newBinaryDictionary;
@@ -533,29 +563,31 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
private void writeBinaryDictionary() {
if (DEBUG) {
- Log.d(TAG, "Generating binary dictionary: " + mFilename + " request="
- + mFilenameDictionaryUpdateController.mLastUpdateRequestTime + " update="
- + mFilenameDictionaryUpdateController.mLastUpdateTime);
+ Log.d(TAG, "Generating binary dictionary: " + mDictName + " request="
+ + mDictNameDictionaryUpdateController.mLastUpdateRequestTime + " update="
+ + mDictNameDictionaryUpdateController.mLastUpdateTime);
}
if (needsToReloadBeforeWriting()) {
mDictionaryWriter.clear();
loadDictionaryAsync();
- mDictionaryWriter.write(mFilename, getHeaderAttributeMap());
+ mDictionaryWriter.write(getDictFile(), getHeaderAttributeMap());
} else {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- if (mBinaryDictionary == null || !mBinaryDictionary.isValidDictionary()) {
- final File file = new File(mContext.getFilesDir(), mFilename);
- BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
- DICTIONARY_FORMAT_VERSION, getHeaderAttributeMap());
- } else {
- if (mBinaryDictionary.needsToRunGC(false /* mindsBlockByGC */)) {
- mBinaryDictionary.flushWithGC();
- } else {
- mBinaryDictionary.flush();
- }
+ if (mBinaryDictionary == null || !isValidDictionary()
+ // TODO: remove the check below
+ || !matchesExpectedBinaryDictFormatVersionForThisType(
+ mBinaryDictionary.getFormatVersion())) {
+ final File file = getDictFile();
+ if (file.exists() && !FileUtils.deleteRecursively(file)) {
+ Log.e(TAG, "Can't remove a file: " + file.getName());
}
+ BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
+ DICTIONARY_FORMAT_VERSION, getHeaderAttributeMap());
} else {
- mDictionaryWriter.write(mFilename, getHeaderAttributeMap());
+ if (mBinaryDictionary.needsToRunGC(false /* mindsBlockByGC */)) {
+ mBinaryDictionary.flushWithGC();
+ } else {
+ mBinaryDictionary.flush();
+ }
}
}
}
@@ -570,10 +602,10 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
protected void setRequiresReload(final boolean requiresRebuild) {
final long time = SystemClock.uptimeMillis();
mPerInstanceDictionaryUpdateController.mLastUpdateRequestTime = time;
- mFilenameDictionaryUpdateController.mLastUpdateRequestTime = time;
+ mDictNameDictionaryUpdateController.mLastUpdateRequestTime = time;
if (DEBUG) {
- Log.d(TAG, "Reload request: " + mFilename + ": request=" + time + " update="
- + mFilenameDictionaryUpdateController.mLastUpdateTime);
+ Log.d(TAG, "Reload request: " + mDictName + ": request=" + time + " update="
+ + mDictNameDictionaryUpdateController.mLastUpdateTime);
}
}
@@ -582,7 +614,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
public final void reloadDictionaryIfRequired() {
if (!isReloadRequired()) return;
- if (setIsRegeneratingIfNotRegenerating()) {
+ if (setProcessingLargeTaskIfNot()) {
reloadDictionary();
}
}
@@ -594,13 +626,14 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
return mBinaryDictionary == null || mPerInstanceDictionaryUpdateController.isOutOfDate();
}
- private boolean isRegenerating() {
- return mFilenameDictionaryUpdateController.mIsRegenerating.get();
+ private boolean processingLargeTask() {
+ return mDictNameDictionaryUpdateController.mProcessingLargeTask.get();
}
- // Returns whether the dictionary can be regenerated.
- private boolean setIsRegeneratingIfNotRegenerating() {
- return mFilenameDictionaryUpdateController.mIsRegenerating.compareAndSet(
+ // Returns whether the dictionary is being used for a large task. If true, we should not use
+ // this dictionary for latency sensitive operations.
+ private boolean setProcessingLargeTaskIfNot() {
+ return mDictNameDictionaryUpdateController.mProcessingLargeTask.compareAndSet(
false /* expect */ , true /* update */);
}
@@ -611,13 +644,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
private final void reloadDictionary() {
// Ensure that only one thread attempts to read or write to the shared binary dictionary
// file at the same time.
- getExecutor(mFilename).execute(new Runnable() {
+ getExecutor(mDictName).execute(new Runnable() {
@Override
public void run() {
try {
final long time = SystemClock.uptimeMillis();
final boolean dictionaryFileExists = dictionaryFileExists();
- if (mFilenameDictionaryUpdateController.isOutOfDate()
+ if (mDictNameDictionaryUpdateController.isOutOfDate()
|| !dictionaryFileExists) {
// If the shared dictionary file does not exist or is out of date, the
// first instance that acquires the lock will generate a new one.
@@ -626,31 +659,44 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
// rebuild the binary dictionary. Empty dictionaries are supported (in
// the case where loadDictionaryAsync() adds nothing) in order to
// provide a uniform framework.
- mFilenameDictionaryUpdateController.mLastUpdateTime = time;
+ mDictNameDictionaryUpdateController.mLastUpdateTime = time;
writeBinaryDictionary();
loadBinaryDictionary();
} else {
// If not, the reload request was unnecessary so revert
// LastUpdateRequestTime to LastUpdateTime.
- mFilenameDictionaryUpdateController.mLastUpdateRequestTime =
- mFilenameDictionaryUpdateController.mLastUpdateTime;
+ mDictNameDictionaryUpdateController.mLastUpdateRequestTime =
+ mDictNameDictionaryUpdateController.mLastUpdateTime;
}
} else if (mBinaryDictionary == null ||
mPerInstanceDictionaryUpdateController.mLastUpdateTime
- < mFilenameDictionaryUpdateController.mLastUpdateTime) {
+ < mDictNameDictionaryUpdateController.mLastUpdateTime) {
// Otherwise, if the local dictionary is older than the shared dictionary,
// load the shared dictionary.
loadBinaryDictionary();
}
- if (mBinaryDictionary != null && !mBinaryDictionary.isValidDictionary()) {
- // Binary dictionary is not valid. Regenerate the dictionary file.
- mFilenameDictionaryUpdateController.mLastUpdateTime = time;
- writeBinaryDictionary();
- loadBinaryDictionary();
- }
- mPerInstanceDictionaryUpdateController.mLastUpdateTime = time;
+ // If we just loaded the binary dictionary, then mBinaryDictionary is not
+ // up-to-date yet so it's useless to test it right away. Schedule the check
+ // for right after it's loaded instead.
+ getExecutor(mDictName).executePrioritized(new Runnable() {
+ @Override
+ public void run() {
+ if (mBinaryDictionary != null && !(isValidDictionary()
+ // TODO: remove the check below
+ && matchesExpectedBinaryDictFormatVersionForThisType(
+ mBinaryDictionary.getFormatVersion()))) {
+ // Binary dictionary or its format version is not valid. Regenerate
+ // the dictionary file. writeBinaryDictionary will remove the
+ // existing files if appropriate.
+ mDictNameDictionaryUpdateController.mLastUpdateTime = time;
+ writeBinaryDictionary();
+ loadBinaryDictionary();
+ }
+ mPerInstanceDictionaryUpdateController.mLastUpdateTime = time;
+ }
+ });
} finally {
- mFilenameDictionaryUpdateController.mIsRegenerating.set(false);
+ mDictNameDictionaryUpdateController.mProcessingLargeTask.set(false);
}
}
});
@@ -658,28 +704,13 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
// TODO: cache the file's existence so that we avoid doing a disk access each time.
private boolean dictionaryFileExists() {
- final File file = new File(mContext.getFilesDir(), mFilename);
- return file.exists();
- }
-
- /**
- * Load the dictionary to memory.
- */
- protected void asyncLoadDictionaryToMemory() {
- getExecutor(mFilename).executePrioritized(new Runnable() {
- @Override
- public void run() {
- if (!ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- loadDictionaryAsync();
- }
- }
- });
+ return getDictFile().exists();
}
/**
* Generate binary dictionary using DictionaryWriter.
*/
- protected void asyncFlashAllBinaryDictionary() {
+ protected void asyncFlushBinaryDictionary() {
final Runnable newTask = new Runnable() {
@Override
public void run() {
@@ -687,37 +718,32 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
};
final Runnable oldTask = mUnfinishedFlushingTask.getAndSet(newTask);
- getExecutor(mFilename).replaceAndExecute(oldTask, newTask);
+ getExecutor(mDictName).replaceAndExecute(oldTask, newTask);
}
/**
- * For tracking whether the dictionary is out of date and the dictionary is regenerating.
- * Can be shared across multiple dictionary instances that access the same filename.
+ * For tracking whether the dictionary is out of date and the dictionary is used in a large
+ * task. Can be shared across multiple dictionary instances that access the same filename.
*/
private static class DictionaryUpdateController {
public volatile long mLastUpdateTime = 0;
public volatile long mLastUpdateRequestTime = 0;
- public volatile AtomicBoolean mIsRegenerating = new AtomicBoolean();
+ public volatile AtomicBoolean mProcessingLargeTask = new AtomicBoolean();
public boolean isOutOfDate() {
return (mLastUpdateRequestTime > mLastUpdateTime);
}
}
- // TODO: Implement native binary methods once the dynamic dictionary implementation is done.
+ // TODO: Implement BinaryDictionary.isInDictionary().
@UsedForTesting
public boolean isInDictionaryForTests(final String word) {
final AsyncResultHolder<Boolean> holder = new AsyncResultHolder<Boolean>();
- getExecutor(mFilename).executePrioritized(new Runnable() {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
@Override
public void run() {
if (mDictType == Dictionary.TYPE_USER_HISTORY) {
- if (ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- holder.set(mBinaryDictionary.isValidWord(word));
- } else {
- holder.set(((DynamicPersonalizationDictionaryWriter) mDictionaryWriter)
- .isInBigramListForTests(word));
- }
+ holder.set(mBinaryDictionary.isValidWord(word));
}
}
});
@@ -725,12 +751,33 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
}
@UsedForTesting
- public void shutdownExecutorForTests() {
- getExecutor(mFilename).shutdown();
+ public void waitAllTasksForTests() {
+ final CountDownLatch countDownLatch = new CountDownLatch(1);
+ getExecutor(mDictName).execute(new Runnable() {
+ @Override
+ public void run() {
+ countDownLatch.countDown();
+ }
+ });
+ try {
+ countDownLatch.await();
+ } catch (InterruptedException e) {
+ Log.e(TAG, "Interrupted while waiting for finishing dictionary operations.", e);
+ }
}
@UsedForTesting
- public boolean isTerminatedForTests() {
- return getExecutor(mFilename).isTerminated();
+ protected void runAfterGcForDebug(final Runnable r) {
+ getExecutor(mDictName).executePrioritized(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mBinaryDictionary.flushWithGC();
+ r.run();
+ } finally {
+ mDictNameDictionaryUpdateController.mProcessingLargeTask.set(false);
+ }
+ }
+ });
}
}
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
deleted file mode 100644
index 95c9bcab9..000000000
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ /dev/null
@@ -1,894 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.latin;
-
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.keyboard.ProximityInfo;
-import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
-import com.android.inputmethod.latin.utils.CollectionUtils;
-import com.android.inputmethod.latin.utils.UserHistoryForgettingCurveUtils.ForgettingCurveParams;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-
-/**
- * Class for an in-memory dictionary that can grow dynamically and can
- * be searched for suggestions and valid words.
- */
-// TODO: Remove after binary dictionary supports dynamic update.
-public class ExpandableDictionary extends Dictionary {
- private static final String TAG = ExpandableDictionary.class.getSimpleName();
- /**
- * The weight to give to a word if it's length is the same as the number of typed characters.
- */
- private static final int FULL_WORD_SCORE_MULTIPLIER = 2;
-
- private char[] mWordBuilder = new char[Constants.DICTIONARY_MAX_WORD_LENGTH];
- private int mMaxDepth;
- private int mInputLength;
-
- private static final class Node {
- char mCode;
- int mFrequency;
- boolean mTerminal;
- Node mParent;
- NodeArray mChildren;
- ArrayList<char[]> mShortcutTargets;
- boolean mShortcutOnly;
- LinkedList<NextWord> mNGrams; // Supports ngram
- }
-
- private static final class NodeArray {
- Node[] mData;
- int mLength = 0;
- private static final int INCREMENT = 2;
-
- NodeArray() {
- mData = new Node[INCREMENT];
- }
-
- void add(final Node n) {
- if (mLength + 1 > mData.length) {
- Node[] tempData = new Node[mLength + INCREMENT];
- if (mLength > 0) {
- System.arraycopy(mData, 0, tempData, 0, mLength);
- }
- mData = tempData;
- }
- mData[mLength++] = n;
- }
- }
-
- public interface NextWord {
- public Node getWordNode();
- public int getFrequency();
- public ForgettingCurveParams getFcParams();
- public int notifyTypedAgainAndGetFrequency();
- }
-
- private static final class NextStaticWord implements NextWord {
- public final Node mWord;
- private final int mFrequency;
- public NextStaticWord(Node word, int frequency) {
- mWord = word;
- mFrequency = frequency;
- }
-
- @Override
- public Node getWordNode() {
- return mWord;
- }
-
- @Override
- public int getFrequency() {
- return mFrequency;
- }
-
- @Override
- public ForgettingCurveParams getFcParams() {
- return null;
- }
-
- @Override
- public int notifyTypedAgainAndGetFrequency() {
- return mFrequency;
- }
- }
-
- private static final class NextHistoryWord implements NextWord {
- public final Node mWord;
- public final ForgettingCurveParams mFcp;
-
- public NextHistoryWord(Node word, ForgettingCurveParams fcp) {
- mWord = word;
- mFcp = fcp;
- }
-
- @Override
- public Node getWordNode() {
- return mWord;
- }
-
- @Override
- public int getFrequency() {
- return mFcp.getFrequency();
- }
-
- @Override
- public ForgettingCurveParams getFcParams() {
- return mFcp;
- }
-
- @Override
- public int notifyTypedAgainAndGetFrequency() {
- return mFcp.notifyTypedAgainAndGetFrequency();
- }
- }
-
- private NodeArray mRoots;
-
- private int[][] mCodes;
-
- public ExpandableDictionary(final String dictType) {
- super(dictType);
- clearDictionary();
- mCodes = new int[Constants.DICTIONARY_MAX_WORD_LENGTH][];
- }
-
- public int getMaxWordLength() {
- return Constants.DICTIONARY_MAX_WORD_LENGTH;
- }
-
- /**
- * Add a word with an optional shortcut to the dictionary.
- * @param word The word to add.
- * @param shortcutTarget A shortcut target for this word, or null if none.
- * @param frequency The frequency for this unigram.
- * @param shortcutFreq The frequency of the shortcut (0~15, with 15 = whitelist). Ignored
- * if shortcutTarget is null.
- */
- public void addWord(final String word, final String shortcutTarget, final int frequency,
- final int shortcutFreq) {
- if (word.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH) {
- return;
- }
- addWordRec(mRoots, word, 0, shortcutTarget, frequency, shortcutFreq, null);
- }
-
- /**
- * Add a word, recursively searching for its correct place in the trie tree.
- * @param children The node to recursively search for addition. Initially, the root of the tree.
- * @param word The word to add.
- * @param depth The current depth in the tree.
- * @param shortcutTarget A shortcut target for this word, or null if none.
- * @param frequency The frequency for this unigram.
- * @param shortcutFreq The frequency of the shortcut (0~15, with 15 = whitelist). Ignored
- * if shortcutTarget is null.
- * @param parentNode The parent node, for up linking. Initially null, as the root has no parent.
- */
- private void addWordRec(final NodeArray children, final String word, final int depth,
- final String shortcutTarget, final int frequency, final int shortcutFreq,
- final Node parentNode) {
- final int wordLength = word.length();
- if (wordLength <= depth) return;
- final char c = word.charAt(depth);
- // Does children have the current character?
- final int childrenLength = children.mLength;
- Node childNode = null;
- for (int i = 0; i < childrenLength; i++) {
- final Node node = children.mData[i];
- if (node.mCode == c) {
- childNode = node;
- break;
- }
- }
- final boolean isShortcutOnly = (null != shortcutTarget);
- if (childNode == null) {
- childNode = new Node();
- childNode.mCode = c;
- childNode.mParent = parentNode;
- childNode.mShortcutOnly = isShortcutOnly;
- children.add(childNode);
- }
- if (wordLength == depth + 1) {
- // Terminate this word
- childNode.mTerminal = true;
- if (isShortcutOnly) {
- if (null == childNode.mShortcutTargets) {
- childNode.mShortcutTargets = CollectionUtils.newArrayList();
- }
- childNode.mShortcutTargets.add(shortcutTarget.toCharArray());
- } else {
- childNode.mShortcutOnly = false;
- }
- childNode.mFrequency = Math.max(frequency, childNode.mFrequency);
- if (childNode.mFrequency > 255) childNode.mFrequency = 255;
- return;
- }
- if (childNode.mChildren == null) {
- childNode.mChildren = new NodeArray();
- }
- addWordRec(childNode.mChildren, word, depth + 1, shortcutTarget, frequency, shortcutFreq,
- childNode);
- }
-
- @Override
- public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
- final String prevWord, final ProximityInfo proximityInfo,
- final boolean blockOffensiveWords, final int[] additionalFeaturesOptions) {
- if (composer.size() > 1) {
- if (composer.size() >= Constants.DICTIONARY_MAX_WORD_LENGTH) {
- return null;
- }
- final ArrayList<SuggestedWordInfo> suggestions =
- getWordsInner(composer, prevWord, proximityInfo);
- return suggestions;
- } else {
- if (TextUtils.isEmpty(prevWord)) return null;
- final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
- runBigramReverseLookUp(prevWord, suggestions);
- return suggestions;
- }
- }
-
- private ArrayList<SuggestedWordInfo> getWordsInner(final WordComposer codes,
- final String prevWordForBigrams, final ProximityInfo proximityInfo) {
- final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
- mInputLength = codes.size();
- if (mCodes.length < mInputLength) mCodes = new int[mInputLength][];
- final InputPointers ips = codes.getInputPointers();
- final int[] xCoordinates = ips.getXCoordinates();
- final int[] yCoordinates = ips.getYCoordinates();
- // Cache the codes so that we don't have to lookup an array list
- for (int i = 0; i < mInputLength; i++) {
- // TODO: Calculate proximity info here.
- if (mCodes[i] == null || mCodes[i].length < 1) {
- mCodes[i] = new int[ProximityInfo.MAX_PROXIMITY_CHARS_SIZE];
- }
- final int x = xCoordinates != null && i < xCoordinates.length ?
- xCoordinates[i] : Constants.NOT_A_COORDINATE;
- final int y = xCoordinates != null && i < yCoordinates.length ?
- yCoordinates[i] : Constants.NOT_A_COORDINATE;
- proximityInfo.fillArrayWithNearestKeyCodes(x, y, codes.getCodeAt(i), mCodes[i]);
- }
- mMaxDepth = mInputLength * 3;
- getWordsRec(mRoots, codes, mWordBuilder, 0, false, 1, 0, -1, suggestions);
- for (int i = 0; i < mInputLength; i++) {
- getWordsRec(mRoots, codes, mWordBuilder, 0, false, 1, 0, i, suggestions);
- }
- return suggestions;
- }
-
- @Override
- public synchronized boolean isValidWord(final String word) {
- final Node node = searchNode(mRoots, word, 0, word.length());
- // If node is null, we didn't find the word, so it's not valid.
- // If node.mShortcutOnly is true, then it exists as a shortcut but not as a word,
- // so that means it's not a valid word.
- // If node.mShortcutOnly is false, then it exists as a word (it may also exist as
- // a shortcut, but this does not matter), so it's a valid word.
- return (node == null) ? false : !node.mShortcutOnly;
- }
-
- public boolean removeBigram(final String word0, final String word1) {
- // Refer to addOrSetBigram() about word1.toLowerCase()
- final Node firstWord = searchWord(mRoots, word0.toLowerCase(), 0, null);
- final Node secondWord = searchWord(mRoots, word1, 0, null);
- LinkedList<NextWord> bigrams = firstWord.mNGrams;
- NextWord bigramNode = null;
- if (bigrams == null || bigrams.size() == 0) {
- return false;
- } else {
- for (NextWord nw : bigrams) {
- if (nw.getWordNode() == secondWord) {
- bigramNode = nw;
- break;
- }
- }
- }
- if (bigramNode == null) {
- return false;
- }
- return bigrams.remove(bigramNode);
- }
-
- /**
- * Returns the word's frequency or -1 if not found
- */
- @UsedForTesting
- public int getWordFrequency(final String word) {
- // Case-sensitive search
- final Node node = searchNode(mRoots, word, 0, word.length());
- return (node == null) ? -1 : node.mFrequency;
- }
-
- public NextWord getBigramWord(final String word0, final String word1) {
- // Refer to addOrSetBigram() about word0.toLowerCase()
- final Node firstWord = searchWord(mRoots, word0.toLowerCase(), 0, null);
- final Node secondWord = searchWord(mRoots, word1, 0, null);
- LinkedList<NextWord> bigrams = firstWord.mNGrams;
- if (bigrams == null || bigrams.size() == 0) {
- return null;
- } else {
- for (NextWord nw : bigrams) {
- if (nw.getWordNode() == secondWord) {
- return nw;
- }
- }
- }
- return null;
- }
-
- private static int computeSkippedWordFinalFreq(final int freq, final int snr,
- final int inputLength) {
- // The computation itself makes sense for >= 2, but the == 2 case returns 0
- // anyway so we may as well test against 3 instead and return the constant
- if (inputLength >= 3) {
- return (freq * snr * (inputLength - 2)) / (inputLength - 1);
- } else {
- return 0;
- }
- }
-
- /**
- * Helper method to add a word and its shortcuts.
- *
- * @param node the terminal node
- * @param word the word to insert, as an array of code points
- * @param depth the depth of the node in the tree
- * @param finalFreq the frequency for this word
- * @param suggestions the suggestion collection to add the suggestions to
- * @return whether there is still space for more words.
- */
- private boolean addWordAndShortcutsFromNode(final Node node, final char[] word, final int depth,
- final int finalFreq, final ArrayList<SuggestedWordInfo> suggestions) {
- if (finalFreq > 0 && !node.mShortcutOnly) {
- // Use KIND_CORRECTION always. This dictionary does not really have a notion of
- // COMPLETION against CORRECTION; we could artificially add one by looking at
- // the respective size of the typed word and the suggestion if it matters sometime
- // in the future.
- suggestions.add(new SuggestedWordInfo(new String(word, 0, depth + 1), finalFreq,
- SuggestedWordInfo.KIND_CORRECTION, this /* sourceDict */,
- SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
- SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */));
- if (suggestions.size() >= Suggest.MAX_SUGGESTIONS) return false;
- }
- if (null != node.mShortcutTargets) {
- final int length = node.mShortcutTargets.size();
- for (int shortcutIndex = 0; shortcutIndex < length; ++shortcutIndex) {
- final char[] shortcut = node.mShortcutTargets.get(shortcutIndex);
- suggestions.add(new SuggestedWordInfo(new String(shortcut, 0, shortcut.length),
- finalFreq, SuggestedWordInfo.KIND_SHORTCUT, this /* sourceDict */,
- SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
- SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */));
- if (suggestions.size() > Suggest.MAX_SUGGESTIONS) return false;
- }
- }
- return true;
- }
-
- /**
- * Recursively traverse the tree for words that match the input. Input consists of
- * a list of arrays. Each item in the list is one input character position. An input
- * character is actually an array of multiple possible candidates. This function is not
- * optimized for speed, assuming that the user dictionary will only be a few hundred words in
- * size.
- * @param roots node whose children have to be search for matches
- * @param codes the input character codes
- * @param word the word being composed as a possible match
- * @param depth the depth of traversal - the length of the word being composed thus far
- * @param completion whether the traversal is now in completion mode - meaning that we've
- * exhausted the input and we're looking for all possible suffixes.
- * @param snr current weight of the word being formed
- * @param inputIndex position in the input characters. This can be off from the depth in
- * case we skip over some punctuations such as apostrophe in the traversal. That is, if you type
- * "wouldve", it could be matching "would've", so the depth will be one more than the
- * inputIndex
- * @param suggestions the list in which to add suggestions
- */
- // TODO: Share this routine with the native code for BinaryDictionary
- private void getWordsRec(final NodeArray roots, final WordComposer codes, final char[] word,
- final int depth, final boolean completion, final int snr, final int inputIndex,
- final int skipPos, final ArrayList<SuggestedWordInfo> suggestions) {
- final int count = roots.mLength;
- final int codeSize = mInputLength;
- // Optimization: Prune out words that are too long compared to how much was typed.
- if (depth > mMaxDepth) {
- return;
- }
- final int[] currentChars;
- if (codeSize <= inputIndex) {
- currentChars = null;
- } else {
- currentChars = mCodes[inputIndex];
- }
-
- for (int i = 0; i < count; i++) {
- final Node node = roots.mData[i];
- final char c = node.mCode;
- final char lowerC = toLowerCase(c);
- final boolean terminal = node.mTerminal;
- final NodeArray children = node.mChildren;
- final int freq = node.mFrequency;
- if (completion || currentChars == null) {
- word[depth] = c;
- if (terminal) {
- final int finalFreq;
- if (skipPos < 0) {
- finalFreq = freq * snr;
- } else {
- finalFreq = computeSkippedWordFinalFreq(freq, snr, mInputLength);
- }
- if (!addWordAndShortcutsFromNode(node, word, depth, finalFreq, suggestions)) {
- // No space left in the queue, bail out
- return;
- }
- }
- if (children != null) {
- getWordsRec(children, codes, word, depth + 1, true, snr, inputIndex,
- skipPos, suggestions);
- }
- } else if ((c == Constants.CODE_SINGLE_QUOTE
- && currentChars[0] != Constants.CODE_SINGLE_QUOTE) || depth == skipPos) {
- // Skip the ' and continue deeper
- word[depth] = c;
- if (children != null) {
- getWordsRec(children, codes, word, depth + 1, completion, snr, inputIndex,
- skipPos, suggestions);
- }
- } else {
- // Don't use alternatives if we're looking for missing characters
- final int alternativesSize = skipPos >= 0 ? 1 : currentChars.length;
- for (int j = 0; j < alternativesSize; j++) {
- final int addedAttenuation = (j > 0 ? 1 : 2);
- final int currentChar = currentChars[j];
- if (currentChar == Constants.NOT_A_CODE) {
- break;
- }
- if (currentChar == lowerC || currentChar == c) {
- word[depth] = c;
-
- if (codeSize == inputIndex + 1) {
- if (terminal) {
- final int finalFreq;
- if (skipPos < 0) {
- finalFreq = freq * snr * addedAttenuation
- * FULL_WORD_SCORE_MULTIPLIER;
- } else {
- finalFreq = computeSkippedWordFinalFreq(freq,
- snr * addedAttenuation, mInputLength);
- }
- if (!addWordAndShortcutsFromNode(node, word, depth, finalFreq,
- suggestions)) {
- // No space left in the queue, bail out
- return;
- }
- }
- if (children != null) {
- getWordsRec(children, codes, word, depth + 1,
- true, snr * addedAttenuation, inputIndex + 1,
- skipPos, suggestions);
- }
- } else if (children != null) {
- getWordsRec(children, codes, word, depth + 1,
- false, snr * addedAttenuation, inputIndex + 1,
- skipPos, suggestions);
- }
- }
- }
- }
- }
- }
-
- public int setBigramAndGetFrequency(final String word0, final String word1,
- final int frequency) {
- return setBigramAndGetFrequency(word0, word1, frequency, null /* unused */);
- }
-
- public int setBigramAndGetFrequency(final String word0, final String word1,
- final ForgettingCurveParams fcp) {
- return setBigramAndGetFrequency(word0, word1, 0 /* unused */, fcp);
- }
-
- /**
- * Adds bigrams to the in-memory trie structure that is being used to retrieve any word
- * @param word0 the first word of this bigram
- * @param word1 the second word of this bigram
- * @param frequency frequency for this bigram
- * @param fcp an instance of ForgettingCurveParams to use for decay policy
- * @return returns the final bigram frequency
- */
- private int setBigramAndGetFrequency(final String word0, final String word1,
- final int frequency, final ForgettingCurveParams fcp) {
- if (TextUtils.isEmpty(word0)) {
- Log.e(TAG, "Invalid bigram previous word: " + word0);
- return frequency;
- }
- // We don't want results to be different according to case of the looked up left hand side
- // word. We do want however to return the correct case for the right hand side.
- // So we want to squash the case of the left hand side, and preserve that of the right
- // hand side word.
- final String word0Lower = word0.toLowerCase();
- if (TextUtils.isEmpty(word0Lower) || TextUtils.isEmpty(word1)) {
- Log.e(TAG, "Invalid bigram pair: " + word0 + ", " + word0Lower + ", " + word1);
- return frequency;
- }
- final Node firstWord = searchWord(mRoots, word0Lower, 0, null);
- final Node secondWord = searchWord(mRoots, word1, 0, null);
- LinkedList<NextWord> bigrams = firstWord.mNGrams;
- if (bigrams == null || bigrams.size() == 0) {
- firstWord.mNGrams = CollectionUtils.newLinkedList();
- bigrams = firstWord.mNGrams;
- } else {
- for (NextWord nw : bigrams) {
- if (nw.getWordNode() == secondWord) {
- return nw.notifyTypedAgainAndGetFrequency();
- }
- }
- }
- if (fcp != null) {
- // history
- firstWord.mNGrams.add(new NextHistoryWord(secondWord, fcp));
- } else {
- firstWord.mNGrams.add(new NextStaticWord(secondWord, frequency));
- }
- return frequency;
- }
-
- /**
- * Searches for the word and add the word if it does not exist.
- * @return Returns the terminal node of the word we are searching for.
- */
- private Node searchWord(final NodeArray children, final String word, final int depth,
- final Node parentNode) {
- final int wordLength = word.length();
- final char c = word.charAt(depth);
- // Does children have the current character?
- final int childrenLength = children.mLength;
- Node childNode = null;
- for (int i = 0; i < childrenLength; i++) {
- final Node node = children.mData[i];
- if (node.mCode == c) {
- childNode = node;
- break;
- }
- }
- if (childNode == null) {
- childNode = new Node();
- childNode.mCode = c;
- childNode.mParent = parentNode;
- children.add(childNode);
- }
- if (wordLength == depth + 1) {
- // Terminate this word
- childNode.mTerminal = true;
- return childNode;
- }
- if (childNode.mChildren == null) {
- childNode.mChildren = new NodeArray();
- }
- return searchWord(childNode.mChildren, word, depth + 1, childNode);
- }
-
- private void runBigramReverseLookUp(final String previousWord,
- final ArrayList<SuggestedWordInfo> suggestions) {
- // Search for the lowercase version of the word only, because that's where bigrams
- // store their sons.
- final Node prevWord = searchNode(mRoots, previousWord.toLowerCase(), 0,
- previousWord.length());
- if (prevWord != null && prevWord.mNGrams != null) {
- reverseLookUp(prevWord.mNGrams, suggestions);
- }
- }
-
- // Local to reverseLookUp, but do not allocate each time.
- private final char[] mLookedUpString = new char[Constants.DICTIONARY_MAX_WORD_LENGTH];
-
- /**
- * reverseLookUp retrieves the full word given a list of terminal nodes and adds those words
- * to the suggestions list passed as an argument.
- * @param terminalNodes list of terminal nodes we want to add
- * @param suggestions the suggestion collection to add the word to
- */
- private void reverseLookUp(final LinkedList<NextWord> terminalNodes,
- final ArrayList<SuggestedWordInfo> suggestions) {
- Node node;
- int freq;
- for (NextWord nextWord : terminalNodes) {
- node = nextWord.getWordNode();
- freq = nextWord.getFrequency();
- int index = Constants.DICTIONARY_MAX_WORD_LENGTH;
- do {
- --index;
- mLookedUpString[index] = node.mCode;
- node = node.mParent;
- } while (node != null && index > 0);
-
- // If node is null, we have a word longer than MAX_WORD_LENGTH in the dictionary.
- // It's a little unclear how this can happen, but just in case it does it's safer
- // to ignore the word in this case.
- if (freq >= 0 && node == null) {
- suggestions.add(new SuggestedWordInfo(new String(mLookedUpString, index,
- Constants.DICTIONARY_MAX_WORD_LENGTH - index),
- freq, SuggestedWordInfo.KIND_CORRECTION, this /* sourceDict */,
- SuggestedWordInfo.NOT_AN_INDEX /* indexOfTouchPointOfSecondWord */,
- SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */));
- }
- }
- }
-
- /**
- * Recursively search for the terminal node of the word.
- *
- * One iteration takes the full word to search for and the current index of the recursion.
- *
- * @param children the node of the trie to search under.
- * @param word the word to search for. Only read [offset..length] so there may be trailing chars
- * @param offset the index in {@code word} this recursion should operate on.
- * @param length the length of the input word.
- * @return Returns the terminal node of the word if the word exists
- */
- private Node searchNode(final NodeArray children, final CharSequence word, final int offset,
- final int length) {
- final int count = children.mLength;
- final char currentChar = word.charAt(offset);
- for (int j = 0; j < count; j++) {
- final Node node = children.mData[j];
- if (node.mCode == currentChar) {
- if (offset == length - 1) {
- if (node.mTerminal) {
- return node;
- }
- } else {
- if (node.mChildren != null) {
- Node returnNode = searchNode(node.mChildren, word, offset + 1, length);
- if (returnNode != null) return returnNode;
- }
- }
- }
- }
- return null;
- }
-
- public void clearDictionary() {
- mRoots = new NodeArray();
- }
-
- private static char toLowerCase(final char c) {
- char baseChar = c;
- if (c < BASE_CHARS.length) {
- baseChar = BASE_CHARS[c];
- }
- if (baseChar >= 'A' && baseChar <= 'Z') {
- return (char)(baseChar | 32);
- } else if (baseChar > 127) {
- return Character.toLowerCase(baseChar);
- }
- return baseChar;
- }
-
- /**
- * Table mapping most combined Latin, Greek, and Cyrillic characters
- * to their base characters. If c is in range, BASE_CHARS[c] == c
- * if c is not a combined character, or the base character if it
- * is combined.
- *
- * cf. native/jni/src/utils/char_utils.cpp
- */
- private static final char BASE_CHARS[] = {
- /* U+0000 */ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
- /* U+0008 */ 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
- /* U+0010 */ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
- /* U+0018 */ 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
- /* U+0020 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
- /* U+0028 */ 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
- /* U+0030 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
- /* U+0038 */ 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
- /* U+0040 */ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
- /* U+0048 */ 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
- /* U+0050 */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
- /* U+0058 */ 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
- /* U+0060 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
- /* U+0068 */ 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
- /* U+0070 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
- /* U+0078 */ 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
- /* U+0080 */ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
- /* U+0088 */ 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
- /* U+0090 */ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
- /* U+0098 */ 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
- /* U+00A0 */ 0x0020, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
- /* U+00A8 */ 0x0020, 0x00A9, 0x0061, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0020,
- /* U+00B0 */ 0x00B0, 0x00B1, 0x0032, 0x0033, 0x0020, 0x03BC, 0x00B6, 0x00B7,
- /* U+00B8 */ 0x0020, 0x0031, 0x006F, 0x00BB, 0x0031, 0x0031, 0x0033, 0x00BF,
- /* U+00C0 */ 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x00C6, 0x0043,
- /* U+00C8 */ 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049,
- /* U+00D0 */ 0x00D0, 0x004E, 0x004F, 0x004F, 0x004F, 0x004F, 0x004F, 0x00D7,
- /* U+00D8 */ 0x004F, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x00DE, 0x0073,
- // U+00D8: Manually changed from 00D8 to 004F
- // TODO: Check if it's really acceptable to consider Ø a diacritical variant of O
- // U+00DF: Manually changed from 00DF to 0073
- /* U+00E0 */ 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x00E6, 0x0063,
- /* U+00E8 */ 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069,
- /* U+00F0 */ 0x00F0, 0x006E, 0x006F, 0x006F, 0x006F, 0x006F, 0x006F, 0x00F7,
- /* U+00F8 */ 0x006F, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x00FE, 0x0079,
- // U+00F8: Manually changed from 00F8 to 006F
- // TODO: Check if it's really acceptable to consider ø a diacritical variant of o
- /* U+0100 */ 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063,
- /* U+0108 */ 0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064,
- /* U+0110 */ 0x0110, 0x0111, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065,
- /* U+0118 */ 0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067,
- /* U+0120 */ 0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0126, 0x0127,
- /* U+0128 */ 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069,
- /* U+0130 */ 0x0049, 0x0131, 0x0049, 0x0069, 0x004A, 0x006A, 0x004B, 0x006B,
- /* U+0138 */ 0x0138, 0x004C, 0x006C, 0x004C, 0x006C, 0x004C, 0x006C, 0x004C,
- /* U+0140 */ 0x006C, 0x004C, 0x006C, 0x004E, 0x006E, 0x004E, 0x006E, 0x004E,
- // U+0141: Manually changed from 0141 to 004C
- // U+0142: Manually changed from 0142 to 006C
- /* U+0148 */ 0x006E, 0x02BC, 0x014A, 0x014B, 0x004F, 0x006F, 0x004F, 0x006F,
- /* U+0150 */ 0x004F, 0x006F, 0x0152, 0x0153, 0x0052, 0x0072, 0x0052, 0x0072,
- /* U+0158 */ 0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
- /* U+0160 */ 0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0166, 0x0167,
- /* U+0168 */ 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075,
- /* U+0170 */ 0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079,
- /* U+0178 */ 0x0059, 0x005A, 0x007A, 0x005A, 0x007A, 0x005A, 0x007A, 0x0073,
- /* U+0180 */ 0x0180, 0x0181, 0x0182, 0x0183, 0x0184, 0x0185, 0x0186, 0x0187,
- /* U+0188 */ 0x0188, 0x0189, 0x018A, 0x018B, 0x018C, 0x018D, 0x018E, 0x018F,
- /* U+0190 */ 0x0190, 0x0191, 0x0192, 0x0193, 0x0194, 0x0195, 0x0196, 0x0197,
- /* U+0198 */ 0x0198, 0x0199, 0x019A, 0x019B, 0x019C, 0x019D, 0x019E, 0x019F,
- /* U+01A0 */ 0x004F, 0x006F, 0x01A2, 0x01A3, 0x01A4, 0x01A5, 0x01A6, 0x01A7,
- /* U+01A8 */ 0x01A8, 0x01A9, 0x01AA, 0x01AB, 0x01AC, 0x01AD, 0x01AE, 0x0055,
- /* U+01B0 */ 0x0075, 0x01B1, 0x01B2, 0x01B3, 0x01B4, 0x01B5, 0x01B6, 0x01B7,
- /* U+01B8 */ 0x01B8, 0x01B9, 0x01BA, 0x01BB, 0x01BC, 0x01BD, 0x01BE, 0x01BF,
- /* U+01C0 */ 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x0044, 0x0044, 0x0064, 0x004C,
- /* U+01C8 */ 0x004C, 0x006C, 0x004E, 0x004E, 0x006E, 0x0041, 0x0061, 0x0049,
- /* U+01D0 */ 0x0069, 0x004F, 0x006F, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055,
- // U+01D5: Manually changed from 00DC to 0055
- // U+01D6: Manually changed from 00FC to 0075
- // U+01D7: Manually changed from 00DC to 0055
- /* U+01D8 */ 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x01DD, 0x0041, 0x0061,
- // U+01D8: Manually changed from 00FC to 0075
- // U+01D9: Manually changed from 00DC to 0055
- // U+01DA: Manually changed from 00FC to 0075
- // U+01DB: Manually changed from 00DC to 0055
- // U+01DC: Manually changed from 00FC to 0075
- // U+01DE: Manually changed from 00C4 to 0041
- // U+01DF: Manually changed from 00E4 to 0061
- /* U+01E0 */ 0x0041, 0x0061, 0x00C6, 0x00E6, 0x01E4, 0x01E5, 0x0047, 0x0067,
- // U+01E0: Manually changed from 0226 to 0041
- // U+01E1: Manually changed from 0227 to 0061
- /* U+01E8 */ 0x004B, 0x006B, 0x004F, 0x006F, 0x004F, 0x006F, 0x01B7, 0x0292,
- // U+01EC: Manually changed from 01EA to 004F
- // U+01ED: Manually changed from 01EB to 006F
- /* U+01F0 */ 0x006A, 0x0044, 0x0044, 0x0064, 0x0047, 0x0067, 0x01F6, 0x01F7,
- /* U+01F8 */ 0x004E, 0x006E, 0x0041, 0x0061, 0x00C6, 0x00E6, 0x004F, 0x006F,
- // U+01FA: Manually changed from 00C5 to 0041
- // U+01FB: Manually changed from 00E5 to 0061
- // U+01FE: Manually changed from 00D8 to 004F
- // TODO: Check if it's really acceptable to consider Ø a diacritical variant of O
- // U+01FF: Manually changed from 00F8 to 006F
- // TODO: Check if it's really acceptable to consider ø a diacritical variant of o
- /* U+0200 */ 0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065,
- /* U+0208 */ 0x0049, 0x0069, 0x0049, 0x0069, 0x004F, 0x006F, 0x004F, 0x006F,
- /* U+0210 */ 0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075,
- /* U+0218 */ 0x0053, 0x0073, 0x0054, 0x0074, 0x021C, 0x021D, 0x0048, 0x0068,
- /* U+0220 */ 0x0220, 0x0221, 0x0222, 0x0223, 0x0224, 0x0225, 0x0041, 0x0061,
- /* U+0228 */ 0x0045, 0x0065, 0x004F, 0x006F, 0x004F, 0x006F, 0x004F, 0x006F,
- // U+022A: Manually changed from 00D6 to 004F
- // U+022B: Manually changed from 00F6 to 006F
- // U+022C: Manually changed from 00D5 to 004F
- // U+022D: Manually changed from 00F5 to 006F
- /* U+0230 */ 0x004F, 0x006F, 0x0059, 0x0079, 0x0234, 0x0235, 0x0236, 0x0237,
- // U+0230: Manually changed from 022E to 004F
- // U+0231: Manually changed from 022F to 006F
- /* U+0238 */ 0x0238, 0x0239, 0x023A, 0x023B, 0x023C, 0x023D, 0x023E, 0x023F,
- /* U+0240 */ 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247,
- /* U+0248 */ 0x0248, 0x0249, 0x024A, 0x024B, 0x024C, 0x024D, 0x024E, 0x024F,
- /* U+0250 */ 0x0250, 0x0251, 0x0252, 0x0253, 0x0254, 0x0255, 0x0256, 0x0257,
- /* U+0258 */ 0x0258, 0x0259, 0x025A, 0x025B, 0x025C, 0x025D, 0x025E, 0x025F,
- /* U+0260 */ 0x0260, 0x0261, 0x0262, 0x0263, 0x0264, 0x0265, 0x0266, 0x0267,
- /* U+0268 */ 0x0268, 0x0269, 0x026A, 0x026B, 0x026C, 0x026D, 0x026E, 0x026F,
- /* U+0270 */ 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277,
- /* U+0278 */ 0x0278, 0x0279, 0x027A, 0x027B, 0x027C, 0x027D, 0x027E, 0x027F,
- /* U+0280 */ 0x0280, 0x0281, 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287,
- /* U+0288 */ 0x0288, 0x0289, 0x028A, 0x028B, 0x028C, 0x028D, 0x028E, 0x028F,
- /* U+0290 */ 0x0290, 0x0291, 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297,
- /* U+0298 */ 0x0298, 0x0299, 0x029A, 0x029B, 0x029C, 0x029D, 0x029E, 0x029F,
- /* U+02A0 */ 0x02A0, 0x02A1, 0x02A2, 0x02A3, 0x02A4, 0x02A5, 0x02A6, 0x02A7,
- /* U+02A8 */ 0x02A8, 0x02A9, 0x02AA, 0x02AB, 0x02AC, 0x02AD, 0x02AE, 0x02AF,
- /* U+02B0 */ 0x0068, 0x0266, 0x006A, 0x0072, 0x0279, 0x027B, 0x0281, 0x0077,
- /* U+02B8 */ 0x0079, 0x02B9, 0x02BA, 0x02BB, 0x02BC, 0x02BD, 0x02BE, 0x02BF,
- /* U+02C0 */ 0x02C0, 0x02C1, 0x02C2, 0x02C3, 0x02C4, 0x02C5, 0x02C6, 0x02C7,
- /* U+02C8 */ 0x02C8, 0x02C9, 0x02CA, 0x02CB, 0x02CC, 0x02CD, 0x02CE, 0x02CF,
- /* U+02D0 */ 0x02D0, 0x02D1, 0x02D2, 0x02D3, 0x02D4, 0x02D5, 0x02D6, 0x02D7,
- /* U+02D8 */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x02DE, 0x02DF,
- /* U+02E0 */ 0x0263, 0x006C, 0x0073, 0x0078, 0x0295, 0x02E5, 0x02E6, 0x02E7,
- /* U+02E8 */ 0x02E8, 0x02E9, 0x02EA, 0x02EB, 0x02EC, 0x02ED, 0x02EE, 0x02EF,
- /* U+02F0 */ 0x02F0, 0x02F1, 0x02F2, 0x02F3, 0x02F4, 0x02F5, 0x02F6, 0x02F7,
- /* U+02F8 */ 0x02F8, 0x02F9, 0x02FA, 0x02FB, 0x02FC, 0x02FD, 0x02FE, 0x02FF,
- /* U+0300 */ 0x0300, 0x0301, 0x0302, 0x0303, 0x0304, 0x0305, 0x0306, 0x0307,
- /* U+0308 */ 0x0308, 0x0309, 0x030A, 0x030B, 0x030C, 0x030D, 0x030E, 0x030F,
- /* U+0310 */ 0x0310, 0x0311, 0x0312, 0x0313, 0x0314, 0x0315, 0x0316, 0x0317,
- /* U+0318 */ 0x0318, 0x0319, 0x031A, 0x031B, 0x031C, 0x031D, 0x031E, 0x031F,
- /* U+0320 */ 0x0320, 0x0321, 0x0322, 0x0323, 0x0324, 0x0325, 0x0326, 0x0327,
- /* U+0328 */ 0x0328, 0x0329, 0x032A, 0x032B, 0x032C, 0x032D, 0x032E, 0x032F,
- /* U+0330 */ 0x0330, 0x0331, 0x0332, 0x0333, 0x0334, 0x0335, 0x0336, 0x0337,
- /* U+0338 */ 0x0338, 0x0339, 0x033A, 0x033B, 0x033C, 0x033D, 0x033E, 0x033F,
- /* U+0340 */ 0x0300, 0x0301, 0x0342, 0x0313, 0x0308, 0x0345, 0x0346, 0x0347,
- /* U+0348 */ 0x0348, 0x0349, 0x034A, 0x034B, 0x034C, 0x034D, 0x034E, 0x034F,
- /* U+0350 */ 0x0350, 0x0351, 0x0352, 0x0353, 0x0354, 0x0355, 0x0356, 0x0357,
- /* U+0358 */ 0x0358, 0x0359, 0x035A, 0x035B, 0x035C, 0x035D, 0x035E, 0x035F,
- /* U+0360 */ 0x0360, 0x0361, 0x0362, 0x0363, 0x0364, 0x0365, 0x0366, 0x0367,
- /* U+0368 */ 0x0368, 0x0369, 0x036A, 0x036B, 0x036C, 0x036D, 0x036E, 0x036F,
- /* U+0370 */ 0x0370, 0x0371, 0x0372, 0x0373, 0x02B9, 0x0375, 0x0376, 0x0377,
- /* U+0378 */ 0x0378, 0x0379, 0x0020, 0x037B, 0x037C, 0x037D, 0x003B, 0x037F,
- /* U+0380 */ 0x0380, 0x0381, 0x0382, 0x0383, 0x0020, 0x00A8, 0x0391, 0x00B7,
- /* U+0388 */ 0x0395, 0x0397, 0x0399, 0x038B, 0x039F, 0x038D, 0x03A5, 0x03A9,
- /* U+0390 */ 0x03CA, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
- /* U+0398 */ 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
- /* U+03A0 */ 0x03A0, 0x03A1, 0x03A2, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7,
- /* U+03A8 */ 0x03A8, 0x03A9, 0x0399, 0x03A5, 0x03B1, 0x03B5, 0x03B7, 0x03B9,
- /* U+03B0 */ 0x03CB, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
- /* U+03B8 */ 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
- /* U+03C0 */ 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7,
- /* U+03C8 */ 0x03C8, 0x03C9, 0x03B9, 0x03C5, 0x03BF, 0x03C5, 0x03C9, 0x03CF,
- /* U+03D0 */ 0x03B2, 0x03B8, 0x03A5, 0x03D2, 0x03D2, 0x03C6, 0x03C0, 0x03D7,
- /* U+03D8 */ 0x03D8, 0x03D9, 0x03DA, 0x03DB, 0x03DC, 0x03DD, 0x03DE, 0x03DF,
- /* U+03E0 */ 0x03E0, 0x03E1, 0x03E2, 0x03E3, 0x03E4, 0x03E5, 0x03E6, 0x03E7,
- /* U+03E8 */ 0x03E8, 0x03E9, 0x03EA, 0x03EB, 0x03EC, 0x03ED, 0x03EE, 0x03EF,
- /* U+03F0 */ 0x03BA, 0x03C1, 0x03C2, 0x03F3, 0x0398, 0x03B5, 0x03F6, 0x03F7,
- /* U+03F8 */ 0x03F8, 0x03A3, 0x03FA, 0x03FB, 0x03FC, 0x03FD, 0x03FE, 0x03FF,
- /* U+0400 */ 0x0415, 0x0415, 0x0402, 0x0413, 0x0404, 0x0405, 0x0406, 0x0406,
- /* U+0408 */ 0x0408, 0x0409, 0x040A, 0x040B, 0x041A, 0x0418, 0x0423, 0x040F,
- /* U+0410 */ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
- /* U+0418 */ 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
- // U+0419: Manually changed from 0418 to 0419
- /* U+0420 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
- /* U+0428 */ 0x0428, 0x0429, 0x042C, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
- // U+042A: Manually changed from 042A to 042C
- /* U+0430 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
- /* U+0438 */ 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
- // U+0439: Manually changed from 0438 to 0439
- /* U+0440 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
- /* U+0448 */ 0x0448, 0x0449, 0x044C, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
- // U+044A: Manually changed from 044A to 044C
- /* U+0450 */ 0x0435, 0x0435, 0x0452, 0x0433, 0x0454, 0x0455, 0x0456, 0x0456,
- /* U+0458 */ 0x0458, 0x0459, 0x045A, 0x045B, 0x043A, 0x0438, 0x0443, 0x045F,
- /* U+0460 */ 0x0460, 0x0461, 0x0462, 0x0463, 0x0464, 0x0465, 0x0466, 0x0467,
- /* U+0468 */ 0x0468, 0x0469, 0x046A, 0x046B, 0x046C, 0x046D, 0x046E, 0x046F,
- /* U+0470 */ 0x0470, 0x0471, 0x0472, 0x0473, 0x0474, 0x0475, 0x0474, 0x0475,
- /* U+0478 */ 0x0478, 0x0479, 0x047A, 0x047B, 0x047C, 0x047D, 0x047E, 0x047F,
- /* U+0480 */ 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487,
- /* U+0488 */ 0x0488, 0x0489, 0x048A, 0x048B, 0x048C, 0x048D, 0x048E, 0x048F,
- /* U+0490 */ 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497,
- /* U+0498 */ 0x0498, 0x0499, 0x049A, 0x049B, 0x049C, 0x049D, 0x049E, 0x049F,
- /* U+04A0 */ 0x04A0, 0x04A1, 0x04A2, 0x04A3, 0x04A4, 0x04A5, 0x04A6, 0x04A7,
- /* U+04A8 */ 0x04A8, 0x04A9, 0x04AA, 0x04AB, 0x04AC, 0x04AD, 0x04AE, 0x04AF,
- /* U+04B0 */ 0x04B0, 0x04B1, 0x04B2, 0x04B3, 0x04B4, 0x04B5, 0x04B6, 0x04B7,
- /* U+04B8 */ 0x04B8, 0x04B9, 0x04BA, 0x04BB, 0x04BC, 0x04BD, 0x04BE, 0x04BF,
- /* U+04C0 */ 0x04C0, 0x0416, 0x0436, 0x04C3, 0x04C4, 0x04C5, 0x04C6, 0x04C7,
- /* U+04C8 */ 0x04C8, 0x04C9, 0x04CA, 0x04CB, 0x04CC, 0x04CD, 0x04CE, 0x04CF,
- /* U+04D0 */ 0x0410, 0x0430, 0x0410, 0x0430, 0x04D4, 0x04D5, 0x0415, 0x0435,
- /* U+04D8 */ 0x04D8, 0x04D9, 0x04D8, 0x04D9, 0x0416, 0x0436, 0x0417, 0x0437,
- /* U+04E0 */ 0x04E0, 0x04E1, 0x0418, 0x0438, 0x0418, 0x0438, 0x041E, 0x043E,
- /* U+04E8 */ 0x04E8, 0x04E9, 0x04E8, 0x04E9, 0x042D, 0x044D, 0x0423, 0x0443,
- /* U+04F0 */ 0x0423, 0x0443, 0x0423, 0x0443, 0x0427, 0x0447, 0x04F6, 0x04F7,
- /* U+04F8 */ 0x042B, 0x044B, 0x04FA, 0x04FB, 0x04FC, 0x04FD, 0x04FE, 0x04FF,
- };
-}
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java
index 8caf6f17f..fcf043031 100644
--- a/java/src/com/android/inputmethod/latin/InputAttributes.java
+++ b/java/src/com/android/inputmethod/latin/InputAttributes.java
@@ -52,8 +52,7 @@ public final class InputAttributes {
} else if (inputClass == 0) {
// TODO: is this check still necessary?
Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x"
- + " imeOptions=0x%08x",
- inputType, editorInfo.imeOptions));
+ + " imeOptions=0x%08x", inputType, editorInfo.imeOptions));
}
mIsSettingsSuggestionStripOn = false;
mInputTypeNoAutoCorrect = false;
@@ -204,8 +203,7 @@ public final class InputAttributes {
public static boolean inPrivateImeOptions(String packageName, String key,
EditorInfo editorInfo) {
if (editorInfo == null) return false;
- final String findingKey = (packageName != null) ? packageName + "." + key
- : key;
+ final String findingKey = (packageName != null) ? packageName + "." + key : key;
return StringUtils.containsInCommaSplittableText(findingKey, editorInfo.privateImeOptions);
}
}
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java
index 642b3a4da..2e9280c77 100644
--- a/java/src/com/android/inputmethod/latin/LastComposedWord.java
+++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java
@@ -16,8 +16,6 @@
package com.android.inputmethod.latin;
-import com.android.inputmethod.latin.utils.StringUtils;
-
import android.text.TextUtils;
/**
@@ -85,8 +83,4 @@ public final class LastComposedWord {
private boolean didCommitTypedWord() {
return TextUtils.equals(mTypedWord, mCommittedWord);
}
-
- public static int getSeparatorLength(final String separatorString) {
- return StringUtils.codePointCount(separatorString);
- }
}
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index b668a7770..6a10131b0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -68,7 +68,6 @@ import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
import com.android.inputmethod.compat.SuggestionSpanUtils;
import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
import com.android.inputmethod.event.EventInterpreter;
-import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
import com.android.inputmethod.keyboard.KeyboardId;
@@ -81,7 +80,6 @@ import com.android.inputmethod.latin.personalization.DictionaryDecayBroadcastRec
import com.android.inputmethod.latin.personalization.PersonalizationDictionary;
import com.android.inputmethod.latin.personalization.PersonalizationDictionarySessionRegister;
import com.android.inputmethod.latin.personalization.PersonalizationHelper;
-import com.android.inputmethod.latin.personalization.PersonalizationPredictionDictionary;
import com.android.inputmethod.latin.personalization.UserHistoryDictionary;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.settings.SettingsActivity;
@@ -97,8 +95,9 @@ import com.android.inputmethod.latin.utils.InputTypeUtils;
import com.android.inputmethod.latin.utils.IntentUtils;
import com.android.inputmethod.latin.utils.JniUtils;
import com.android.inputmethod.latin.utils.LatinImeLoggerUtils;
+import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
import com.android.inputmethod.latin.utils.RecapitalizeStatus;
-import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
+import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TargetPackageInfoGetterTask;
import com.android.inputmethod.latin.utils.TextRange;
import com.android.inputmethod.latin.utils.UserHistoryForgettingCurveUtils;
@@ -109,6 +108,7 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Locale;
import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
/**
* Input method implementation for Qwerty'ish keyboard.
@@ -181,7 +181,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private boolean mIsMainDictionaryAvailable;
private UserBinaryDictionary mUserDictionary;
private UserHistoryDictionary mUserHistoryDictionary;
- private PersonalizationPredictionDictionary mPersonalizationPredictionDictionary;
private PersonalizationDictionary mPersonalizationDictionary;
private boolean mIsUserDictionaryAvailable;
@@ -195,9 +194,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private int mLastSelectionStart = NOT_A_CURSOR_POSITION;
private int mLastSelectionEnd = NOT_A_CURSOR_POSITION;
- // Whether we are expecting an onUpdateSelection event to fire. If it does when we don't
- // "expect" it, it means the user actually moved the cursor.
- private boolean mExpectingUpdateSelection;
private int mDeleteCount;
private long mLastKeyTime;
private final TreeSet<Long> mCurrentlyPressedHardwareKeys = CollectionUtils.newTreeSet();
@@ -226,7 +222,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
public final UIHandler mHandler = new UIHandler(this);
private InputUpdater mInputUpdater;
- public static final class UIHandler extends StaticInnerHandlerWrapper<LatinIME> {
+ public static final class UIHandler extends LeakGuardHandlerWrapper<LatinIME> {
private static final int MSG_UPDATE_SHIFT_STATE = 0;
private static final int MSG_PENDING_IMS_CALLBACK = 1;
private static final int MSG_UPDATE_SUGGESTION_STRIP = 2;
@@ -235,6 +231,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private static final int MSG_REOPEN_DICTIONARIES = 5;
private static final int MSG_ON_END_BATCH_INPUT = 6;
private static final int MSG_RESET_CACHES = 7;
+ // Update this when adding new messages
+ private static final int MSG_LAST = MSG_RESET_CACHES;
private static final int ARG1_NOT_GESTURE_INPUT = 0;
private static final int ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT = 1;
@@ -247,12 +245,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private long mDoubleSpacePeriodTimeout;
private long mDoubleSpacePeriodTimerStart;
- public UIHandler(final LatinIME outerInstance) {
- super(outerInstance);
+ public UIHandler(final LatinIME ownerInstance) {
+ super(ownerInstance);
}
public void onCreate() {
- final Resources res = getOuterInstance().getResources();
+ final Resources res = getOwnerInstance().getResources();
mDelayUpdateSuggestions =
res.getInteger(R.integer.config_delay_update_suggestions);
mDelayUpdateShiftState =
@@ -263,7 +261,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public void handleMessage(final Message msg) {
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
final KeyboardSwitcher switcher = latinIme.mKeyboardSwitcher;
switch (msg.what) {
case MSG_UPDATE_SUGGESTION_STRIP:
@@ -346,6 +344,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
removeMessages(MSG_UPDATE_SHIFT_STATE);
}
+ @UsedForTesting
+ public void removeAllMessages() {
+ for (int i = 0; i <= MSG_LAST; ++i) {
+ removeMessages(i);
+ }
+ }
+
public void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
final boolean dismissGestureFloatingPreviewText) {
removeMessages(MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);
@@ -400,7 +405,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
removeMessages(MSG_PENDING_IMS_CALLBACK);
resetPendingImsCallback();
mIsOrientationChanging = true;
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
if (latinIme.isInputViewShown()) {
latinIme.mKeyboardSwitcher.saveKeyboardState();
}
@@ -433,7 +438,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mIsOrientationChanging = false;
mPendingSuccessiveImsCallback = true;
}
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
executePendingImsCallback(latinIme, editorInfo, restarting);
latinIme.onStartInputInternal(editorInfo, restarting);
}
@@ -452,7 +457,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
sendMessageDelayed(obtainMessage(MSG_PENDING_IMS_CALLBACK),
PENDING_IMS_CALLBACK_DURATION);
}
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
executePendingImsCallback(latinIme, editorInfo, restarting);
latinIme.onStartInputViewInternal(editorInfo, restarting);
mAppliedEditorInfo = editorInfo;
@@ -464,7 +469,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Typically this is the first onFinishInputView after orientation changed.
mHasPendingFinishInputView = true;
} else {
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
latinIme.onFinishInputViewInternal(finishingInput);
mAppliedEditorInfo = null;
}
@@ -475,7 +480,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Typically this is the first onFinishInput after orientation changed.
mHasPendingFinishInput = true;
} else {
- final LatinIME latinIme = getOuterInstance();
+ final LatinIME latinIme = getOwnerInstance();
executePendingImsCallback(latinIme, null, false);
latinIme.onFinishInputInternal();
}
@@ -608,7 +613,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final Locale switcherSubtypeLocale = mSubtypeSwitcher.getCurrentSubtypeLocale();
final String switcherLocaleStr = switcherSubtypeLocale.toString();
final Locale subtypeLocale;
- final String localeStr;
if (TextUtils.isEmpty(switcherLocaleStr)) {
// This happens in very rare corner cases - for example, immediately after a switch
// to LatinIME has been requested, about a frame later another switch happens. In this
@@ -618,10 +622,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// of knowing anyway.
Log.e(TAG, "System is reporting no current subtype.");
subtypeLocale = getResources().getConfiguration().locale;
- localeStr = subtypeLocale.toString();
} else {
subtypeLocale = switcherSubtypeLocale;
- localeStr = switcherLocaleStr;
}
final Suggest newSuggest = new Suggest(this /* Context */, subtypeLocale,
@@ -636,21 +638,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
ResearchLogger.getInstance().initSuggest(newSuggest);
}
- mUserDictionary = new UserBinaryDictionary(this, localeStr);
+ mUserDictionary = new UserBinaryDictionary(this, subtypeLocale);
mIsUserDictionaryAvailable = mUserDictionary.isEnabled();
newSuggest.setUserDictionary(mUserDictionary);
- final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
mUserHistoryDictionary = PersonalizationHelper.getUserHistoryDictionary(
- this, localeStr, prefs);
+ this, subtypeLocale);
newSuggest.setUserHistoryDictionary(mUserHistoryDictionary);
- mPersonalizationDictionary = PersonalizationHelper
- .getPersonalizationDictionary(this, localeStr, prefs);
+ mPersonalizationDictionary =
+ PersonalizationHelper.getPersonalizationDictionary(this, subtypeLocale);
newSuggest.setPersonalizationDictionary(mPersonalizationDictionary);
- mPersonalizationPredictionDictionary = PersonalizationHelper
- .getPersonalizationPredictionDictionary(this, localeStr, prefs);
- newSuggest.setPersonalizationPredictionDictionary(mPersonalizationPredictionDictionary);
final Suggest oldSuggest = mSuggest;
resetContactsDictionary(null != oldSuggest ? oldSuggest.getContactsDictionary() : null);
@@ -724,8 +721,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
LatinImeLogger.commit();
LatinImeLogger.onDestroy();
if (mInputUpdater != null) {
- mInputUpdater.onDestroy();
- mInputUpdater = null;
+ mInputUpdater.quitLooper();
}
super.onDestroy();
}
@@ -760,8 +756,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
.findViewById(android.R.id.extractArea);
mKeyPreviewBackingView = view.findViewById(R.id.key_preview_backing);
mSuggestionStripView = (SuggestionStripView)view.findViewById(R.id.suggestion_strip_view);
- if (mSuggestionStripView != null)
+ if (mSuggestionStripView != null) {
mSuggestionStripView.setListener(this, view);
+ }
if (LatinImeLogger.sVISUALDEBUG) {
mKeyPreviewBackingView.setBackgroundColor(0x10FF0000);
}
@@ -810,6 +807,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
super.onStartInputView(editorInfo, restarting);
mRichImm.clearSubtypeCaches();
final KeyboardSwitcher switcher = mKeyboardSwitcher;
+ switcher.updateKeyboardTheme();
final MainKeyboardView mainKeyboardView = switcher.getMainKeyboardView();
// If we are starting input in a different text field from before, we'll have to reload
// settings, so currentSettingsValues can't be final.
@@ -906,9 +904,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// refresh later.
final boolean canReachInputConnection;
if (!mConnection.resetCachesUponCursorMoveAndReturnSuccess(editorInfo.initialSelStart,
- false /* shouldFinishComposition */)) {
+ editorInfo.initialSelEnd, false /* shouldFinishComposition */)) {
// We try resetting the caches up to 5 times before giving up.
mHandler.postResetCaches(isDifferentTextField, 5 /* remainingTries */);
+ // mLastSelection{Start,End} are reset later in this method, don't need to do it here
canReachInputConnection = false;
} else {
if (isDifferentTextField) {
@@ -988,10 +987,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (textLength > mLastSelectionStart
|| (textLength < Constants.EDITOR_CONTENTS_CACHE_SIZE
&& mLastSelectionStart < Constants.EDITOR_CONTENTS_CACHE_SIZE)) {
+ // It should not be possible to have only one of those variables be
+ // NOT_A_CURSOR_POSITION, so if they are equal, either the selection is zero-sized
+ // (simple cursor, no selection) or there is no cursor/we don't know its pos
+ final boolean wasEqual = mLastSelectionStart == mLastSelectionEnd;
mLastSelectionStart = textLength;
// We can't figure out the value of mLastSelectionEnd :(
- // But at least if it's smaller than mLastSelectionStart something is wrong
- if (mLastSelectionStart > mLastSelectionEnd) {
+ // But at least if it's smaller than mLastSelectionStart something is wrong,
+ // and if they used to be equal we also don't want to make it look like there is a
+ // selection.
+ if (wasEqual || mLastSelectionStart > mLastSelectionEnd) {
mLastSelectionEnd = mLastSelectionStart;
}
}
@@ -1080,16 +1085,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ", ce=" + composingSpanEnd);
}
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- final boolean expectingUpdateSelectionFromLogger =
- ResearchLogger.getAndClearLatinIMEExpectingUpdateSelection();
ResearchLogger.latinIME_onUpdateSelection(mLastSelectionStart, mLastSelectionEnd,
oldSelStart, oldSelEnd, newSelStart, newSelEnd, composingSpanStart,
- composingSpanEnd, mExpectingUpdateSelection,
- expectingUpdateSelectionFromLogger, mConnection);
- if (expectingUpdateSelectionFromLogger) {
- // TODO: Investigate. Quitting now sounds wrong - we won't do the resetting work
- return;
- }
+ composingSpanEnd, mConnection);
}
final boolean selectionChanged = mLastSelectionStart != newSelStart
@@ -1108,14 +1106,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO: revisit this when LatinIME supports hardware keyboards.
// NOTE: the test harness subclasses LatinIME and overrides isInputViewShown().
// TODO: find a better way to simulate actual execution.
- if (isInputViewShown() && !mExpectingUpdateSelection
- && !mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart)) {
- // TAKE CARE: there is a race condition when we enter this test even when the user
- // did not explicitly move the cursor. This happens when typing fast, where two keys
- // turn this flag on in succession and both onUpdateSelection() calls arrive after
- // the second one - the first call successfully avoids this test, but the second one
- // enters. For the moment we rely on noComposingSpan to further reduce the impact.
-
+ if (isInputViewShown() && !mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart,
+ oldSelEnd, newSelEnd)) {
// TODO: the following is probably better done in resetEntireInputState().
// it should only happen when the cursor moved, and the very purpose of the
// test below is to narrow down whether this happened or not. Likewise with
@@ -1141,13 +1133,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Another option would be to send suggestions each time we set the composing
// text, but that is probably too expensive to do, so we decided to leave things
// as is.
- resetEntireInputState(newSelStart);
+ resetEntireInputState(newSelStart, newSelEnd);
} else {
- // resetEntireInputState calls resetCachesUponCursorMove, but with the second
- // argument as true. But in all cases where we don't reset the entire input state,
- // we still want to tell the rich input connection about the new cursor position so
- // that it can update its caches.
- mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart,
+ // resetEntireInputState calls resetCachesUponCursorMove, but forcing the
+ // composition to end. But in all cases where we don't reset the entire input
+ // state, we still want to tell the rich input connection about the new cursor
+ // position so that it can update its caches.
+ mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd,
false /* shouldFinishComposition */);
}
@@ -1160,7 +1152,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mRecapitalizeStatus.deactivate();
mKeyboardSwitcher.updateShiftState();
}
- mExpectingUpdateSelection = false;
// Make a note of the cursor position
mLastSelectionStart = newSelStart;
@@ -1261,9 +1252,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final boolean needsInputViewShown) {
// TODO: Modify this if we support suggestions with hard keyboard
if (onEvaluateInputViewShown() && mSuggestionStripView != null) {
- final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
- final boolean inputViewShown = (mainKeyboardView != null)
- ? mainKeyboardView.isShown() : false;
+ final boolean inputViewShown = mKeyboardSwitcher.isShowingMainKeyboardOrEmojiPalettes();
final boolean shouldShowSuggestions = shown
&& (needsInputViewShown ? inputViewShown : true);
if (isFullscreenMode()) {
@@ -1329,7 +1318,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (visibleKeyboardView.isShown()) {
// Note that the height of Emoji layout is the same as the height of the main keyboard
// and the suggestion strip
- if (mKeyboardSwitcher.isShowingEmojiKeyboard()
+ if (mKeyboardSwitcher.isShowingEmojiPalettes()
|| mSuggestionStripView.getVisibility() == View.VISIBLE) {
visibleTopY -= suggestionsHeight;
}
@@ -1348,8 +1337,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public boolean onEvaluateFullscreenMode() {
// Reread resource value here, because this method is called by framework anytime as needed.
- final boolean isFullscreenModeAllowed =
- Settings.readUseFullscreenMode(getResources());
+ final boolean isFullscreenModeAllowed = Settings.readUseFullscreenMode(getResources());
if (super.onEvaluateFullscreenMode() && isFullscreenModeAllowed) {
// TODO: Remove this hack. Actually we should not really assume NO_EXTRACT_UI
// implies NO_FULLSCREEN. However, the framework mistakenly does. i.e. NO_EXTRACT_UI
@@ -1374,7 +1362,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// This will reset the whole input state to the starting state. It will clear
// the composing word, reset the last composed word, tell the inputconnection about it.
- private void resetEntireInputState(final int newCursorPosition) {
+ private void resetEntireInputState(final int newSelStart, final int newSelEnd) {
final boolean shouldFinishComposition = mWordComposer.isComposingWord();
resetComposingState(true /* alsoResetLastComposedWord */);
final SettingsValues settingsValues = mSettings.getCurrent();
@@ -1383,14 +1371,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
} else {
setSuggestedWords(settingsValues.mSuggestPuncList, false);
}
- mConnection.resetCachesUponCursorMoveAndReturnSuccess(newCursorPosition,
+ mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd,
shouldFinishComposition);
}
private void resetComposingState(final boolean alsoResetLastComposedWord) {
mWordComposer.reset();
- if (alsoResetLastComposedWord)
+ if (alsoResetLastComposedWord) {
mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD;
+ }
}
private void commitTyped(final String separatorString) {
@@ -1437,15 +1426,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (0 != (auto & TextUtils.CAP_MODE_CHARACTERS)) {
return WordComposer.CAPS_MODE_AUTO_SHIFT_LOCKED;
}
- if (0 != auto) return WordComposer.CAPS_MODE_AUTO_SHIFTED;
+ if (0 != auto) {
+ return WordComposer.CAPS_MODE_AUTO_SHIFTED;
+ }
return WordComposer.CAPS_MODE_OFF;
}
private void swapSwapperAndSpace() {
final CharSequence lastTwo = mConnection.getTextBeforeCursor(2, 0);
// It is guaranteed lastTwo.charAt(1) is a swapper - else this method is not called.
- if (lastTwo != null && lastTwo.length() == 2
- && lastTwo.charAt(0) == Constants.CODE_SPACE) {
+ if (lastTwo != null && lastTwo.length() == 2 && lastTwo.charAt(0) == Constants.CODE_SPACE) {
mConnection.deleteSurroundingText(2, 0);
final String text = lastTwo.charAt(1) + " ";
mConnection.commitText(text, 1);
@@ -1458,7 +1448,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private boolean maybeDoubleSpacePeriod() {
final SettingsValues currentSettingsValues = mSettings.getCurrent();
- if (!currentSettingsValues.mCorrectionEnabled) return false;
if (!currentSettingsValues.mUseDoubleSpacePeriod) return false;
if (!mHandler.isAcceptingDoubleSpacePeriod()) return false;
// We only do this when we see two spaces and an accepted code point before the cursor.
@@ -1503,6 +1492,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|| codePoint == Constants.CODE_CLOSING_CURLY_BRACKET
|| codePoint == Constants.CODE_CLOSING_ANGLE_BRACKET
|| codePoint == Constants.CODE_PLUS
+ || codePoint == Constants.CODE_PERCENT
|| Character.getType(codePoint) == Character.OTHER_SYMBOL;
}
@@ -1588,8 +1578,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// relying on this behavior so we continue to support it for older apps.
sendDownUpKeyEvent(KeyEvent.KEYCODE_ENTER);
} else {
- final String text = new String(new int[] { code }, 0, 1);
- mConnection.commitText(text, text.length());
+ mConnection.commitText(StringUtils.newSingleCodePointString(code), 1);
}
}
@@ -1624,8 +1613,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
case Constants.CODE_DELETE:
mSpaceState = SPACE_STATE_NONE;
handleBackspace(spaceState);
- mDeleteCount++;
- mExpectingUpdateSelection = true;
LatinImeLogger.logOnDelete(x, y);
break;
case Constants.CODE_SHIFT:
@@ -1712,7 +1699,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mSpaceState = SPACE_STATE_NONE;
final boolean didAutoCorrect;
final SettingsValues settingsValues = mSettings.getCurrent();
- if (settingsValues.isWordSeparator(primaryCode)) {
+ if (settingsValues.isWordSeparator(primaryCode)
+ || Character.getType(primaryCode) == Character.OTHER_SYMBOL) {
didAutoCorrect = handleSeparator(primaryCode, x, y, spaceState);
} else {
didAutoCorrect = false;
@@ -1726,7 +1714,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
// If we are in the middle of a recorrection, we need to commit the recorrection
// first so that we can insert the character at the current cursor position.
- resetEntireInputState(mLastSelectionStart);
+ resetEntireInputState(mLastSelectionStart, mLastSelectionEnd);
} else {
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
}
@@ -1742,7 +1730,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
handleCharacter(primaryCode, keyX, keyY, spaceState);
}
- mExpectingUpdateSelection = true;
return didAutoCorrect;
}
@@ -1782,9 +1769,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mInputUpdater.onStartBatchInput();
mHandler.cancelUpdateSuggestionStrip();
mConnection.beginBatchEdit();
- final SettingsValues settingsValues = mSettings.getCurrent();
+ final SettingsValues currentSettingsValues = mSettings.getCurrent();
if (mWordComposer.isComposingWord()) {
- if (settingsValues.mIsInternal) {
+ if (currentSettingsValues.mIsInternal) {
if (mWordComposer.isBatchMode()) {
LatinImeLoggerUtils.onAutoCorrection(
"", mWordComposer.getTypedWord(), " ", mWordComposer);
@@ -1795,7 +1782,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
// If we are in the middle of a recorrection, we need to commit the recorrection
// first so that we can insert the batch input at the current cursor position.
- resetEntireInputState(mLastSelectionStart);
+ resetEntireInputState(mLastSelectionStart, mLastSelectionEnd);
} else if (wordComposerSize <= 1) {
// We auto-correct the previous (typed, not gestured) string iff it's one character
// long. The reason for this is, even in the middle of gesture typing, you'll still
@@ -1808,24 +1795,26 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
} else {
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
}
- mExpectingUpdateSelection = true;
}
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
if (Character.isLetterOrDigit(codePointBeforeCursor)
- || settingsValues.isUsuallyFollowedBySpace(codePointBeforeCursor)) {
+ || currentSettingsValues.isUsuallyFollowedBySpace(codePointBeforeCursor)) {
mSpaceState = SPACE_STATE_PHANTOM;
}
mConnection.endBatchEdit();
- mWordComposer.setCapitalizedModeAtStartComposingTime(getActualCapsMode());
+ mKeyboardSwitcher.updateShiftState();
+ mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime(getActualCapsMode(),
+ // Prev word is 1st word before cursor
+ getNthPreviousWordForSuggestion(currentSettingsValues, 1 /* nthPreviousWord */));
}
- private static final class InputUpdater implements Handler.Callback {
+ static final class InputUpdater implements Handler.Callback {
private final Handler mHandler;
private final LatinIME mLatinIme;
private final Object mLock = new Object();
private boolean mInBatchInput; // synchronized using {@link #mLock}.
- private InputUpdater(final LatinIME latinIme) {
+ InputUpdater(final LatinIME latinIme) {
final HandlerThread handlerThread = new HandlerThread(
InputUpdater.class.getSimpleName());
handlerThread.start();
@@ -1838,12 +1827,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public boolean handleMessage(final Message msg) {
+ // TODO: straighten message passing - we don't need two kinds of messages calling
+ // each other.
switch (msg.what) {
case MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP:
- updateBatchInput((InputPointers)msg.obj);
+ updateBatchInput((InputPointers)msg.obj, msg.arg2 /* sequenceNumber */);
break;
case MSG_GET_SUGGESTED_WORDS:
- mLatinIme.getSuggestedWords(msg.arg1, (OnGetSuggestedWordsCallback) msg.obj);
+ mLatinIme.getSuggestedWords(msg.arg1 /* sessionId */,
+ msg.arg2 /* sequenceNumber */, (OnGetSuggestedWordsCallback) msg.obj);
break;
}
return true;
@@ -1860,14 +1852,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
// Run in the Handler thread.
- private void updateBatchInput(final InputPointers batchPointers) {
+ private void updateBatchInput(final InputPointers batchPointers, final int sequenceNumber) {
synchronized (mLock) {
if (!mInBatchInput) {
// Batch input has ended or canceled while the message was being delivered.
return;
}
- getSuggestedWordsGestureLocked(batchPointers, new OnGetSuggestedWordsCallback() {
+ getSuggestedWordsGestureLocked(batchPointers, sequenceNumber,
+ new OnGetSuggestedWordsCallback() {
@Override
public void onGetSuggestedWords(final SuggestedWords suggestedWords) {
mLatinIme.mHandler.showGesturePreviewAndSuggestionStrip(
@@ -1878,13 +1871,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
// Run in the UI thread.
- public void onUpdateBatchInput(final InputPointers batchPointers) {
+ public void onUpdateBatchInput(final InputPointers batchPointers,
+ final int sequenceNumber) {
if (mHandler.hasMessages(MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP)) {
return;
}
- mHandler.obtainMessage(
- MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP, batchPointers)
- .sendToTarget();
+ mHandler.obtainMessage(MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP, 0 /* arg1 */,
+ sequenceNumber /* arg2 */, batchPointers /* obj */).sendToTarget();
}
public void onCancelBatchInput() {
@@ -1898,7 +1891,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Run in the UI thread.
public void onEndBatchInput(final InputPointers batchPointers) {
synchronized(mLock) {
- getSuggestedWordsGestureLocked(batchPointers, new OnGetSuggestedWordsCallback() {
+ getSuggestedWordsGestureLocked(batchPointers, SuggestedWords.NOT_A_SEQUENCE_NUMBER,
+ new OnGetSuggestedWordsCallback() {
@Override
public void onGetSuggestedWords(final SuggestedWords suggestedWords) {
mInBatchInput = false;
@@ -1913,10 +1907,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// {@link LatinIME#getSuggestedWords(int)} method calls with same session id have to
// be synchronized.
private void getSuggestedWordsGestureLocked(final InputPointers batchPointers,
- final OnGetSuggestedWordsCallback callback) {
+ final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {
mLatinIme.mWordComposer.setBatchInputPointers(batchPointers);
mLatinIme.getSuggestedWordsOrOlderSuggestionsAsync(Suggest.SESSION_GESTURE,
- new OnGetSuggestedWordsCallback() {
+ sequenceNumber, new OnGetSuggestedWordsCallback() {
@Override
public void onGetSuggestedWords(SuggestedWords suggestedWords) {
final int suggestionCount = suggestedWords.size();
@@ -1931,12 +1925,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
});
}
- public void getSuggestedWords(final int sessionId,
+ public void getSuggestedWords(final int sessionId, final int sequenceNumber,
final OnGetSuggestedWordsCallback callback) {
- mHandler.obtainMessage(MSG_GET_SUGGESTED_WORDS, sessionId, 0, callback).sendToTarget();
+ mHandler.obtainMessage(MSG_GET_SUGGESTED_WORDS, sessionId, sequenceNumber, callback)
+ .sendToTarget();
}
- private void onDestroy() {
+ void quitLooper() {
mHandler.removeMessages(MSG_GET_SUGGESTED_WORDS);
mHandler.removeMessages(MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);
mHandler.getLooper().quit();
@@ -1954,11 +1949,28 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
+ /* The sequence number member is only used in onUpdateBatchInput. It is increased each time
+ * auto-commit happens. The reason we need this is, when auto-commit happens we trim the
+ * input pointers that are held in a singleton, and to know how much to trim we rely on the
+ * results of the suggestion process that is held in mSuggestedWords.
+ * However, the suggestion process is asynchronous, and sometimes we may enter the
+ * onUpdateBatchInput method twice without having recomputed suggestions yet, or having
+ * received new suggestions generated from not-yet-trimmed input pointers. In this case, the
+ * mIndexOfTouchPointOfSecondWords member will be out of date, and we must not use it lest we
+ * remove an unrelated number of pointers (possibly even more than are left in the input
+ * pointers, leading to a crash).
+ * To avoid that, we increase the sequence number each time we auto-commit and trim the
+ * input pointers, and we do not use any suggested words that have been generated with an
+ * earlier sequence number.
+ */
+ private int mAutoCommitSequenceNumber = 1;
@Override
public void onUpdateBatchInput(final InputPointers batchPointers) {
if (mSettings.getCurrent().mPhraseGestureEnabled) {
final SuggestedWordInfo candidate = mSuggestedWords.getAutoCommitCandidate();
- if (null != candidate) {
+ // If these suggested words have been generated with out of date input pointers, then
+ // we skip auto-commit (see comments above on the mSequenceNumber member).
+ if (null != candidate && mSuggestedWords.mSequenceNumber >= mAutoCommitSequenceNumber) {
if (candidate.mSourceDict.shouldAutoCommit(candidate)) {
final String[] commitParts = candidate.mWord.split(" ", 2);
batchPointers.shift(candidate.mIndexOfTouchPointOfSecondWord);
@@ -1966,17 +1978,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mConnection.commitText(commitParts[0], 0);
mSpaceState = SPACE_STATE_PHANTOM;
mKeyboardSwitcher.updateShiftState();
- mWordComposer.setCapitalizedModeAtStartComposingTime(getActualCapsMode());
+ mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime(
+ getActualCapsMode(), commitParts[0]);
+ ++mAutoCommitSequenceNumber;
}
}
}
- mInputUpdater.onUpdateBatchInput(batchPointers);
+ mInputUpdater.onUpdateBatchInput(batchPointers, mAutoCommitSequenceNumber);
}
// This method must run in UI Thread.
public void onEndBatchInputAsyncInternal(final SuggestedWords suggestedWords) {
- final String batchInputText = suggestedWords.isEmpty()
- ? null : suggestedWords.getWord(0);
+ final String batchInputText = suggestedWords.isEmpty() ? null : suggestedWords.getWord(0);
if (TextUtils.isEmpty(batchInputText)) {
return;
}
@@ -1998,7 +2011,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mWordComposer.setBatchInputWord(batchInputText);
mConnection.setComposingText(batchInputText, 1);
}
- mExpectingUpdateSelection = true;
mConnection.endBatchEdit();
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.latinIME_onEndBatchInput(batchInputText, 0, suggestedWords);
@@ -2052,6 +2064,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
private void handleBackspace(final int spaceState) {
+ mDeleteCount++;
+
// In many cases, we may have to put the keyboard in auto-shift state again. However
// we want to wait a few milliseconds before doing it to avoid the keyboard flashing
// during key repeat.
@@ -2060,7 +2074,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
// If we are in the middle of a recorrection, we need to commit the recorrection
// first so that we can remove the character at the current cursor position.
- resetEntireInputState(mLastSelectionStart);
+ resetEntireInputState(mLastSelectionStart, mLastSelectionEnd);
// When we exit this if-clause, mWordComposer.isComposingWord() will return false.
}
if (mWordComposer.isComposingWord()) {
@@ -2141,8 +2155,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// This should never happen.
Log.e(TAG, "Backspace when we don't know the selection position");
}
- final int lengthToDelete = Character.isSupplementaryCodePoint(
- mConnection.getCodePointBeforeCursor()) ? 2 : 1;
if (mAppWorkAroundsUtils.isBeforeJellyBean() ||
currentSettings.mInputAttributes.isTypeNull()) {
// There are two possible reasons to send a key event: either the field has
@@ -2153,21 +2165,35 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// applications are relying on this behavior so we continue to support it for
// older apps, so we retain this behavior if the app has target SDK < JellyBean.
sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL);
+ if (mDeleteCount > DELETE_ACCELERATE_AT) {
+ sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL);
+ }
} else {
+ final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
+ if (codePointBeforeCursor == Constants.NOT_A_CODE) {
+ // Nothing to delete before the cursor.
+ return;
+ }
+ final int lengthToDelete =
+ Character.isSupplementaryCodePoint(codePointBeforeCursor) ? 2 : 1;
mConnection.deleteSurroundingText(lengthToDelete, 0);
- }
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace(lengthToDelete,
- true /* shouldUncommitLogUnit */);
- }
- if (mDeleteCount > DELETE_ACCELERATE_AT) {
- final int lengthToDeleteAgain = Character.isSupplementaryCodePoint(
- mConnection.getCodePointBeforeCursor()) ? 2 : 1;
- mConnection.deleteSurroundingText(lengthToDeleteAgain, 0);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.latinIME_handleBackspace(lengthToDeleteAgain,
+ ResearchLogger.latinIME_handleBackspace(lengthToDelete,
true /* shouldUncommitLogUnit */);
}
+ if (mDeleteCount > DELETE_ACCELERATE_AT) {
+ final int codePointBeforeCursorToDeleteAgain =
+ mConnection.getCodePointBeforeCursor();
+ if (codePointBeforeCursorToDeleteAgain != Constants.NOT_A_CODE) {
+ final int lengthToDeleteAgain = Character.isSupplementaryCodePoint(
+ codePointBeforeCursorToDeleteAgain) ? 2 : 1;
+ mConnection.deleteSurroundingText(lengthToDeleteAgain, 0);
+ if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
+ ResearchLogger.latinIME_handleBackspace(lengthToDeleteAgain,
+ true /* shouldUncommitLogUnit */);
+ }
+ }
+ }
}
}
if (currentSettings.isSuggestionsRequested(mDisplayOrientation)
@@ -2182,8 +2208,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
/*
* Strip a trailing space if necessary and returns whether it's a swap weak space situation.
*/
- private boolean maybeStripSpace(final int code,
- final int spaceState, final boolean isFromSuggestionStrip) {
+ private boolean maybeStripSpace(final int code, final int spaceState,
+ final boolean isFromSuggestionStrip) {
if (Constants.CODE_ENTER == code && SPACE_STATE_SWAP_PUNCTUATION == spaceState) {
mConnection.removeTrailingSpace();
return false;
@@ -2198,8 +2224,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return false;
}
- private void handleCharacter(final int primaryCode, final int x,
- final int y, final int spaceState) {
+ private void handleCharacter(final int primaryCode, final int x, final int y,
+ final int spaceState) {
// TODO: refactor this method to stop flipping isComposingWord around all the time, and
// make it shorter (possibly cut into several pieces). Also factor handleNonSpecialCharacter
// which has the same name as other handle* methods but is not the same.
@@ -2219,7 +2245,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
// If we are in the middle of a recorrection, we need to commit the recorrection
// first so that we can insert the character at the current cursor position.
- resetEntireInputState(mLastSelectionStart);
+ resetEntireInputState(mLastSelectionStart, mLastSelectionEnd);
isComposingWord = false;
}
// We want to find out whether to start composing a new word with this character. If so,
@@ -2249,25 +2275,24 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
resetComposingState(false /* alsoResetLastComposedWord */);
}
if (isComposingWord) {
- final int keyX, keyY;
- if (Constants.isValidCoordinate(x) && Constants.isValidCoordinate(y)) {
- final KeyDetector keyDetector =
- mKeyboardSwitcher.getMainKeyboardView().getKeyDetector();
- keyX = keyDetector.getTouchX(x);
- keyY = keyDetector.getTouchY(y);
- } else {
- keyX = x;
- keyY = y;
- }
+ final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
+ // TODO: We should reconsider which coordinate system should be used to represent
+ // keyboard event.
+ final int keyX = mainKeyboardView.getKeyX(x);
+ final int keyY = mainKeyboardView.getKeyY(y);
mWordComposer.add(primaryCode, keyX, keyY);
// If it's the first letter, make note of auto-caps state
if (mWordComposer.size() == 1) {
- mWordComposer.setCapitalizedModeAtStartComposingTime(getActualCapsMode());
+ // We pass 1 to getPreviousWordForSuggestion because we were not composing a word
+ // yet, so the word we want is the 1st word before the cursor.
+ mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime(
+ getActualCapsMode(),
+ getNthPreviousWordForSuggestion(currentSettings, 1 /* nthPreviousWord */));
}
mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1);
} else {
- final boolean swapWeakSpace = maybeStripSpace(primaryCode,
- spaceState, Constants.SUGGESTION_STRIP_COORDINATE == x);
+ final boolean swapWeakSpace = maybeStripSpace(primaryCode, spaceState,
+ Constants.SUGGESTION_STRIP_COORDINATE == x);
sendKeyCodePoint(primaryCode);
@@ -2331,16 +2356,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
// If we are in the middle of a recorrection, we need to commit the recorrection
// first so that we can insert the separator at the current cursor position.
- resetEntireInputState(mLastSelectionStart);
+ resetEntireInputState(mLastSelectionStart, mLastSelectionEnd);
}
if (mWordComposer.isComposingWord()) { // May have changed since we stored wasComposing
if (currentSettings.mCorrectionEnabled) {
final String separator = shouldAvoidSendingCode ? LastComposedWord.NOT_A_SEPARATOR
- : new String(new int[] { primaryCode }, 0, 1);
+ : StringUtils.newSingleCodePointString(primaryCode);
commitCurrentAutoCorrection(separator);
didAutoCorrect = true;
} else {
- commitTyped(new String(new int[]{primaryCode}, 0, 1));
+ commitTyped(StringUtils.newSingleCodePointString(primaryCode));
}
}
@@ -2489,7 +2514,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final AsyncResultHolder<SuggestedWords> holder = new AsyncResultHolder<SuggestedWords>();
getSuggestedWordsOrOlderSuggestionsAsync(Suggest.SESSION_TYPING,
- new OnGetSuggestedWordsCallback() {
+ SuggestedWords.NOT_A_SEQUENCE_NUMBER, new OnGetSuggestedWordsCallback() {
@Override
public void onGetSuggestedWords(final SuggestedWords suggestedWords) {
holder.set(suggestedWords);
@@ -2504,7 +2529,25 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
- private void getSuggestedWords(final int sessionId,
+ /**
+ * Get the nth previous word before the cursor as context for the suggestion process.
+ * @param currentSettings the current settings values.
+ * @param nthPreviousWord reverse index of the word to get (1-indexed)
+ * @return the nth previous word before the cursor.
+ */
+ private String getNthPreviousWordForSuggestion(final SettingsValues currentSettings,
+ final int nthPreviousWord) {
+ if (currentSettings.mCurrentLanguageHasSpaces) {
+ // If we are typing in a language with spaces we can just look up the previous
+ // word from textview.
+ return mConnection.getNthPreviousWord(currentSettings, nthPreviousWord);
+ } else {
+ return LastComposedWord.NOT_A_COMPOSED_WORD == mLastComposedWord ? null
+ : mLastComposedWord.mCommittedWord;
+ }
+ }
+
+ private void getSuggestedWords(final int sessionId, final int sequenceNumber,
final OnGetSuggestedWordsCallback callback) {
final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
final Suggest suggest = mSuggest;
@@ -2517,30 +2560,45 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// should just skip whitespace if any, so 1.
final SettingsValues currentSettings = mSettings.getCurrent();
final int[] additionalFeaturesOptions = currentSettings.mAdditionalFeaturesSettingValues;
- final String prevWord;
- if (currentSettings.mCurrentLanguageHasSpaces) {
- // If we are typing in a language with spaces we can just look up the previous
- // word from textview.
- prevWord = mConnection.getNthPreviousWord(currentSettings.mWordSeparators,
- mWordComposer.isComposingWord() ? 2 : 1);
+
+ final String previousWord;
+ if (mWordComposer.isComposingWord() || mWordComposer.isBatchMode()) {
+ previousWord = mWordComposer.getPreviousWord();
} else {
- prevWord = LastComposedWord.NOT_A_COMPOSED_WORD == mLastComposedWord ? null
- : mLastComposedWord.mCommittedWord;
+ // Not composing: this is for prediction.
+ // TODO: read the previous word earlier for prediction, like we are doing for
+ // normal suggestions.
+ previousWord = getNthPreviousWordForSuggestion(currentSettings, 1 /* nthPreviousWord*/);
+ }
+ if (DEBUG) {
+ // TODO: this is for checking consistency with older versions. Remove this when
+ // we are confident this is stable.
+ // We're checking the previous word in the text field against the memorized previous
+ // word. If we are composing a word we should have the second word before the cursor
+ // memorized, otherwise we should have the first.
+ final String rereadPrevWord = getNthPreviousWordForSuggestion(currentSettings,
+ mWordComposer.isComposingWord() ? 2 : 1);
+ if (!TextUtils.equals(previousWord, rereadPrevWord)) {
+ throw new RuntimeException("Unexpected previous word: "
+ + previousWord + " <> " + rereadPrevWord);
+ }
}
- suggest.getSuggestedWords(mWordComposer, prevWord, keyboard.getProximityInfo(),
+ suggest.getSuggestedWords(mWordComposer, mWordComposer.getPreviousWord(),
+ keyboard.getProximityInfo(),
currentSettings.mBlockPotentiallyOffensive, currentSettings.mCorrectionEnabled,
- additionalFeaturesOptions, sessionId, callback);
+ additionalFeaturesOptions, sessionId, sequenceNumber, callback);
}
private void getSuggestedWordsOrOlderSuggestionsAsync(final int sessionId,
- final OnGetSuggestedWordsCallback callback) {
- mInputUpdater.getSuggestedWords(sessionId, new OnGetSuggestedWordsCallback() {
- @Override
- public void onGetSuggestedWords(SuggestedWords suggestedWords) {
- callback.onGetSuggestedWords(maybeRetrieveOlderSuggestions(
- mWordComposer.getTypedWord(), suggestedWords));
- }
- });
+ final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {
+ mInputUpdater.getSuggestedWords(sessionId, sequenceNumber,
+ new OnGetSuggestedWordsCallback() {
+ @Override
+ public void onGetSuggestedWords(SuggestedWords suggestedWords) {
+ callback.onGetSuggestedWords(maybeRetrieveOlderSuggestions(
+ mWordComposer.getTypedWord(), suggestedWords));
+ }
+ });
}
private SuggestedWords maybeRetrieveOlderSuggestions(final String typedWord,
@@ -2643,7 +2701,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
ResearchLogger.latinIme_commitCurrentAutoCorrection(typedWord, autoCorrection,
separator, mWordComposer.isBatchMode(), suggestedWords);
}
- mExpectingUpdateSelection = true;
commitChosenWord(autoCorrection, LastComposedWord.COMMIT_TYPE_DECIDED_WORD,
separator);
if (!typedWord.equals(autoCorrection)) {
@@ -2714,7 +2771,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// typed word.
final String replacedWord = mWordComposer.getTypedWord();
LatinImeLogger.logOnManualSuggestion(replacedWord, suggestion, index, suggestedWords);
- mExpectingUpdateSelection = true;
commitChosenWord(suggestion, LastComposedWord.COMMIT_TYPE_MANUAL_PICK,
LastComposedWord.NOT_A_SEPARATOR);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
@@ -2797,7 +2853,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final UserHistoryDictionary userHistoryDictionary = mUserHistoryDictionary;
if (userHistoryDictionary == null) return null;
- final String prevWord = mConnection.getNthPreviousWord(currentSettings.mWordSeparators, 2);
+ final String prevWord = mConnection.getNthPreviousWord(currentSettings, 2);
final String secondWord;
if (mWordComposer.wasAutoCapitalized() && !mWordComposer.isMostlyCaps()) {
secondWord = suggestion.toLowerCase(mSubtypeSwitcher.getCurrentSubtypeLocale());
@@ -2809,7 +2865,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final int maxFreq = AutoCorrectionUtils.getMaxFrequency(
suggest.getUnigramDictionaries(), suggestion);
if (maxFreq == 0) return null;
- userHistoryDictionary.addToDictionary(prevWord, secondWord, maxFreq > 0);
+ userHistoryDictionary.addToDictionary(prevWord, secondWord, maxFreq > 0,
+ (int)TimeUnit.MILLISECONDS.toSeconds((System.currentTimeMillis())));
return prevWord;
}
@@ -2865,7 +2922,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
}
- mWordComposer.setComposingWord(typedWord, mKeyboardSwitcher.getKeyboard());
+ mWordComposer.setComposingWord(typedWord,
+ getNthPreviousWordForSuggestion(currentSettings,
+ // We want the previous word for suggestion. If we have chars in the word
+ // before the cursor, then we want the word before that, hence 2; otherwise,
+ // we want the word immediately before the cursor, hence 1.
+ 0 == numberOfCharsInWordBeforeCursor ? 1 : 2),
+ mKeyboardSwitcher.getKeyboard());
mWordComposer.setCursorPositionWithinWord(
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
mConnection.setComposingRegion(
@@ -2875,30 +2938,30 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// We come here if there weren't any suggestion spans on this word. We will try to
// compute suggestions for it instead.
mInputUpdater.getSuggestedWords(Suggest.SESSION_TYPING,
- new OnGetSuggestedWordsCallback() {
- @Override
- public void onGetSuggestedWords(
- final SuggestedWords suggestedWordsIncludingTypedWord) {
- final SuggestedWords suggestedWords;
- if (suggestedWordsIncludingTypedWord.size() > 1) {
- // We were able to compute new suggestions for this word.
- // Remove the typed word, since we don't want to display it in this case.
- // The #getSuggestedWordsExcludingTypedWord() method sets willAutoCorrect to
- // false.
- suggestedWords = suggestedWordsIncludingTypedWord
- .getSuggestedWordsExcludingTypedWord();
- } else {
- // No saved suggestions, and we were unable to compute any good one either.
- // Rather than displaying an empty suggestion strip, we'll display the
- // original word alone in the middle.
- // Since there is only one word, willAutoCorrect is false.
- suggestedWords = suggestedWordsIncludingTypedWord;
- }
- // We need to pass typedWord because mWordComposer.mTypedWord may differ from
- // typedWord.
- unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(suggestedWords,
- typedWord);
- }});
+ SuggestedWords.NOT_A_SEQUENCE_NUMBER, new OnGetSuggestedWordsCallback() {
+ @Override
+ public void onGetSuggestedWords(
+ final SuggestedWords suggestedWordsIncludingTypedWord) {
+ final SuggestedWords suggestedWords;
+ if (suggestedWordsIncludingTypedWord.size() > 1) {
+ // We were able to compute new suggestions for this word.
+ // Remove the typed word, since we don't want to display it in this
+ // case. The #getSuggestedWordsExcludingTypedWord() method sets
+ // willAutoCorrect to false.
+ suggestedWords = suggestedWordsIncludingTypedWord
+ .getSuggestedWordsExcludingTypedWord();
+ } else {
+ // No saved suggestions, and we were unable to compute any good one
+ // either. Rather than displaying an empty suggestion strip, we'll
+ // display the original word alone in the middle.
+ // Since there is only one word, willAutoCorrect is false.
+ suggestedWords = suggestedWordsIncludingTypedWord;
+ }
+ // We need to pass typedWord because mWordComposer.mTypedWord may
+ // differ from typedWord.
+ unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(
+ suggestedWords, typedWord);
+ }});
} else {
// We found suggestion spans in the word. We'll create the SuggestedWords out of
// them, and make willAutoCorrect false.
@@ -2943,7 +3006,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
private void restartSuggestionsOnWordBeforeCursor(final String word) {
- mWordComposer.setComposingWord(word, mKeyboardSwitcher.getKeyboard());
+ mWordComposer.setComposingWord(word,
+ // Previous word is the 2nd word before cursor because we are restarting on the
+ // 1st word before cursor.
+ getNthPreviousWordForSuggestion(mSettings.getCurrent(), 2 /* nthPreviousWord */),
+ mKeyboardSwitcher.getKeyboard());
final int length = word.length();
mConnection.deleteSurroundingText(length, 0);
mConnection.setComposingText(word, 1);
@@ -2961,7 +3028,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
* @param remainingTries How many times we may try again before giving up.
*/
private void retryResetCaches(final boolean tryResumeSuggestions, final int remainingTries) {
- if (!mConnection.resetCachesUponCursorMoveAndReturnSuccess(mLastSelectionStart, false)) {
+ if (!mConnection.resetCachesUponCursorMoveAndReturnSuccess(mLastSelectionStart,
+ mLastSelectionEnd, false)) {
if (0 < remainingTries) {
mHandler.postResetCaches(tryResumeSuggestions, remainingTries - 1);
return;
@@ -2979,8 +3047,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final String originallyTypedWord = mLastComposedWord.mTypedWord;
final String committedWord = mLastComposedWord.mCommittedWord;
final int cancelLength = committedWord.length();
- final int separatorLength = LastComposedWord.getSeparatorLength(
- mLastComposedWord.mSeparatorString);
+ // We want java chars, not codepoints for the following.
+ final int separatorLength = mLastComposedWord.mSeparatorString.length();
// TODO: should we check our saved separator against the actual contents of the text view?
final int deleteLength = cancelLength + separatorLength;
if (DEBUG) {
@@ -2988,8 +3056,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
throw new RuntimeException("revertCommit, but we are composing a word");
}
final CharSequence wordBeforeCursor =
- mConnection.getTextBeforeCursor(deleteLength, 0)
- .subSequence(0, cancelLength);
+ mConnection.getTextBeforeCursor(deleteLength, 0).subSequence(0, cancelLength);
if (!TextUtils.equals(committedWord, wordBeforeCursor)) {
throw new RuntimeException("revertCommit check failed: we thought we were "
+ "reverting \"" + committedWord
@@ -3009,7 +3076,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
} else {
// For languages without spaces, we revert the typed string but the cursor is flush
// with the typed word, so we need to resume suggestions right away.
- mWordComposer.setComposingWord(stringToCommit, mKeyboardSwitcher.getKeyboard());
+ mWordComposer.setComposingWord(stringToCommit, previousWord,
+ mKeyboardSwitcher.getKeyboard());
mConnection.setComposingText(stringToCommit, 1);
}
if (mSettings.isInternal()) {
@@ -3059,8 +3127,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void hapticAndAudioFeedback(final int code, final int repeatCount) {
final MainKeyboardView keyboardView = mKeyboardSwitcher.getMainKeyboardView();
- if (keyboardView != null && keyboardView.isInSlidingKeyInput()) {
- // No need to feedback while sliding input.
+ if (keyboardView != null && keyboardView.isInDraggingFinger()) {
+ // No need to feedback while finger is dragging.
return;
}
if (repeatCount > 0) {
@@ -3190,8 +3258,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final Intent intent = IntentUtils.getInputLanguageSelectionIntent(
mRichImm.getInputMethodIdOfThisIme(),
Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
- | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
case 1:
@@ -3200,9 +3268,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
};
- final AlertDialog.Builder builder = new AlertDialog.Builder(this)
- .setItems(items, listener)
- .setTitle(title);
+ final AlertDialog.Builder builder =
+ new AlertDialog.Builder(this).setItems(items, listener).setTitle(title);
showOptionDialog(builder.create());
}
@@ -3263,11 +3330,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final Printer p = new PrintWriterPrinter(fout);
p.println("LatinIME state :");
+ p.println(" VersionCode = " + ApplicationUtils.getVersionCode(this));
+ p.println(" VersionName = " + ApplicationUtils.getVersionName(this));
final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
p.println(" Keyboard mode = " + keyboardMode);
final SettingsValues settingsValues = mSettings.getCurrent();
- p.println(" mIsSuggestionsSuggestionsRequested = "
+ p.println(" mIsSuggestionsRequested = "
+ settingsValues.isSuggestionsRequested(mDisplayOrientation));
p.println(" mCorrectionEnabled=" + settingsValues.mCorrectionEnabled);
p.println(" isComposingWord=" + mWordComposer.isComposingWord());
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index e43cab5ca..37311acf2 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -57,14 +57,19 @@ public final class RichInputConnection {
private static final int INVALID_CURSOR_POSITION = -1;
/**
- * This variable contains an expected value for the cursor position. This is where the
- * cursor may end up after all the keyboard-triggered updates have passed. We keep this to
- * compare it to the actual cursor position to guess whether the move was caused by a
- * keyboard command or not.
- * It's not really the cursor position: the cursor may not be there yet, and it's also expected
- * there be cases where it never actually comes to be there.
+ * This variable contains an expected value for the selection start position. This is where the
+ * cursor or selection start may end up after all the keyboard-triggered updates have passed. We
+ * keep this to compare it to the actual selection start to guess whether the move was caused by
+ * a keyboard command or not.
+ * It's not really the selection start position: the selection start may not be there yet, and
+ * in some cases, it may never arrive there.
*/
- private int mExpectedCursorPosition = INVALID_CURSOR_POSITION; // in chars, not code points
+ private int mExpectedSelStart = INVALID_CURSOR_POSITION; // in chars, not code points
+ /**
+ * The expected selection end. Only differs from mExpectedSelStart if a non-empty selection is
+ * expected. The same caveats as mExpectedSelStart apply.
+ */
+ private int mExpectedSelEnd = INVALID_CURSOR_POSITION; // in chars, not code points
/**
* This contains the committed text immediately preceding the cursor and the composing
* text if any. It is refreshed when the cursor moves by calling upon the TextView.
@@ -103,16 +108,16 @@ public final class RichInputConnection {
final String reference = (beforeCursor.length() <= actualLength) ? beforeCursor.toString()
: beforeCursor.subSequence(beforeCursor.length() - actualLength,
beforeCursor.length()).toString();
- if (et.selectionStart != mExpectedCursorPosition
+ if (et.selectionStart != mExpectedSelStart
|| !(reference.equals(internal.toString()))) {
- final String context = "Expected cursor position = " + mExpectedCursorPosition
- + "\nActual cursor position = " + et.selectionStart
+ final String context = "Expected selection start = " + mExpectedSelStart
+ + "\nActual selection start = " + et.selectionStart
+ "\nExpected text = " + internal.length() + " " + internal
+ "\nActual text = " + reference.length() + " " + reference;
((LatinIME)mParent).debugDumpStateAndCrashWithException(context);
} else {
Log.e(TAG, DebugLogUtils.getStackTrace(2));
- Log.e(TAG, "Exp <> Actual : " + mExpectedCursorPosition + " <> " + et.selectionStart);
+ Log.e(TAG, "Exp <> Actual : " + mExpectedSelStart + " <> " + et.selectionStart);
}
}
@@ -150,16 +155,50 @@ public final class RichInputConnection {
* data, so we empty the cache and note that we don't know the new cursor position, and we
* return false so that the caller knows about this and can retry later.
*
- * @param newCursorPosition The new position of the cursor, as received from the system.
- * @param shouldFinishComposition Whether we should finish the composition in progress.
+ * @param newSelStart the new position of the selection start, as received from the system.
+ * @param newSelEnd the new position of the selection end, as received from the system.
+ * @param shouldFinishComposition whether we should finish the composition in progress.
* @return true if we were able to connect to the editor successfully, false otherwise. When
* this method returns false, the caches could not be correctly refreshed so they were only
* reset: the caller should try again later to return to normal operation.
*/
- public boolean resetCachesUponCursorMoveAndReturnSuccess(final int newCursorPosition,
- final boolean shouldFinishComposition) {
- mExpectedCursorPosition = newCursorPosition;
+ public boolean resetCachesUponCursorMoveAndReturnSuccess(final int newSelStart,
+ final int newSelEnd, final boolean shouldFinishComposition) {
+ mExpectedSelStart = newSelStart;
+ mExpectedSelEnd = newSelEnd;
mComposingText.setLength(0);
+ final boolean didReloadTextSuccessfully = reloadTextCache();
+ if (!didReloadTextSuccessfully) {
+ Log.d(TAG, "Will try to retrieve text later.");
+ return false;
+ }
+ final int lengthOfTextBeforeCursor = mCommittedTextBeforeComposingText.length();
+ if (lengthOfTextBeforeCursor > newSelStart
+ || (lengthOfTextBeforeCursor < Constants.EDITOR_CONTENTS_CACHE_SIZE
+ && newSelStart < Constants.EDITOR_CONTENTS_CACHE_SIZE)) {
+ // newSelStart and newSelEnd may be lying -- when rotating the device (probably a
+ // framework bug). If we have less chars than we asked for, then we know how many chars
+ // we have, and if we got more than newSelStart says, then we know it was lying. In both
+ // cases the length is more reliable. Note that we only have to check newSelStart (not
+ // newSelEnd) since if newSelEnd is wrong, the newSelStart will be wrong as well.
+ mExpectedSelStart = lengthOfTextBeforeCursor;
+ mExpectedSelEnd = lengthOfTextBeforeCursor;
+ }
+ if (null != mIC && shouldFinishComposition) {
+ mIC.finishComposingText();
+ if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
+ ResearchLogger.richInputConnection_finishComposingText();
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Reload the cached text from the InputConnection.
+ *
+ * @return true if successful
+ */
+ private boolean reloadTextCache() {
mCommittedTextBeforeComposingText.setLength(0);
mIC = mParent.getCurrentInputConnection();
// Call upon the inputconnection directly since our own method is using the cache, and
@@ -169,27 +208,12 @@ public final class RichInputConnection {
if (null == textBeforeCursor) {
// For some reason the app thinks we are not connected to it. This looks like a
// framework bug... Fall back to ground state and return false.
- mExpectedCursorPosition = INVALID_CURSOR_POSITION;
- Log.e(TAG, "Unable to connect to the editor to retrieve text... will retry later");
+ mExpectedSelStart = INVALID_CURSOR_POSITION;
+ mExpectedSelEnd = INVALID_CURSOR_POSITION;
+ Log.e(TAG, "Unable to connect to the editor to retrieve text.");
return false;
}
mCommittedTextBeforeComposingText.append(textBeforeCursor);
- final int lengthOfTextBeforeCursor = textBeforeCursor.length();
- if (lengthOfTextBeforeCursor > newCursorPosition
- || (lengthOfTextBeforeCursor < Constants.EDITOR_CONTENTS_CACHE_SIZE
- && newCursorPosition < Constants.EDITOR_CONTENTS_CACHE_SIZE)) {
- // newCursorPosition may be lying -- when rotating the device (probably a framework
- // bug). If we have less chars than we asked for, then we know how many chars we have,
- // and if we got more than newCursorPosition says, then we know it was lying. In both
- // cases the length is more reliable
- mExpectedCursorPosition = lengthOfTextBeforeCursor;
- }
- if (null != mIC && shouldFinishComposition) {
- mIC.finishComposingText();
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- ResearchLogger.richInputConnection_finishComposingText();
- }
- }
return true;
}
@@ -218,7 +242,8 @@ public final class RichInputConnection {
if (DEBUG_BATCH_NESTING) checkBatchEdit();
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
mCommittedTextBeforeComposingText.append(text);
- mExpectedCursorPosition += text.length() - mComposingText.length();
+ mExpectedSelStart += text.length() - mComposingText.length();
+ mExpectedSelEnd = mExpectedSelStart;
mComposingText.setLength(0);
if (null != mIC) {
mIC.commitText(text, i);
@@ -231,7 +256,7 @@ public final class RichInputConnection {
}
public boolean canDeleteCharacters() {
- return mExpectedCursorPosition > 0;
+ return mExpectedSelStart > 0;
}
/**
@@ -268,11 +293,10 @@ public final class RichInputConnection {
// heavy pressing of delete, for example DEFAULT_TEXT_CACHE_SIZE - 5 times or so.
// getCapsMode should be updated to be able to return a "not enough info" result so that
// we can get more context only when needed.
- if (TextUtils.isEmpty(mCommittedTextBeforeComposingText) && 0 != mExpectedCursorPosition) {
- final CharSequence textBeforeCursor = getTextBeforeCursor(
- Constants.EDITOR_CONTENTS_CACHE_SIZE, 0);
- if (!TextUtils.isEmpty(textBeforeCursor)) {
- mCommittedTextBeforeComposingText.append(textBeforeCursor);
+ if (TextUtils.isEmpty(mCommittedTextBeforeComposingText) && 0 != mExpectedSelStart) {
+ if (!reloadTextCache()) {
+ Log.w(TAG, "Unable to connect to the editor. "
+ + "Setting caps mode without knowing text.");
}
}
// This never calls InputConnection#getCapsMode - in fact, it's a static method that
@@ -292,9 +316,20 @@ public final class RichInputConnection {
mCommittedTextBeforeComposingText.length() + mComposingText.length();
// If we have enough characters to satisfy the request, or if we have all characters in
// the text field, then we can return the cached version right away.
- if (cachedLength >= n || cachedLength >= mExpectedCursorPosition) {
+ // However, if we don't have an expected cursor position, then we should always
+ // go fetch the cache again (as it happens, INVALID_CURSOR_POSITION < 0, so we need to
+ // test for this explicitly)
+ if (INVALID_CURSOR_POSITION != mExpectedSelStart
+ && (cachedLength >= n || cachedLength >= mExpectedSelStart)) {
final StringBuilder s = new StringBuilder(mCommittedTextBeforeComposingText);
- s.append(mComposingText);
+ // We call #toString() here to create a temporary object.
+ // In some situations, this method is called on a worker thread, and it's possible
+ // the main thread touches the contents of mComposingText while this worker thread
+ // is suspended, because mComposingText is a StringBuilder. This may lead to crashes,
+ // so we call #toString() on it. That will result in the return value being strictly
+ // speaking wrong, but since this is used for basing bigram probability off, and
+ // it's only going to matter for one getSuggestions call, it's fine in the practice.
+ s.append(mComposingText.toString());
if (s.length() > n) {
s.delete(0, s.length() - n);
}
@@ -325,10 +360,14 @@ public final class RichInputConnection {
+ remainingChars, 0);
mCommittedTextBeforeComposingText.setLength(len);
}
- if (mExpectedCursorPosition > beforeLength) {
- mExpectedCursorPosition -= beforeLength;
+ if (mExpectedSelStart > beforeLength) {
+ mExpectedSelStart -= beforeLength;
+ mExpectedSelEnd -= beforeLength;
} else {
- mExpectedCursorPosition = 0;
+ // There are fewer characters before the cursor in the buffer than we are being asked to
+ // delete. Only delete what is there.
+ mExpectedSelStart = 0;
+ mExpectedSelEnd -= mExpectedSelStart;
}
if (null != mIC) {
mIC.deleteSurroundingText(beforeLength, afterLength);
@@ -362,7 +401,8 @@ public final class RichInputConnection {
switch (keyEvent.getKeyCode()) {
case KeyEvent.KEYCODE_ENTER:
mCommittedTextBeforeComposingText.append("\n");
- mExpectedCursorPosition += 1;
+ mExpectedSelStart += 1;
+ mExpectedSelEnd = mExpectedSelStart;
break;
case KeyEvent.KEYCODE_DEL:
if (0 == mComposingText.length()) {
@@ -374,18 +414,24 @@ public final class RichInputConnection {
} else {
mComposingText.delete(mComposingText.length() - 1, mComposingText.length());
}
- if (mExpectedCursorPosition > 0) mExpectedCursorPosition -= 1;
+ if (mExpectedSelStart > 0 && mExpectedSelStart == mExpectedSelEnd) {
+ // TODO: Handle surrogate pairs.
+ mExpectedSelStart -= 1;
+ }
+ mExpectedSelEnd = mExpectedSelStart;
break;
case KeyEvent.KEYCODE_UNKNOWN:
if (null != keyEvent.getCharacters()) {
mCommittedTextBeforeComposingText.append(keyEvent.getCharacters());
- mExpectedCursorPosition += keyEvent.getCharacters().length();
+ mExpectedSelStart += keyEvent.getCharacters().length();
+ mExpectedSelEnd = mExpectedSelStart;
}
break;
default:
- final String text = new String(new int[] { keyEvent.getUnicodeChar() }, 0, 1);
+ final String text = StringUtils.newSingleCodePointString(keyEvent.getUnicodeChar());
mCommittedTextBeforeComposingText.append(text);
- mExpectedCursorPosition += text.length();
+ mExpectedSelStart += text.length();
+ mExpectedSelEnd = mExpectedSelStart;
break;
}
}
@@ -419,10 +465,12 @@ public final class RichInputConnection {
public void setComposingText(final CharSequence text, final int newCursorPosition) {
if (DEBUG_BATCH_NESTING) checkBatchEdit();
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
- mExpectedCursorPosition += text.length() - mComposingText.length();
+ mExpectedSelStart += text.length() - mComposingText.length();
+ mExpectedSelEnd = mExpectedSelStart;
mComposingText.setLength(0);
mComposingText.append(text);
- // TODO: support values of i != 1. At this time, this is never called with i != 1.
+ // TODO: support values of newCursorPosition != 1. At this time, this is never called with
+ // newCursorPosition != 1.
if (null != mIC) {
mIC.setComposingText(text, newCursorPosition);
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
@@ -432,19 +480,31 @@ public final class RichInputConnection {
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
}
- public void setSelection(final int start, final int end) {
+ /**
+ * Set the selection of the text editor.
+ *
+ * Calls through to {@link InputConnection#setSelection(int, int)}.
+ *
+ * @param start the character index where the selection should start.
+ * @param end the character index where the selection should end.
+ * @return Returns true on success, false if the input connection is no longer valid either when
+ * setting the selection or when retrieving the text cache at that point.
+ */
+ public boolean setSelection(final int start, final int end) {
if (DEBUG_BATCH_NESTING) checkBatchEdit();
if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug();
+ mExpectedSelStart = start;
+ mExpectedSelEnd = end;
if (null != mIC) {
- mIC.setSelection(start, end);
+ final boolean isIcValid = mIC.setSelection(start, end);
+ if (!isIcValid) {
+ return false;
+ }
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
ResearchLogger.richInputConnection_setSelection(start, end);
}
}
- mExpectedCursorPosition = start;
- mCommittedTextBeforeComposingText.setLength(0);
- mCommittedTextBeforeComposingText.append(
- getTextBeforeCursor(Constants.EDITOR_CONTENTS_CACHE_SIZE, 0));
+ return reloadTextCache();
}
public void commitCorrection(final CorrectionInfo correctionInfo) {
@@ -465,7 +525,8 @@ public final class RichInputConnection {
// text should never be null, but just in case, it's better to insert nothing than to crash
if (null == text) text = "";
mCommittedTextBeforeComposingText.append(text);
- mExpectedCursorPosition += text.length() - mComposingText.length();
+ mExpectedSelStart += text.length() - mComposingText.length();
+ mExpectedSelEnd = mExpectedSelStart;
mComposingText.setLength(0);
if (null != mIC) {
mIC.commitCompletion(completionInfo);
@@ -477,7 +538,7 @@ public final class RichInputConnection {
}
@SuppressWarnings("unused")
- public String getNthPreviousWord(final String sentenceSeperators, final int n) {
+ public String getNthPreviousWord(final SettingsValues currentSettingsValues, final int n) {
mIC = mParent.getCurrentInputConnection();
if (null == mIC) return null;
final CharSequence prev = getTextBeforeCursor(LOOKBACK_CHARACTER_NUM, 0);
@@ -496,7 +557,7 @@ public final class RichInputConnection {
}
}
}
- return getNthPreviousWord(prev, sentenceSeperators, n);
+ return getNthPreviousWord(prev, currentSettingsValues, n);
}
private static boolean isSeparator(int code, String sep) {
@@ -520,7 +581,7 @@ public final class RichInputConnection {
// (n = 2) "abc |" -> null
// (n = 2) "abc. def|" -> null
public static String getNthPreviousWord(final CharSequence prev,
- final String sentenceSeperators, final int n) {
+ final SettingsValues currentSettingsValues, final int n) {
if (prev == null) return null;
final String[] w = spaceRegex.split(prev);
@@ -532,7 +593,8 @@ public final class RichInputConnection {
// If ends in a separator, return null
final char lastChar = nthPrevWord.charAt(length - 1);
- if (sentenceSeperators.contains(String.valueOf(lastChar))) return null;
+ if (currentSettingsValues.isWordSeparator(lastChar)
+ || currentSettingsValues.isWordConnector(lastChar)) return null;
return nthPrevWord;
}
@@ -747,20 +809,30 @@ public final class RichInputConnection {
* this update and not the ones in-between. This is almost impossible to achieve even trying
* very very hard.
*
- * @param oldSelStart The value of the old cursor position in the update.
- * @param newSelStart The value of the new cursor position in the update.
+ * @param oldSelStart The value of the old selection in the update.
+ * @param newSelStart The value of the new selection in the update.
+ * @param oldSelEnd The value of the old selection end in the update.
+ * @param newSelEnd The value of the new selection end in the update.
* @return whether this is a belated expected update or not.
*/
- public boolean isBelatedExpectedUpdate(final int oldSelStart, final int newSelStart) {
- // If this is an update that arrives at our expected position, it's a belated update.
- if (newSelStart == mExpectedCursorPosition) return true;
- // If this is an update that moves the cursor from our expected position, it must be
- // an explicit move.
- if (oldSelStart == mExpectedCursorPosition) return false;
- // The following returns true if newSelStart is between oldSelStart and
- // mCurrentCursorPosition. We assume that if the updated position is between the old
- // position and the expected position, then it must be a belated update.
- return (newSelStart - oldSelStart) * (mExpectedCursorPosition - newSelStart) >= 0;
+ public boolean isBelatedExpectedUpdate(final int oldSelStart, final int newSelStart,
+ final int oldSelEnd, final int newSelEnd) {
+ // This update is "belated" if we are expecting it. That is, mExpectedSelStart and
+ // mExpectedSelEnd match the new values that the TextView is updating TO.
+ if (mExpectedSelStart == newSelStart && mExpectedSelEnd == newSelEnd) return true;
+ // This update is not belated if mExpectedSelStart and mExpeectedSelend match the old
+ // values, and one of newSelStart or newSelEnd is updated to a different value. In this
+ // case, there is likely something other than the IME that has moved the selection endpoint
+ // to the new value.
+ if (mExpectedSelStart == oldSelStart && mExpectedSelEnd == oldSelEnd
+ && (oldSelStart != newSelStart || oldSelEnd != newSelEnd)) return false;
+ // If nether of the above two cases holds, then the system may be having trouble keeping up
+ // with updates. If 1) the selection is a cursor, 2) newSelStart is between oldSelStart
+ // and mExpectedSelStart, and 3) newSelEnd is between oldSelEnd and mExpectedSelEnd, then
+ // assume a belated update.
+ return (newSelStart == newSelEnd)
+ && (newSelStart - oldSelStart) * (mExpectedSelStart - newSelStart) >= 0
+ && (newSelEnd - oldSelEnd) * (mExpectedSelEnd - newSelEnd) >= 0;
}
/**
diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
index cd9c89f04..379eaaa3d 100644
--- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
@@ -32,7 +32,9 @@ import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
+import com.android.inputmethod.latin.utils.LocaleUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
import java.util.List;
@@ -56,23 +58,34 @@ public final class SubtypeSwitcher {
private InputMethodSubtype mEmojiSubtype;
private boolean mIsNetworkConnected;
+ private static final String KEYBOARD_MODE = "keyboard";
// Dummy no language QWERTY subtype. See {@link R.xml.method}.
- private static final InputMethodSubtype DUMMY_NO_LANGUAGE_SUBTYPE = new InputMethodSubtype(
- R.string.subtype_no_language_qwerty, R.drawable.ic_ime_switcher_dark,
- SubtypeLocaleUtils.NO_LANGUAGE, "keyboard", "KeyboardLayoutSet="
- + SubtypeLocaleUtils.QWERTY
- + "," + Constants.Subtype.ExtraValue.ASCII_CAPABLE
- + ",EnabledWhenDefaultIsNotAsciiCapable,"
- + Constants.Subtype.ExtraValue.EMOJI_CAPABLE,
- false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */);
+ private static final int SUBTYPE_ID_OF_DUMMY_NO_LANGUAGE_SUBTYPE = 0xdde0bfd3;
+ private static final String EXTRA_VALUE_OF_DUMMY_NO_LANGUAGE_SUBTYPE =
+ "KeyboardLayoutSet=" + SubtypeLocaleUtils.QWERTY
+ + "," + Constants.Subtype.ExtraValue.ASCII_CAPABLE
+ + "," + Constants.Subtype.ExtraValue.ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE
+ + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
+ private static final InputMethodSubtype DUMMY_NO_LANGUAGE_SUBTYPE =
+ InputMethodSubtypeCompatUtils.newInputMethodSubtype(
+ R.string.subtype_no_language_qwerty, R.drawable.ic_ime_switcher_dark,
+ SubtypeLocaleUtils.NO_LANGUAGE, KEYBOARD_MODE,
+ EXTRA_VALUE_OF_DUMMY_NO_LANGUAGE_SUBTYPE,
+ false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */,
+ SUBTYPE_ID_OF_DUMMY_NO_LANGUAGE_SUBTYPE);
// Caveat: We probably should remove this when we add an Emoji subtype in {@link R.xml.method}.
// Dummy Emoji subtype. See {@link R.xml.method}.
- private static final InputMethodSubtype DUMMY_EMOJI_SUBTYPE = new InputMethodSubtype(
- R.string.subtype_emoji, R.drawable.ic_ime_switcher_dark,
- SubtypeLocaleUtils.NO_LANGUAGE, "keyboard", "KeyboardLayoutSet="
- + SubtypeLocaleUtils.EMOJI + ","
- + Constants.Subtype.ExtraValue.EMOJI_CAPABLE,
- false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */);
+ private static final int SUBTYPE_ID_OF_DUMMY_EMOJI_SUBTYPE = 0xd78b2ed0;
+ private static final String EXTRA_VALUE_OF_DUMMY_EMOJI_SUBTYPE =
+ "KeyboardLayoutSet=" + SubtypeLocaleUtils.EMOJI
+ + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
+ private static final InputMethodSubtype DUMMY_EMOJI_SUBTYPE =
+ InputMethodSubtypeCompatUtils.newInputMethodSubtype(
+ R.string.subtype_emoji, R.drawable.ic_ime_switcher_dark,
+ SubtypeLocaleUtils.NO_LANGUAGE, KEYBOARD_MODE,
+ EXTRA_VALUE_OF_DUMMY_EMOJI_SUBTYPE,
+ false /* isAuxiliary */, false /* overridesImplicitlyEnabledSubtype */,
+ SUBTYPE_ID_OF_DUMMY_EMOJI_SUBTYPE);
static final class NeedsToDisplayLanguage {
private int mEnabledSubtypeCount;
@@ -256,18 +269,23 @@ public final class SubtypeSwitcher {
return mNeedsToDisplayLanguage.getValue();
}
- private static Locale sForcedLocaleForTesting = null;
+ private static InputMethodSubtype sForcedSubtypeForTesting = null;
@UsedForTesting
- void forceLocale(final Locale locale) {
- sForcedLocaleForTesting = locale;
+ void forceSubtype(final InputMethodSubtype subtype) {
+ sForcedSubtypeForTesting = subtype;
}
public Locale getCurrentSubtypeLocale() {
- if (null != sForcedLocaleForTesting) return sForcedLocaleForTesting;
+ if (null != sForcedSubtypeForTesting) {
+ return LocaleUtils.constructLocaleFromString(sForcedSubtypeForTesting.getLocale());
+ }
return SubtypeLocaleUtils.getSubtypeLocale(getCurrentSubtype());
}
public InputMethodSubtype getCurrentSubtype() {
+ if (null != sForcedSubtypeForTesting) {
+ return sForcedSubtypeForTesting;
+ }
return mRichImm.getCurrentInputMethodSubtype(getNoLanguageSubtype());
}
@@ -279,8 +297,8 @@ public final class SubtypeSwitcher {
if (mNoLanguageSubtype != null) {
return mNoLanguageSubtype;
}
- Log.w(TAG, "Can't find no lanugage with QWERTY subtype");
- Log.w(TAG, "No input method subtype found; return dummy subtype: "
+ Log.w(TAG, "Can't find any language with QWERTY subtype");
+ Log.w(TAG, "No input method subtype found; returning dummy subtype: "
+ DUMMY_NO_LANGUAGE_SUBTYPE);
return DUMMY_NO_LANGUAGE_SUBTYPE;
}
@@ -293,8 +311,9 @@ public final class SubtypeSwitcher {
if (mEmojiSubtype != null) {
return mEmojiSubtype;
}
- Log.w(TAG, "Can't find Emoji subtype");
- Log.w(TAG, "No input method subtype found; return dummy subtype: " + DUMMY_EMOJI_SUBTYPE);
+ Log.w(TAG, "Can't find emoji subtype");
+ Log.w(TAG, "No input method subtype found; returning dummy subtype: "
+ + DUMMY_EMOJI_SUBTYPE);
return DUMMY_EMOJI_SUBTYPE;
}
}
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index c270d47d0..0ecb41100 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -25,7 +25,6 @@ import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.keyboard.ProximityInfo;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.personalization.PersonalizationDictionary;
-import com.android.inputmethod.latin.personalization.PersonalizationPredictionDictionary;
import com.android.inputmethod.latin.personalization.UserHistoryDictionary;
import com.android.inputmethod.latin.settings.Settings;
import com.android.inputmethod.latin.utils.AutoCorrectionUtils;
@@ -90,7 +89,6 @@ public final class Suggest {
PreferenceManager.getDefaultSharedPreferences(context))) {
mOnlyDictionarySetForDebug = new HashSet<String>();
mOnlyDictionarySetForDebug.add(Dictionary.TYPE_PERSONALIZATION);
- mOnlyDictionarySetForDebug.add(Dictionary.TYPE_PERSONALIZATION_PREDICTION_IN_JAVA);
}
}
@@ -194,12 +192,6 @@ public final class Suggest {
addOrReplaceDictionaryInternal(Dictionary.TYPE_USER_HISTORY, userHistoryDictionary);
}
- public void setPersonalizationPredictionDictionary(
- final PersonalizationPredictionDictionary personalizationPredictionDictionary) {
- addOrReplaceDictionaryInternal(Dictionary.TYPE_PERSONALIZATION_PREDICTION_IN_JAVA,
- personalizationPredictionDictionary);
- }
-
public void setPersonalizationDictionary(
final PersonalizationDictionary personalizationDictionary) {
addOrReplaceDictionaryInternal(Dictionary.TYPE_PERSONALIZATION,
@@ -217,15 +209,17 @@ public final class Suggest {
public void getSuggestedWords(final WordComposer wordComposer,
final String prevWordForBigram, final ProximityInfo proximityInfo,
final boolean blockOffensiveWords, final boolean isCorrectionEnabled,
- final int[] additionalFeaturesOptions, final int sessionId,
+ final int[] additionalFeaturesOptions, final int sessionId, final int sequenceNumber,
final OnGetSuggestedWordsCallback callback) {
LatinImeLogger.onStartSuggestion(prevWordForBigram);
if (wordComposer.isBatchMode()) {
getSuggestedWordsForBatchInput(wordComposer, prevWordForBigram, proximityInfo,
- blockOffensiveWords, additionalFeaturesOptions, sessionId, callback);
+ blockOffensiveWords, additionalFeaturesOptions, sessionId, sequenceNumber,
+ callback);
} else {
getSuggestedWordsForTypingInput(wordComposer, prevWordForBigram, proximityInfo,
- blockOffensiveWords, isCorrectionEnabled, additionalFeaturesOptions, callback);
+ blockOffensiveWords, isCorrectionEnabled, additionalFeaturesOptions,
+ sequenceNumber, callback);
}
}
@@ -234,7 +228,8 @@ public final class Suggest {
private void getSuggestedWordsForTypingInput(final WordComposer wordComposer,
final String prevWordForBigram, final ProximityInfo proximityInfo,
final boolean blockOffensiveWords, final boolean isCorrectionEnabled,
- final int[] additionalFeaturesOptions, final OnGetSuggestedWordsCallback callback) {
+ final int[] additionalFeaturesOptions, final int sequenceNumber,
+ final OnGetSuggestedWordsCallback callback) {
final int trailingSingleQuotesCount = wordComposer.trailingSingleQuotesCount();
final BoundedTreeSet suggestionsSet = new BoundedTreeSet(sSuggestedWordInfoComparator,
MAX_SUGGESTIONS);
@@ -347,7 +342,7 @@ public final class Suggest {
hasAutoCorrection, /* willAutoCorrect */
false /* isPunctuationSuggestions */,
false /* isObsoleteSuggestions */,
- !wordComposer.isComposingWord() /* isPrediction */));
+ !wordComposer.isComposingWord() /* isPrediction */, sequenceNumber));
}
// Retrieves suggestions for the batch input
@@ -355,7 +350,8 @@ public final class Suggest {
private void getSuggestedWordsForBatchInput(final WordComposer wordComposer,
final String prevWordForBigram, final ProximityInfo proximityInfo,
final boolean blockOffensiveWords, final int[] additionalFeaturesOptions,
- final int sessionId, final OnGetSuggestedWordsCallback callback) {
+ final int sessionId, final int sequenceNumber,
+ final OnGetSuggestedWordsCallback callback) {
final BoundedTreeSet suggestionsSet = new BoundedTreeSet(sSuggestedWordInfoComparator,
MAX_SUGGESTIONS);
@@ -408,7 +404,7 @@ public final class Suggest {
false /* willAutoCorrect */,
false /* isPunctuationSuggestions */,
false /* isObsoleteSuggestions */,
- false /* isPrediction */));
+ false /* isPrediction */, sequenceNumber));
}
private static ArrayList<SuggestedWordInfo> getSuggestionsInfoListWithDebugInfo(
@@ -428,7 +424,8 @@ public final class Suggest {
final String scoreInfoString;
if (normalizedScore > 0) {
scoreInfoString = String.format(
- Locale.ROOT, "%d (%4.2f)", cur.mScore, normalizedScore);
+ Locale.ROOT, "%d (%4.2f), %s", cur.mScore, normalizedScore,
+ cur.mSourceDict.mDictType);
} else {
scoreInfoString = Integer.toString(cur.mScore);
}
@@ -475,7 +472,7 @@ public final class Suggest {
}
return new SuggestedWordInfo(sb.toString(), wordInfo.mScore, wordInfo.mKind,
wordInfo.mSourceDict, wordInfo.mIndexOfTouchPointOfSecondWord,
- SuggestedWordInfo.NOT_A_CONFIDENCE /* autoCommitFirstWordConfidence */);
+ wordInfo.mAutoCommitFirstWordConfidence);
}
public void close() {
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index fed4cdbbb..97c89dd4e 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -29,6 +29,7 @@ import java.util.HashSet;
public final class SuggestedWords {
public static final int INDEX_OF_TYPED_WORD = 0;
public static final int INDEX_OF_AUTO_CORRECTION = 1;
+ public static final int NOT_A_SEQUENCE_NUMBER = -1;
private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST =
CollectionUtils.newArrayList(0);
@@ -43,6 +44,7 @@ public final class SuggestedWords {
public final boolean mIsPunctuationSuggestions;
public final boolean mIsObsoleteSuggestions;
public final boolean mIsPrediction;
+ public final int mSequenceNumber; // Sequence number for auto-commit.
private final ArrayList<SuggestedWordInfo> mSuggestedWordInfoList;
public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList,
@@ -51,12 +53,24 @@ public final class SuggestedWords {
final boolean isPunctuationSuggestions,
final boolean isObsoleteSuggestions,
final boolean isPrediction) {
+ this(suggestedWordInfoList, typedWordValid, willAutoCorrect, isPunctuationSuggestions,
+ isObsoleteSuggestions, isPrediction, NOT_A_SEQUENCE_NUMBER);
+ }
+
+ public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList,
+ final boolean typedWordValid,
+ final boolean willAutoCorrect,
+ final boolean isPunctuationSuggestions,
+ final boolean isObsoleteSuggestions,
+ final boolean isPrediction,
+ final int sequenceNumber) {
mSuggestedWordInfoList = suggestedWordInfoList;
mTypedWordValid = typedWordValid;
mWillAutoCorrect = willAutoCorrect;
mIsPunctuationSuggestions = isPunctuationSuggestions;
mIsObsoleteSuggestions = isObsoleteSuggestions;
mIsPrediction = isPrediction;
+ mSequenceNumber = sequenceNumber;
}
public boolean isEmpty() {
diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java
index 6405b5e46..9cb2f5bc4 100644
--- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserBinaryDictionary.java
@@ -22,14 +22,15 @@ import com.android.inputmethod.keyboard.ProximityInfo;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import java.util.ArrayList;
+import java.util.Locale;
public final class SynchronouslyLoadedUserBinaryDictionary extends UserBinaryDictionary {
- public SynchronouslyLoadedUserBinaryDictionary(final Context context, final String locale) {
+ public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale) {
this(context, locale, false);
}
- public SynchronouslyLoadedUserBinaryDictionary(final Context context, final String locale,
+ public SynchronouslyLoadedUserBinaryDictionary(final Context context, final Locale locale,
final boolean alsoUseMoreRestrictiveLocales) {
super(context, locale, alsoUseMoreRestrictiveLocales);
}
diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
index 15b3d8d02..1dc3c54bb 100644
--- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
@@ -18,7 +18,6 @@ package com.android.inputmethod.latin;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
-import android.content.ContentUris;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
@@ -75,20 +74,21 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary {
final private String mLocale;
final private boolean mAlsoUseMoreRestrictiveLocales;
- public UserBinaryDictionary(final Context context, final String locale) {
+ public UserBinaryDictionary(final Context context, final Locale locale) {
this(context, locale, false);
}
- public UserBinaryDictionary(final Context context, final String locale,
+ public UserBinaryDictionary(final Context context, final Locale locale,
final boolean alsoUseMoreRestrictiveLocales) {
- super(context, getFilenameWithLocale(NAME, locale), Dictionary.TYPE_USER,
+ super(context, getDictNameWithLocale(NAME, locale), locale, Dictionary.TYPE_USER,
false /* isUpdatable */);
if (null == locale) throw new NullPointerException(); // Catch the error earlier
- if (SubtypeLocaleUtils.NO_LANGUAGE.equals(locale)) {
+ final String localeStr = locale.toString();
+ if (SubtypeLocaleUtils.NO_LANGUAGE.equals(localeStr)) {
// If we don't have a locale, insert into the "all locales" user dictionary.
mLocale = USER_DICTIONARY_ALL_LANGUAGES;
} else {
- mLocale = locale;
+ mLocale = localeStr;
}
mAlsoUseMoreRestrictiveLocales = alsoUseMoreRestrictiveLocales;
// Perform a managed query. The Activity will handle closing and re-querying the cursor
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 039dadc66..2f81d15d5 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -48,6 +48,10 @@ public final class WordComposer {
// at any given time. However this is not limited in size, while mPrimaryKeyCodes is limited
// to MAX_WORD_LENGTH code points.
private final StringBuilder mTypedWord;
+ // The previous word (before the composing word). Used as context for suggestions. May be null
+ // after resetting and before starting a new composing word, or when there is no context like
+ // at the start of text for example.
+ private String mPreviousWord;
private String mAutoCorrection;
private boolean mIsResumed;
private boolean mIsBatchMode;
@@ -85,6 +89,7 @@ public final class WordComposer {
mIsBatchMode = false;
mCursorPositionWithinWord = 0;
mRejectedBatchModeSuggestion = null;
+ mPreviousWord = null;
refreshSize();
}
@@ -101,6 +106,7 @@ public final class WordComposer {
mIsBatchMode = source.mIsBatchMode;
mCursorPositionWithinWord = source.mCursorPositionWithinWord;
mRejectedBatchModeSuggestion = source.mRejectedBatchModeSuggestion;
+ mPreviousWord = source.mPreviousWord;
refreshSize();
}
@@ -118,6 +124,7 @@ public final class WordComposer {
mIsBatchMode = false;
mCursorPositionWithinWord = 0;
mRejectedBatchModeSuggestion = null;
+ mPreviousWord = null;
refreshSize();
}
@@ -284,8 +291,13 @@ public final class WordComposer {
/**
* Set the currently composing word to the one passed as an argument.
* This will register NOT_A_COORDINATE for X and Ys, and use the passed keyboard for proximity.
+ * @param word the char sequence to set as the composing word.
+ * @param previousWord the previous word, to use as context for suggestions. Can be null if
+ * the context is nil (typically, at start of text).
+ * @param keyboard the keyboard this is typed on, for coordinate info/proximity.
*/
- public void setComposingWord(final CharSequence word, final Keyboard keyboard) {
+ public void setComposingWord(final CharSequence word, final String previousWord,
+ final Keyboard keyboard) {
reset();
final int length = word.length();
for (int i = 0; i < length; i = Character.offsetByCodePoints(word, i, 1)) {
@@ -293,6 +305,7 @@ public final class WordComposer {
addKeyInfo(codePoint, keyboard);
}
mIsResumed = true;
+ mPreviousWord = previousWord;
}
/**
@@ -343,6 +356,10 @@ public final class WordComposer {
return mTypedWord.toString();
}
+ public String getPreviousWord() {
+ return mPreviousWord;
+ }
+
/**
* Whether or not the user typed a capital letter as the first letter in the word
* @return capitalization preference
@@ -388,18 +405,21 @@ public final class WordComposer {
}
/**
- * Saves the caps mode at the start of composing.
+ * Saves the caps mode and the previous word at the start of composing.
*
- * WordComposer needs to know about this for several reasons. The first is, we need to know
- * after the fact what the reason was, to register the correct form into the user history
- * dictionary: if the word was automatically capitalized, we should insert it in all-lower
- * case but if it's a manual pressing of shift, then it should be inserted as is.
+ * WordComposer needs to know about the caps mode for several reasons. The first is, we need
+ * to know after the fact what the reason was, to register the correct form into the user
+ * history dictionary: if the word was automatically capitalized, we should insert it in
+ * all-lower case but if it's a manual pressing of shift, then it should be inserted as is.
* Also, batch input needs to know about the current caps mode to display correctly
* capitalized suggestions.
* @param mode the mode at the time of start
+ * @param previousWord the previous word as context for suggestions. May be null if none.
*/
- public void setCapitalizedModeAtStartComposingTime(final int mode) {
+ public void setCapitalizedModeAndPreviousWordAtStartComposingTime(final int mode,
+ final String previousWord) {
mCapitalizedMode = mode;
+ mPreviousWord = previousWord;
}
/**
@@ -451,6 +471,7 @@ public final class WordComposer {
mCapsCount = 0;
mDigitsCount = 0;
mIsBatchMode = false;
+ mPreviousWord = mTypedWord.toString();
mTypedWord.setLength(0);
mCodePointSize = 0;
mTrailingSingleQuotesCount = 0;
@@ -464,7 +485,8 @@ public final class WordComposer {
return lastComposedWord;
}
- public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord) {
+ public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord,
+ final String previousWord) {
mPrimaryKeyCodes = lastComposedWord.mPrimaryKeyCodes;
mInputPointers.set(lastComposedWord.mInputPointers);
mTypedWord.setLength(0);
@@ -475,6 +497,7 @@ public final class WordComposer {
mCursorPositionWithinWord = mCodePointSize;
mRejectedBatchModeSuggestion = null;
mIsResumed = true;
+ mPreviousWord = previousWord;
}
public boolean isBatchMode() {
diff --git a/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java
index 9f7f502ea..f8fa68f45 100644
--- a/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/AbstractDictDecoder.java
@@ -32,35 +32,35 @@ import java.util.TreeMap;
* A base class of the binary dictionary decoder.
*/
public abstract class AbstractDictDecoder implements DictDecoder {
- protected FileHeader readHeader(final DictBuffer dictBuffer)
+ private static final int SUCCESS = 0;
+ private static final int ERROR_CANNOT_READ = 1;
+ private static final int ERROR_WRONG_FORMAT = 2;
+
+ protected FileHeader readHeader(final DictBuffer headerBuffer)
throws IOException, UnsupportedFormatException {
- if (dictBuffer == null) {
+ if (headerBuffer == null) {
openDictBuffer();
}
- final int version = HeaderReader.readVersion(dictBuffer);
+ final int version = HeaderReader.readVersion(headerBuffer);
if (version < FormatSpec.MINIMUM_SUPPORTED_VERSION
|| version > FormatSpec.MAXIMUM_SUPPORTED_VERSION) {
throw new UnsupportedFormatException("Unsupported version : " + version);
}
// TODO: Remove this field.
- final int optionsFlags = HeaderReader.readOptionFlags(dictBuffer);
-
- final int headerSize = HeaderReader.readHeaderSize(dictBuffer);
-
+ final int optionsFlags = HeaderReader.readOptionFlags(headerBuffer);
+ final int headerSize = HeaderReader.readHeaderSize(headerBuffer);
if (headerSize < 0) {
throw new UnsupportedFormatException("header size can't be negative.");
}
- final HashMap<String, String> attributes = HeaderReader.readAttributes(dictBuffer,
+ final HashMap<String, String> attributes = HeaderReader.readAttributes(headerBuffer,
headerSize);
final FileHeader header = new FileHeader(headerSize,
- new FusionDictionary.DictionaryOptions(attributes,
- 0 != (optionsFlags & FormatSpec.GERMAN_UMLAUT_PROCESSING_FLAG),
- 0 != (optionsFlags & FormatSpec.FRENCH_LIGATURE_PROCESSING_FLAG)),
- new FormatOptions(version,
- 0 != (optionsFlags & FormatSpec.SUPPORTS_DYNAMIC_UPDATE)));
+ new FusionDictionary.DictionaryOptions(attributes),
+ new FormatOptions(version,
+ 0 != (optionsFlags & FormatSpec.CONTAINS_TIMESTAMP_FLAG)));
return header;
}
@@ -203,4 +203,25 @@ public abstract class AbstractDictDecoder implements DictDecoder {
return readLength;
}
}
+
+ /**
+ * Check whether the header contains the expected information. This is a no-error method,
+ * that will return an error code and never throw a checked exception.
+ * @return an error code, either ERROR_* or SUCCESS.
+ */
+ private int checkHeader() {
+ try {
+ readHeader();
+ } catch (IOException e) {
+ return ERROR_CANNOT_READ;
+ } catch (UnsupportedFormatException e) {
+ return ERROR_WRONG_FORMAT;
+ }
+ return SUCCESS;
+ }
+
+ @Override
+ public boolean hasValidRawBinaryDictionary() {
+ return checkHeader() == SUCCESS;
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
index 216492b4d..7f0aa777f 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
@@ -24,12 +24,9 @@ import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray;
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;
@@ -169,6 +166,14 @@ public final class BinaryDictDecoderUtils {
return size;
}
+ static int getCharArraySize(final int[] chars, final int start, final int end) {
+ int size = 0;
+ for (int i = start; i < end; ++i) {
+ size += getCharSize(chars[i]);
+ }
+ return size;
+ }
+
/**
* Writes a char array to a byte buffer.
*
@@ -200,8 +205,7 @@ public final class BinaryDictDecoderUtils {
* @param word the string to write.
* @return the size written, in bytes.
*/
- static int writeString(final byte[] buffer, final int origin,
- final String word) {
+ static int writeString(final byte[] buffer, final int origin, final String word) {
final int length = word.length();
int index = origin;
for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) {
@@ -223,22 +227,62 @@ public final class BinaryDictDecoderUtils {
*
* This will also write the terminator byte.
*
- * @param buffer the OutputStream to write to.
+ * @param stream the OutputStream to write to.
* @param word the string to write.
+ * @return the size written, in bytes.
*/
- static void writeString(final OutputStream buffer, final String word) throws IOException {
+ static int writeString(final OutputStream stream, final String word) throws IOException {
final int length = word.length();
+ int written = 0;
for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) {
final int codePoint = word.codePointAt(i);
- if (1 == getCharSize(codePoint)) {
- buffer.write((byte) codePoint);
+ final int charSize = getCharSize(codePoint);
+ if (1 == charSize) {
+ stream.write((byte) codePoint);
} else {
- buffer.write((byte) (0xFF & (codePoint >> 16)));
- buffer.write((byte) (0xFF & (codePoint >> 8)));
- buffer.write((byte) (0xFF & codePoint));
+ stream.write((byte) (0xFF & (codePoint >> 16)));
+ stream.write((byte) (0xFF & (codePoint >> 8)));
+ stream.write((byte) (0xFF & codePoint));
}
+ written += charSize;
}
- buffer.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR);
+ stream.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR);
+ written += FormatSpec.PTNODE_TERMINATOR_SIZE;
+ return written;
+ }
+
+ /**
+ * Writes an array of code points with our character format to an OutputStream.
+ *
+ * This will also write the terminator byte.
+ *
+ * @param stream the OutputStream to write to.
+ * @param codePoints the array of code points
+ * @return the size written, in bytes.
+ */
+ // TODO: Merge this method with writeCharArray and rename the various write* methods to
+ // make the difference clear.
+ static int writeCodePoints(final OutputStream stream, final int[] codePoints,
+ final int startIndex, final int endIndex)
+ throws IOException {
+ int written = 0;
+ for (int i = startIndex; i < endIndex; ++i) {
+ final int codePoint = codePoints[i];
+ final int charSize = getCharSize(codePoint);
+ if (1 == charSize) {
+ stream.write((byte) codePoint);
+ } else {
+ stream.write((byte) (0xFF & (codePoint >> 16)));
+ stream.write((byte) (0xFF & (codePoint >> 8)));
+ stream.write((byte) (0xFF & codePoint));
+ }
+ written += charSize;
+ }
+ if (endIndex - startIndex > 1) {
+ stream.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR);
+ written += FormatSpec.PTNODE_TERMINATOR_SIZE;
+ }
+ return written;
}
/**
@@ -286,7 +330,7 @@ public final class BinaryDictDecoderUtils {
static int readChildrenAddress(final DictBuffer dictBuffer,
final int optionFlags, final FormatOptions options) {
- if (options.mSupportsDynamicUpdate) {
+ if (options.supportsDynamicUpdate()) {
final int address = dictBuffer.readUnsignedInt24();
if (address == 0) return FormatSpec.NO_CHILDREN_ADDRESS;
if ((address & FormatSpec.MSB24) != 0) {
@@ -496,11 +540,11 @@ public final class BinaryDictDecoderUtils {
}
// reach the end of the array.
- if (options.mSupportsDynamicUpdate) {
+ if (options.supportsDynamicUpdate()) {
final boolean hasValidForwardLink = dictDecoder.readAndFollowForwardLink();
if (!hasValidForwardLink) break;
}
- } while (options.mSupportsDynamicUpdate && dictDecoder.hasNextPtNodeArray());
+ } while (options.supportsDynamicUpdate() && dictDecoder.hasNextPtNodeArray());
final PtNodeArray nodeArray = new PtNodeArray(nodeArrayContents);
nodeArray.mCachedAddressBeforeUpdate = nodeArrayOriginPos;
@@ -556,7 +600,7 @@ public final class BinaryDictDecoderUtils {
Map<Integer, PtNodeArray> reverseNodeArrayMapping = new TreeMap<Integer, PtNodeArray>();
Map<Integer, PtNode> reversePtNodeMapping = new TreeMap<Integer, PtNode>();
- final PtNodeArray root = readNodeArray(dictDecoder, fileHeader.mHeaderSize,
+ final PtNodeArray root = readNodeArray(dictDecoder, fileHeader.mBodyOffset,
reverseNodeArrayMapping, reversePtNodeMapping, fileHeader.mFormatOptions);
FusionDictionary newDict = new FusionDictionary(root, fileHeader.mDictionaryOptions);
@@ -592,32 +636,10 @@ public final class BinaryDictDecoderUtils {
/**
* Basic test to find out whether the file is a binary dictionary or not.
*
- * Concretely this only tests the magic number.
- *
* @param file The file to test.
* @return true if it's a binary dictionary, false otherwise
*/
public static boolean isBinaryDictionary(final File file) {
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(file);
- final ByteBuffer buffer = inStream.getChannel().map(
- FileChannel.MapMode.READ_ONLY, 0, file.length());
- final int version = getFormatVersion(new ByteBufferDictBuffer(buffer));
- return (version >= FormatSpec.MINIMUM_SUPPORTED_VERSION
- && version <= FormatSpec.MAXIMUM_SUPPORTED_VERSION);
- } catch (FileNotFoundException e) {
- return false;
- } catch (IOException e) {
- return false;
- } finally {
- if (inStream != null) {
- try {
- inStream.close();
- } catch (IOException e) {
- // do nothing
- }
- }
- }
+ return FormatSpec.getDictDecoder(file).hasValidRawBinaryDictionary();
}
}
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
index f761829de..8ba0797de 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
@@ -17,9 +17,9 @@
package com.android.inputmethod.latin.makedict;
import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer;
import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
-import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions;
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray;
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
@@ -160,7 +160,7 @@ public class BinaryDictEncoderUtils {
node.mCachedSize = nodeSize;
size += nodeSize;
}
- if (options.mSupportsDynamicUpdate) {
+ if (options.supportsDynamicUpdate()) {
size += FormatSpec.FORWARD_LINK_ADDRESS_SIZE;
}
ptNodeArray.mCachedSize = size;
@@ -245,6 +245,26 @@ public class BinaryDictEncoderUtils {
}
}
+ static void writeUIntToDictBuffer(final DictBuffer dictBuffer, final int value,
+ final int size) {
+ switch(size) {
+ case 4:
+ dictBuffer.put((byte) ((value >> 24) & 0xFF));
+ /* fall through */
+ case 3:
+ dictBuffer.put((byte) ((value >> 16) & 0xFF));
+ /* fall through */
+ case 2:
+ dictBuffer.put((byte) ((value >> 8) & 0xFF));
+ /* fall through */
+ case 1:
+ dictBuffer.put((byte) (value & 0xFF));
+ break;
+ default:
+ /* nop */
+ }
+ }
+
// End utility methods
// This method is responsible for finding a nice ordering of the nodes that favors run-time
@@ -377,7 +397,7 @@ public class BinaryDictEncoderUtils {
nodeSize += FormatSpec.PTNODE_FREQUENCY_SIZE;
}
}
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
nodeSize += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
} else if (null != ptNode.mChildren) {
nodeSize += getByteSize(getOffsetToTargetNodeArrayDuringUpdate(ptNodeArray,
@@ -397,7 +417,7 @@ public class BinaryDictEncoderUtils {
ptNode.mCachedSize = nodeSize;
size += nodeSize;
}
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
size += FormatSpec.FORWARD_LINK_ADDRESS_SIZE;
}
if (ptNodeArray.mCachedSize != size) {
@@ -513,7 +533,7 @@ public class BinaryDictEncoderUtils {
if (passes > MAX_PASSES) throw new RuntimeException("Too many passes - probably a bug");
} while (changesDone);
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
computeParentAddresses(flatNodes);
}
final PtNodeArray lastPtNodeArray = flatNodes.get(flatNodes.size() - 1);
@@ -622,7 +642,7 @@ public class BinaryDictEncoderUtils {
byte flags = 0;
if (hasMultipleChars) flags |= FormatSpec.FLAG_HAS_MULTIPLE_CHARS;
if (isTerminal) flags |= FormatSpec.FLAG_IS_TERMINAL;
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
flags |= FormatSpec.FLAG_IS_NOT_MOVED;
} else if (true) {
switch (childrenAddressSize) {
@@ -690,6 +710,13 @@ public class BinaryDictEncoderUtils {
+ word + " is " + unigramFrequency);
bigramFrequency = unigramFrequency;
}
+ bigramFlags += getBigramFrequencyDiff(unigramFrequency, bigramFrequency)
+ & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY;
+ return bigramFlags;
+ }
+
+ public static int getBigramFrequencyDiff(final int unigramFrequency,
+ final int bigramFrequency) {
// We compute the difference between 255 (which means probability = 1) and the
// unigram score. We split this into a number of discrete steps.
// Now, the steps are numbered 0~15; 0 represents an increase of 1 step while 15
@@ -723,22 +750,15 @@ public class BinaryDictEncoderUtils {
// include this bigram in the dictionary. For now, register as 0, and live with the
// small over-estimation that we get in this case. TODO: actually remove this bigram
// if discretizedFrequency < 0.
- final int finalBigramFrequency = discretizedFrequency > 0 ? discretizedFrequency : 0;
- bigramFlags += finalBigramFrequency & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY;
- return bigramFlags;
+ return discretizedFrequency > 0 ? discretizedFrequency : 0;
}
/**
- * Makes the 2-byte value for options flags.
+ * Makes the 2-byte value for options flags. Unused at the moment, and always 0.
*/
- private static final int makeOptionsValue(final FusionDictionary dictionary,
- final FormatOptions formatOptions) {
- final DictionaryOptions options = dictionary.mOptions;
- final boolean hasBigrams = dictionary.hasBigrams();
- return (options.mFrenchLigatureProcessing ? FormatSpec.FRENCH_LIGATURE_PROCESSING_FLAG : 0)
- + (options.mGermanUmlautProcessing ? FormatSpec.GERMAN_UMLAUT_PROCESSING_FLAG : 0)
- + (hasBigrams ? FormatSpec.CONTAINS_BIGRAMS_FLAG : 0)
- + (formatOptions.mSupportsDynamicUpdate ? FormatSpec.SUPPORTS_DYNAMIC_UPDATE : 0);
+ private static final int makeOptionsValue(final FormatOptions formatOptions) {
+ // TODO: why doesn't this handle CONTAINS_TIMESTAMP_FLAG?
+ return 0;
}
/**
@@ -826,7 +846,7 @@ public class BinaryDictEncoderUtils {
}
dictEncoder.writePtNode(ptNode, parentPosition, formatOptions, dict);
}
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
dictEncoder.writeForwardLinkAddress(FormatSpec.NO_FORWARD_LINK_ADDRESS);
}
if (dictEncoder.getPosition() != ptNodeArray.mCachedAddressAfterUpdate
@@ -927,7 +947,7 @@ public class BinaryDictEncoderUtils {
headerBuffer.write((byte) (0xFF & version));
// Options flags
- final int options = makeOptionsValue(dict, formatOptions);
+ final int options = makeOptionsValue(formatOptions);
headerBuffer.write((byte) (0xFF & (options >> 8)));
headerBuffer.write((byte) (0xFF & options));
final int headerSizeOffset = headerBuffer.size();
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
index 0f7d2f6c9..640d778bb 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
@@ -62,7 +62,7 @@ public final class BinaryDictIOUtils {
* Retrieves all node arrays without recursive call.
*/
private static void readUnigramsAndBigramsBinaryInner(final DictDecoder dictDecoder,
- final int headerSize, final Map<Integer, String> words,
+ final int bodyOffset, final Map<Integer, String> words,
final Map<Integer, Integer> frequencies,
final Map<Integer, ArrayList<PendingAttribute>> bigrams,
final FormatOptions formatOptions) {
@@ -71,7 +71,7 @@ public final class BinaryDictIOUtils {
Stack<Position> stack = new Stack<Position>();
int index = 0;
- Position initPos = new Position(headerSize, 0);
+ Position initPos = new Position(bodyOffset, 0);
stack.push(initPos);
while (!stack.empty()) {
@@ -112,7 +112,7 @@ public final class BinaryDictIOUtils {
}
if (p.mPosition == p.mNumOfPtNode) {
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
final boolean hasValidForwardLinkAddress =
dictDecoder.readAndFollowForwardLink();
if (hasValidForwardLinkAddress && dictDecoder.hasNextPtNodeArray()) {
@@ -154,7 +154,7 @@ public final class BinaryDictIOUtils {
UnsupportedFormatException {
// Read header
final FileHeader header = dictDecoder.readHeader();
- readUnigramsAndBigramsBinaryInner(dictDecoder, header.mHeaderSize, words,
+ readUnigramsAndBigramsBinaryInner(dictDecoder, header.mBodyOffset, words,
frequencies, bigrams, header.mFormatOptions);
}
@@ -228,7 +228,7 @@ public final class BinaryDictIOUtils {
// a forward link address that we need to consult and possibly resume
// search on the next node array in the linked list.
if (foundNextPtNode) break;
- if (!header.mFormatOptions.mSupportsDynamicUpdate) {
+ if (!header.mFormatOptions.supportsDynamicUpdate()) {
return FormatSpec.NOT_VALID_WORD;
}
@@ -245,8 +245,7 @@ public final class BinaryDictIOUtils {
/**
* @return the size written, in bytes. Always 3 bytes.
*/
- static int writeSInt24ToBuffer(final DictBuffer dictBuffer,
- final int value) {
+ static int writeSInt24ToBuffer(final DictBuffer dictBuffer, final int value) {
final int absValue = Math.abs(value);
dictBuffer.put((byte)(((value < 0 ? 0x80 : 0) | (absValue >> 16)) & 0xFF));
dictBuffer.put((byte)((absValue >> 8) & 0xFF));
@@ -301,35 +300,6 @@ public final class BinaryDictIOUtils {
}
/**
- * Write a string to a stream.
- *
- * @param destination the stream to write.
- * @param word the string to be written.
- * @return the size written, in bytes.
- * @throws IOException
- */
- private static int writeString(final OutputStream destination, final String word)
- throws IOException {
- int size = 0;
- final int length = word.length();
- for (int i = 0; i < length; i = word.offsetByCodePoints(i, 1)) {
- final int codePoint = word.codePointAt(i);
- if (CharEncoding.getCharSize(codePoint) == 1) {
- destination.write((byte)codePoint);
- size++;
- } else {
- destination.write((byte)(0xFF & (codePoint >> 16)));
- destination.write((byte)(0xFF & (codePoint >> 8)));
- destination.write((byte)(0xFF & codePoint));
- size += 3;
- }
- }
- destination.write((byte)FormatSpec.PTNODE_CHARACTERS_TERMINATOR);
- size += FormatSpec.PTNODE_TERMINATOR_SIZE;
- return size;
- }
-
- /**
* Write a PtNode to an output stream from a PtNodeInfo.
* A PtNode is an in-memory representation of a node in the patricia trie.
* A PtNode info is a container for low-level information about how the
@@ -387,7 +357,7 @@ public final class BinaryDictIOUtils {
destination.write((byte)BinaryDictEncoderUtils.makeShortcutFlags(
shortcutIterator.hasNext(), target.mFrequency));
size++;
- size += writeString(destination, target.mWord);
+ size += CharEncoding.writeString(destination, target.mWord);
}
}
@@ -445,6 +415,27 @@ public final class BinaryDictIOUtils {
}
/**
+ * Writes a PtNodeCount to the stream.
+ *
+ * @param destination the stream to write.
+ * @param ptNodeCount the count.
+ * @return the size written in bytes.
+ */
+ static int writePtNodeCount(final OutputStream destination, final int ptNodeCount)
+ throws IOException {
+ final int countSize = BinaryDictIOUtils.getPtNodeCountSize(ptNodeCount);
+ // the count must fit on one byte or two bytes.
+ // Please see comments in FormatSpec.
+ if (countSize != 1 && countSize != 2) {
+ throw new RuntimeException("Strange size from getPtNodeCountSize : " + countSize);
+ }
+ final int encodedPtNodeCount = (countSize == 2) ?
+ (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount;
+ BinaryDictEncoderUtils.writeUIntToStream(destination, encodedPtNodeCount, countSize);
+ return countSize;
+ }
+
+ /**
* Write a node array to the stream.
*
* @param destination the stream to write.
@@ -454,18 +445,7 @@ public final class BinaryDictIOUtils {
*/
static int writeNodes(final OutputStream destination, final PtNodeInfo[] infos)
throws IOException {
- int size = getPtNodeCountSize(infos.length);
- switch (getPtNodeCountSize(infos.length)) {
- case 1:
- destination.write((byte)infos.length);
- break;
- case 2:
- destination.write((byte)(infos.length >> 8));
- destination.write((byte)(infos.length & 0xFF));
- break;
- default:
- throw new RuntimeException("Invalid node count size.");
- }
+ int size = writePtNodeCount(destination, infos.length);
for (final PtNodeInfo info : infos) size += writePtNode(destination, info);
writeSInt24ToStream(destination, FormatSpec.NO_FORWARD_LINK_ADDRESS);
return size + FormatSpec.FORWARD_LINK_ADDRESS_SIZE;
@@ -527,7 +507,7 @@ public final class BinaryDictIOUtils {
* Helper method to check whether the node is moved.
*/
public static boolean isMovedPtNode(final int flags, final FormatOptions options) {
- return options.mSupportsDynamicUpdate
+ return options.supportsDynamicUpdate()
&& ((flags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) == FormatSpec.FLAG_IS_MOVED);
}
@@ -536,14 +516,14 @@ public final class BinaryDictIOUtils {
*/
public static boolean supportsDynamicUpdate(final FormatOptions options) {
return options.mVersion >= FormatSpec.FIRST_VERSION_WITH_DYNAMIC_UPDATE
- && options.mSupportsDynamicUpdate;
+ && options.supportsDynamicUpdate();
}
/**
* Helper method to check whether the node is deleted.
*/
public static boolean isDeletedPtNode(final int flags, final FormatOptions formatOptions) {
- return formatOptions.mSupportsDynamicUpdate
+ return formatOptions.supportsDynamicUpdate()
&& ((flags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) == FormatSpec.FLAG_IS_DELETED);
}
@@ -566,7 +546,7 @@ public final class BinaryDictIOUtils {
static int getChildrenAddressSize(final int optionFlags,
final FormatOptions formatOptions) {
- if (formatOptions.mSupportsDynamicUpdate) return FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
+ if (formatOptions.supportsDynamicUpdate()) return FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
switch (optionFlags & FormatSpec.MASK_CHILDREN_ADDRESS_TYPE) {
case FormatSpec.FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE:
return 1;
diff --git a/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java
index 3dbeee099..b4838f00f 100644
--- a/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/DictDecoder.java
@@ -35,6 +35,7 @@ import java.util.TreeMap;
/**
* An interface of binary dictionary decoders.
*/
+// TODO: Straighten out responsibility for the buffer's file pointer.
public interface DictDecoder {
/**
@@ -43,7 +44,7 @@ public interface DictDecoder {
public FileHeader readHeader() throws IOException, UnsupportedFormatException;
/**
- * Reads PtNode from nodeAddress.
+ * Reads PtNode from ptNodePos.
* @param ptNodePos the position of PtNode.
* @param formatOptions the format options.
* @return PtNodeInfo.
@@ -127,7 +128,8 @@ public interface DictDecoder {
* Opens the dictionary file and makes DictBuffer.
*/
@UsedForTesting
- public void openDictBuffer() throws FileNotFoundException, IOException;
+ public void openDictBuffer() throws FileNotFoundException, IOException,
+ UnsupportedFormatException;
@UsedForTesting
public boolean isDictBufferOpen();
@@ -228,4 +230,9 @@ public interface DictDecoder {
}
public void skipPtNode(final FormatOptions formatOptions);
+
+ /**
+ * @return whether this decoder has a valid binary dictionary that it can decode.
+ */
+ public boolean hasValidRawBinaryDictionary();
}
diff --git a/java/src/com/android/inputmethod/latin/makedict/DynamicBinaryDictIOUtils.java b/java/src/com/android/inputmethod/latin/makedict/DynamicBinaryDictIOUtils.java
index 336277196..ff03190a3 100644
--- a/java/src/com/android/inputmethod/latin/makedict/DynamicBinaryDictIOUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/DynamicBinaryDictIOUtils.java
@@ -22,6 +22,7 @@ import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer;
import com.android.inputmethod.latin.makedict.FormatSpec.FileHeader;
import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
+import com.android.inputmethod.latin.utils.CollectionUtils;
import java.io.IOException;
import java.io.OutputStream;
@@ -36,7 +37,7 @@ import java.util.Arrays;
@UsedForTesting
public final class DynamicBinaryDictIOUtils {
private static final boolean DBG = false;
- private static final int MAX_JUMPS = 10000;
+ static final int MAX_JUMPS = 10000;
private DynamicBinaryDictIOUtils() {
// This utility class is not publicly instantiable.
@@ -60,7 +61,7 @@ public final class DynamicBinaryDictIOUtils {
final DictBuffer dictBuffer = dictUpdater.getDictBuffer();
final int originalPosition = dictBuffer.position();
dictBuffer.position(ptNodeOriginAddress);
- if (!formatOptions.mSupportsDynamicUpdate) {
+ if (!formatOptions.supportsDynamicUpdate()) {
throw new RuntimeException("this file format does not support parent addresses");
}
final int flags = dictBuffer.readUnsignedByte();
@@ -101,7 +102,7 @@ public final class DynamicBinaryDictIOUtils {
}
if (!dictUpdater.readAndFollowForwardLink()) break;
if (dictUpdater.getPosition() == FormatSpec.NO_FORWARD_LINK_ADDRESS) break;
- } while (formatOptions.mSupportsDynamicUpdate);
+ } while (formatOptions.supportsDynamicUpdate());
dictUpdater.setPosition(originalPosition);
}
@@ -217,6 +218,25 @@ public final class DynamicBinaryDictIOUtils {
}
/**
+ * Converts a list of WeightedString to a list of PendingAttribute.
+ */
+ public static ArrayList<PendingAttribute> resolveBigramPositions(final DictUpdater dictUpdater,
+ final ArrayList<WeightedString> bigramStrings)
+ throws IOException, UnsupportedFormatException {
+ if (bigramStrings == null) return CollectionUtils.newArrayList();
+ final ArrayList<PendingAttribute> bigrams = CollectionUtils.newArrayList();
+ for (final WeightedString bigram : bigramStrings) {
+ final int pos = dictUpdater.getTerminalPosition(bigram.mWord);
+ if (pos == FormatSpec.NOT_VALID_WORD) {
+ // TODO: figure out what is the correct thing to do here.
+ } else {
+ bigrams.add(new PendingAttribute(bigram.mFrequency, pos));
+ }
+ }
+ return bigrams;
+ }
+
+ /**
* Insert a word into a binary dictionary.
*
* @param dictUpdater the dict updater.
@@ -238,18 +258,9 @@ public final class DynamicBinaryDictIOUtils {
final ArrayList<WeightedString> shortcuts, final boolean isNotAWord,
final boolean isBlackListEntry)
throws IOException, UnsupportedFormatException {
- final ArrayList<PendingAttribute> bigrams = new ArrayList<PendingAttribute>();
+ final ArrayList<PendingAttribute> bigrams = resolveBigramPositions(dictUpdater,
+ bigramStrings);
final DictBuffer dictBuffer = dictUpdater.getDictBuffer();
- if (bigramStrings != null) {
- for (final WeightedString bigram : bigramStrings) {
- int position = dictUpdater.getTerminalPosition(bigram.mWord);
- if (position == FormatSpec.NOT_VALID_WORD) {
- // TODO: figure out what is the correct thing to do here.
- } else {
- bigrams.add(new PendingAttribute(bigram.mFrequency, position));
- }
- }
- }
final boolean isTerminal = true;
final boolean hasBigrams = !bigrams.isEmpty();
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
index 5a5d7af6b..20ddba836 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -37,13 +37,11 @@ public final class FormatSpec {
* sion
*
* o |
- * p | not used 4 bits
- * t | has bigrams ? 1 bit, 1 = yes, 0 = no : CONTAINS_BIGRAMS_FLAG
- * i | FRENCH_LIGATURE_PROCESSING_FLAG
- * o | supports dynamic updates ? 1 bit, 1 = yes, 0 = no : SUPPORTS_DYNAMIC_UPDATE
- * n | GERMAN_UMLAUT_PROCESSING_FLAG
- * f |
- * lags
+ * p | not used 3 bits
+ * t | each unigram and bigram entry has a time stamp?
+ * i | 1 bit, 1 = yes, 0 = no : CONTAINS_TIMESTAMP_FLAG
+ * o |
+ * nflags
*
* h |
* e | size of the file header, 4bytes
@@ -80,45 +78,36 @@ public final class FormatSpec {
* s
*
* f |
- * o | IF SUPPORTS_DYNAMIC_UPDATE (defined in the file header)
- * r | forward link address, 3byte
- * w | 1 byte = bbbbbbbb match
- * a | case 1xxxxxxx => -((xxxxxxx << 16) + (next byte << 8) + next byte)
- * r | otherwise => (xxxxxxx << 16) + (next byte << 8) + next byte
- * d |
- * linkaddress
+ * o | forward link address, 3byte
+ * r | 1 byte = bbbbbbbb match
+ * w | case 1xxxxxxx => -((xxxxxxx << 16) + (next byte << 8) + next byte)
+ * a | otherwise => (xxxxxxx << 16) + (next byte << 8) + next byte
+ * r |
+ * dlinkaddress
*/
/* Node (FusionDictionary.PtNode) layout is as follows:
- * | IF !SUPPORTS_DYNAMIC_UPDATE
- * | addressType xx : mask with MASK_CHILDREN_ADDRESS_TYPE
- * | 2 bits, 00 = no children : FLAG_CHILDREN_ADDRESS_TYPE_NOADDRESS
- * f | 01 = 1 byte : FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE
- * l | 10 = 2 bytes : FLAG_CHILDREN_ADDRESS_TYPE_TWOBYTES
- * a | 11 = 3 bytes : FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES
- * g | ELSE
- * s | is moved ? 2 bits, 11 = no : FLAG_IS_NOT_MOVED
- * | This must be the same as FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES
- * | 01 = yes : FLAG_IS_MOVED
- * | the new address is stored in the same place as the parent address
- * | is deleted? 10 = yes : FLAG_IS_DELETED
- * | has several chars ? 1 bit, 1 = yes, 0 = no : FLAG_HAS_MULTIPLE_CHARS
- * | has a terminal ? 1 bit, 1 = yes, 0 = no : FLAG_IS_TERMINAL
- * | has shortcut targets ? 1 bit, 1 = yes, 0 = no : FLAG_HAS_SHORTCUT_TARGETS
+ * | is moved ? 2 bits, 11 = no : FLAG_IS_NOT_MOVED
+ * | This must be the same as FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES
+ * | 01 = yes : FLAG_IS_MOVED
+ * f | the new address is stored in the same place as the parent address
+ * l | is deleted? 10 = yes : FLAG_IS_DELETED
+ * a | has several chars ? 1 bit, 1 = yes, 0 = no : FLAG_HAS_MULTIPLE_CHARS
+ * g | has a terminal ? 1 bit, 1 = yes, 0 = no : FLAG_IS_TERMINAL
+ * s | has shortcut targets ? 1 bit, 1 = yes, 0 = no : FLAG_HAS_SHORTCUT_TARGETS
* | has bigrams ? 1 bit, 1 = yes, 0 = no : FLAG_HAS_BIGRAMS
* | is not a word ? 1 bit, 1 = yes, 0 = no : FLAG_IS_NOT_A_WORD
* | is blacklisted ? 1 bit, 1 = yes, 0 = no : FLAG_IS_BLACKLISTED
*
* p |
- * a | IF SUPPORTS_DYNAMIC_UPDATE (defined in the file header)
- * r | parent address, 3byte
- * e | 1 byte = bbbbbbbb match
- * n | case 1xxxxxxx => -((0xxxxxxx << 16) + (next byte << 8) + next byte)
- * t | otherwise => (bbbbbbbb << 16) + (next byte << 8) + next byte
- * a | This address is relative to the head of the PtNode.
- * d | If the node doesn't have a parent, this field is set to 0.
+ * a | parent address, 3byte
+ * r | 1 byte = bbbbbbbb match
+ * e | case 1xxxxxxx => -((0xxxxxxx << 16) + (next byte << 8) + next byte)
+ * n | otherwise => (bbbbbbbb << 16) + (next byte << 8) + next byte
+ * t | This address is relative to the head of the PtNode.
+ * a | If the node doesn't have a parent, this field is set to 0.
* d |
- * ress
+ * dress
*
* c | IF FLAG_HAS_MULTIPLE_CHARS
* h | char, char, char, char n * (1 or 3 bytes) : use PtNodeInfo for i/o helpers
@@ -132,23 +121,16 @@ public final class FormatSpec {
* e | frequency 1 byte
* q |
*
- * c | IF SUPPORTS_DYNAMIC_UPDATE
- * h | children address, 3 bytes
- * i | 1 byte = bbbbbbbb match
- * l | case 1xxxxxxx => -((0xxxxxxx << 16) + (next byte << 8) + next byte)
- * d | otherwise => (bbbbbbbb<<16) + (next byte << 8) + next byte
- * r | if this node doesn't have children, this field is set to 0.
- * e | (see BinaryDictEncoderUtils#writeVariableSignedAddress)
- * n | ELSIF 00 = FLAG_CHILDREN_ADDRESS_TYPE_NOADDRESS == addressType
- * a | // nothing
- * d | ELSIF 01 = FLAG_CHILDREN_ADDRESS_TYPE_ONEBYTE == addressType
- * d | children address, 1 byte
- * r | ELSIF 10 = FLAG_CHILDREN_ADDRESS_TYPE_TWOBYTES == addressType
- * e | children address, 2 bytes
- * s | ELSE // 11 = FLAG_CHILDREN_ADDRESS_TYPE_THREEBYTES = addressType
- * s | children address, 3 bytes
- * | END
- * | This address is relative to the position of this field.
+ * c |
+ * h | children address, 3 bytes
+ * i | 1 byte = bbbbbbbb match
+ * l | case 1xxxxxxx => -((0xxxxxxx << 16) + (next byte << 8) + next byte)
+ * d | otherwise => (bbbbbbbb<<16) + (next byte << 8) + next byte
+ * r | if this node doesn't have children, this field is set to 0.
+ * e | (see BinaryDictEncoderUtils#writeVariableSignedAddress)
+ * n | This address is relative to the position of this field.
+ * a |
+ * ddress
*
* | IF FLAG_IS_TERMINAL && FLAG_HAS_SHORTCUT_TARGETS
* | shortcut string list
@@ -197,20 +179,23 @@ public final class FormatSpec {
*/
public static final int MAGIC_NUMBER = 0x9BC13AFE;
- static final int MINIMUM_SUPPORTED_VERSION = 2;
- static final int MAXIMUM_SUPPORTED_VERSION = 4;
static final int NOT_A_VERSION_NUMBER = -1;
static final int FIRST_VERSION_WITH_DYNAMIC_UPDATE = 3;
static final int FIRST_VERSION_WITH_TERMINAL_ID = 4;
- static final int VERSION3 = 3;
- static final int VERSION4 = 4;
+
+ // These MUST have the same values as the relevant constants in format_utils.h.
+ // From version 4 on, we use version * 100 + revision as a version number. That allows
+ // us to change the format during development while having testing devices remove
+ // older files with each upgrade, while still having a readable versioning scheme.
+ public static final int VERSION2 = 2;
+ public static final int VERSION3 = 3;
+ public static final int VERSION4 = 400;
+ static final int MINIMUM_SUPPORTED_VERSION = VERSION2;
+ static final int MAXIMUM_SUPPORTED_VERSION = VERSION4;
// These options need to be the same numeric values as the one in the native reading code.
- static final int GERMAN_UMLAUT_PROCESSING_FLAG = 0x1;
// TODO: Make the native reading code read this variable.
- static final int SUPPORTS_DYNAMIC_UPDATE = 0x2;
- static final int FRENCH_LIGATURE_PROCESSING_FLAG = 0x4;
- static final int CONTAINS_BIGRAMS_FLAG = 0x8;
+ static final int CONTAINS_TIMESTAMP_FLAG = 0x10;
// TODO: Make this value adaptative to content data, store it in the header, and
// use it in the reading code.
@@ -260,9 +245,12 @@ public final class FormatSpec {
static final int PTNODE_ATTRIBUTE_MAX_ADDRESS_SIZE = 3;
static final int PTNODE_SHORTCUT_LIST_SIZE_SIZE = 2;
- // These values are used only by version 4 or later.
+ // These values are used only by version 4 or later. They MUST match the definitions in
+ // ver4_dict_constants.cpp.
static final String TRIE_FILE_EXTENSION = ".trie";
+ public static final String HEADER_FILE_EXTENSION = ".header";
static final String FREQ_FILE_EXTENSION = ".freq";
+ static final String UNIGRAM_TIMESTAMP_FILE_EXTENSION = ".timestamp";
// tat = Terminal Address Table
static final String TERMINAL_ADDRESS_TABLE_FILE_EXTENSION = ".tat";
static final String BIGRAM_FILE_EXTENSION = ".bigram";
@@ -271,19 +259,25 @@ public final class FormatSpec {
static final String CONTENT_TABLE_FILE_SUFFIX = "_index";
static final int FREQUENCY_AND_FLAGS_SIZE = 2;
static final int TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE = 3;
+ static final int UNIGRAM_TIMESTAMP_SIZE = 4;
// With the English main dictionary as of October 2013, the size of bigram address table is
- // is 584KB with the block size being 4.
- // This is 91% of that of full address table.
- static final int BIGRAM_ADDRESS_TABLE_BLOCK_SIZE = 4;
- static final int BIGRAM_CONTENT_COUNT = 1;
+ // is 345KB with the block size being 16.
+ // This is 54% of that of full address table.
+ static final int BIGRAM_ADDRESS_TABLE_BLOCK_SIZE = 16;
+ static final int BIGRAM_CONTENT_COUNT = 2;
static final int BIGRAM_FREQ_CONTENT_INDEX = 0;
+ static final int BIGRAM_TIMESTAMP_CONTENT_INDEX = 1;
static final String BIGRAM_FREQ_CONTENT_ID = "_freq";
+ static final String BIGRAM_TIMESTAMP_CONTENT_ID = "_timestamp";
+ static final int BIGRAM_TIMESTAMP_SIZE = 4;
+ static final int BIGRAM_COUNTER_SIZE = 1;
+ static final int BIGRAM_LEVEL_SIZE = 1;
static final int SHORTCUT_CONTENT_COUNT = 1;
static final int SHORTCUT_CONTENT_INDEX = 0;
// With the English main dictionary as of October 2013, the size of shortcut address table is
- // 29KB with the block size being 64.
+ // 26KB with the block size being 64.
// This is only 4.4% of that of full address table.
static final int SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE = 64;
static final String SHORTCUT_CONTENT_ID = "_shortcut";
@@ -294,6 +288,8 @@ public final class FormatSpec {
static final int INVALID_CHARACTER = -1;
static final int MAX_PTNODES_FOR_ONE_BYTE_PTNODE_COUNT = 0x7F; // 127
+ // Large PtNode array size field size is 2 bytes.
+ static final int LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG = 0x8000;
static final int MAX_PTNODES_IN_A_PT_NODE_ARRAY = 0x7FFF; // 32767
static final int MAX_BIGRAMS_IN_A_PTNODE = 10000;
static final int MAX_SHORTCUT_LIST_SIZE_IN_A_PTNODE = 0xFFFF;
@@ -319,22 +315,22 @@ public final class FormatSpec {
*/
public static final class FormatOptions {
public final int mVersion;
- public final boolean mSupportsDynamicUpdate;
public final boolean mHasTerminalId;
+ public final boolean mHasTimestamp;
+
@UsedForTesting
public FormatOptions(final int version) {
- this(version, false);
+ this(version, false /* hasTimestamp */);
}
- @UsedForTesting
- public FormatOptions(final int version, final boolean supportsDynamicUpdate) {
+ public FormatOptions(final int version, final boolean hasTimestamp) {
mVersion = version;
- if (version < FIRST_VERSION_WITH_DYNAMIC_UPDATE && supportsDynamicUpdate) {
- throw new RuntimeException("Dynamic updates are only supported with versions "
- + FIRST_VERSION_WITH_DYNAMIC_UPDATE + " and ulterior.");
- }
- mSupportsDynamicUpdate = supportsDynamicUpdate;
mHasTerminalId = (version >= FIRST_VERSION_WITH_TERMINAL_ID);
+ mHasTimestamp = hasTimestamp;
+ }
+
+ public boolean supportsDynamicUpdate() {
+ return mVersion >= FIRST_VERSION_WITH_DYNAMIC_UPDATE;
}
}
@@ -342,13 +338,13 @@ public final class FormatSpec {
* Class representing file header.
*/
public static final class FileHeader {
- public final int mHeaderSize;
+ public final int mBodyOffset;
public final DictionaryOptions mDictionaryOptions;
public final FormatOptions mFormatOptions;
// Note that these are corresponding definitions in native code in latinime::HeaderPolicy
// and latinime::HeaderReadWriteUtils.
- public static final String SUPPORTS_DYNAMIC_UPDATE_ATTRIBUTE = "SUPPORTS_DYNAMIC_UPDATE";
public static final String USES_FORGETTING_CURVE_ATTRIBUTE = "USES_FORGETTING_CURVE";
+ public static final String HAS_HISTORICAL_INFO_ATTRIBUTE = "HAS_HISTORICAL_INFO";
public static final String ATTRIBUTE_VALUE_TRUE = "1";
public static final String DICTIONARY_VERSION_ATTRIBUTE = "version";
@@ -357,9 +353,18 @@ public final class FormatSpec {
private static final String DICTIONARY_DESCRIPTION_ATTRIBUTE = "description";
public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions,
final FormatOptions formatOptions) {
- mHeaderSize = headerSize;
mDictionaryOptions = dictionaryOptions;
mFormatOptions = formatOptions;
+ mBodyOffset = formatOptions.mVersion < VERSION4 ? headerSize : 0;
+ if (null == getLocaleString()) {
+ throw new RuntimeException("Cannot create a FileHeader without a locale");
+ }
+ if (null == getVersion()) {
+ throw new RuntimeException("Cannot create a FileHeader without a version");
+ }
+ if (null == getId()) {
+ throw new RuntimeException("Cannot create a FileHeader without an ID");
+ }
}
// Helper method to get the locale as a String
diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 3bb218bea..fdf2ae7b5 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -303,14 +303,9 @@ public final class FusionDictionary implements Iterable<Word> {
* Options global to the dictionary.
*/
public static final class DictionaryOptions {
- public final boolean mGermanUmlautProcessing;
- public final boolean mFrenchLigatureProcessing;
public final HashMap<String, String> mAttributes;
- public DictionaryOptions(final HashMap<String, String> attributes,
- final boolean germanUmlautProcessing, final boolean frenchLigatureProcessing) {
+ public DictionaryOptions(final HashMap<String, String> attributes) {
mAttributes = attributes;
- mGermanUmlautProcessing = germanUmlautProcessing;
- mFrenchLigatureProcessing = frenchLigatureProcessing;
}
@Override
public String toString() { // Convenience method
@@ -339,14 +334,6 @@ public final class FusionDictionary implements Iterable<Word> {
}
s.append("\n");
}
- if (mGermanUmlautProcessing) {
- s.append(indent);
- s.append("Needs German umlaut processing\n");
- }
- if (mFrenchLigatureProcessing) {
- s.append(indent);
- s.append("Needs French ligature processing\n");
- }
return s.toString();
}
}
@@ -701,138 +688,6 @@ public final class FusionDictionary implements Iterable<Word> {
}
/**
- * Recursively count the number of nodes in a given branch of the trie.
- *
- * @param nodeArray the node array to count.
- * @return the number of nodes in this branch.
- */
- public static int countNodeArrays(final PtNodeArray nodeArray) {
- int size = 1;
- for (int i = nodeArray.mData.size() - 1; i >= 0; --i) {
- PtNode ptNode = nodeArray.mData.get(i);
- if (null != ptNode.mChildren)
- size += countNodeArrays(ptNode.mChildren);
- }
- return size;
- }
-
- // Recursively find out whether there are any bigrams.
- // This can be pretty expensive especially if there aren't any (we return as soon
- // as we find one, so it's much cheaper if there are bigrams)
- private static boolean hasBigramsInternal(final PtNodeArray nodeArray) {
- if (null == nodeArray) return false;
- for (int i = nodeArray.mData.size() - 1; i >= 0; --i) {
- PtNode ptNode = nodeArray.mData.get(i);
- if (null != ptNode.mBigrams) return true;
- if (hasBigramsInternal(ptNode.mChildren)) return true;
- }
- return false;
- }
-
- /**
- * Finds out whether there are any bigrams in this dictionary.
- *
- * @return true if there is any bigram, false otherwise.
- */
- // TODO: this is expensive especially for large dictionaries without any bigram.
- // The up side is, this is always accurate and correct and uses no memory. We should
- // find a more efficient way of doing this, without compromising too much on memory
- // and ease of use.
- public boolean hasBigrams() {
- return hasBigramsInternal(mRootNodeArray);
- }
-
- // Historically, the tails of the words were going to be merged to save space.
- // However, that would prevent the code to search for a specific address in log(n)
- // time so this was abandoned.
- // The code is still of interest as it does add some compression to any dictionary
- // that has no need for attributes. Implementations that does not read attributes should be
- // able to read a dictionary with merged tails.
- // Also, the following code does support frequencies, as in, it will only merges
- // tails that share the same frequency. Though it would result in the above loss of
- // performance while searching by address, it is still technically possible to merge
- // tails that contain attributes, but this code does not take that into account - it does
- // not compare attributes and will merge terminals with different attributes regardless.
- public void mergeTails() {
- MakedictLog.i("Do not merge tails");
- return;
-
-// MakedictLog.i("Merging PtNodes. Number of PtNodes : " + countPtNodes(root));
-// MakedictLog.i("Number of PtNodes : " + countPtNodes(root));
-//
-// final HashMap<String, ArrayList<PtNodeArray>> repository =
-// new HashMap<String, ArrayList<PtNodeArray>>();
-// mergeTailsInner(repository, root);
-//
-// MakedictLog.i("Number of different pseudohashes : " + repository.size());
-// int size = 0;
-// for (ArrayList<PtNodeArray> a : repository.values()) {
-// size += a.size();
-// }
-// MakedictLog.i("Number of nodes after merge : " + (1 + size));
-// MakedictLog.i("Recursively seen nodes : " + countNodes(root));
- }
-
- // The following methods are used by the deactivated mergeTails()
-// private static boolean isEqual(PtNodeArray a, PtNodeArray b) {
-// if (null == a && null == b) return true;
-// if (null == a || null == b) return false;
-// if (a.data.size() != b.data.size()) return false;
-// final int size = a.data.size();
-// for (int i = size - 1; i >= 0; --i) {
-// PtNode aPtNode = a.data.get(i);
-// PtNode bPtNode = b.data.get(i);
-// if (aPtNode.frequency != bPtNode.frequency) return false;
-// if (aPtNode.alternates == null && bPtNode.alternates != null) return false;
-// if (aPtNode.alternates != null && !aPtNode.equals(bPtNode.alternates)) return false;
-// if (!Arrays.equals(aPtNode.chars, bPtNode.chars)) return false;
-// if (!isEqual(aPtNode.children, bPtNode.children)) return false;
-// }
-// return true;
-// }
-
-// static private HashMap<String, ArrayList<PtNodeArray>> mergeTailsInner(
-// final HashMap<String, ArrayList<PtNodeArray>> map, final PtNodeArray nodeArray) {
-// final ArrayList<PtNode> branches = nodeArray.data;
-// final int nodeSize = branches.size();
-// for (int i = 0; i < nodeSize; ++i) {
-// PtNode ptNode = branches.get(i);
-// if (null != ptNode.children) {
-// String pseudoHash = getPseudoHash(ptNode.children);
-// ArrayList<PtNodeArray> similarList = map.get(pseudoHash);
-// if (null == similarList) {
-// similarList = new ArrayList<PtNodeArray>();
-// map.put(pseudoHash, similarList);
-// }
-// boolean merged = false;
-// for (PtNodeArray similar : similarList) {
-// if (isEqual(ptNode.children, similar)) {
-// ptNode.children = similar;
-// merged = true;
-// break;
-// }
-// }
-// if (!merged) {
-// similarList.add(ptNode.children);
-// }
-// mergeTailsInner(map, ptNode.children);
-// }
-// }
-// return map;
-// }
-
-// private static String getPseudoHash(final PtNodeArray nodeArray) {
-// StringBuilder s = new StringBuilder();
-// for (PtNode ptNode : nodeArray.data) {
-// s.append(ptNode.frequency);
-// for (int ch : ptNode.chars) {
-// s.append(Character.toChars(ch));
-// }
-// }
-// return s.toString();
-// }
-
- /**
* Iterator to walk through a dictionary.
*
* This is purely for convenience.
diff --git a/java/src/com/android/inputmethod/latin/makedict/SparseTableContentReader.java b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentReader.java
new file mode 100644
index 000000000..06088b651
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentReader.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin.makedict;
+
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.DictBuffer;
+import com.android.inputmethod.latin.makedict.DictDecoder.DictionaryBufferFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * An auxiliary class for reading SparseTable and data written by SparseTableContentWriter.
+ */
+public class SparseTableContentReader {
+
+ /**
+ * An interface of a function which is passed to SparseTableContentReader.read.
+ */
+ public interface SparseTableContentReaderInterface {
+ /**
+ * Reads data.
+ *
+ * @param buffer the DictBuffer. The position of the buffer is set to the head of data.
+ */
+ public void read(final DictBuffer buffer);
+ }
+
+ protected final int mContentCount;
+ protected final int mBlockSize;
+ protected final File mBaseDir;
+ protected final File mLookupTableFile;
+ protected final File[] mAddressTableFiles;
+ protected final File[] mContentFiles;
+ protected DictBuffer mLookupTableBuffer;
+ protected final DictBuffer[] mAddressTableBuffers;
+ private final DictBuffer[] mContentBuffers;
+ protected final DictionaryBufferFactory mFactory;
+
+ /**
+ * Sole constructor of SparseTableContentReader.
+ *
+ * @param name the name of SparseTable.
+ * @param blockSize the block size of the content table.
+ * @param baseDir the directory which contains the files of the content table.
+ * @param contentFilenames the file names of content files.
+ * @param contentIds the ids of contents. These ids are used for a suffix of a name of
+ * address files and content files.
+ * @param factory the DictionaryBufferFactory which is used for opening the files.
+ */
+ public SparseTableContentReader(final String name, final int blockSize, final File baseDir,
+ final String[] contentFilenames, final String[] contentIds,
+ final DictionaryBufferFactory factory) {
+ if (contentFilenames.length != contentIds.length) {
+ throw new RuntimeException("The length of contentFilenames and the length of"
+ + " contentIds are different " + contentFilenames.length + ", "
+ + contentIds.length);
+ }
+ mBlockSize = blockSize;
+ mBaseDir = baseDir;
+ mFactory = factory;
+ mContentCount = contentFilenames.length;
+ mLookupTableFile = new File(baseDir, name + FormatSpec.LOOKUP_TABLE_FILE_SUFFIX);
+ mAddressTableFiles = new File[mContentCount];
+ mContentFiles = new File[mContentCount];
+ for (int i = 0; i < mContentCount; ++i) {
+ mAddressTableFiles[i] = new File(mBaseDir,
+ name + FormatSpec.CONTENT_TABLE_FILE_SUFFIX + contentIds[i]);
+ mContentFiles[i] = new File(mBaseDir, contentFilenames[i] + contentIds[i]);
+ }
+ mAddressTableBuffers = new DictBuffer[mContentCount];
+ mContentBuffers = new DictBuffer[mContentCount];
+ }
+
+ public void openBuffers() throws FileNotFoundException, IOException {
+ mLookupTableBuffer = mFactory.getDictionaryBuffer(mLookupTableFile);
+ for (int i = 0; i < mContentCount; ++i) {
+ mAddressTableBuffers[i] = mFactory.getDictionaryBuffer(mAddressTableFiles[i]);
+ mContentBuffers[i] = mFactory.getDictionaryBuffer(mContentFiles[i]);
+ }
+ }
+
+ protected void read(final int contentIndex, final int index,
+ final SparseTableContentReaderInterface reader) {
+ if (index < 0 || (index / mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES
+ >= mLookupTableBuffer.limit()) {
+ return;
+ }
+
+ mLookupTableBuffer.position((index / mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES);
+ final int posInAddressTable = mLookupTableBuffer.readInt();
+ if (posInAddressTable == SparseTable.NOT_EXIST) {
+ return;
+ }
+
+ mAddressTableBuffers[contentIndex].position(
+ (posInAddressTable + index % mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES);
+ final int address = mAddressTableBuffers[contentIndex].readInt();
+ if (address == SparseTable.NOT_EXIST) {
+ return;
+ }
+
+ mContentBuffers[contentIndex].position(address);
+ reader.read(mContentBuffers[contentIndex]);
+ }
+} \ No newline at end of file
diff --git a/java/src/com/android/inputmethod/latin/makedict/SparseTableContentUpdater.java b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentUpdater.java
new file mode 100644
index 000000000..4518f21b9
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentUpdater.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin.makedict;
+
+import com.android.inputmethod.latin.makedict.DictDecoder.DictionaryBufferFactory;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * An auxiliary class for updating data associated with SparseTable.
+ */
+public class SparseTableContentUpdater extends SparseTableContentReader {
+ protected OutputStream mLookupTableOutStream;
+ protected OutputStream[] mAddressTableOutStreams;
+ protected OutputStream[] mContentOutStreams;
+
+ public SparseTableContentUpdater(final String name, final int blockSize,
+ final File baseDir, final String[] contentFilenames, final String[] contentIds,
+ final DictionaryBufferFactory factory) {
+ super(name, blockSize, baseDir, contentFilenames, contentIds, factory);
+ mAddressTableOutStreams = new OutputStream[mContentCount];
+ mContentOutStreams = new OutputStream[mContentCount];
+ }
+
+ protected void openStreamsAndBuffers() throws IOException {
+ openBuffers();
+ mLookupTableOutStream = new FileOutputStream(mLookupTableFile, true /* append */);
+ for (int i = 0; i < mContentCount; ++i) {
+ mAddressTableOutStreams[i] = new FileOutputStream(mAddressTableFiles[i],
+ true /* append */);
+ mContentOutStreams[i] = new FileOutputStream(mContentFiles[i], true /* append */);
+ }
+ }
+
+ /**
+ * Set the contentIndex-th elements of contentId-th table.
+ *
+ * @param contentId the id of the content table.
+ * @param contentIndex the index where to set the valie.
+ * @param value the value to set.
+ */
+ protected void setContentValue(final int contentId, final int contentIndex, final int value)
+ throws IOException {
+ if ((contentIndex / mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES
+ >= mLookupTableBuffer.limit()) {
+ // Need to extend the lookup table
+ final int currentSize = mLookupTableBuffer.limit()
+ / SparseTable.SIZE_OF_INT_IN_BYTES;
+ final int target = contentIndex / mBlockSize + 1;
+ for (int i = currentSize; i < target; ++i) {
+ BinaryDictEncoderUtils.writeUIntToStream(mLookupTableOutStream,
+ SparseTable.NOT_EXIST, SparseTable.SIZE_OF_INT_IN_BYTES);
+ }
+ // We need to reopen the byte buffer of the lookup table because a MappedByteBuffer in
+ // Java isn't expanded automatically when the underlying file is expanded.
+ reopenLookupTable();
+ }
+
+ mLookupTableBuffer.position((contentIndex / mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES);
+ int posInAddressTable = mLookupTableBuffer.readInt();
+ if (posInAddressTable == SparseTable.NOT_EXIST) {
+ // Need to extend the address table
+ mLookupTableBuffer.position(mLookupTableBuffer.position()
+ - SparseTable.SIZE_OF_INT_IN_BYTES);
+ posInAddressTable = mAddressTableBuffers[0].limit() / mBlockSize;
+ BinaryDictEncoderUtils.writeUIntToDictBuffer(mLookupTableBuffer,
+ posInAddressTable, SparseTable.SIZE_OF_INT_IN_BYTES);
+ for (int i = 0; i < mContentCount; ++i) {
+ for (int j = 0; j < mBlockSize; ++j) {
+ BinaryDictEncoderUtils.writeUIntToStream(mAddressTableOutStreams[i],
+ SparseTable.NOT_EXIST, SparseTable.SIZE_OF_INT_IN_BYTES);
+ }
+ }
+ // We need to reopen the byte buffers of the address tables because a MappedByteBuffer
+ // in Java isn't expanded automatically when the underlying file is expanded.
+ reopenAddressTables();
+ }
+ posInAddressTable += (contentIndex % mBlockSize) * SparseTable.SIZE_OF_INT_IN_BYTES;
+
+ mAddressTableBuffers[contentId].position(posInAddressTable);
+ BinaryDictEncoderUtils.writeUIntToDictBuffer(mAddressTableBuffers[contentId],
+ value, SparseTable.SIZE_OF_INT_IN_BYTES);
+ }
+
+ private void reopenLookupTable() throws IOException {
+ mLookupTableOutStream.flush();
+ mLookupTableBuffer = mFactory.getDictionaryBuffer(mLookupTableFile);
+ }
+
+ private void reopenAddressTables() throws IOException {
+ for (int i = 0; i < mContentCount; ++i) {
+ mAddressTableOutStreams[i].flush();
+ mAddressTableBuffers[i] = mFactory.getDictionaryBuffer(mAddressTableFiles[i]);
+ }
+ }
+
+ protected void close() throws IOException {
+ mLookupTableOutStream.close();
+ for (final OutputStream stream : mAddressTableOutStreams) {
+ stream.close();
+ }
+ for (final OutputStream stream : mContentOutStreams) {
+ stream.close();
+ }
+ }
+}
diff --git a/java/src/com/android/inputmethod/latin/makedict/SparseTableContentWriter.java b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentWriter.java
new file mode 100644
index 000000000..49f0fd624
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/makedict/SparseTableContentWriter.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin.makedict;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * An auxiliary class for writing data associated with SparseTable to files.
+ */
+public class SparseTableContentWriter {
+ public interface SparseTableContentWriterInterface {
+ public void write(final OutputStream outStream) throws IOException;
+ }
+
+ private final int mContentCount;
+ private final SparseTable mSparseTable;
+ private final File mLookupTableFile;
+ protected final File mBaseDir;
+ private final File[] mAddressTableFiles;
+ private final File[] mContentFiles;
+ protected final OutputStream[] mContentOutStreams;
+
+ /**
+ * Sole constructor of SparseTableContentWriter.
+ *
+ * @param name the name of SparseTable.
+ * @param initialCapacity the initial capacity of SparseTable.
+ * @param blockSize the block size of the content table.
+ * @param baseDir the directory which contains the files of the content table.
+ * @param contentFilenames the file names of content files.
+ * @param contentIds the ids of contents. These ids are used for a suffix of a name of address
+ * files and content files.
+ */
+ public SparseTableContentWriter(final String name, final int initialCapacity,
+ final int blockSize, final File baseDir, final String[] contentFilenames,
+ final String[] contentIds) {
+ if (contentFilenames.length != contentIds.length) {
+ throw new RuntimeException("The length of contentFilenames and the length of"
+ + " contentIds are different " + contentFilenames.length + ", "
+ + contentIds.length);
+ }
+ mContentCount = contentFilenames.length;
+ mSparseTable = new SparseTable(initialCapacity, blockSize, mContentCount);
+ mLookupTableFile = new File(baseDir, name + FormatSpec.LOOKUP_TABLE_FILE_SUFFIX);
+ mAddressTableFiles = new File[mContentCount];
+ mContentFiles = new File[mContentCount];
+ mBaseDir = baseDir;
+ for (int i = 0; i < mContentCount; ++i) {
+ mAddressTableFiles[i] = new File(mBaseDir,
+ name + FormatSpec.CONTENT_TABLE_FILE_SUFFIX + contentIds[i]);
+ mContentFiles[i] = new File(mBaseDir, contentFilenames[i] + contentIds[i]);
+ }
+ mContentOutStreams = new OutputStream[mContentCount];
+ }
+
+ public void openStreams() throws FileNotFoundException {
+ for (int i = 0; i < mContentCount; ++i) {
+ mContentOutStreams[i] = new FileOutputStream(mContentFiles[i]);
+ }
+ }
+
+ protected void write(final int contentIndex, final int index,
+ final SparseTableContentWriterInterface writer) throws IOException {
+ mSparseTable.set(contentIndex, index, (int) mContentFiles[contentIndex].length());
+ writer.write(mContentOutStreams[contentIndex]);
+ mContentOutStreams[contentIndex].flush();
+ }
+
+ public void closeStreams() throws IOException {
+ mSparseTable.writeToFiles(mLookupTableFile, mAddressTableFiles);
+ for (int i = 0; i < mContentCount; ++i) {
+ mContentOutStreams[i].close();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver3DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver3DictEncoder.java
index d9e19899c..92eb861d6 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver3DictEncoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver3DictEncoder.java
@@ -129,7 +129,9 @@ public class Ver3DictEncoder implements DictEncoder {
if (countSize != 1 && countSize != 2) {
throw new RuntimeException("Strange size from getGroupCountSize : " + countSize);
}
- mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, ptNodeCount,
+ final int encodedPtNodeCount = (countSize == 2) ?
+ (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount;
+ mPosition = BinaryDictEncoderUtils.writeUIntToBuffer(mBuffer, mPosition, encodedPtNodeCount,
countSize);
}
@@ -167,7 +169,7 @@ public class Ver3DictEncoder implements DictEncoder {
private void writeChildrenPosition(final PtNode ptNode, final FormatOptions formatOptions) {
final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode, formatOptions);
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
mPosition += BinaryDictEncoderUtils.writeSignedChildrenPosition(mBuffer, mPosition,
childrenPos);
} else {
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
index 53729075f..3be62f066 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
@@ -40,26 +40,52 @@ import java.util.Arrays;
public class Ver4DictDecoder extends AbstractDictDecoder {
private static final String TAG = Ver4DictDecoder.class.getSimpleName();
- private static final int FILETYPE_TRIE = 1;
- private static final int FILETYPE_FREQUENCY = 2;
- private static final int FILETYPE_TERMINAL_ADDRESS_TABLE = 3;
- private static final int FILETYPE_BIGRAM_FREQ = 4;
- private static final int FILETYPE_SHORTCUT = 5;
-
- private final File mDictDirectory;
- private final DictionaryBufferFactory mBufferFactory;
+ protected static final int FILETYPE_TRIE = 1;
+ protected static final int FILETYPE_FREQUENCY = 2;
+ protected static final int FILETYPE_TERMINAL_ADDRESS_TABLE = 3;
+ protected static final int FILETYPE_BIGRAM_FREQ = 4;
+ protected static final int FILETYPE_SHORTCUT = 5;
+ protected static final int FILETYPE_HEADER = 6;
+
+ protected final File mDictDirectory;
+ protected final DictionaryBufferFactory mBufferFactory;
protected DictBuffer mDictBuffer;
- private DictBuffer mFrequencyBuffer;
- private DictBuffer mTerminalAddressTableBuffer;
- private DictBuffer mBigramBuffer;
- private DictBuffer mShortcutBuffer;
- private SparseTable mBigramAddressTable;
- private SparseTable mShortcutAddressTable;
+ protected DictBuffer mHeaderBuffer;
+ protected DictBuffer mFrequencyBuffer;
+ protected DictBuffer mTerminalAddressTableBuffer;
+ private BigramContentReader mBigramReader;
+ private ShortcutContentReader mShortcutReader;
+
+ /**
+ * Raw PtNode info straight out of a trie file in version 4 dictionary.
+ */
+ protected static final class Ver4PtNodeInfo {
+ public final int mFlags;
+ public final int[] mCharacters;
+ public final int mTerminalId;
+ public final int mChildrenPos;
+ public final int mParentPos;
+ public final int mNodeSize;
+ public int mStartIndexOfCharacters;
+ public int mEndIndexOfCharacters; // exclusive
+
+ public Ver4PtNodeInfo(final int flags, final int[] characters, final int terminalId,
+ final int childrenPos, final int parentPos, final int nodeSize) {
+ mFlags = flags;
+ mCharacters = characters;
+ mTerminalId = terminalId;
+ mChildrenPos = childrenPos;
+ mParentPos = parentPos;
+ mNodeSize = nodeSize;
+ mStartIndexOfCharacters = 0;
+ mEndIndexOfCharacters = characters.length;
+ }
+ }
@UsedForTesting
/* package */ Ver4DictDecoder(final File dictDirectory, final int factoryFlag) {
mDictDirectory = dictDirectory;
- mDictBuffer = mFrequencyBuffer = null;
+ mDictBuffer = mHeaderBuffer = mFrequencyBuffer = null;
if ((factoryFlag & MASK_DICTBUFFER) == USE_READONLY_BYTEBUFFER) {
mBufferFactory = new DictionaryBufferFromReadOnlyByteBufferFactory();
@@ -76,13 +102,16 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
/* package */ Ver4DictDecoder(final File dictDirectory, final DictionaryBufferFactory factory) {
mDictDirectory = dictDirectory;
mBufferFactory = factory;
- mDictBuffer = mFrequencyBuffer = null;
+ mDictBuffer = mHeaderBuffer = mFrequencyBuffer = null;
}
- private File getFile(final int fileType) {
+ protected File getFile(final int fileType) throws UnsupportedFormatException {
if (fileType == FILETYPE_TRIE) {
return new File(mDictDirectory,
mDictDirectory.getName() + FormatSpec.TRIE_FILE_EXTENSION);
+ } else if (fileType == FILETYPE_HEADER) {
+ return new File(mDictDirectory,
+ mDictDirectory.getName() + FormatSpec.HEADER_FILE_EXTENSION);
} else if (fileType == FILETYPE_FREQUENCY) {
return new File(mDictDirectory,
mDictDirectory.getName() + FormatSpec.FREQ_FILE_EXTENSION);
@@ -98,20 +127,27 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
mDictDirectory.getName() + FormatSpec.SHORTCUT_FILE_EXTENSION
+ FormatSpec.SHORTCUT_CONTENT_ID);
} else {
- throw new RuntimeException("Unsupported kind of file : " + fileType);
+ throw new UnsupportedFormatException("Unsupported kind of file : " + fileType);
}
}
@Override
- public void openDictBuffer() throws FileNotFoundException, IOException {
+ public void openDictBuffer() throws FileNotFoundException, IOException,
+ UnsupportedFormatException {
+ if (!mDictDirectory.isDirectory()) {
+ throw new UnsupportedFormatException("Format 4 dictionary needs a directory");
+ }
+ mHeaderBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_HEADER));
mDictBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_TRIE));
mFrequencyBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_FREQUENCY));
mTerminalAddressTableBuffer = mBufferFactory.getDictionaryBuffer(
getFile(FILETYPE_TERMINAL_ADDRESS_TABLE));
- mBigramBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_BIGRAM_FREQ));
- loadBigramAddressSparseTable();
- mShortcutBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_SHORTCUT));
- loadShortcutAddressSparseTable();
+ mBigramReader = new BigramContentReader(mDictDirectory.getName(),
+ mDictDirectory, mBufferFactory, false);
+ mBigramReader.openBuffers();
+ mShortcutReader = new ShortcutContentReader(mDictDirectory.getName(), mDictDirectory,
+ mBufferFactory);
+ mShortcutReader.openBuffers();
}
@Override
@@ -119,42 +155,134 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
return mDictBuffer != null;
}
+ @UsedForTesting
+ /* package */ DictBuffer getHeaderBuffer() {
+ return mHeaderBuffer;
+ }
+
+ @UsedForTesting
/* package */ DictBuffer getDictBuffer() {
return mDictBuffer;
}
@Override
public FileHeader readHeader() throws IOException, UnsupportedFormatException {
- if (mDictBuffer == null) {
+ if (mHeaderBuffer == null) {
openDictBuffer();
}
- final FileHeader header = super.readHeader(mDictBuffer);
+ mHeaderBuffer.position(0);
+ final FileHeader header = super.readHeader(mHeaderBuffer);
final int version = header.mFormatOptions.mVersion;
- if (version != 4) {
+ if (version != FormatSpec.VERSION4) {
throw new UnsupportedFormatException("File header has a wrong version : " + version);
}
return header;
}
- private void loadBigramAddressSparseTable() throws IOException {
- final File lookupIndexFile = new File(mDictDirectory, mDictDirectory.getName()
- + FormatSpec.BIGRAM_FILE_EXTENSION + FormatSpec.LOOKUP_TABLE_FILE_SUFFIX);
- final File freqsFile = new File(mDictDirectory, mDictDirectory.getName()
- + FormatSpec.BIGRAM_FILE_EXTENSION + FormatSpec.CONTENT_TABLE_FILE_SUFFIX
- + FormatSpec.BIGRAM_FREQ_CONTENT_ID);
- mBigramAddressTable = SparseTable.readFromFiles(lookupIndexFile, new File[] { freqsFile },
- FormatSpec.BIGRAM_ADDRESS_TABLE_BLOCK_SIZE);
+ /**
+ * An auxiliary class for reading bigrams.
+ */
+ protected static class BigramContentReader extends SparseTableContentReader {
+ public BigramContentReader(final String name, final File baseDir,
+ final DictionaryBufferFactory factory, final boolean hasTimestamp) {
+ super(name + FormatSpec.BIGRAM_FILE_EXTENSION,
+ FormatSpec.BIGRAM_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ getContentFilenames(name, hasTimestamp), getContentIds(hasTimestamp), factory);
+ }
+
+ // TODO: Consolidate this method and BigramContentWriter.getContentFilenames.
+ protected static String[] getContentFilenames(final String name,
+ final boolean hasTimestamp) {
+ final String[] contentFilenames;
+ if (hasTimestamp) {
+ contentFilenames = new String[] { name + FormatSpec.BIGRAM_FILE_EXTENSION,
+ name + FormatSpec.BIGRAM_FILE_EXTENSION };
+ } else {
+ contentFilenames = new String[] { name + FormatSpec.BIGRAM_FILE_EXTENSION };
+ }
+ return contentFilenames;
+ }
+
+ // TODO: Consolidate this method and BigramContentWriter.getContentIds.
+ protected static String[] getContentIds(final boolean hasTimestamp) {
+ final String[] contentIds;
+ if (hasTimestamp) {
+ contentIds = new String[] { FormatSpec.BIGRAM_FREQ_CONTENT_ID,
+ FormatSpec.BIGRAM_TIMESTAMP_CONTENT_ID };
+ } else {
+ contentIds = new String[] { FormatSpec.BIGRAM_FREQ_CONTENT_ID };
+ }
+ return contentIds;
+ }
+
+ public ArrayList<PendingAttribute> readTargetsAndFrequencies(final int terminalId,
+ final DictBuffer terminalAddressTableBuffer) {
+ final ArrayList<PendingAttribute> bigrams = CollectionUtils.newArrayList();
+ read(FormatSpec.BIGRAM_FREQ_CONTENT_INDEX, terminalId,
+ new SparseTableContentReaderInterface() {
+ @Override
+ public void read(final DictBuffer buffer) {
+ while (bigrams.size() < FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
+ // If bigrams.size() reaches FormatSpec.MAX_BIGRAMS_IN_A_PTNODE,
+ // remaining bigram entries are ignored.
+ final int bigramFlags = buffer.readUnsignedByte();
+ final int targetTerminalId = buffer.readUnsignedInt24();
+ terminalAddressTableBuffer.position(targetTerminalId
+ * FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
+ final int targetAddress =
+ terminalAddressTableBuffer.readUnsignedInt24();
+ bigrams.add(new PendingAttribute(bigramFlags
+ & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY,
+ targetAddress));
+ if (0 == (bigramFlags
+ & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) {
+ break;
+ }
+ }
+ if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
+ throw new RuntimeException("Too many bigrams in a PtNode ("
+ + bigrams.size() + " but max is "
+ + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")");
+ }
+ }
+ });
+ if (bigrams.isEmpty()) return null;
+ return bigrams;
+ }
}
- // TODO: Let's have something like SparseTableContentsReader in this class.
- private void loadShortcutAddressSparseTable() throws IOException {
- final File lookupIndexFile = new File(mDictDirectory, mDictDirectory.getName()
- + FormatSpec.SHORTCUT_FILE_EXTENSION + FormatSpec.LOOKUP_TABLE_FILE_SUFFIX);
- final File contentFile = new File(mDictDirectory, mDictDirectory.getName()
- + FormatSpec.SHORTCUT_FILE_EXTENSION + FormatSpec.CONTENT_TABLE_FILE_SUFFIX
- + FormatSpec.SHORTCUT_CONTENT_ID);
- mShortcutAddressTable = SparseTable.readFromFiles(lookupIndexFile,
- new File[] { contentFile }, FormatSpec.SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE);
+ /**
+ * An auxiliary class for reading shortcuts.
+ */
+ protected static class ShortcutContentReader extends SparseTableContentReader {
+ public ShortcutContentReader(final String name, final File baseDir,
+ final DictionaryBufferFactory factory) {
+ super(name + FormatSpec.SHORTCUT_FILE_EXTENSION,
+ FormatSpec.SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ new String[] { name + FormatSpec.SHORTCUT_FILE_EXTENSION },
+ new String[] { FormatSpec.SHORTCUT_CONTENT_ID }, factory);
+ }
+
+ public ArrayList<WeightedString> readShortcuts(final int terminalId) {
+ final ArrayList<WeightedString> shortcuts = CollectionUtils.newArrayList();
+ read(FormatSpec.SHORTCUT_CONTENT_INDEX, terminalId,
+ new SparseTableContentReaderInterface() {
+ @Override
+ public void read(final DictBuffer buffer) {
+ while (true) {
+ final int flags = buffer.readUnsignedByte();
+ final String word = CharEncoding.readString(buffer);
+ shortcuts.add(new WeightedString(word,
+ flags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY));
+ if (0 == (flags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) {
+ break;
+ }
+ }
+ }
+ });
+ if (shortcuts.isEmpty()) return null;
+ return shortcuts;
+ }
}
protected static class PtNodeReader extends AbstractDictDecoder.PtNodeReader {
@@ -168,102 +296,82 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
}
}
- private ArrayList<WeightedString> readShortcuts(final int terminalId) {
- if (mShortcutAddressTable.get(0, terminalId) == SparseTable.NOT_EXIST) return null;
-
- final ArrayList<WeightedString> ret = CollectionUtils.newArrayList();
- final int posOfShortcuts = mShortcutAddressTable.get(FormatSpec.SHORTCUT_CONTENT_INDEX,
- terminalId);
- mShortcutBuffer.position(posOfShortcuts);
- while (true) {
- final int flags = mShortcutBuffer.readUnsignedByte();
- final String word = CharEncoding.readString(mShortcutBuffer);
- ret.add(new WeightedString(word,
- flags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY));
- if (0 == (flags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) break;
- }
- return ret;
- }
+ private final int[] mCharacterBufferForReadingVer4PtNodeInfo
+ = new int[FormatSpec.MAX_WORD_LENGTH];
+ /**
+ * Reads PtNode from ptNodePos in the trie file and returns Ver4PtNodeInfo.
+ *
+ * @param ptNodePos the position of PtNode.
+ * @param options the format options.
+ * @return Ver4PtNodeInfo.
+ */
// TODO: Make this buffer thread safe.
// TODO: Support words longer than FormatSpec.MAX_WORD_LENGTH.
- private final int[] mCharacterBuffer = new int[FormatSpec.MAX_WORD_LENGTH];
- @Override
- public PtNodeInfo readPtNode(int ptNodePos, FormatOptions options) {
- int addressPointer = ptNodePos;
+ protected Ver4PtNodeInfo readVer4PtNodeInfo(final int ptNodePos, final FormatOptions options) {
+ int readingPos = ptNodePos;
final int flags = PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
- addressPointer += FormatSpec.PTNODE_FLAGS_SIZE;
+ readingPos += FormatSpec.PTNODE_FLAGS_SIZE;
- final int parentAddress = PtNodeReader.readParentAddress(mDictBuffer, options);
+ final int parentPos = PtNodeReader.readParentAddress(mDictBuffer, options);
if (BinaryDictIOUtils.supportsDynamicUpdate(options)) {
- addressPointer += FormatSpec.PARENT_ADDRESS_SIZE;
+ readingPos += FormatSpec.PARENT_ADDRESS_SIZE;
}
final int characters[];
if (0 != (flags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS)) {
int index = 0;
int character = CharEncoding.readChar(mDictBuffer);
- addressPointer += CharEncoding.getCharSize(character);
+ readingPos += CharEncoding.getCharSize(character);
while (FormatSpec.INVALID_CHARACTER != character
&& index < FormatSpec.MAX_WORD_LENGTH) {
- mCharacterBuffer[index++] = character;
+ mCharacterBufferForReadingVer4PtNodeInfo[index++] = character;
character = CharEncoding.readChar(mDictBuffer);
- addressPointer += CharEncoding.getCharSize(character);
+ readingPos += CharEncoding.getCharSize(character);
}
- characters = Arrays.copyOfRange(mCharacterBuffer, 0, index);
+ characters = Arrays.copyOfRange(mCharacterBufferForReadingVer4PtNodeInfo, 0, index);
} else {
final int character = CharEncoding.readChar(mDictBuffer);
- addressPointer += CharEncoding.getCharSize(character);
+ readingPos += CharEncoding.getCharSize(character);
characters = new int[] { character };
}
final int terminalId;
if (0 != (FormatSpec.FLAG_IS_TERMINAL & flags)) {
terminalId = PtNodeReader.readTerminalId(mDictBuffer);
- addressPointer += FormatSpec.PTNODE_TERMINAL_ID_SIZE;
+ readingPos += FormatSpec.PTNODE_TERMINAL_ID_SIZE;
} else {
terminalId = PtNode.NOT_A_TERMINAL;
}
+ int childrenPos = PtNodeReader.readChildrenAddress(mDictBuffer, flags, options);
+ if (childrenPos != FormatSpec.NO_CHILDREN_ADDRESS) {
+ childrenPos += readingPos;
+ }
+ readingPos += BinaryDictIOUtils.getChildrenAddressSize(flags, options);
+
+ return new Ver4PtNodeInfo(flags, characters, terminalId, childrenPos, parentPos,
+ readingPos - ptNodePos);
+ }
+
+ @Override
+ public PtNodeInfo readPtNode(int ptNodePos, FormatOptions options) {
+ final Ver4PtNodeInfo nodeInfo = readVer4PtNodeInfo(ptNodePos, options);
+
final int frequency;
- if (0 != (FormatSpec.FLAG_IS_TERMINAL & flags)) {
- frequency = PtNodeReader.readFrequency(mFrequencyBuffer, terminalId);
+ if (0 != (FormatSpec.FLAG_IS_TERMINAL & nodeInfo.mFlags)) {
+ frequency = PtNodeReader.readFrequency(mFrequencyBuffer, nodeInfo.mTerminalId);
} else {
frequency = PtNode.NOT_A_TERMINAL;
}
- int childrenAddress = PtNodeReader.readChildrenAddress(mDictBuffer, flags, options);
- if (childrenAddress != FormatSpec.NO_CHILDREN_ADDRESS) {
- childrenAddress += addressPointer;
- }
- addressPointer += BinaryDictIOUtils.getChildrenAddressSize(flags, options);
- final ArrayList<WeightedString> shortcutTargets = readShortcuts(terminalId);
-
- final ArrayList<PendingAttribute> bigrams;
- if (0 != (flags & FormatSpec.FLAG_HAS_BIGRAMS)) {
- bigrams = new ArrayList<PendingAttribute>();
- final int posOfBigrams = mBigramAddressTable.get(0 /* contentTableIndex */, terminalId);
- mBigramBuffer.position(posOfBigrams);
- while (bigrams.size() < FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
- // If bigrams.size() reaches FormatSpec.MAX_BIGRAMS_IN_A_PTNODE,
- // remaining bigram entries are ignored.
- final int bigramFlags = mBigramBuffer.readUnsignedByte();
- final int targetTerminalId = mBigramBuffer.readUnsignedInt24();
- mTerminalAddressTableBuffer.position(
- targetTerminalId * FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
- final int targetAddress = mTerminalAddressTableBuffer.readUnsignedInt24();
- bigrams.add(new PendingAttribute(
- bigramFlags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY,
- targetAddress));
- if (0 == (bigramFlags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) break;
- }
- if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) {
- throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size()
- + " but max is " + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")");
- }
- } else {
- bigrams = null;
- }
- return new PtNodeInfo(ptNodePos, addressPointer, flags, characters, frequency,
- parentAddress, childrenAddress, shortcutTargets, bigrams);
+
+ final ArrayList<WeightedString> shortcutTargets = mShortcutReader.readShortcuts(
+ nodeInfo.mTerminalId);
+ final ArrayList<PendingAttribute> bigrams = mBigramReader.readTargetsAndFrequencies(
+ nodeInfo.mTerminalId, mTerminalAddressTableBuffer);
+
+ return new PtNodeInfo(ptNodePos, ptNodePos + nodeInfo.mNodeSize, nodeInfo.mFlags,
+ nodeInfo.mCharacters, frequency, nodeInfo.mParentPos, nodeInfo.mChildrenPos,
+ shortcutTargets, bigrams);
}
private void deleteDictFiles() {
@@ -314,10 +422,14 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
@Override
public boolean readAndFollowForwardLink() {
- final int nextAddress = mDictBuffer.readUnsignedInt24();
- if (nextAddress >= 0 && nextAddress < mDictBuffer.limit()) {
- mDictBuffer.position(nextAddress);
- return true;
+ final int forwardLinkPos = mDictBuffer.position();
+ int nextRelativePos = BinaryDictDecoderUtils.readSInt24(mDictBuffer);
+ if (nextRelativePos != FormatSpec.NO_FORWARD_LINK_ADDRESS) {
+ final int nextPos = forwardLinkPos + nextRelativePos;
+ if (nextPos >= 0 && nextPos < mDictBuffer.limit()) {
+ mDictBuffer.position(nextPos);
+ return true;
+ }
}
return false;
}
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
index f9dcacf77..8b80ebe63 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictEncoder.java
@@ -25,6 +25,8 @@ import com.android.inputmethod.latin.makedict.FusionDictionary.DictionaryOptions
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray;
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
+import com.android.inputmethod.latin.utils.CollectionUtils;
+import com.android.inputmethod.latin.utils.FileUtils;
import java.io.File;
import java.io.FileNotFoundException;
@@ -32,6 +34,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
/**
@@ -42,9 +46,10 @@ public class Ver4DictEncoder implements DictEncoder {
private final File mDictPlacedDir;
private byte[] mTrieBuf;
private int mTriePos;
- private int mHeaderSize;
private OutputStream mTrieOutStream;
+ private OutputStream mHeaderOutStream;
private OutputStream mFreqOutStream;
+ private OutputStream mUnigramTimestampOutStream;
private OutputStream mTerminalAddressTableOutStream;
private File mDictDir;
private String mBaseFilename;
@@ -56,73 +61,41 @@ public class Ver4DictEncoder implements DictEncoder {
mDictPlacedDir = dictPlacedDir;
}
- private interface SparseTableContentWriterInterface {
- public void write(final OutputStream outStream) throws IOException;
- }
+ private static class BigramContentWriter extends SparseTableContentWriter {
+ private final boolean mWriteTimestamp;
- private static class SparseTableContentWriter {
- private final int mContentCount;
- private final SparseTable mSparseTable;
- private final File mLookupTableFile;
- protected final File mBaseDir;
- private final File[] mAddressTableFiles;
- private final File[] mContentFiles;
- protected final OutputStream[] mContentOutStreams;
-
- public SparseTableContentWriter(final String name, final int contentCount,
- final int initialCapacity, final int blockSize, final File baseDir,
- final String[] contentFilenames, final String[] contentIds) {
- if (contentFilenames.length != contentIds.length) {
- throw new RuntimeException("The length of contentFilenames and the length of"
- + " contentIds are different " + contentFilenames.length + ", "
- + contentIds.length);
- }
- mContentCount = contentCount;
- mSparseTable = new SparseTable(initialCapacity, blockSize, contentCount);
- mLookupTableFile = new File(baseDir, name + FormatSpec.LOOKUP_TABLE_FILE_SUFFIX);
- mAddressTableFiles = new File[mContentCount];
- mContentFiles = new File[mContentCount];
- mBaseDir = baseDir;
- for (int i = 0; i < mContentCount; ++i) {
- mAddressTableFiles[i] = new File(mBaseDir,
- name + FormatSpec.CONTENT_TABLE_FILE_SUFFIX + contentIds[i]);
- mContentFiles[i] = new File(mBaseDir, contentFilenames[i] + contentIds[i]);
- }
- mContentOutStreams = new OutputStream[mContentCount];
+ public BigramContentWriter(final String name, final int initialCapacity,
+ final File baseDir, final boolean writeTimestamp) {
+ super(name + FormatSpec.BIGRAM_FILE_EXTENSION, initialCapacity,
+ FormatSpec.BIGRAM_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ getContentFilenames(name, writeTimestamp), getContentIds(writeTimestamp));
+ mWriteTimestamp = writeTimestamp;
}
- public void openStreams() throws FileNotFoundException {
- for (int i = 0; i < mContentCount; ++i) {
- mContentOutStreams[i] = new FileOutputStream(mContentFiles[i]);
+ private static String[] getContentFilenames(final String name,
+ final boolean writeTimestamp) {
+ final String[] contentFilenames;
+ if (writeTimestamp) {
+ contentFilenames = new String[] { name + FormatSpec.BIGRAM_FILE_EXTENSION,
+ name + FormatSpec.BIGRAM_FILE_EXTENSION };
+ } else {
+ contentFilenames = new String[] { name + FormatSpec.BIGRAM_FILE_EXTENSION };
}
+ return contentFilenames;
}
- protected void write(final int contentIndex, final int index,
- final SparseTableContentWriterInterface writer) throws IOException {
- mSparseTable.set(contentIndex, index, (int) mContentFiles[contentIndex].length());
- writer.write(mContentOutStreams[contentIndex]);
- mContentOutStreams[contentIndex].flush();
- }
-
- public void closeStreams() throws IOException {
- mSparseTable.writeToFiles(mLookupTableFile, mAddressTableFiles);
- for (int i = 0; i < mContentCount; ++i) {
- mContentOutStreams[i].close();
+ private static String[] getContentIds(final boolean writeTimestamp) {
+ final String[] contentIds;
+ if (writeTimestamp) {
+ contentIds = new String[] { FormatSpec.BIGRAM_FREQ_CONTENT_ID,
+ FormatSpec.BIGRAM_TIMESTAMP_CONTENT_ID };
+ } else {
+ contentIds = new String[] { FormatSpec.BIGRAM_FREQ_CONTENT_ID };
}
- }
- }
-
- private static class BigramContentWriter extends SparseTableContentWriter {
-
- public BigramContentWriter(final String name, final int initialCapacity,
- final File baseDir) {
- super(name + FormatSpec.BIGRAM_FILE_EXTENSION, FormatSpec.BIGRAM_CONTENT_COUNT,
- initialCapacity, FormatSpec.BIGRAM_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
- new String[] { name + FormatSpec.BIGRAM_FILE_EXTENSION },
- new String[] { FormatSpec.BIGRAM_FREQ_CONTENT_ID });
+ return contentIds;
}
- public void writeBigramsForOneWord(final int terminalId,
+ public void writeBigramsForOneWord(final int terminalId, final int bigramCount,
final Iterator<WeightedString> bigramIterator, final FusionDictionary dict)
throws IOException {
write(FormatSpec.BIGRAM_FREQ_CONTENT_INDEX, terminalId,
@@ -130,8 +103,16 @@ public class Ver4DictEncoder implements DictEncoder {
@Override
public void write(final OutputStream outStream) throws IOException {
writeBigramsForOneWordInternal(outStream, bigramIterator, dict);
- }
- });
+ }});
+ if (mWriteTimestamp) {
+ write(FormatSpec.BIGRAM_TIMESTAMP_CONTENT_INDEX, terminalId,
+ new SparseTableContentWriterInterface() {
+ @Override
+ public void write(final OutputStream outStream) throws IOException {
+ initBigramTimestampsCountersAndLevelsForOneWordInternal(outStream,
+ bigramCount);
+ }});
+ }
}
private void writeBigramsForOneWordInternal(final OutputStream outStream,
@@ -151,13 +132,26 @@ public class Ver4DictEncoder implements DictEncoder {
FormatSpec.PTNODE_ATTRIBUTE_MAX_ADDRESS_SIZE);
}
}
+
+ private void initBigramTimestampsCountersAndLevelsForOneWordInternal(
+ final OutputStream outStream, final int bigramCount) throws IOException {
+ for (int i = 0; i < bigramCount; ++i) {
+ // TODO: Figure out what initial values should be.
+ BinaryDictEncoderUtils.writeUIntToStream(outStream, 0 /* value */,
+ FormatSpec.BIGRAM_TIMESTAMP_SIZE);
+ BinaryDictEncoderUtils.writeUIntToStream(outStream, 0 /* value */,
+ FormatSpec.BIGRAM_COUNTER_SIZE);
+ BinaryDictEncoderUtils.writeUIntToStream(outStream, 0 /* value */,
+ FormatSpec.BIGRAM_LEVEL_SIZE);
+ }
+ }
}
private static class ShortcutContentWriter extends SparseTableContentWriter {
public ShortcutContentWriter(final String name, final int initialCapacity,
final File baseDir) {
- super(name + FormatSpec.SHORTCUT_FILE_EXTENSION, FormatSpec.SHORTCUT_CONTENT_COUNT,
- initialCapacity, FormatSpec.SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ super(name + FormatSpec.SHORTCUT_FILE_EXTENSION, initialCapacity,
+ FormatSpec.SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
new String[] { name + FormatSpec.SHORTCUT_FILE_EXTENSION },
new String[] { FormatSpec.SHORTCUT_CONTENT_ID });
}
@@ -192,19 +186,26 @@ public class Ver4DictEncoder implements DictEncoder {
mBaseFilename = header.getId() + "." + header.getVersion();
mDictDir = new File(mDictPlacedDir, mBaseFilename);
final File trieFile = new File(mDictDir, mBaseFilename + FormatSpec.TRIE_FILE_EXTENSION);
+ final File headerFile = new File(mDictDir,
+ mBaseFilename + FormatSpec.HEADER_FILE_EXTENSION);
final File freqFile = new File(mDictDir, mBaseFilename + FormatSpec.FREQ_FILE_EXTENSION);
+ final File timestampFile = new File(mDictDir,
+ mBaseFilename + FormatSpec.UNIGRAM_TIMESTAMP_FILE_EXTENSION);
final File terminalAddressTableFile = new File(mDictDir,
mBaseFilename + FormatSpec.TERMINAL_ADDRESS_TABLE_FILE_EXTENSION);
if (!mDictDir.isDirectory()) {
- if (mDictDir.exists()) mDictDir.delete();
+ if (mDictDir.exists()) {
+ FileUtils.deleteRecursively(mDictDir);
+ }
mDictDir.mkdirs();
}
- if (!trieFile.exists()) trieFile.createNewFile();
- if (!freqFile.exists()) freqFile.createNewFile();
- if (!terminalAddressTableFile.exists()) terminalAddressTableFile.createNewFile();
mTrieOutStream = new FileOutputStream(trieFile);
+ mHeaderOutStream = new FileOutputStream(headerFile);
mFreqOutStream = new FileOutputStream(freqFile);
mTerminalAddressTableOutStream = new FileOutputStream(terminalAddressTableFile);
+ if (formatOptions.mHasTimestamp) {
+ mUnigramTimestampOutStream = new FileOutputStream(timestampFile);
+ }
}
private void close() throws IOException {
@@ -212,14 +213,21 @@ public class Ver4DictEncoder implements DictEncoder {
if (mTrieOutStream != null) {
mTrieOutStream.close();
}
+ if (mHeaderOutStream != null) {
+ mHeaderOutStream.close();
+ }
if (mFreqOutStream != null) {
mFreqOutStream.close();
}
if (mTerminalAddressTableOutStream != null) {
mTerminalAddressTableOutStream.close();
}
+ if (mUnigramTimestampOutStream != null) {
+ mUnigramTimestampOutStream.close();
+ }
} finally {
mTrieOutStream = null;
+ mHeaderOutStream = null;
mFreqOutStream = null;
mTerminalAddressTableOutStream = null;
}
@@ -240,16 +248,34 @@ public class Ver4DictEncoder implements DictEncoder {
openStreams(formatOptions, dict.mOptions);
}
- mHeaderSize = BinaryDictEncoderUtils.writeDictionaryHeader(mTrieOutStream, dict,
- formatOptions);
+ BinaryDictEncoderUtils.writeDictionaryHeader(mHeaderOutStream, dict, formatOptions);
MakedictLog.i("Flattening the tree...");
ArrayList<PtNodeArray> flatNodes = BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray);
int terminalCount = 0;
+ final ArrayList<PtNode> nodes = CollectionUtils.newArrayList();
for (final PtNodeArray array : flatNodes) {
for (final PtNode node : array.mData) {
- if (node.isTerminal()) node.mTerminalId = terminalCount++;
+ if (node.isTerminal()) {
+ nodes.add(node);
+ node.mTerminalId = terminalCount++;
+ }
+ }
+ }
+ Collections.sort(nodes, new Comparator<PtNode>() {
+ @Override
+ public int compare(final PtNode lhs, final PtNode rhs) {
+ if (lhs.mFrequency != rhs.mFrequency) {
+ return lhs.mFrequency < rhs.mFrequency ? -1 : 1;
+ }
+ if (lhs.mTerminalId < rhs.mTerminalId) return -1;
+ if (lhs.mTerminalId > rhs.mTerminalId) return 1;
+ return 0;
}
+ });
+ int count = 0;
+ for (final PtNode node : nodes) {
+ node.mTerminalId = count++;
}
MakedictLog.i("Computing addresses...");
@@ -257,7 +283,11 @@ public class Ver4DictEncoder implements DictEncoder {
if (MakedictLog.DBG) BinaryDictEncoderUtils.checkFlatPtNodeArrayList(flatNodes);
writeTerminalData(flatNodes, terminalCount);
- mBigramWriter = new BigramContentWriter(mBaseFilename, terminalCount, mDictDir);
+ if (formatOptions.mHasTimestamp) {
+ initUnigramTimestamps(terminalCount);
+ }
+ mBigramWriter = new BigramContentWriter(mBaseFilename, terminalCount, mDictDir,
+ formatOptions.mHasTimestamp);
writeBigrams(flatNodes, dict);
mShortcutWriter = new ShortcutContentWriter(mBaseFilename, terminalCount, mDictDir);
writeShortcuts(flatNodes);
@@ -282,7 +312,7 @@ public class Ver4DictEncoder implements DictEncoder {
@Override
public void setPosition(int position) {
- if (mTrieBuf == null || position < 0 || position >- mTrieBuf.length) return;
+ if (mTrieBuf == null || position < 0 || position > mTrieBuf.length) return;
mTriePos = position;
}
@@ -299,7 +329,9 @@ public class Ver4DictEncoder implements DictEncoder {
if (countSize != 1 && countSize != 2) {
throw new RuntimeException("Strange size from getPtNodeCountSize : " + countSize);
}
- mTriePos = BinaryDictEncoderUtils.writeUIntToBuffer(mTrieBuf, mTriePos, ptNodeCount,
+ final int encodedPtNodeCount = (countSize == 2) ?
+ (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount;
+ mTriePos = BinaryDictEncoderUtils.writeUIntToBuffer(mTrieBuf, mTriePos, encodedPtNodeCount,
countSize);
}
@@ -333,7 +365,7 @@ public class Ver4DictEncoder implements DictEncoder {
private void writeChildrenPosition(PtNode ptNode, FormatOptions formatOptions) {
final int childrenPos = BinaryDictEncoderUtils.getChildrenPosition(ptNode, formatOptions);
- if (formatOptions.mSupportsDynamicUpdate) {
+ if (formatOptions.supportsDynamicUpdate()) {
mTriePos += BinaryDictEncoderUtils.writeSignedChildrenPosition(mTrieBuf,
mTriePos, childrenPos);
} else {
@@ -348,7 +380,7 @@ public class Ver4DictEncoder implements DictEncoder {
for (final PtNodeArray nodeArray : flatNodes) {
for (final PtNode ptNode : nodeArray.mData) {
if (ptNode.mBigrams != null) {
- mBigramWriter.writeBigramsForOneWord(ptNode.mTerminalId,
+ mBigramWriter.writeBigramsForOneWord(ptNode.mTerminalId, ptNode.mBigrams.size(),
ptNode.mBigrams.iterator(), dict);
}
}
@@ -400,7 +432,7 @@ public class Ver4DictEncoder implements DictEncoder {
ptNode.mFrequency, FormatSpec.FREQUENCY_AND_FLAGS_SIZE);
BinaryDictEncoderUtils.writeUIntToBuffer(terminalAddressTableBuf,
ptNode.mTerminalId * FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE,
- ptNode.mCachedAddressAfterUpdate + mHeaderSize,
+ ptNode.mCachedAddressAfterUpdate,
FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
}
}
@@ -408,4 +440,11 @@ public class Ver4DictEncoder implements DictEncoder {
mFreqOutStream.write(freqBuf);
mTerminalAddressTableOutStream.write(terminalAddressTableBuf);
}
+
+ private void initUnigramTimestamps(final int terminalCount) throws IOException {
+ // Initial value of time stamps for each word is 0.
+ final byte[] unigramTimestampBuf =
+ new byte[terminalCount * FormatSpec.UNIGRAM_TIMESTAMP_SIZE];
+ mUnigramTimestampOutStream.write(unigramTimestampBuf);
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictUpdater.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictUpdater.java
index 3d8f186ba..c46bc36bb 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictUpdater.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictUpdater.java
@@ -17,29 +17,130 @@
package com.android.inputmethod.latin.makedict;
import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils.CharEncoding;
+import com.android.inputmethod.latin.makedict.FormatSpec.FileHeader;
+import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
+import com.android.inputmethod.latin.makedict.FusionDictionary.PtNode;
import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
+import com.android.inputmethod.latin.utils.CollectionUtils;
+
+import android.util.Log;
import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
/**
* An implementation of DictUpdater for version 4 binary dictionary.
*/
@UsedForTesting
public class Ver4DictUpdater extends Ver4DictDecoder implements DictUpdater {
+ private static final String TAG = Ver4DictUpdater.class.getSimpleName();
+
+ private OutputStream mDictStream;
+ private final File mFrequencyFile;
@UsedForTesting
- public Ver4DictUpdater(final File dictDirectory, final int factoryType) {
+ public Ver4DictUpdater(final File dictDirectory, final int factoryType)
+ throws UnsupportedFormatException {
// DictUpdater must have an updatable DictBuffer.
super(dictDirectory, ((factoryType & MASK_DICTBUFFER) == USE_BYTEARRAY)
? USE_BYTEARRAY : USE_WRITABLE_BYTEBUFFER);
+ mFrequencyFile = getFile(FILETYPE_FREQUENCY);
+ }
+
+ private static class BigramContentUpdater extends SparseTableContentUpdater {
+ public BigramContentUpdater(final String name, final File baseDir,
+ final boolean hasTimestamp) {
+ super(name + FormatSpec.BIGRAM_FILE_EXTENSION,
+ FormatSpec.BIGRAM_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ BigramContentReader.getContentFilenames(name, hasTimestamp),
+ BigramContentReader.getContentIds(hasTimestamp),
+ new DictionaryBufferFromWritableByteBufferFactory());
+ }
+
+ public void insertBigramEntries(final int terminalId, final int frequency,
+ final ArrayList<PendingAttribute> entries) throws IOException {
+ if (terminalId < 0) {
+ throw new RuntimeException("Invalid terminal id : " + terminalId);
+ }
+ openStreamsAndBuffers();
+
+ if (entries == null || entries.isEmpty()) {
+ setContentValue(FormatSpec.BIGRAM_FREQ_CONTENT_INDEX, terminalId,
+ SparseTable.NOT_EXIST);
+ return;
+ }
+ final int positionOfEntries =
+ (int) mContentFiles[FormatSpec.BIGRAM_FREQ_CONTENT_INDEX].length();
+ setContentValue(FormatSpec.BIGRAM_FREQ_CONTENT_INDEX, terminalId, positionOfEntries);
+
+ final Iterator<PendingAttribute> bigramIterator = entries.iterator();
+ while (bigramIterator.hasNext()) {
+ final PendingAttribute entry = bigramIterator.next();
+ final int flags = BinaryDictEncoderUtils.makeBigramFlags(bigramIterator.hasNext(),
+ 0 /* offset */, entry.mFrequency, frequency, "" /* word */);
+ BinaryDictEncoderUtils.writeUIntToStream(
+ mContentOutStreams[FormatSpec.BIGRAM_FREQ_CONTENT_INDEX], flags,
+ FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE);
+ BinaryDictEncoderUtils.writeUIntToStream(
+ mContentOutStreams[FormatSpec.BIGRAM_FREQ_CONTENT_INDEX], entry.mAddress,
+ FormatSpec.PTNODE_ATTRIBUTE_MAX_ADDRESS_SIZE);
+ }
+ close();
+ }
+ }
+
+ private static class ShortcutContentUpdater extends SparseTableContentUpdater {
+ public ShortcutContentUpdater(final String name, final File baseDir) {
+ super(name + FormatSpec.SHORTCUT_FILE_EXTENSION,
+ FormatSpec.SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE, baseDir,
+ new String[] { name + FormatSpec.SHORTCUT_FILE_EXTENSION },
+ new String[] { FormatSpec.SHORTCUT_CONTENT_ID },
+ new DictionaryBufferFromWritableByteBufferFactory());
+ }
+
+ public void insertShortcuts(final int terminalId,
+ final ArrayList<WeightedString> shortcuts) throws IOException {
+ if (terminalId < 0) {
+ throw new RuntimeException("Invalid terminal id : " + terminalId);
+ }
+ openStreamsAndBuffers();
+ if (shortcuts == null || shortcuts.isEmpty()) {
+ setContentValue(FormatSpec.SHORTCUT_CONTENT_INDEX, terminalId,
+ SparseTable.NOT_EXIST);
+ return;
+ }
+
+ final int positionOfShortcuts =
+ (int) mContentFiles[FormatSpec.SHORTCUT_CONTENT_INDEX].length();
+ setContentValue(FormatSpec.SHORTCUT_CONTENT_INDEX, terminalId, positionOfShortcuts);
+
+ final Iterator<WeightedString> shortcutIterator = shortcuts.iterator();
+ while (shortcutIterator.hasNext()) {
+ final WeightedString target = shortcutIterator.next();
+ final int shortcutFlags = BinaryDictEncoderUtils.makeShortcutFlags(
+ shortcutIterator.hasNext(), target.mFrequency);
+ BinaryDictEncoderUtils.writeUIntToStream(
+ mContentOutStreams[FormatSpec.SHORTCUT_CONTENT_INDEX], shortcutFlags,
+ FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE);
+ CharEncoding.writeString(mContentOutStreams[FormatSpec.SHORTCUT_CONTENT_INDEX],
+ target.mWord);
+ }
+ close();
+ }
}
@Override
public void deleteWord(final String word) throws IOException, UnsupportedFormatException {
- if (mDictBuffer == null) openDictBuffer();
- readHeader();
+ if (mDictBuffer == null) {
+ openDictBuffer();
+ readHeader();
+ }
final int wordPos = getTerminalPosition(word);
if (wordPos != FormatSpec.NOT_VALID_WORD) {
mDictBuffer.position(wordPos);
@@ -49,11 +150,623 @@ public class Ver4DictUpdater extends Ver4DictDecoder implements DictUpdater {
}
}
- @Override
+ private int getNewTerminalId() {
+ // The size of frequency file is FormatSpec.FREQUENCY_AND_FLAGS_SIZE * number of terminals
+ // because each terminal always has a frequency.
+ // So we can get a fresh terminal id by this logic.
+ // CAVEAT: we are reading the file size from the disk each time: beware of race conditions,
+ // even on one thread.
+ return (int) (mFrequencyFile.length() / FormatSpec.FREQUENCY_AND_FLAGS_SIZE);
+ }
+
+ private void updateParentPosIfNotMoved(final int nodePos, final int newParentPos,
+ final FormatOptions formatOptions) {
+ final int originalPos = getPosition();
+ setPosition(nodePos);
+ final int flags = PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
+ if (!BinaryDictIOUtils.isMovedPtNode(flags, formatOptions)) {
+ final int parentOffset = newParentPos - nodePos;
+ BinaryDictIOUtils.writeSInt24ToBuffer(mDictBuffer, parentOffset);
+ }
+ setPosition(originalPos);
+ }
+
+ private void updateParentPositions(final int nodeArrayPos, final int newParentPos,
+ final FormatOptions formatOptions) {
+ final int originalPos = mDictBuffer.position();
+ mDictBuffer.position(nodeArrayPos);
+ int jumpCount = 0;
+ do {
+ final int count = readPtNodeCount();
+ for (int i = 0; i < count; ++i) {
+ updateParentPosIfNotMoved(getPosition(), newParentPos, formatOptions);
+ skipPtNode(formatOptions);
+ }
+ if (!readAndFollowForwardLink()) break;
+ } while (jumpCount++ < DynamicBinaryDictIOUtils.MAX_JUMPS);
+ setPosition(originalPos);
+ }
+
+ private void updateChildrenPos(final int nodePos, final int newChildrenPos,
+ final FormatOptions options) {
+ final int originalPos = getPosition();
+ setPosition(nodePos);
+ final int flags = PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
+ PtNodeReader.readParentAddress(mDictBuffer, options);
+ BinaryDictIOUtils.skipString(mDictBuffer,
+ (flags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS) != 0);
+ if ((flags & FormatSpec.FLAG_IS_TERMINAL) != 0) PtNodeReader.readTerminalId(mDictBuffer);
+ final int basePos = getPosition();
+ BinaryDictIOUtils.writeSInt24ToBuffer(mDictBuffer, newChildrenPos - basePos);
+ setPosition(originalPos);
+ }
+
+ private void updateTerminalPosition(final int terminalId, final int position) {
+ if (terminalId == PtNode.NOT_A_TERMINAL
+ || terminalId * FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE
+ >= mTerminalAddressTableBuffer.limit()) return;
+ mTerminalAddressTableBuffer.position(terminalId
+ * FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
+ BinaryDictEncoderUtils.writeUIntToDictBuffer(mTerminalAddressTableBuffer, position,
+ FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
+ }
+
+ private void updateForwardLink(final int nodeArrayPos, final int newForwardLink,
+ final FormatOptions formatOptions) {
+ final int originalPos = getPosition();
+ setPosition(nodeArrayPos);
+ int jumpCount = 0;
+ while (jumpCount++ < DynamicBinaryDictIOUtils.MAX_JUMPS) {
+ final int ptNodeCount = readPtNodeCount();
+ for (int i = 0; i < ptNodeCount; ++i) {
+ skipPtNode(formatOptions);
+ }
+ final int forwardLinkPos = getPosition();
+ if (!readAndFollowForwardLink()) {
+ setPosition(forwardLinkPos);
+ BinaryDictIOUtils.writeSInt24ToBuffer(mDictBuffer, newForwardLink - forwardLinkPos);
+ break;
+ }
+ }
+ setPosition(originalPos);
+ }
+
+ private void markPtNodeAsMoved(final int nodePos, final int newNodePos,
+ final FormatOptions options) {
+ final int originalPos = getPosition();
+ updateParentPosIfNotMoved(nodePos, newNodePos, options);
+ setPosition(nodePos);
+ final int currentFlags = PtNodeReader.readPtNodeOptionFlags(mDictBuffer);
+ setPosition(nodePos);
+ mDictBuffer.put((byte) (FormatSpec.FLAG_IS_MOVED
+ | (currentFlags & (~FormatSpec.MASK_MOVE_AND_DELETE_FLAG))));
+ final int offset = newNodePos - nodePos;
+ BinaryDictIOUtils.writeSInt24ToBuffer(mDictBuffer, offset);
+ setPosition(originalPos);
+ }
+
+ /**
+ * Writes a PtNode to an output stream from a Ver4PtNodeInfo.
+ *
+ * @param nodePos the position of the head of the PtNode.
+ * @param info the PtNode info to be written.
+ * @return the size written, in bytes.
+ */
+ private int writePtNode(final int nodePos, final Ver4PtNodeInfo info) throws IOException {
+ int written = 0;
+
+ // Write flags.
+ mDictStream.write((byte) (info.mFlags & 0xFF));
+ written += FormatSpec.PTNODE_FLAGS_SIZE;
+
+ // Write the parent position.
+ final int parentOffset = info.mParentPos == FormatSpec.NO_PARENT_ADDRESS ?
+ FormatSpec.NO_PARENT_ADDRESS : info.mParentPos - nodePos;
+ BinaryDictIOUtils.writeSInt24ToStream(mDictStream, parentOffset);
+ written += FormatSpec.PARENT_ADDRESS_SIZE;
+
+ // Write a string.
+ if (((info.mFlags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS) != 0)
+ != (info.mEndIndexOfCharacters - info.mStartIndexOfCharacters > 1)) {
+ throw new RuntimeException("Inconsistent flags : hasMultipleChars = "
+ + ((info.mFlags & FormatSpec.FLAG_HAS_MULTIPLE_CHARS) != 0) + ", length = "
+ + (info.mEndIndexOfCharacters - info.mStartIndexOfCharacters));
+ }
+ written += CharEncoding.writeCodePoints(mDictStream, info.mCharacters,
+ info.mStartIndexOfCharacters, info.mEndIndexOfCharacters);
+
+ // Write the terminal id.
+ if ((info.mFlags & FormatSpec.FLAG_IS_TERMINAL) != 0) {
+ BinaryDictEncoderUtils.writeUIntToStream(mDictStream, info.mTerminalId,
+ FormatSpec.PTNODE_TERMINAL_ID_SIZE);
+ written += FormatSpec.PTNODE_TERMINAL_ID_SIZE;
+ }
+
+ // Write the children position.
+ final int childrenOffset = info.mChildrenPos == FormatSpec.NO_CHILDREN_ADDRESS
+ ? 0 : info.mChildrenPos - (nodePos + written);
+ BinaryDictIOUtils.writeSInt24ToStream(mDictStream, childrenOffset);
+ written += FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
+
+ return written;
+ }
+
+ /**
+ * Helper method to split and move PtNode.
+ *
+ * @param ptNodeArrayPos the position of PtNodeArray which contains the split and moved PtNode.
+ * @param splittedPtNodeToMovePos the position of the split and moved PtNode.
+ * @param newParent the parent PtNode after splitting.
+ * @param newChildren the children PtNodes after splitting.
+ * @param newParentStartPos where to write the new parent.
+ * @param formatOptions the format options.
+ */
+ private void writeSplittedPtNodes(final int ptNodeArrayPos, final int splittedPtNodeToMovePos,
+ final Ver4PtNodeInfo newParent, final Ver4PtNodeInfo[] newChildren,
+ final int newParentStartPos,
+ final FormatOptions formatOptions) throws IOException {
+ updateTerminalPosition(newParent.mTerminalId,
+ newParentStartPos + 1 /* size of PtNodeCount */);
+ int written = writePtNodeArray(newParentStartPos, new Ver4PtNodeInfo[] { newParent },
+ FormatSpec.NO_FORWARD_LINK_ADDRESS);
+ final int childrenStartPos = newParentStartPos + written;
+ writePtNodeArray(childrenStartPos, newChildren, FormatSpec.NO_FORWARD_LINK_ADDRESS);
+ int childrenNodePos = childrenStartPos + 1 /* size of PtNodeCount */;
+ for (final Ver4PtNodeInfo info : newChildren) {
+ updateTerminalPosition(info.mTerminalId, childrenNodePos);
+ childrenNodePos += computePtNodeSize(info.mCharacters, info.mStartIndexOfCharacters,
+ info.mEndIndexOfCharacters,
+ (info.mFlags & FormatSpec.FLAG_IS_TERMINAL) != 0);
+ }
+
+ // Mark as moved.
+ markPtNodeAsMoved(splittedPtNodeToMovePos, newParentStartPos + 1 /* size of PtNodeCount */,
+ formatOptions);
+ updateForwardLink(ptNodeArrayPos, newParentStartPos, formatOptions);
+ }
+
+ /**
+ * Writes a node array to the stream.
+ *
+ * @param nodeArrayPos the position of the head of the node array.
+ * @param infos an array of Ver4PtNodeInfo to be written.
+ * @return the written length in bytes.
+ */
+ private int writePtNodeArray(final int nodeArrayPos, final Ver4PtNodeInfo[] infos,
+ final int forwardLink) throws IOException {
+ int written = BinaryDictIOUtils.writePtNodeCount(mDictStream, infos.length);
+ for (int i = 0; i < infos.length; ++i) {
+ written += writePtNode(nodeArrayPos + written, infos[i]);
+ }
+ BinaryDictIOUtils.writeSInt24ToStream(mDictStream, forwardLink);
+ written += FormatSpec.FORWARD_LINK_ADDRESS_SIZE;
+ return written;
+ }
+
+ private int computePtNodeSize(final int[] codePoints, final int startIndex, final int endIndex,
+ final boolean isTerminal) {
+ return FormatSpec.PTNODE_FLAGS_SIZE + FormatSpec.PARENT_ADDRESS_SIZE
+ + CharEncoding.getCharArraySize(codePoints, startIndex, endIndex)
+ + (endIndex - startIndex > 1 ? FormatSpec.PTNODE_TERMINATOR_SIZE : 0)
+ + (isTerminal ? FormatSpec.PTNODE_TERMINAL_ID_SIZE : 0)
+ + FormatSpec.SIGNED_CHILDREN_ADDRESS_SIZE;
+ }
+
+ private void writeNewSinglePtNodeWithAttributes(final int[] codePoints,
+ final boolean hasShortcuts, final int terminalId, final boolean hasBigrams,
+ final boolean isNotAWord, final boolean isBlackListEntry, final int parentPos,
+ final FormatOptions formatOptions) throws IOException {
+ final int newNodeArrayPos = mDictBuffer.limit();
+ final int newNodeFlags = BinaryDictEncoderUtils.makePtNodeFlags(codePoints.length > 1,
+ terminalId != PtNode.NOT_A_TERMINAL, FormatSpec.FLAG_IS_NOT_MOVED, hasShortcuts,
+ hasBigrams, isNotAWord, isBlackListEntry, formatOptions);
+ final Ver4PtNodeInfo info = new Ver4PtNodeInfo(newNodeFlags, codePoints, terminalId,
+ FormatSpec.NO_CHILDREN_ADDRESS, parentPos, 0 /* nodeSize */);
+ writePtNodeArray(newNodeArrayPos, new Ver4PtNodeInfo[] { info },
+ FormatSpec.NO_FORWARD_LINK_ADDRESS);
+ }
+
+ private int setMultipleCharsInFlags(final int currentFlags, final boolean hasMultipleChars) {
+ final int flags;
+ if (hasMultipleChars) {
+ flags = currentFlags | FormatSpec.FLAG_HAS_MULTIPLE_CHARS;
+ } else {
+ flags = currentFlags & (~FormatSpec.FLAG_HAS_MULTIPLE_CHARS);
+ }
+ return flags;
+ }
+
+ private int setIsNotAWordInFlags(final int currentFlags, final boolean isNotAWord) {
+ final int flags;
+ if (isNotAWord) {
+ flags = currentFlags | FormatSpec.FLAG_IS_NOT_A_WORD;
+ } else {
+ flags = currentFlags & (~FormatSpec.FLAG_IS_NOT_A_WORD);
+ }
+ return flags;
+ }
+
+ private int setIsBlackListEntryInFlags(final int currentFlags, final boolean isBlackListEntry) {
+ final int flags;
+ if (isBlackListEntry) {
+ flags = currentFlags | FormatSpec.FLAG_IS_BLACKLISTED;
+ } else {
+ flags = currentFlags & (~FormatSpec.FLAG_IS_BLACKLISTED);
+ }
+ return flags;
+ }
+
+ /**
+ * Splits a PtNode.
+ *
+ * abcd - ef
+ *
+ * -> inserting "abc"
+ *
+ * abc - d - ef
+ *
+ * @param nodeArrayToSplitPos the position of PtNodeArray which contains the PtNode to split.
+ * @param nodeToSplitPos the position of the PtNode to split.
+ * @param nodeToSplitInfo the information of the PtNode to split.
+ * @param indexToSplit the index where to split in the code points array.
+ * @param parentOfNodeToSplitPos the absolute position of a parent of the node to split.
+ * @param newTerminalId the terminal id of the inserted node (corresponds to "d").
+ * @param hasShortcuts whether the inserted word should have shortcuts.
+ * @param hasBigrams whether the inserted word should have bigrams.
+ * @param isNotAWord whether the inserted word should be not a word.
+ * @param isBlackListEntry whether the inserted word should be a black list entry.
+ * @param formatOptions the format options.
+ */
+ private void splitOnly(final int nodeArrayToSplitPos, final int nodeToSplitPos,
+ final Ver4PtNodeInfo nodeToSplitInfo, final int indexToSplit,
+ final int parentOfNodeToSplitPos, final int newTerminalId, final boolean hasShortcuts,
+ final boolean hasBigrams, final boolean isNotAWord, final boolean isBlackListEntry,
+ final FormatOptions formatOptions) throws IOException {
+ final int parentNodeArrayStartPos = mDictBuffer.limit();
+ final int parentNodeStartPos = parentNodeArrayStartPos + 1 /* size of PtNodeCount */;
+ final int parentFlags = BinaryDictEncoderUtils.makePtNodeFlags(indexToSplit > 1,
+ true /* isTerminal */, FormatSpec.FLAG_IS_NOT_MOVED, hasShortcuts, hasBigrams,
+ isNotAWord, isBlackListEntry, formatOptions);
+ final Ver4PtNodeInfo parentInfo = new Ver4PtNodeInfo(parentFlags,
+ nodeToSplitInfo.mCharacters, newTerminalId, parentNodeStartPos
+ + computePtNodeSize(nodeToSplitInfo.mCharacters, 0, indexToSplit, true)
+ + FormatSpec.FORWARD_LINK_ADDRESS_SIZE,
+ parentOfNodeToSplitPos, 0 /* nodeSize */);
+ parentInfo.mStartIndexOfCharacters = 0;
+ parentInfo.mEndIndexOfCharacters = indexToSplit;
+
+ // Write the child.
+ final int childrenFlags = setMultipleCharsInFlags(nodeToSplitInfo.mFlags,
+ nodeToSplitInfo.mCharacters.length - indexToSplit > 1);
+ final Ver4PtNodeInfo childrenInfo = new Ver4PtNodeInfo(childrenFlags,
+ nodeToSplitInfo.mCharacters, nodeToSplitInfo.mTerminalId,
+ nodeToSplitInfo.mChildrenPos, parentNodeStartPos, 0 /* nodeSize */);
+ childrenInfo.mStartIndexOfCharacters = indexToSplit;
+ childrenInfo.mEndIndexOfCharacters = nodeToSplitInfo.mCharacters.length;
+ if (nodeToSplitInfo.mChildrenPos != FormatSpec.NO_CHILDREN_ADDRESS) {
+ updateParentPositions(nodeToSplitInfo.mChildrenPos,
+ parentInfo.mChildrenPos + 1 /* size of PtNodeCount */, formatOptions);
+ }
+
+ writeSplittedPtNodes(nodeArrayToSplitPos, nodeToSplitPos, parentInfo,
+ new Ver4PtNodeInfo[] { childrenInfo }, parentNodeArrayStartPos, formatOptions);
+ }
+
+ /**
+ * Split and branch a PtNode.
+ *
+ * ab - cd
+ *
+ * -> inserting "ac"
+ *
+ * a - b - cd
+ * |
+ * - c
+ *
+ * @param nodeArrayToSplitPos the position of PtNodeArray which contains the PtNode to split.
+ * @param nodeToSplitPos the position of the PtNode to split.
+ * @param nodeToSplitInfo the information of the PtNode to split.
+ * @param indexToSplit the index where to split in the code points array.
+ * @param parentOfNodeToSplitPos the absolute position of parent of the node to split.
+ * @param newWordSuffixCodePoints the suffix of the newly inserted word (corresponds to "c").
+ * @param startIndexOfNewWordSuffixCodePoints the start index in newWordSuffixCodePoints where
+ * the suffix starts.
+ * @param newTerminalId the terminal id of the inserted node (correspond to "c").
+ * @param hasShortcuts whether the inserted word should have shortcuts.
+ * @param hasBigrams whether the inserted word should have bigrams.
+ * @param isNotAWord whether the inserted word should be not a word.
+ * @param isBlackListEntry whether the inserted word should be a black list entry.
+ * @param formatOptions the format options.
+ */
+ private void splitAndBranch(final int nodeArrayToSplitPos, final int nodeToSplitPos,
+ final Ver4PtNodeInfo nodeToSplitInfo, final int indexToSplit,
+ final int parentOfNodeToSplitPos, final int[] newWordSuffixCodePoints,
+ final int startIndexOfNewWordSuffixCodePoints,
+ final int newTerminalId,
+ final boolean hasShortcuts, final boolean hasBigrams, final boolean isNotAWord,
+ final boolean isBlackListEntry, final FormatOptions formatOptions) throws IOException {
+ final int parentNodeArrayStartPos = mDictBuffer.limit();
+ final int parentNodeStartPos = parentNodeArrayStartPos + 1 /* size of PtNodeCount */;
+ final int parentFlags = BinaryDictEncoderUtils.makePtNodeFlags(
+ indexToSplit > 1,
+ false /* isTerminal */, FormatSpec.FLAG_IS_NOT_MOVED,
+ false /* hasShortcut */, false /* hasBigrams */,
+ false /* isNotAWord */, false /* isBlackListEntry */, formatOptions);
+ final Ver4PtNodeInfo parentInfo = new Ver4PtNodeInfo(parentFlags,
+ nodeToSplitInfo.mCharacters, PtNode.NOT_A_TERMINAL,
+ parentNodeStartPos
+ + computePtNodeSize(nodeToSplitInfo.mCharacters, 0, indexToSplit, false)
+ + FormatSpec.FORWARD_LINK_ADDRESS_SIZE,
+ parentOfNodeToSplitPos, 0 /* nodeSize */);
+ parentInfo.mStartIndexOfCharacters = 0;
+ parentInfo.mEndIndexOfCharacters = indexToSplit;
+
+ final int childrenNodeArrayStartPos = parentNodeStartPos
+ + computePtNodeSize(nodeToSplitInfo.mCharacters, 0, indexToSplit, false)
+ + FormatSpec.FORWARD_LINK_ADDRESS_SIZE;
+ final int firstChildrenFlags = BinaryDictEncoderUtils.makePtNodeFlags(
+ newWordSuffixCodePoints.length - startIndexOfNewWordSuffixCodePoints > 1,
+ true /* isTerminal */, FormatSpec.FLAG_IS_NOT_MOVED, hasShortcuts, hasBigrams,
+ isNotAWord, isBlackListEntry, formatOptions);
+ final Ver4PtNodeInfo firstChildrenInfo = new Ver4PtNodeInfo(firstChildrenFlags,
+ newWordSuffixCodePoints, newTerminalId,
+ FormatSpec.NO_CHILDREN_ADDRESS, parentNodeStartPos,
+ 0 /* nodeSize */);
+ firstChildrenInfo.mStartIndexOfCharacters = startIndexOfNewWordSuffixCodePoints;
+ firstChildrenInfo.mEndIndexOfCharacters = newWordSuffixCodePoints.length;
+
+ final int secondChildrenStartPos = childrenNodeArrayStartPos + 1 /* size of ptNodeCount */
+ + computePtNodeSize(newWordSuffixCodePoints, startIndexOfNewWordSuffixCodePoints,
+ newWordSuffixCodePoints.length, true /* isTerminal */);
+ final int secondChildrenFlags = setMultipleCharsInFlags(nodeToSplitInfo.mFlags,
+ nodeToSplitInfo.mCharacters.length - indexToSplit > 1);
+ final Ver4PtNodeInfo secondChildrenInfo = new Ver4PtNodeInfo(secondChildrenFlags,
+ nodeToSplitInfo.mCharacters, nodeToSplitInfo.mTerminalId,
+ nodeToSplitInfo.mChildrenPos, parentNodeStartPos, 0 /* nodeSize */);
+ secondChildrenInfo.mStartIndexOfCharacters = indexToSplit;
+ secondChildrenInfo.mEndIndexOfCharacters = nodeToSplitInfo.mCharacters.length;
+ if (nodeToSplitInfo.mChildrenPos != FormatSpec.NO_CHILDREN_ADDRESS) {
+ updateParentPositions(nodeToSplitInfo.mChildrenPos, secondChildrenStartPos,
+ formatOptions);
+ }
+
+ writeSplittedPtNodes(nodeArrayToSplitPos, nodeToSplitPos, parentInfo,
+ new Ver4PtNodeInfo[] { firstChildrenInfo, secondChildrenInfo },
+ parentNodeArrayStartPos, formatOptions);
+ }
+
+ /**
+ * Inserts a word into the trie file and returns the position of inserted terminal node.
+ * If the insertion is failed, returns FormatSpec.NOT_VALID_WORD.
+ */
+ @UsedForTesting
+ private int insertWordToTrie(final String word, final int newTerminalId,
+ final boolean isNotAWord, final boolean isBlackListEntry, final boolean hasBigrams,
+ final boolean hasShortcuts) throws IOException, UnsupportedFormatException {
+ setPosition(0);
+ final FileHeader header = readHeader();
+
+ final int[] codePoints = FusionDictionary.getCodePoints(word);
+ final int wordLen = codePoints.length;
+
+ int wordPos = 0;
+ for (int depth = 0; depth < FormatSpec.MAX_WORD_LENGTH; /* nop */) {
+ final int nodeArrayPos = getPosition();
+ final int ptNodeCount = readPtNodeCount();
+ boolean goToChildren = false;
+ int parentPos = FormatSpec.NO_PARENT_ADDRESS;
+ for (int i = 0; i < ptNodeCount; ++i) {
+ final int nodePos = getPosition();
+ final Ver4PtNodeInfo nodeInfo = readVer4PtNodeInfo(nodePos, header.mFormatOptions);
+ if (BinaryDictIOUtils.isMovedPtNode(nodeInfo.mFlags, header.mFormatOptions)) {
+ continue;
+ }
+ if (nodeInfo.mParentPos != FormatSpec.NO_PARENT_ADDRESS) {
+ parentPos = nodePos + nodeInfo.mParentPos;
+ }
+
+ final boolean firstCharacterMatched =
+ codePoints[wordPos] == nodeInfo.mCharacters[0];
+ boolean allCharactersMatched = true;
+ int firstDifferentCharacterIndex = -1;
+ for (int p = 0; p < nodeInfo.mCharacters.length; ++p) {
+ if (wordPos + p >= codePoints.length) break;
+ if (codePoints[wordPos + p] != nodeInfo.mCharacters[p]) {
+ if (firstDifferentCharacterIndex == -1) {
+ firstDifferentCharacterIndex = p;
+ }
+ allCharactersMatched = false;
+ }
+ }
+
+ if (!firstCharacterMatched) {
+ // Go to the next sibling node.
+ continue;
+ }
+
+ if (!allCharactersMatched) {
+ final int parentNodeArrayStartPos = mDictBuffer.limit();
+ splitAndBranch(nodeArrayPos, nodePos, nodeInfo, firstDifferentCharacterIndex,
+ parentPos, codePoints, wordPos + firstDifferentCharacterIndex,
+ newTerminalId, hasShortcuts, hasBigrams, isNotAWord,
+ isBlackListEntry, header.mFormatOptions);
+
+ return parentNodeArrayStartPos + computePtNodeSize(codePoints, wordPos,
+ wordPos + firstDifferentCharacterIndex, false)
+ + FormatSpec.FORWARD_LINK_ADDRESS_SIZE + 1 /* size of PtNodeCount */;
+ }
+
+ if (wordLen - wordPos < nodeInfo.mCharacters.length) {
+ final int parentNodeArrayStartPos = mDictBuffer.limit();
+ splitOnly(nodeArrayPos, nodePos, nodeInfo, wordLen - wordPos, parentPos,
+ newTerminalId, hasShortcuts, hasBigrams, isNotAWord, isBlackListEntry,
+ header.mFormatOptions);
+
+ // Return the position of the inserted word.
+ return parentNodeArrayStartPos + 1 /* size of PtNodeCount */;
+ }
+
+ wordPos += nodeInfo.mCharacters.length;
+ if (wordPos == wordLen) {
+ // This dictionary already contains the word.
+ Log.e(TAG, "Something went wrong. If the word is already contained, "
+ + " there is no need to insert new PtNode.");
+ return FormatSpec.NOT_VALID_WORD;
+ }
+ if (nodeInfo.mChildrenPos == FormatSpec.NO_CHILDREN_ADDRESS) {
+ // There are no children.
+ // We need to add a new node as a child of this node.
+ final int newNodeArrayPos = mDictBuffer.limit();
+ final int[] newNodeCodePoints = Arrays.copyOfRange(codePoints, wordPos,
+ codePoints.length);
+ writeNewSinglePtNodeWithAttributes(newNodeCodePoints, hasShortcuts,
+ newTerminalId, hasBigrams, isNotAWord, isBlackListEntry, nodePos,
+ header.mFormatOptions);
+ updateChildrenPos(nodePos, newNodeArrayPos, header.mFormatOptions);
+ return newNodeArrayPos + 1 /* size of PtNodeCount */;
+ } else {
+ // Found the matched node.
+ // Go to the children of this node.
+ setPosition(nodeInfo.mChildrenPos);
+ goToChildren = true;
+ depth++;
+ break;
+ }
+ }
+
+ if (goToChildren) continue;
+ if (!readAndFollowForwardLink()) {
+ // Add a new node that contains [wordPos, word.length()-1].
+ // and update the forward link.
+ final int newNodeArrayPos = mDictBuffer.limit();
+ final int[] newCodePoints = Arrays.copyOfRange(codePoints, wordPos,
+ codePoints.length);
+ writeNewSinglePtNodeWithAttributes(newCodePoints, hasShortcuts, newTerminalId,
+ hasBigrams, isNotAWord, isBlackListEntry, parentPos, header.mFormatOptions);
+ updateForwardLink(nodeArrayPos, newNodeArrayPos, header.mFormatOptions);
+ return newNodeArrayPos + 1 /* size of PtNodeCount */;
+ }
+ }
+ return FormatSpec.NOT_VALID_WORD;
+ }
+
+ private void updateFrequency(final int terminalId, final int frequency) {
+ mFrequencyBuffer.position(terminalId * FormatSpec.FREQUENCY_AND_FLAGS_SIZE);
+ BinaryDictEncoderUtils.writeUIntToDictBuffer(mFrequencyBuffer, frequency,
+ FormatSpec.FREQUENCY_AND_FLAGS_SIZE);
+ }
+
+ private void insertFrequency(final int frequency) throws IOException {
+ final OutputStream frequencyStream = new FileOutputStream(mFrequencyFile,
+ true /* append */);
+ BinaryDictEncoderUtils.writeUIntToStream(frequencyStream, frequency,
+ FormatSpec.FREQUENCY_AND_FLAGS_SIZE);
+ frequencyStream.close();
+ }
+
+ private void insertTerminalPosition(final int posOfTerminal) throws IOException,
+ UnsupportedFormatException {
+ final OutputStream terminalPosStream = new FileOutputStream(
+ getFile(FILETYPE_TERMINAL_ADDRESS_TABLE), true /* append */);
+ BinaryDictEncoderUtils.writeUIntToStream(terminalPosStream, posOfTerminal,
+ FormatSpec.TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE);
+ terminalPosStream.close();
+ }
+
+ private void insertBigrams(final int terminalId, final int frequency,
+ final ArrayList<PendingAttribute> bigramAddresses)
+ throws IOException, UnsupportedFormatException {
+ openDictBuffer();
+ final BigramContentUpdater updater = new BigramContentUpdater(mDictDirectory.getName(),
+ mDictDirectory, false);
+
+ // Convert addresses to terminal ids.
+ final ArrayList<PendingAttribute> bigrams = CollectionUtils.newArrayList();
+ mDictBuffer.position(0);
+ final FileHeader header = readHeader();
+ for (PendingAttribute attr : bigramAddresses) {
+ mDictBuffer.position(attr.mAddress);
+ final Ver4PtNodeInfo info = readVer4PtNodeInfo(attr.mAddress, header.mFormatOptions);
+ if (info.mTerminalId == PtNode.NOT_A_TERMINAL) {
+ throw new RuntimeException("We can't have a bigram target that's not a terminal.");
+ }
+ bigrams.add(new PendingAttribute(frequency, info.mTerminalId));
+ }
+ updater.insertBigramEntries(terminalId, frequency, bigrams);
+ close();
+ }
+
+ private void insertShortcuts(final int terminalId, final ArrayList<WeightedString> shortcuts)
+ throws IOException {
+ final ShortcutContentUpdater updater = new ShortcutContentUpdater(mDictDirectory.getName(),
+ mDictDirectory);
+ updater.insertShortcuts(terminalId, shortcuts);
+ }
+
+ private void openBuffersAndStream() throws IOException, UnsupportedFormatException {
+ openDictBuffer();
+ mDictStream = new FileOutputStream(getFile(FILETYPE_TRIE), true /* append */);
+ }
+
+ private void close() throws IOException {
+ if (mDictStream != null) {
+ mDictStream.close();
+ mDictStream = null;
+ }
+ mDictBuffer = null;
+ mFrequencyBuffer = null;
+ mTerminalAddressTableBuffer = null;
+ }
+
+ private void updateAttributes(final int posOfWord, final int frequency,
+ final ArrayList<WeightedString> bigramStrings,
+ final ArrayList<WeightedString> shortcuts, final boolean isNotAWord,
+ final boolean isBlackListEntry) throws IOException, UnsupportedFormatException {
+ mDictBuffer.position(0);
+ final FileHeader header = readHeader();
+ mDictBuffer.position(posOfWord);
+ final Ver4PtNodeInfo info = readVer4PtNodeInfo(posOfWord, header.mFormatOptions);
+ final int terminalId = info.mTerminalId;
+
+ // Update the flags.
+ final int newFlags = setIsNotAWordInFlags(
+ setIsBlackListEntryInFlags(info.mFlags, isBlackListEntry), isNotAWord);
+ mDictBuffer.position(posOfWord);
+ mDictBuffer.put((byte) newFlags);
+
+ updateFrequency(terminalId, frequency);
+ insertBigrams(terminalId, frequency,
+ DynamicBinaryDictIOUtils.resolveBigramPositions(this, bigramStrings));
+ insertShortcuts(terminalId, shortcuts);
+ }
+
+ @Override @UsedForTesting
public void insertWord(final String word, final int frequency,
final ArrayList<WeightedString> bigramStrings, final ArrayList<WeightedString> shortcuts,
final boolean isNotAWord, final boolean isBlackListEntry)
throws IOException, UnsupportedFormatException {
- // TODO: Implement this method.
+ final int newTerminalId = getNewTerminalId();
+
+ openBuffersAndStream();
+ final int posOfWord = getTerminalPosition(word);
+ if (posOfWord != FormatSpec.NOT_VALID_WORD) {
+ // The word is already contained in the dictionary.
+ updateAttributes(posOfWord, frequency, bigramStrings, shortcuts, isNotAWord,
+ isBlackListEntry);
+ close();
+ return;
+ }
+
+ // Insert new PtNode into trie.
+ final int posOfTerminal = insertWordToTrie(word, newTerminalId, isNotAWord,
+ isBlackListEntry, bigramStrings != null && !bigramStrings.isEmpty(),
+ shortcuts != null && !shortcuts.isEmpty());
+ insertFrequency(frequency);
+ insertTerminalPosition(posOfTerminal);
+ close();
+
+ insertBigrams(newTerminalId, frequency,
+ DynamicBinaryDictIOUtils.resolveBigramPositions(this, bigramStrings));
+ insertShortcuts(newTerminalId, shortcuts);
}
}
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
index a1e36006b..9b573b4b8 100644
--- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
@@ -17,18 +17,16 @@
package com.android.inputmethod.latin.personalization;
import android.content.Context;
-import android.content.SharedPreferences;
import android.util.Log;
import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.latin.BinaryDictionary.LanguageModelParam;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.Dictionary;
import com.android.inputmethod.latin.ExpandableBinaryDictionary;
-import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.makedict.DictDecoder;
import com.android.inputmethod.latin.makedict.FormatSpec;
-import com.android.inputmethod.latin.settings.Settings;
-import com.android.inputmethod.latin.utils.CollectionUtils;
+import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
import com.android.inputmethod.latin.utils.UserHistoryDictIOUtils;
import com.android.inputmethod.latin.utils.UserHistoryDictIOUtils.OnAddWordListener;
@@ -36,7 +34,9 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
+import java.util.concurrent.TimeUnit;
/**
* This class is a base class of a dictionary that supports decaying for the personalized language
@@ -45,8 +45,7 @@ import java.util.Map;
public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableBinaryDictionary {
private static final String TAG = DecayingExpandableBinaryDictionaryBase.class.getSimpleName();
public static final boolean DBG_SAVE_RESTORE = false;
- private static final boolean DBG_STRESS_TEST = false;
- private static final boolean PROFILE_SAVE_RESTORE = LatinImeLogger.sDBG;
+ private static final boolean DBG_DUMP_ON_CLOSE = false;
/** Any pair being typed or picked */
public static final int FREQUENCY_FOR_TYPED = 2;
@@ -54,52 +53,56 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
public static final int FREQUENCY_FOR_WORDS_IN_DICTS = FREQUENCY_FOR_TYPED;
public static final int FREQUENCY_FOR_WORDS_NOT_IN_DICTS = Dictionary.NOT_A_PROBABILITY;
- /** Locale for which this user history dictionary is storing words */
- private final String mLocale;
-
- private final String mFileName;
+ public static final int REQUIRED_BINARY_DICTIONARY_VERSION = 4;
- private final SharedPreferences mPrefs;
+ /** Locale for which this user history dictionary is storing words */
+ private final Locale mLocale;
- private final ArrayList<PersonalizationDictionaryUpdateSession> mSessions =
- CollectionUtils.newArrayList();
+ private final String mDictName;
- // Should always be false except when we use this class for test
- @UsedForTesting boolean mIsTest = false;
+ /* package */ DecayingExpandableBinaryDictionaryBase(final Context context,
+ final Locale locale, final String dictionaryType, final String dictName) {
+ super(context, dictName, locale, dictionaryType, true);
+ mLocale = locale;
+ mDictName = dictName;
+ if (mLocale != null && mLocale.toString().length() > 1) {
+ reloadDictionaryIfRequired();
+ }
+ }
+ // Creates an instance that uses a given dictionary file for testing.
+ @UsedForTesting
/* package */ DecayingExpandableBinaryDictionaryBase(final Context context,
- final String locale, final SharedPreferences sp, final String dictionaryType,
- final String fileName) {
- super(context, fileName, dictionaryType, true);
+ final Locale locale, final String dictionaryType, final String dictName,
+ final File dictFile) {
+ super(context, dictName, locale, dictionaryType, true, dictFile);
mLocale = locale;
- mFileName = fileName;
- mPrefs = sp;
- if (mLocale != null && mLocale.length() > 1) {
- asyncLoadDictionaryToMemory();
+ mDictName = dictName;
+ if (mLocale != null && mLocale.toString().length() > 1) {
reloadDictionaryIfRequired();
}
}
@Override
public void close() {
- if (!ExpandableBinaryDictionary.ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE) {
- closeBinaryDictionary();
+ if (DBG_DUMP_ON_CLOSE) {
+ dumpAllWordsForDebug();
}
// Flush pending writes.
- // TODO: Remove after this class become to use a dynamic binary dictionary.
- asyncFlashAllBinaryDictionary();
- Settings.writeLastUserHistoryWriteTime(mPrefs, mLocale);
+ asyncFlushBinaryDictionary();
}
@Override
protected Map<String, String> getHeaderAttributeMap() {
HashMap<String, String> attributeMap = new HashMap<String, String>();
- attributeMap.put(FormatSpec.FileHeader.SUPPORTS_DYNAMIC_UPDATE_ATTRIBUTE,
- FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE);
attributeMap.put(FormatSpec.FileHeader.USES_FORGETTING_CURVE_ATTRIBUTE,
FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE);
- attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, mFileName);
- attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, mLocale);
+ attributeMap.put(FormatSpec.FileHeader.HAS_HISTORICAL_INFO_ATTRIBUTE,
+ FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE);
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_ID_ATTRIBUTE, mDictName);
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_LOCALE_ATTRIBUTE, mLocale.toString());
+ attributeMap.put(FormatSpec.FileHeader.DICTIONARY_VERSION_ATTRIBUTE,
+ String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
return attributeMap;
}
@@ -113,13 +116,23 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
return false;
}
- /**
- * Return whether the passed charsequence is in the dictionary.
- */
@Override
- public boolean isValidWord(final String word) {
- // Words included only in the user history should be treated as not in dictionary words.
- return false;
+ protected boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) {
+ // This class is using format 4 because it's used by all version 4 dictionaries.
+ // TODO: remove this when all dynamically generated dicts use version 4.
+ return formatVersion == REQUIRED_BINARY_DICTIONARY_VERSION;
+ }
+
+ public void addMultipleDictionaryEntriesToDictionary(
+ final ArrayList<LanguageModelParam> languageModelParams,
+ final ExpandableBinaryDictionary.AddMultipleDictionaryEntriesCallback callback) {
+ if (languageModelParams == null || languageModelParams.isEmpty()) {
+ if (callback != null) {
+ callback.onFinished();
+ }
+ return;
+ }
+ addMultipleDictionaryEntriesDynamically(languageModelParams, callback);
}
/**
@@ -130,70 +143,63 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
* context, as in beginning of a sentence for example.
* The second word may not be null (a NullPointerException would be thrown).
*/
- public void addToDictionary(final String word0, final String word1, final boolean isValid) {
+ public void addToDictionary(final String word0, final String word1, final boolean isValid,
+ final int timestamp) {
if (word1.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH ||
(word0 != null && word0.length() >= Constants.DICTIONARY_MAX_WORD_LENGTH)) {
return;
}
- final int frequency = ENABLE_BINARY_DICTIONARY_DYNAMIC_UPDATE ?
- (isValid ? FREQUENCY_FOR_WORDS_IN_DICTS : FREQUENCY_FOR_WORDS_NOT_IN_DICTS) :
- FREQUENCY_FOR_TYPED;
- addWordDynamically(word1, null /* shortcutTarget */, frequency, 0 /* shortcutFreq */,
- false /* isNotAWord */);
+ final int frequency = isValid ?
+ FREQUENCY_FOR_WORDS_IN_DICTS : FREQUENCY_FOR_WORDS_NOT_IN_DICTS;
+ addWordDynamically(word1, frequency, null /* shortcutTarget */, 0 /* shortcutFreq */,
+ false /* isNotAWord */, false /* isBlacklisted */, timestamp);
// Do not insert a word as a bigram of itself
if (word1.equals(word0)) {
return;
}
if (null != word0) {
- addBigramDynamically(word0, word1, frequency, isValid);
+ addBigramDynamically(word0, word1, frequency, timestamp);
}
}
- public void cancelAddingUserHistory(final String word0, final String word1) {
- removeBigramDynamically(word0, word1);
- }
-
@Override
protected void loadDictionaryAsync() {
- final int[] profTotalCount = { 0 };
- final String locale = getLocale();
- if (DBG_STRESS_TEST) {
- try {
- Log.w(TAG, "Start stress in loading: " + locale);
- Thread.sleep(15000);
- Log.w(TAG, "End stress in loading");
- } catch (InterruptedException e) {
+ // Never loaded to memory in Java side.
+ }
+
+ @UsedForTesting
+ public void dumpAllWordsForDebug() {
+ runAfterGcForDebug(new Runnable() {
+ @Override
+ public void run() {
+ dumpAllWordsForDebugLocked();
}
- }
- final long last = Settings.readLastUserHistoryWriteTime(mPrefs, locale);
- final long now = System.currentTimeMillis();
- final ExpandableBinaryDictionary dictionary = this;
+ });
+ }
+
+ private void dumpAllWordsForDebugLocked() {
+ Log.d(TAG, "dumpAllWordsForDebug started.");
final OnAddWordListener listener = new OnAddWordListener() {
@Override
public void setUnigram(final String word, final String shortcutTarget,
final int frequency, final int shortcutFreq) {
- if (DBG_SAVE_RESTORE) {
- Log.d(TAG, "load unigram: " + word + "," + frequency);
- }
- addWord(word, shortcutTarget, frequency, shortcutFreq, false /* isNotAWord */);
- ++profTotalCount[0];
+ Log.d(TAG, "load unigram: " + word + "," + frequency);
}
@Override
public void setBigram(final String word0, final String word1, final int frequency) {
if (word0.length() < Constants.DICTIONARY_MAX_WORD_LENGTH
&& word1.length() < Constants.DICTIONARY_MAX_WORD_LENGTH) {
- if (DBG_SAVE_RESTORE) {
- Log.d(TAG, "load bigram: " + word0 + "," + word1 + "," + frequency);
- }
- ++profTotalCount[0];
- addBigram(word0, word1, frequency, last);
+ Log.d(TAG, "load bigram: " + word0 + "," + word1 + "," + frequency);
+ } else {
+ Log.d(TAG, "Skip inserting a too long bigram: " + word0 + "," + word1 + ","
+ + frequency);
}
}
};
// Load the dictionary from binary file
- final File dictFile = new File(mContext.getFilesDir(), mFileName);
+ final File dictFile = new File(mContext.getFilesDir(), mDictName);
final DictDecoder dictDecoder = FormatSpec.getDictDecoder(dictFile,
DictDecoder.USE_BYTEARRAY);
if (dictDecoder == null) {
@@ -207,35 +213,17 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
UserHistoryDictIOUtils.readDictionaryBinary(dictDecoder, listener);
} catch (IOException e) {
Log.d(TAG, "IOException on opening a bytebuffer", e);
- } finally {
- if (PROFILE_SAVE_RESTORE) {
- final long diff = System.currentTimeMillis() - now;
- Log.d(TAG, "PROF: Load UserHistoryDictionary: "
- + locale + ", " + diff + "ms. load " + profTotalCount[0] + "entries.");
- }
+ } catch (UnsupportedFormatException e) {
+ Log.d(TAG, "Unsupported format, can't read the dictionary", e);
}
}
- protected String getLocale() {
- return mLocale;
- }
-
- public void registerUpdateSession(PersonalizationDictionaryUpdateSession session) {
- session.setPredictionDictionary(this);
- mSessions.add(session);
- session.onDictionaryReady();
- }
-
- public void unRegisterUpdateSession(PersonalizationDictionaryUpdateSession session) {
- mSessions.remove(session);
- }
-
@UsedForTesting
public void clearAndFlushDictionary() {
// Clear the node structure on memory
clear();
// Then flush the cleared state of the dictionary on disk.
- asyncFlashAllBinaryDictionary();
+ asyncFlushBinaryDictionary();
}
/* package */ void decayIfNeeded() {
diff --git a/java/src/com/android/inputmethod/latin/personalization/DynamicPersonalizationDictionaryWriter.java b/java/src/com/android/inputmethod/latin/personalization/DynamicPersonalizationDictionaryWriter.java
deleted file mode 100644
index 6f152bb91..000000000
--- a/java/src/com/android/inputmethod/latin/personalization/DynamicPersonalizationDictionaryWriter.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.latin.personalization;
-
-import android.content.Context;
-
-import com.android.inputmethod.annotations.UsedForTesting;
-import com.android.inputmethod.compat.ActivityManagerCompatUtils;
-import com.android.inputmethod.keyboard.ProximityInfo;
-import com.android.inputmethod.latin.AbstractDictionaryWriter;
-import com.android.inputmethod.latin.ExpandableDictionary;
-import com.android.inputmethod.latin.WordComposer;
-import com.android.inputmethod.latin.ExpandableDictionary.NextWord;
-import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
-import com.android.inputmethod.latin.makedict.DictEncoder;
-import com.android.inputmethod.latin.makedict.FormatSpec;
-import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
-import com.android.inputmethod.latin.utils.UserHistoryDictIOUtils;
-import com.android.inputmethod.latin.utils.UserHistoryDictIOUtils.BigramDictionaryInterface;
-import com.android.inputmethod.latin.utils.UserHistoryForgettingCurveUtils;
-import com.android.inputmethod.latin.utils.UserHistoryForgettingCurveUtils.ForgettingCurveParams;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Map;
-
-// Currently this class is used to implement dynamic prodiction dictionary.
-// TODO: Move to native code.
-public class DynamicPersonalizationDictionaryWriter extends AbstractDictionaryWriter {
- private static final String TAG = DynamicPersonalizationDictionaryWriter.class.getSimpleName();
- /** Maximum number of pairs. Pruning will start when databases goes above this number. */
- public static final int DEFAULT_MAX_HISTORY_BIGRAMS = 10000;
- public static final int LOW_MEMORY_MAX_HISTORY_BIGRAMS = 2000;
-
- /** Any pair being typed or picked */
- private static final int FREQUENCY_FOR_TYPED = 2;
-
- private static final int BINARY_DICT_VERSION = 3;
- private static final FormatSpec.FormatOptions FORMAT_OPTIONS =
- new FormatSpec.FormatOptions(BINARY_DICT_VERSION, true /* supportsDynamicUpdate */);
-
- private final UserHistoryDictionaryBigramList mBigramList =
- new UserHistoryDictionaryBigramList();
- private final ExpandableDictionary mExpandableDictionary;
- private final int mMaxHistoryBigrams;
-
- public DynamicPersonalizationDictionaryWriter(final Context context, final String dictType) {
- super(context, dictType);
- mExpandableDictionary = new ExpandableDictionary(dictType);
- final boolean isLowRamDevice = ActivityManagerCompatUtils.isLowRamDevice(context);
- mMaxHistoryBigrams = isLowRamDevice ?
- LOW_MEMORY_MAX_HISTORY_BIGRAMS : DEFAULT_MAX_HISTORY_BIGRAMS;
- }
-
- @Override
- public void clear() {
- mBigramList.evictAll();
- mExpandableDictionary.clearDictionary();
- }
-
- /**
- * Adds a word unigram to the fusion dictionary. Call updateBinaryDictionary when all changes
- * are done to update the binary dictionary.
- * @param word The word to add.
- * @param shortcutTarget A shortcut target for this word, or null if none.
- * @param frequency The frequency for this unigram.
- * @param shortcutFreq The frequency of the shortcut (0~15, with 15 = whitelist). Ignored
- * if shortcutTarget is null.
- * @param isNotAWord true if this is not a word, i.e. shortcut only.
- */
- @Override
- public void addUnigramWord(final String word, final String shortcutTarget, final int frequency,
- final int shortcutFreq, final boolean isNotAWord) {
- if (mBigramList.size() > mMaxHistoryBigrams * 2) {
- // Too many entries: just stop adding new vocabulary and wait next refresh.
- return;
- }
- mExpandableDictionary.addWord(word, shortcutTarget, frequency, shortcutFreq);
- mBigramList.addBigram(null, word, (byte)frequency);
- }
-
- @Override
- public void addBigramWords(final String word0, final String word1, final int frequency,
- final boolean isValid, final long lastModifiedTime) {
- if (mBigramList.size() > mMaxHistoryBigrams * 2) {
- // Too many entries: just stop adding new vocabulary and wait next refresh.
- return;
- }
- if (lastModifiedTime > 0) {
- mExpandableDictionary.setBigramAndGetFrequency(word0, word1,
- new ForgettingCurveParams(frequency, System.currentTimeMillis(),
- lastModifiedTime));
- mBigramList.addBigram(word0, word1, (byte)frequency);
- } else {
- mExpandableDictionary.setBigramAndGetFrequency(word0, word1,
- new ForgettingCurveParams(isValid));
- mBigramList.addBigram(word0, word1, (byte)frequency);
- }
- }
-
- @Override
- public void removeBigramWords(final String word0, final String word1) {
- if (mBigramList.removeBigram(word0, word1)) {
- mExpandableDictionary.removeBigram(word0, word1);
- }
- }
-
- @Override
- protected void writeDictionary(final DictEncoder dictEncoder,
- final Map<String, String> attributeMap) throws IOException, UnsupportedFormatException {
- UserHistoryDictIOUtils.writeDictionary(dictEncoder,
- new FrequencyProvider(mBigramList, mExpandableDictionary, mMaxHistoryBigrams),
- mBigramList, FORMAT_OPTIONS);
- }
-
- private static class FrequencyProvider implements BigramDictionaryInterface {
- private final UserHistoryDictionaryBigramList mBigramList;
- private final ExpandableDictionary mExpandableDictionary;
- private final int mMaxHistoryBigrams;
-
- public FrequencyProvider(final UserHistoryDictionaryBigramList bigramList,
- final ExpandableDictionary expandableDictionary, final int maxHistoryBigrams) {
- mBigramList = bigramList;
- mExpandableDictionary = expandableDictionary;
- mMaxHistoryBigrams = maxHistoryBigrams;
- }
-
- @Override
- public int getFrequency(final String word0, final String word1) {
- final int freq;
- if (word0 == null) { // unigram
- freq = FREQUENCY_FOR_TYPED;
- } else { // bigram
- final NextWord nw = mExpandableDictionary.getBigramWord(word0, word1);
- if (nw != null) {
- final ForgettingCurveParams forgettingCurveParams = nw.getFcParams();
- final byte prevFc = mBigramList.getBigrams(word0).get(word1);
- final byte fc = forgettingCurveParams.getFc();
- final boolean isValid = forgettingCurveParams.isValid();
- if (prevFc > 0 && prevFc == fc) {
- freq = fc & 0xFF;
- } else if (UserHistoryForgettingCurveUtils.
- needsToSave(fc, isValid, mBigramList.size() <= mMaxHistoryBigrams)) {
- freq = fc & 0xFF;
- } else {
- // Delete this entry
- freq = -1;
- }
- } else {
- // Delete this entry
- freq = -1;
- }
- }
- return freq;
- }
- }
-
- @Override
- public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
- final String prevWord, final ProximityInfo proximityInfo,
- boolean blockOffensiveWords, final int[] additionalFeaturesOptions) {
- return mExpandableDictionary.getSuggestions(composer, prevWord, proximityInfo,
- blockOffensiveWords, additionalFeaturesOptions);
- }
-
- @Override
- public boolean isValidWord(final String word) {
- return mExpandableDictionary.isValidWord(word);
- }
-
- @UsedForTesting
- public boolean isInBigramListForTests(final String word) {
- // TODO: Use native method to determine whether the word is in dictionary or not
- return mBigramList.containsKey(word) || mBigramList.getBigrams(null).containsKey(word);
- }
-}
diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java
index f257165cb..596562f1d 100644
--- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java
+++ b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionary.java
@@ -16,53 +16,37 @@
package com.android.inputmethod.latin.personalization;
+import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.Dictionary;
-import com.android.inputmethod.latin.ExpandableBinaryDictionary;
import com.android.inputmethod.latin.utils.CollectionUtils;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Locale;
+
import android.content.Context;
-import android.content.SharedPreferences;
-import java.util.ArrayList;
+public class PersonalizationDictionary extends DecayingExpandableBinaryDictionaryBase {
+ private static final String NAME = PersonalizationDictionary.class.getSimpleName();
-/**
- * This class is a dictionary for the personalized language model that uses binary dictionary.
- */
-public class PersonalizationDictionary extends ExpandableBinaryDictionary {
- private static final String NAME = "personalization";
private final ArrayList<PersonalizationDictionaryUpdateSession> mSessions =
CollectionUtils.newArrayList();
- /** Locale for which this user history dictionary is storing words */
- private final String mLocale;
-
- public PersonalizationDictionary(final Context context, final String locale,
- final SharedPreferences prefs) {
- // TODO: Make isUpdatable true.
- super(context, getFilenameWithLocale(NAME, locale), Dictionary.TYPE_PERSONALIZATION,
- false /* isUpdatable */);
- mLocale = locale;
- // TODO: Restore last updated time
- loadDictionary();
- }
-
- @Override
- protected void loadDictionaryAsync() {
- // TODO: Implement
- }
-
- @Override
- protected boolean hasContentChanged() {
- return false;
+ /* package */ PersonalizationDictionary(final Context context, final Locale locale) {
+ super(context, locale, Dictionary.TYPE_PERSONALIZATION,
+ getDictNameWithLocale(NAME, locale));
}
- @Override
- protected boolean needsToReloadBeforeWriting() {
- return false;
+ // Creates an instance that uses a given dictionary file for testing.
+ @UsedForTesting
+ public PersonalizationDictionary(final Context context, final Locale locale,
+ final File dictFile) {
+ super(context, locale, Dictionary.TYPE_PERSONALIZATION, getDictNameWithLocale(NAME, locale),
+ dictFile);
}
public void registerUpdateSession(PersonalizationDictionaryUpdateSession session) {
- session.setDictionary(this);
+ session.setPredictionDictionary(this);
mSessions.add(session);
session.onDictionaryReady();
}
diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionarySessionRegister.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionarySessionRegister.java
index c1833ff14..542bda621 100644
--- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionarySessionRegister.java
+++ b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionarySessionRegister.java
@@ -20,18 +20,18 @@ import android.content.Context;
import android.content.res.Configuration;
public class PersonalizationDictionarySessionRegister {
- public static void init(Context context) {
+ public static void init(final Context context) {
}
public static void onConfigurationChanged(final Context context, final Configuration conf) {
}
- public static void onUpdateData(Context context, String type) {
+ public static void onUpdateData(final Context context, final String type) {
}
- public static void onRemoveData(Context context, String type) {
+ public static void onRemoveData(final Context context, final String type) {
}
- public static void onDestroy(Context context) {
+ public static void onDestroy(final Context context) {
}
}
diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdateSession.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdateSession.java
index a86f6e584..61354762b 100644
--- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdateSession.java
+++ b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdateSession.java
@@ -18,61 +18,37 @@ package com.android.inputmethod.latin.personalization;
import android.content.Context;
+import com.android.inputmethod.latin.BinaryDictionary.LanguageModelParam;
+import com.android.inputmethod.latin.ExpandableBinaryDictionary;
+
import java.lang.ref.WeakReference;
import java.util.ArrayList;
+import java.util.Locale;
/**
* This class is a session where a data provider can communicate with a personalization
* dictionary.
*/
public abstract class PersonalizationDictionaryUpdateSession {
- /**
- * This class is a parameter for a new unigram or bigram word which will be added
- * to the personalization dictionary.
- */
- public static class PersonalizationLanguageModelParam {
- public final String mWord0;
- public final String mWord1;
- public final boolean mIsValid;
- public final int mFrequency;
- public PersonalizationLanguageModelParam(String word0, String word1, boolean isValid,
- int frequency) {
- mWord0 = word0;
- mWord1 = word1;
- mIsValid = isValid;
- mFrequency = frequency;
- }
- }
-
- // TODO: Use a dynamic binary dictionary instead
public WeakReference<PersonalizationDictionary> mDictionary;
- public WeakReference<DecayingExpandableBinaryDictionaryBase> mPredictionDictionary;
- public final String mSystemLocale;
- public PersonalizationDictionaryUpdateSession(String locale) {
+ public final Locale mSystemLocale;
+
+ public PersonalizationDictionaryUpdateSession(final Locale locale) {
mSystemLocale = locale;
}
public abstract void onDictionaryReady();
- public abstract void onDictionaryClosed(Context context);
+ public abstract void onDictionaryClosed(final Context context);
- public void setDictionary(PersonalizationDictionary dictionary) {
+ public void setPredictionDictionary(final PersonalizationDictionary dictionary) {
mDictionary = new WeakReference<PersonalizationDictionary>(dictionary);
}
- public void setPredictionDictionary(DecayingExpandableBinaryDictionaryBase dictionary) {
- mPredictionDictionary =
- new WeakReference<DecayingExpandableBinaryDictionaryBase>(dictionary);
- }
-
protected PersonalizationDictionary getDictionary() {
return mDictionary == null ? null : mDictionary.get();
}
- protected DecayingExpandableBinaryDictionaryBase getPredictionDictionary() {
- return mPredictionDictionary == null ? null : mPredictionDictionary.get();
- }
-
private void unsetDictionary() {
final PersonalizationDictionary dictionary = getDictionary();
if (dictionary == null) {
@@ -81,48 +57,30 @@ public abstract class PersonalizationDictionaryUpdateSession {
dictionary.unRegisterUpdateSession(this);
}
- private void unsetPredictionDictionary() {
- final DecayingExpandableBinaryDictionaryBase dictionary = getPredictionDictionary();
- if (dictionary == null) {
- return;
- }
- dictionary.unRegisterUpdateSession(this);
- }
-
- public void clearAndFlushPredictionDictionary(Context context) {
- final DecayingExpandableBinaryDictionaryBase dictionary = getPredictionDictionary();
+ public void clearAndFlushDictionary(final Context context) {
+ final PersonalizationDictionary dictionary = getDictionary();
if (dictionary == null) {
return;
}
dictionary.clearAndFlushDictionary();
}
- public void closeSession(Context context) {
+ public void closeSession(final Context context) {
unsetDictionary();
- unsetPredictionDictionary();
onDictionaryClosed(context);
}
- // TODO: Support multi locale to add bigram
- public void addBigramToPersonalizationDictionary(String word0, String word1, boolean isValid,
- int frequency) {
- final DecayingExpandableBinaryDictionaryBase dictionary = getPredictionDictionary();
- if (dictionary == null) {
- return;
- }
- dictionary.addToDictionary(word0, word1, isValid);
- }
-
- // Bulk import
- // TODO: Support multi locale to add bigram
- public void addBigramsToPersonalizationDictionary(
- final ArrayList<PersonalizationLanguageModelParam> lmParams) {
- final DecayingExpandableBinaryDictionaryBase dictionary = getPredictionDictionary();
+ // TODO: Support multi locale.
+ public void addMultipleDictionaryEntriesToDictionary(
+ final ArrayList<LanguageModelParam> languageModelParams,
+ final ExpandableBinaryDictionary.AddMultipleDictionaryEntriesCallback callback) {
+ final PersonalizationDictionary dictionary = getDictionary();
if (dictionary == null) {
+ if (callback != null) {
+ callback.onFinished();
+ }
return;
}
- for (final PersonalizationLanguageModelParam lmParam : lmParams) {
- dictionary.addToDictionary(lmParam.mWord0, lmParam.mWord1, lmParam.mIsValid);
- }
+ dictionary.addMultipleDictionaryEntriesToDictionary(languageModelParams, callback);
}
}
diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java
index 221ddeeba..d55cae132 100644
--- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java
+++ b/java/src/com/android/inputmethod/latin/personalization/PersonalizationHelper.java
@@ -19,11 +19,10 @@ package com.android.inputmethod.latin.personalization;
import com.android.inputmethod.latin.utils.CollectionUtils;
import android.content.Context;
-import android.content.SharedPreferences;
-import android.preference.PreferenceManager;
import android.util.Log;
import java.lang.ref.SoftReference;
+import java.util.Locale;
import java.util.concurrent.ConcurrentHashMap;
public class PersonalizationHelper {
@@ -31,21 +30,16 @@ public class PersonalizationHelper {
private static final boolean DEBUG = false;
private static final ConcurrentHashMap<String, SoftReference<UserHistoryDictionary>>
sLangUserHistoryDictCache = CollectionUtils.newConcurrentHashMap();
-
private static final ConcurrentHashMap<String, SoftReference<PersonalizationDictionary>>
sLangPersonalizationDictCache = CollectionUtils.newConcurrentHashMap();
- private static final ConcurrentHashMap<String,
- SoftReference<PersonalizationPredictionDictionary>>
- sLangPersonalizationPredictionDictCache =
- CollectionUtils.newConcurrentHashMap();
-
public static UserHistoryDictionary getUserHistoryDictionary(
- final Context context, final String locale, final SharedPreferences sp) {
+ final Context context, final Locale locale) {
+ final String localeStr = locale.toString();
synchronized (sLangUserHistoryDictCache) {
- if (sLangUserHistoryDictCache.containsKey(locale)) {
+ if (sLangUserHistoryDictCache.containsKey(localeStr)) {
final SoftReference<UserHistoryDictionary> ref =
- sLangUserHistoryDictCache.get(locale);
+ sLangUserHistoryDictCache.get(localeStr);
final UserHistoryDictionary dict = ref == null ? null : ref.get();
if (dict != null) {
if (DEBUG) {
@@ -55,8 +49,9 @@ public class PersonalizationHelper {
return dict;
}
}
- final UserHistoryDictionary dict = new UserHistoryDictionary(context, locale, sp);
- sLangUserHistoryDictCache.put(locale, new SoftReference<UserHistoryDictionary>(dict));
+ final UserHistoryDictionary dict = new UserHistoryDictionary(context, locale);
+ sLangUserHistoryDictCache.put(localeStr,
+ new SoftReference<UserHistoryDictionary>(dict));
return dict;
}
}
@@ -74,57 +69,30 @@ public class PersonalizationHelper {
}
public static void registerPersonalizationDictionaryUpdateSession(final Context context,
- final PersonalizationDictionaryUpdateSession session, String locale) {
- final PersonalizationPredictionDictionary predictionDictionary =
- getPersonalizationPredictionDictionary(context, locale,
- PreferenceManager.getDefaultSharedPreferences(context));
- predictionDictionary.registerUpdateSession(session);
- final PersonalizationDictionary dictionary =
- getPersonalizationDictionary(context, locale,
- PreferenceManager.getDefaultSharedPreferences(context));
- dictionary.registerUpdateSession(session);
+ final PersonalizationDictionaryUpdateSession session, final Locale locale) {
+ final PersonalizationDictionary personalizationDictionary =
+ getPersonalizationDictionary(context, locale);
+ personalizationDictionary.registerUpdateSession(session);
}
public static PersonalizationDictionary getPersonalizationDictionary(
- final Context context, final String locale, final SharedPreferences sp) {
+ final Context context, final Locale locale) {
+ final String localeStr = locale.toString();
synchronized (sLangPersonalizationDictCache) {
- if (sLangPersonalizationDictCache.containsKey(locale)) {
+ if (sLangPersonalizationDictCache.containsKey(localeStr)) {
final SoftReference<PersonalizationDictionary> ref =
- sLangPersonalizationDictCache.get(locale);
+ sLangPersonalizationDictCache.get(localeStr);
final PersonalizationDictionary dict = ref == null ? null : ref.get();
if (dict != null) {
if (DEBUG) {
- Log.w(TAG, "Use cached PersonalizationDictCache for " + locale);
+ Log.w(TAG, "Use cached PersonalizationDictionary for " + locale);
}
return dict;
}
}
- final PersonalizationDictionary dict =
- new PersonalizationDictionary(context, locale, sp);
+ final PersonalizationDictionary dict = new PersonalizationDictionary(context, locale);
sLangPersonalizationDictCache.put(
- locale, new SoftReference<PersonalizationDictionary>(dict));
- return dict;
- }
- }
-
- public static PersonalizationPredictionDictionary getPersonalizationPredictionDictionary(
- final Context context, final String locale, final SharedPreferences sp) {
- synchronized (sLangPersonalizationPredictionDictCache) {
- if (sLangPersonalizationPredictionDictCache.containsKey(locale)) {
- final SoftReference<PersonalizationPredictionDictionary> ref =
- sLangPersonalizationPredictionDictCache.get(locale);
- final PersonalizationPredictionDictionary dict = ref == null ? null : ref.get();
- if (dict != null) {
- if (DEBUG) {
- Log.w(TAG, "Use cached PersonalizationPredictionDictionary for " + locale);
- }
- return dict;
- }
- }
- final PersonalizationPredictionDictionary dict =
- new PersonalizationPredictionDictionary(context, locale, sp);
- sLangPersonalizationPredictionDictCache.put(
- locale, new SoftReference<PersonalizationPredictionDictionary>(dict));
+ localeStr, new SoftReference<PersonalizationDictionary>(dict));
return dict;
}
}
diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationPredictionDictionary.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationPredictionDictionary.java
deleted file mode 100644
index 432954453..000000000
--- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationPredictionDictionary.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.latin.personalization;
-
-import com.android.inputmethod.latin.Dictionary;
-import com.android.inputmethod.latin.ExpandableBinaryDictionary;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-
-public class PersonalizationPredictionDictionary extends DecayingExpandableBinaryDictionaryBase {
- private static final String NAME = PersonalizationPredictionDictionary.class.getSimpleName();
-
- /* package */ PersonalizationPredictionDictionary(final Context context, final String locale,
- final SharedPreferences sp) {
- super(context, locale, sp, Dictionary.TYPE_PERSONALIZATION_PREDICTION_IN_JAVA,
- getDictionaryFileName(locale));
- }
-
- private static String getDictionaryFileName(final String locale) {
- return NAME + "." + locale + ExpandableBinaryDictionary.DICT_FILE_EXTENSION;
- }
-}
diff --git a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
index a60226d7e..868f21cbc 100644
--- a/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/personalization/UserHistoryDictionary.java
@@ -16,11 +16,13 @@
package com.android.inputmethod.latin.personalization;
+import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.Dictionary;
-import com.android.inputmethod.latin.ExpandableBinaryDictionary;
+
+import java.io.File;
+import java.util.Locale;
import android.content.Context;
-import android.content.SharedPreferences;
/**
* Locally gathers stats about the words user types and various other signals like auto-correction
@@ -29,12 +31,19 @@ import android.content.SharedPreferences;
public class UserHistoryDictionary extends DecayingExpandableBinaryDictionaryBase {
/* package for tests */ static final String NAME =
UserHistoryDictionary.class.getSimpleName();
- /* package */ UserHistoryDictionary(final Context context, final String locale,
- final SharedPreferences sp) {
- super(context, locale, sp, Dictionary.TYPE_USER_HISTORY, getDictionaryFileName(locale));
+ /* package */ UserHistoryDictionary(final Context context, final Locale locale) {
+ super(context, locale, Dictionary.TYPE_USER_HISTORY, getDictNameWithLocale(NAME, locale));
+ }
+
+ // Creates an instance that uses a given dictionary file for testing.
+ @UsedForTesting
+ public UserHistoryDictionary(final Context context, final Locale locale,
+ final File dictFile) {
+ super(context, locale, Dictionary.TYPE_USER_HISTORY, getDictNameWithLocale(NAME, locale),
+ dictFile);
}
- private static String getDictionaryFileName(final String locale) {
- return NAME + "." + locale + ExpandableBinaryDictionary.DICT_FILE_EXTENSION;
+ public void cancelAddingUserHistory(final String word0, final String word1) {
+ removeBigramDynamically(word0, word1);
}
}
diff --git a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
index 1b592b565..d060485bd 100644
--- a/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
+++ b/java/src/com/android/inputmethod/latin/settings/DebugSettings.java
@@ -112,10 +112,7 @@ public final class DebugSettings extends PreferenceFragment
updateDebugMode();
mServiceNeedsRestart = true;
}
- } else if (key.equals(PREF_FORCE_NON_DISTINCT_MULTITOUCH)
- || key.equals(KeyboardSwitcher.PREF_KEYBOARD_LAYOUT)) {
- mServiceNeedsRestart = true;
- } else if (key.equals(PREF_USE_ONLY_PERSONALIZATION_DICTIONARY_FOR_DEBUG)) {
+ } else if (key.equals(PREF_FORCE_NON_DISTINCT_MULTITOUCH)) {
mServiceNeedsRestart = true;
}
}
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index 1a0fecc62..714c3a97a 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -27,12 +27,10 @@ import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
import com.android.inputmethod.latin.InputAttributes;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
-import com.android.inputmethod.latin.utils.LocaleUtils;
import com.android.inputmethod.latin.utils.ResourceUtils;
import com.android.inputmethod.latin.utils.RunInLocale;
import com.android.inputmethod.latin.utils.StringUtils;
-import java.util.HashMap;
import java.util.Locale;
import java.util.concurrent.locks.ReentrantLock;
@@ -53,8 +51,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
public static final String PREF_AUTO_CORRECTION_THRESHOLD = "auto_correction_threshold";
public static final String PREF_SHOW_SUGGESTIONS_SETTING = "show_suggestions_setting";
public static final String PREF_MISC_SETTINGS = "misc_settings";
- public static final String PREF_LAST_USER_DICTIONARY_WRITE_TIME =
- "last_user_dictionary_write_time";
public static final String PREF_ADVANCED_SETTINGS = "pref_advanced_settings";
public static final String PREF_KEY_USE_CONTACTS_DICT = "pref_key_use_contacts_dict";
public static final String PREF_KEY_USE_DOUBLE_SPACE_PERIOD =
@@ -65,6 +61,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
"pref_show_language_switch_key";
public static final String PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST =
"pref_include_other_imes_in_language_switch_list";
+ public static final String PREF_KEYBOARD_LAYOUT = "pref_keyboard_layout_20110916";
public static final String PREF_CUSTOM_INPUT_STYLES = "custom_input_styles";
public static final String PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY =
"pref_key_preview_popup_dismiss_delay";
@@ -101,6 +98,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
// Emoji
public static final String PREF_EMOJI_RECENT_KEYS = "emoji_recent_keys";
public static final String PREF_EMOJI_CATEGORY_LAST_TYPED_ID = "emoji_category_last_typed_id";
+ public static final String PREF_LAST_SHOWN_EMOJI_CATEGORY_ID = "last_shown_emoji_category_id";
private Resources mRes;
private SharedPreferences mPrefs;
@@ -227,16 +225,15 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
res.getBoolean(R.bool.config_default_phrase_gesture_enabled));
}
- public static boolean readFromBuildConfigIfToShowKeyPreviewPopupSettingsOption(
- final Resources res) {
- return res.getBoolean(R.bool.config_enable_show_option_of_key_preview_popup);
+ public static boolean readFromBuildConfigIfToShowKeyPreviewPopupOption(final Resources res) {
+ return res.getBoolean(R.bool.config_enable_show_key_preview_popup_option);
}
public static boolean readKeyPreviewPopupEnabled(final SharedPreferences prefs,
final Resources res) {
final boolean defaultKeyPreviewPopup = res.getBoolean(
R.bool.config_default_key_preview_popup);
- if (!readFromBuildConfigIfToShowKeyPreviewPopupSettingsOption(res)) {
+ if (!readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
return defaultKeyPreviewPopup;
}
return prefs.getBoolean(PREF_POPUP_ON, defaultKeyPreviewPopup);
@@ -261,6 +258,28 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return prefs.getBoolean(PREF_SHOW_LANGUAGE_SWITCH_KEY, true);
}
+ public static int readKeyboardThemeIndex(final SharedPreferences prefs, final Resources res) {
+ final String defaultThemeIndex = res.getString(
+ R.string.config_default_keyboard_theme_index);
+ final String themeIndex = prefs.getString(PREF_KEYBOARD_LAYOUT, defaultThemeIndex);
+ try {
+ return Integer.valueOf(themeIndex);
+ } catch (final NumberFormatException e) {
+ // Format error, returns default keyboard theme index.
+ Log.e(TAG, "Illegal keyboard theme in preference: " + themeIndex + ", default to "
+ + defaultThemeIndex, e);
+ return Integer.valueOf(defaultThemeIndex);
+ }
+ }
+
+ public static int resetAndGetDefaultKeyboardThemeIndex(final SharedPreferences prefs,
+ final Resources res) {
+ final String defaultThemeIndex = res.getString(
+ R.string.config_default_keyboard_theme_index);
+ prefs.edit().putString(PREF_KEYBOARD_LAYOUT, defaultThemeIndex).apply();
+ return Integer.valueOf(defaultThemeIndex);
+ }
+
public static String readPrefAdditionalSubtypes(final SharedPreferences prefs,
final Resources res) {
final String predefinedPrefSubtypes = AdditionalSubtypeUtils.createPrefSubtypes(
@@ -309,25 +328,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return prefs.getBoolean(DebugSettings.PREF_USABILITY_STUDY_MODE, true);
}
- public static long readLastUserHistoryWriteTime(final SharedPreferences prefs,
- final String locale) {
- final String str = prefs.getString(PREF_LAST_USER_DICTIONARY_WRITE_TIME, "");
- final HashMap<String, Long> map = LocaleUtils.localeAndTimeStrToHashMap(str);
- if (map.containsKey(locale)) {
- return map.get(locale);
- }
- return 0;
- }
-
- public static void writeLastUserHistoryWriteTime(final SharedPreferences prefs,
- final String locale) {
- final String oldStr = prefs.getString(PREF_LAST_USER_DICTIONARY_WRITE_TIME, "");
- final HashMap<String, Long> map = LocaleUtils.localeAndTimeStrToHashMap(oldStr);
- map.put(locale, System.currentTimeMillis());
- final String newStr = LocaleUtils.localeAndTimeHashMapToStr(map);
- prefs.edit().putString(PREF_LAST_USER_DICTIONARY_WRITE_TIME, newStr).apply();
- }
-
public static boolean readUseFullscreenMode(final Resources res) {
return res.getBoolean(R.bool.config_use_fullscreen_mode);
}
@@ -383,15 +383,25 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return prefs.getString(PREF_EMOJI_RECENT_KEYS, "");
}
- public static void writeEmojiCategoryLastTypedId(
- final SharedPreferences prefs, final int category, final int id) {
- final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + category;
- prefs.edit().putInt(key, id).apply();
+ public static void writeLastTypedEmojiCategoryPageId(
+ final SharedPreferences prefs, final int categoryId, final int categoryPageId) {
+ final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + categoryId;
+ prefs.edit().putInt(key, categoryPageId).apply();
}
- public static int readEmojiCategoryLastTypedId(
- final SharedPreferences prefs, final int category) {
- final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + category;
+ public static int readLastTypedEmojiCategoryPageId(
+ final SharedPreferences prefs, final int categoryId) {
+ final String key = PREF_EMOJI_CATEGORY_LAST_TYPED_ID + categoryId;
return prefs.getInt(key, 0);
}
+
+ public static void writeLastShownEmojiCategoryId(
+ final SharedPreferences prefs, final int categoryId) {
+ prefs.edit().putInt(PREF_LAST_SHOWN_EMOJI_CATEGORY_ID, categoryId).apply();
+ }
+
+ public static int readLastShownEmojiCategoryId(
+ final SharedPreferences prefs, final int defValue) {
+ return prefs.getInt(PREF_LAST_SHOWN_EMOJI_CATEGORY_ID, defValue);
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
index cb7dda655..d7a3e95b3 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java
@@ -48,7 +48,6 @@ import com.android.inputmethod.latin.utils.AdditionalSubtypeUtils;
import com.android.inputmethod.latin.utils.ApplicationUtils;
import com.android.inputmethod.latin.utils.FeedbackUtils;
import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
-import com.android.inputmethod.research.ResearchLogger;
import com.android.inputmethodcommon.InputMethodSettingsFragment;
import java.util.TreeSet;
@@ -61,13 +60,6 @@ public final class SettingsFragment extends InputMethodSettingsFragment
DBG_USE_INTERNAL_PERSONAL_DICTIONARY_SETTINGS
|| Build.VERSION.SDK_INT <= 18 /* Build.VERSION.JELLY_BEAN_MR2 */;
- private CheckBoxPreference mVoiceInputKeyPreference;
- private ListPreference mShowCorrectionSuggestionsPreference;
- private ListPreference mAutoCorrectionThresholdPreference;
- private ListPreference mKeyPreviewPopupDismissDelay;
- // Use bigrams to predict the next word when there is no input for it yet
- private CheckBoxPreference mBigramPrediction;
-
private void setPreferenceEnabled(final String preferenceKey, final boolean enabled) {
final Preference preference = findPreference(preferenceKey);
if (preference != null) {
@@ -75,6 +67,18 @@ public final class SettingsFragment extends InputMethodSettingsFragment
}
}
+ private void updateListPreferenceSummaryToCurrentValue(final String prefKey) {
+ // Because the "%s" summary trick of {@link ListPreference} doesn't work properly before
+ // KitKat, we need to update the summary programmatically.
+ final ListPreference listPreference = (ListPreference)findPreference(prefKey);
+ if (listPreference == null) {
+ return;
+ }
+ final CharSequence entries[] = listPreference.getEntries();
+ final int entryIndex = listPreference.findIndexOfValue(listPreference.getValue());
+ listPreference.setSummary(entryIndex < 0 ? null : entries[entryIndex]);
+ }
+
private static void removePreference(final String preferenceKey, final PreferenceGroup parent) {
if (parent == null) {
return;
@@ -107,16 +111,9 @@ public final class SettingsFragment extends InputMethodSettingsFragment
SubtypeLocaleUtils.init(context);
AudioAndHapticFeedbackManager.init(context);
- mVoiceInputKeyPreference =
- (CheckBoxPreference) findPreference(Settings.PREF_VOICE_INPUT_KEY);
- mShowCorrectionSuggestionsPreference =
- (ListPreference) findPreference(Settings.PREF_SHOW_SUGGESTIONS_SETTING);
final SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
prefs.registerOnSharedPreferenceChangeListener(this);
- mAutoCorrectionThresholdPreference =
- (ListPreference) findPreference(Settings.PREF_AUTO_CORRECTION_THRESHOLD);
- mBigramPrediction = (CheckBoxPreference) findPreference(Settings.PREF_BIGRAM_PREDICTIONS);
ensureConsistencyOfAutoCorrectionSettings();
final PreferenceGroup generalSettings =
@@ -143,12 +140,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
feedbackSettings.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference pref) {
- if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
- // Use development-only feedback mechanism
- ResearchLogger.getInstance().presentFeedbackDialogFromSettings();
- } else {
- FeedbackUtils.showFeedbackForm(getActivity());
- }
+ FeedbackUtils.showFeedbackForm(getActivity());
return true;
}
});
@@ -167,7 +159,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment
final boolean showVoiceKeyOption = res.getBoolean(
R.bool.config_enable_show_voice_key_option);
if (!showVoiceKeyOption) {
- generalSettings.removePreference(mVoiceInputKeyPreference);
+ removePreference(Settings.PREF_VOICE_INPUT_KEY, generalSettings);
}
final PreferenceGroup advancedSettings =
@@ -177,26 +169,27 @@ public final class SettingsFragment extends InputMethodSettingsFragment
removePreference(Settings.PREF_VIBRATION_DURATION_SETTINGS, advancedSettings);
}
- mKeyPreviewPopupDismissDelay =
- (ListPreference) findPreference(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
- if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupSettingsOption(res)) {
+ if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
removePreference(Settings.PREF_POPUP_ON, generalSettings);
removePreference(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY, advancedSettings);
} else {
+ // TODO: Cleanup this setup.
+ final ListPreference keyPreviewPopupDismissDelay =
+ (ListPreference) findPreference(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
final String popupDismissDelayDefaultValue = Integer.toString(res.getInteger(
R.integer.config_key_preview_linger_timeout));
- mKeyPreviewPopupDismissDelay.setEntries(new String[] {
+ keyPreviewPopupDismissDelay.setEntries(new String[] {
res.getString(R.string.key_preview_popup_dismiss_no_delay),
res.getString(R.string.key_preview_popup_dismiss_default_delay),
});
- mKeyPreviewPopupDismissDelay.setEntryValues(new String[] {
+ keyPreviewPopupDismissDelay.setEntryValues(new String[] {
"0",
popupDismissDelayDefaultValue
});
- if (null == mKeyPreviewPopupDismissDelay.getValue()) {
- mKeyPreviewPopupDismissDelay.setValue(popupDismissDelayDefaultValue);
+ if (null == keyPreviewPopupDismissDelay.getValue()) {
+ keyPreviewPopupDismissDelay.setValue(popupDismissDelayDefaultValue);
}
- mKeyPreviewPopupDismissDelay.setEnabled(
+ keyPreviewPopupDismissDelay.setEnabled(
Settings.readKeyPreviewPopupEnabled(prefs, res));
}
@@ -243,19 +236,19 @@ public final class SettingsFragment extends InputMethodSettingsFragment
@Override
public void onResume() {
super.onResume();
- final boolean isShortcutImeEnabled = SubtypeSwitcher.getInstance().isShortcutImeEnabled();
- if (!isShortcutImeEnabled) {
- getPreferenceScreen().removePreference(mVoiceInputKeyPreference);
- }
final SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
+ final Resources res = getResources();
+ final boolean isShortcutImeEnabled = SubtypeSwitcher.getInstance().isShortcutImeEnabled();
+ setPreferenceEnabled(Settings.PREF_VOICE_INPUT_KEY, isShortcutImeEnabled);
final CheckBoxPreference showSetupWizardIcon =
(CheckBoxPreference)findPreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON);
if (showSetupWizardIcon != null) {
showSetupWizardIcon.setChecked(Settings.readShowSetupWizardIcon(prefs, getActivity()));
}
- updateShowCorrectionSuggestionsSummary();
- updateKeyPreviewPopupDelaySummary();
- updateCustomInputStylesSummary();
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_SHOW_SUGGESTIONS_SETTING);
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEYBOARD_LAYOUT);
+ updateCustomInputStylesSummary(prefs, res);
}
@Override
@@ -286,30 +279,26 @@ public final class SettingsFragment extends InputMethodSettingsFragment
LauncherIconVisibilityManager.updateSetupWizardIconVisibility(getActivity());
}
ensureConsistencyOfAutoCorrectionSettings();
- updateShowCorrectionSuggestionsSummary();
- updateKeyPreviewPopupDelaySummary();
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_SHOW_SUGGESTIONS_SETTING);
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY);
+ updateListPreferenceSummaryToCurrentValue(Settings.PREF_KEYBOARD_LAYOUT);
refreshEnablingsOfKeypressSoundAndVibrationSettings(prefs, getResources());
}
private void ensureConsistencyOfAutoCorrectionSettings() {
final String autoCorrectionOff = getResources().getString(
R.string.auto_correction_threshold_mode_index_off);
- final String currentSetting = mAutoCorrectionThresholdPreference.getValue();
- mBigramPrediction.setEnabled(!currentSetting.equals(autoCorrectionOff));
- }
-
- private void updateShowCorrectionSuggestionsSummary() {
- mShowCorrectionSuggestionsPreference.setSummary(
- getResources().getStringArray(R.array.prefs_suggestion_visibilities)
- [mShowCorrectionSuggestionsPreference.findIndexOfValue(
- mShowCorrectionSuggestionsPreference.getValue())]);
+ final ListPreference autoCorrectionThresholdPref = (ListPreference)findPreference(
+ Settings.PREF_AUTO_CORRECTION_THRESHOLD);
+ final String currentSetting = autoCorrectionThresholdPref.getValue();
+ setPreferenceEnabled(
+ Settings.PREF_BIGRAM_PREDICTIONS, !currentSetting.equals(autoCorrectionOff));
}
- private void updateCustomInputStylesSummary() {
+ private void updateCustomInputStylesSummary(final SharedPreferences prefs,
+ final Resources res) {
final PreferenceScreen customInputStyles =
(PreferenceScreen)findPreference(Settings.PREF_CUSTOM_INPUT_STYLES);
- final SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
- final Resources res = getResources();
final String prefSubtype = Settings.readPrefAdditionalSubtypes(prefs, res);
final InputMethodSubtype[] subtypes =
AdditionalSubtypeUtils.createAdditionalSubtypesArray(prefSubtype);
@@ -321,13 +310,6 @@ public final class SettingsFragment extends InputMethodSettingsFragment
customInputStyles.setSummary(styles);
}
- private void updateKeyPreviewPopupDelaySummary() {
- final ListPreference lp = mKeyPreviewPopupDismissDelay;
- final CharSequence[] entries = lp.getEntries();
- if (entries == null || entries.length <= 0) return;
- lp.setSummary(entries[lp.findIndexOfValue(lp.getValue())]);
- }
-
private void refreshEnablingsOfKeypressSoundAndVibrationSettings(
final SharedPreferences sp, final Resources res) {
setPreferenceEnabled(Settings.PREF_VIBRATION_DURATION_SETTINGS,
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
index f331c78e5..06406c19b 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
@@ -67,7 +67,7 @@ public final class SettingsValues {
public final boolean mVibrateOn;
public final boolean mSoundOn;
public final boolean mKeyPreviewPopupOn;
- private final boolean mShowsVoiceInputKey;
+ public final boolean mShowsVoiceInputKey;
public final boolean mIncludesOtherImesInLanguageSwitchList;
public final boolean mShowsLanguageSwitchKey;
public final boolean mUseContactsDict;
@@ -271,13 +271,6 @@ public final class SettingsValues {
return mInputAttributes.mShouldInsertSpacesAutomatically;
}
- public boolean isVoiceKeyEnabled(final EditorInfo editorInfo) {
- final boolean shortcutImeEnabled = SubtypeSwitcher.getInstance().isShortcutImeEnabled();
- final int inputType = (editorInfo != null) ? editorInfo.inputType : 0;
- return shortcutImeEnabled && mShowsVoiceInputKey
- && !InputTypeUtils.isPasswordInputType(inputType);
- }
-
public boolean isLanguageSwitchKeyEnabled() {
if (!mShowsLanguageSwitchKey) {
return false;
@@ -374,16 +367,20 @@ public final class SettingsValues {
return autoCorrectionThreshold;
}
- private static boolean needsToShowVoiceInputKey(SharedPreferences prefs, Resources res) {
- final String voiceModeMain = res.getString(R.string.voice_mode_main);
- final String voiceMode = prefs.getString(Settings.PREF_VOICE_MODE_OBSOLETE, voiceModeMain);
- final boolean showsVoiceInputKey = voiceMode == null || voiceMode.equals(voiceModeMain);
- if (!showsVoiceInputKey) {
- // Migrate settings from PREF_VOICE_MODE_OBSOLETE to PREF_VOICE_INPUT_KEY
- // Set voiceModeMain as a value of obsolete voice mode settings.
- prefs.edit().putString(Settings.PREF_VOICE_MODE_OBSOLETE, voiceModeMain).apply();
- // Disable voice input key.
- prefs.edit().putBoolean(Settings.PREF_VOICE_INPUT_KEY, false).apply();
+ private static boolean needsToShowVoiceInputKey(final SharedPreferences prefs,
+ final Resources res) {
+ if (!prefs.contains(Settings.PREF_VOICE_INPUT_KEY)) {
+ // Migrate preference from {@link Settings#PREF_VOICE_MODE_OBSOLETE} to
+ // {@link Settings#PREF_VOICE_INPUT_KEY}.
+ final String voiceModeMain = res.getString(R.string.voice_mode_main);
+ final String voiceMode = prefs.getString(
+ Settings.PREF_VOICE_MODE_OBSOLETE, voiceModeMain);
+ final boolean shouldShowVoiceInputKey = voiceModeMain.equals(voiceMode);
+ prefs.edit().putBoolean(Settings.PREF_VOICE_INPUT_KEY, shouldShowVoiceInputKey).apply();
+ }
+ // Remove the obsolete preference if exists.
+ if (prefs.contains(Settings.PREF_VOICE_MODE_OBSOLETE)) {
+ prefs.edit().remove(Settings.PREF_VOICE_MODE_OBSOLETE).apply();
}
return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, true);
}
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
index c4a813c24..5072fabd6 100644
--- a/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
+++ b/java/src/com/android/inputmethod/latin/setup/SetupWizardActivity.java
@@ -38,7 +38,7 @@ import com.android.inputmethod.compat.ViewCompatUtils;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.settings.SettingsActivity;
import com.android.inputmethod.latin.utils.CollectionUtils;
-import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
+import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
import java.util.ArrayList;
@@ -74,21 +74,21 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL
private SettingsPoolingHandler mHandler;
private static final class SettingsPoolingHandler
- extends StaticInnerHandlerWrapper<SetupWizardActivity> {
+ extends LeakGuardHandlerWrapper<SetupWizardActivity> {
private static final int MSG_POLLING_IME_SETTINGS = 0;
private static final long IME_SETTINGS_POLLING_INTERVAL = 200;
private final InputMethodManager mImmInHandler;
- public SettingsPoolingHandler(final SetupWizardActivity outerInstance,
+ public SettingsPoolingHandler(final SetupWizardActivity ownerInstance,
final InputMethodManager imm) {
- super(outerInstance);
+ super(ownerInstance);
mImmInHandler = imm;
}
@Override
public void handleMessage(final Message msg) {
- final SetupWizardActivity setupWizardActivity = getOuterInstance();
+ final SetupWizardActivity setupWizardActivity = getOwnerInstance();
if (setupWizardActivity == null) {
return;
}
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index 503b18b1b..c108b20ed 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -428,7 +428,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
final String localeStr = locale.toString();
UserBinaryDictionary userDictionary = mUserDictionaries.get(localeStr);
if (null == userDictionary) {
- userDictionary = new SynchronouslyLoadedUserBinaryDictionary(this, localeStr, true);
+ userDictionary = new SynchronouslyLoadedUserBinaryDictionary(this, locale, true);
mUserDictionaries.put(localeStr, userDictionary);
}
dictionaryCollection.addDictionary(userDictionary);
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/DictionaryPool.java b/java/src/com/android/inputmethod/latin/spellcheck/DictionaryPool.java
index a0aed2829..b7a5a4026 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/DictionaryPool.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/DictionaryPool.java
@@ -49,6 +49,7 @@ public final class DictionaryPool extends LinkedBlockingQueue<DictAndKeyboard> {
final static ArrayList<SuggestedWordInfo> noSuggestions = CollectionUtils.newArrayList();
private final static DictAndKeyboard dummyDict = new DictAndKeyboard(
new Dictionary(Dictionary.TYPE_MAIN) {
+ // TODO: this dummy dictionary should be a singleton in the Dictionary class.
@Override
public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer,
final String prevWord, final ProximityInfo proximityInfo,
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
index acd47450b..52012c846 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java
@@ -66,7 +66,8 @@ public final class MoreSuggestions extends Keyboard {
clearKeys();
mDivider = res.getDrawable(R.drawable.more_suggestions_divider);
mDividerWidth = mDivider.getIntrinsicWidth();
- final float padding = res.getDimension(R.dimen.more_suggestions_key_horizontal_padding);
+ final float padding = res.getDimension(
+ R.dimen.config_more_suggestions_key_horizontal_padding);
int row = 0;
int index = fromIndex;
@@ -75,7 +76,7 @@ public final class MoreSuggestions extends Keyboard {
while (index < size) {
final String word = suggestedWords.getWord(index);
// TODO: Should take care of text x-scaling.
- mWidths[index] = (int)(TypefaceUtils.getLabelWidth(word, paint) + padding);
+ mWidths[index] = (int)(TypefaceUtils.getStringWidth(word, paint) + padding);
final int numColumn = index - rowStartIndex + 1;
final int columnWidth =
(maxWidth - mDividerWidth * (numColumn - 1)) / numColumn;
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
index 0ebe37782..549ff0d9d 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java
@@ -54,7 +54,7 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView {
public void adjustVerticalCorrectionForModalMode() {
// Set vertical correction to zero (Reset more keys keyboard sliding allowance
- // {@link R#dimen.more_keys_keyboard_slide_allowance}).
+ // {@link R#dimen.config_more_keys_keyboard_slide_allowance}).
mKeyDetector.setKeyboard(getKeyboard(), -getPaddingLeft(), -getPaddingTop());
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
index 8d2689a7d..72281e62c 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java
@@ -119,7 +119,8 @@ final class SuggestionStripLayoutHelper {
mDividerWidth = dividerView.getMeasuredWidth();
final Resources res = wordView.getResources();
- mSuggestionsStripHeight = res.getDimensionPixelSize(R.dimen.suggestions_strip_height);
+ mSuggestionsStripHeight = res.getDimensionPixelSize(
+ R.dimen.config_suggestions_strip_height);
final TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.SuggestionStripView, defStyle, R.style.SuggestionStripView);
@@ -145,15 +146,17 @@ final class SuggestionStripLayoutHelper {
a.recycle();
mMoreSuggestionsHint = getMoreSuggestionsHint(res,
- res.getDimension(R.dimen.more_suggestions_hint_text_size), mColorAutoCorrect);
+ res.getDimension(R.dimen.config_more_suggestions_hint_text_size),
+ mColorAutoCorrect);
mCenterPositionInStrip = mSuggestionsCountInStrip / 2;
// Assuming there are at least three suggestions. Also, note that the suggestions are
// laid out according to script direction, so this is left of the center for LTR scripts
// and right of the center for RTL scripts.
mTypedWordPositionWhenAutocorrect = mCenterPositionInStrip - 1;
mMoreSuggestionsBottomGap = res.getDimensionPixelOffset(
- R.dimen.more_suggestions_bottom_gap);
- mMoreSuggestionsRowHeight = res.getDimensionPixelSize(R.dimen.more_suggestions_row_height);
+ R.dimen.config_more_suggestions_bottom_gap);
+ mMoreSuggestionsRowHeight = res.getDimensionPixelSize(
+ R.dimen.config_more_suggestions_row_height);
final LayoutInflater inflater = LayoutInflater.from(context);
mWordToSaveView = (TextView)inflater.inflate(R.layout.suggestion_word, null);
@@ -302,18 +305,19 @@ final class SuggestionStripLayoutHelper {
final int countInStrip = mSuggestionsCountInStrip;
setupWordViewsTextAndColor(suggestedWords, countInStrip);
final TextView centerWordView = mWordViews.get(mCenterPositionInStrip);
- final int stripWidth = placerView.getWidth();
- final int centerWidth = getSuggestionWidth(mCenterPositionInStrip, stripWidth);
+ final int availableStripWidth = placerView.getWidth()
+ - placerView.getPaddingRight() - placerView.getPaddingLeft();
+ final int centerWidth = getSuggestionWidth(mCenterPositionInStrip, availableStripWidth);
if (getTextScaleX(centerWordView.getText(), centerWidth, centerWordView.getPaint())
< MIN_TEXT_XSCALE) {
// Layout only the most relevant suggested word at the center of the suggestion strip
// by consolidating all slots in the strip.
mMoreSuggestionsAvailable = (suggestedWords.size() > 1);
- layoutWord(mCenterPositionInStrip, stripWidth);
+ layoutWord(mCenterPositionInStrip, availableStripWidth - mPadding);
stripView.addView(centerWordView);
setLayoutWeight(centerWordView, 1.0f, ViewGroup.LayoutParams.MATCH_PARENT);
if (SuggestionStripView.DBG) {
- layoutDebugInfo(mCenterPositionInStrip, placerView, stripWidth);
+ layoutDebugInfo(mCenterPositionInStrip, placerView, availableStripWidth);
}
return;
}
@@ -328,7 +332,7 @@ final class SuggestionStripLayoutHelper {
x += divider.getMeasuredWidth();
}
- final int width = getSuggestionWidth(positionInStrip, stripWidth);
+ final int width = getSuggestionWidth(positionInStrip, availableStripWidth);
final TextView wordView = layoutWord(positionInStrip, width);
stripView.addView(wordView);
setLayoutWeight(wordView, getSuggestionWeight(positionInStrip),
@@ -373,9 +377,9 @@ final class SuggestionStripLayoutHelper {
// Disable this suggestion if the suggestion is null or empty.
wordView.setEnabled(!TextUtils.isEmpty(word));
final CharSequence text = getEllipsizedText(word, width, wordView.getPaint());
- final float scaleX = wordView.getTextScaleX();
+ final float scaleX = getTextScaleX(word, width, wordView.getPaint());
wordView.setText(text); // TextView.setText() resets text scale x to 1.0.
- wordView.setTextScaleX(scaleX);
+ wordView.setTextScaleX(Math.max(scaleX, MIN_TEXT_XSCALE));
return wordView;
}
@@ -545,8 +549,24 @@ final class SuggestionStripLayoutHelper {
// Note that TextUtils.ellipsize() use text-x-scale as 1.0 if ellipsize is needed. To
// get squeezed and ellipsized text, passes enlarged width (maxWidth / MIN_TEXT_XSCALE).
- final CharSequence ellipsized = TextUtils.ellipsize(
- text, paint, maxWidth / MIN_TEXT_XSCALE, TextUtils.TruncateAt.MIDDLE);
+ final float upscaledWidth = maxWidth / MIN_TEXT_XSCALE;
+ CharSequence ellipsized = TextUtils.ellipsize(
+ text, paint, upscaledWidth, TextUtils.TruncateAt.MIDDLE);
+ // For an unknown reason, ellipsized seems to return a text that does indeed fit inside the
+ // passed width according to paint.measureText, but not according to paint.getTextWidths.
+ // But when rendered, the text seems to actually take up as many pixels as returned by
+ // paint.getTextWidths, hence problem.
+ // To save this case, we compare the measured size of the new text, and if it's too much,
+ // try it again removing the difference. This may still give a text too long by one or
+ // two pixels so we take an additional 2 pixels cushion and call it a day.
+ // TODO: figure out why getTextWidths and measureText don't agree with each other, and
+ // remove the following code.
+ final float ellipsizedTextWidth = getTextWidth(ellipsized, paint);
+ if (upscaledWidth <= ellipsizedTextWidth) {
+ ellipsized = TextUtils.ellipsize(
+ text, paint, upscaledWidth - (ellipsizedTextWidth - upscaledWidth) - 2,
+ TextUtils.TruncateAt.MIDDLE);
+ }
paint.setTextScaleX(MIN_TEXT_XSCALE);
return ellipsized;
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index 75f17c559..aa87affa2 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -112,7 +112,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
final Resources res = context.getResources();
mMoreSuggestionsModalTolerance = res.getDimensionPixelOffset(
- R.dimen.more_suggestions_modal_tolerance);
+ R.dimen.config_more_suggestions_modal_tolerance);
mMoreSuggestionsSlidingDetector = new GestureDetector(
context, mMoreSuggestionsSlidingListener);
}
diff --git a/java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java b/java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java
index d87f6f3c4..ef1d0f42c 100644
--- a/java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/AdditionalSubtypeUtils.java
@@ -17,21 +17,25 @@
package com.android.inputmethod.latin.utils;
import static com.android.inputmethod.latin.Constants.Subtype.KEYBOARD_MODE;
+import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.IS_ADDITIONAL_SUBTYPE;
import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME;
import android.os.Build;
import android.text.TextUtils;
+import android.util.Log;
import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils;
-import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.R;
import java.util.ArrayList;
+import java.util.Arrays;
public final class AdditionalSubtypeUtils {
+ private static final String TAG = AdditionalSubtypeUtils.class.getSimpleName();
+
private static final InputMethodSubtype[] EMPTY_SUBTYPE_ARRAY = new InputMethodSubtype[0];
private AdditionalSubtypeUtils() {
@@ -43,6 +47,11 @@ public final class AdditionalSubtypeUtils {
}
private static final String LOCALE_AND_LAYOUT_SEPARATOR = ":";
+ private static final int INDEX_OF_LOCALE = 0;
+ private static final int INDEX_OF_KEYBOARD_LAYOUT = 1;
+ private static final int INDEX_OF_EXTRA_VALUE = 2;
+ private static final int LENGTH_WITHOUT_EXTRA_VALUE = (INDEX_OF_KEYBOARD_LAYOUT + 1);
+ private static final int LENGTH_WITH_EXTRA_VALUE = (INDEX_OF_EXTRA_VALUE + 1);
private static final String PREF_SUBTYPE_SEPARATOR = ";";
public static InputMethodSubtype createAdditionalSubtype(final String localeString,
@@ -79,17 +88,6 @@ public final class AdditionalSubtypeUtils {
: basePrefSubtype + LOCALE_AND_LAYOUT_SEPARATOR + extraValue;
}
- public static InputMethodSubtype createAdditionalSubtype(final String prefSubtype) {
- final String elems[] = prefSubtype.split(LOCALE_AND_LAYOUT_SEPARATOR);
- if (elems.length < 2 || elems.length > 3) {
- throw new RuntimeException("Unknown additional subtype specified: " + prefSubtype);
- }
- final String localeString = elems[0];
- final String keyboardLayoutSetName = elems[1];
- final String extraValue = (elems.length == 3) ? elems[2] : null;
- return createAdditionalSubtype(localeString, keyboardLayoutSetName, extraValue);
- }
-
public static InputMethodSubtype[] createAdditionalSubtypesArray(final String prefSubtypes) {
if (TextUtils.isEmpty(prefSubtypes)) {
return EMPTY_SUBTYPE_ARRAY;
@@ -98,7 +96,19 @@ public final class AdditionalSubtypeUtils {
final ArrayList<InputMethodSubtype> subtypesList =
CollectionUtils.newArrayList(prefSubtypeArray.length);
for (final String prefSubtype : prefSubtypeArray) {
- final InputMethodSubtype subtype = createAdditionalSubtype(prefSubtype);
+ final String elems[] = prefSubtype.split(LOCALE_AND_LAYOUT_SEPARATOR);
+ if (elems.length != LENGTH_WITHOUT_EXTRA_VALUE
+ && elems.length != LENGTH_WITH_EXTRA_VALUE) {
+ Log.w(TAG, "Unknown additional subtype specified: " + prefSubtype + " in "
+ + prefSubtypes);
+ continue;
+ }
+ final String localeString = elems[INDEX_OF_LOCALE];
+ final String keyboardLayoutSetName = elems[INDEX_OF_KEYBOARD_LAYOUT];
+ final String extraValue = (elems.length == LENGTH_WITH_EXTRA_VALUE)
+ ? elems[INDEX_OF_EXTRA_VALUE] : null;
+ final InputMethodSubtype subtype = createAdditionalSubtype(
+ localeString, keyboardLayoutSetName, extraValue);
if (subtype.getNameResId() == SubtypeLocaleUtils.UNKNOWN_KEYBOARD_LAYOUT) {
// Skip unknown keyboard layout subtype. This may happen when predefined keyboard
// layout has been removed.
@@ -137,31 +147,36 @@ public final class AdditionalSubtypeUtils {
return sb.toString();
}
- private static InputMethodSubtype buildInputMethodSubtype(int nameId, String localeString,
- String layoutExtraValue, String additionalSubtypeExtraValue) {
- // CAVEAT! If you want to change subtypeId after changing the extra values,
- // you must change "getInputMethodSubtypeId". But it will remove the additional keyboard
- // from the current users. So, you should be really careful to change it.
- final int subtypeId = getInputMethodSubtypeId(nameId, localeString, layoutExtraValue,
- additionalSubtypeExtraValue);
+ private static InputMethodSubtype buildInputMethodSubtype(final int nameId,
+ final String localeString, final String layoutExtraValue,
+ final String additionalSubtypeExtraValue) {
+ // To preserve additional subtype settings and user's selection across OS updates, subtype
+ // id shouldn't be changed. New attributes, such as emojiCapable, are carefully excluded
+ // from the calculation of subtype id.
+ final String compatibleExtraValue = StringUtils.joinCommaSplittableText(
+ layoutExtraValue, additionalSubtypeExtraValue);
+ final int compatibleSubtypeId = getInputMethodSubtypeId(localeString, compatibleExtraValue);
final String extraValue;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- extraValue = layoutExtraValue + "," + additionalSubtypeExtraValue
- + "," + Constants.Subtype.ExtraValue.ASCII_CAPABLE
- + "," + Constants.Subtype.ExtraValue.EMOJI_CAPABLE;
+ // Color Emoji is supported from KitKat.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ extraValue = StringUtils.appendToCommaSplittableTextIfNotExists(
+ EMOJI_CAPABLE, compatibleExtraValue);
} else {
- extraValue = layoutExtraValue + "," + additionalSubtypeExtraValue;
+ extraValue = compatibleExtraValue;
}
return InputMethodSubtypeCompatUtils.newInputMethodSubtype(nameId,
R.drawable.ic_ime_switcher_dark, localeString, KEYBOARD_MODE, extraValue,
- false, false, subtypeId);
+ false, false, compatibleSubtypeId);
}
- private static int getInputMethodSubtypeId(int nameId, String localeString,
- String layoutExtraValue, String additionalSubtypeExtraValue) {
- // TODO: Use InputMethodSubtypeBuilder once we use SDK version 19.
- return (new InputMethodSubtype(nameId, R.drawable.ic_ime_switcher_dark,
- localeString, KEYBOARD_MODE, layoutExtraValue + "," + additionalSubtypeExtraValue,
- false, false)).hashCode();
+ private static int getInputMethodSubtypeId(final String localeString, final String extraValue) {
+ // From the compatibility point of view, the calculation of subtype id has been copied from
+ // {@link InputMethodSubtype} of JellyBean MR2.
+ return Arrays.hashCode(new Object[] {
+ localeString,
+ KEYBOARD_MODE,
+ extraValue,
+ false /* isAuxiliary */,
+ false /* overrideImplicitlyEnabledSubtype */ });
}
}
diff --git a/java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java b/java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java
index 08a2a8c5a..e521ec807 100644
--- a/java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ApplicationUtils.java
@@ -62,4 +62,22 @@ public final class ApplicationUtils {
}
return "";
}
+
+ /**
+ * A utility method to get the application's PackageInfo.versionCode
+ * @return the application's PackageInfo.versionCode
+ */
+ public static int getVersionCode(final Context context) {
+ try {
+ if (context == null) {
+ return 0;
+ }
+ final String packageName = context.getPackageName();
+ final PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0);
+ return info.versionCode;
+ } catch (final NameNotFoundException e) {
+ Log.e(TAG, "Could not find version info.", e);
+ }
+ return 0;
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
index c2e97a36f..d12aad639 100644
--- a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
+++ b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
@@ -20,7 +20,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
- * This class is a holder of a result of asynchronous computation.
+ * This class is a holder of the result of an asynchronous computation.
*
* @param <E> the type of the result.
*/
@@ -36,9 +36,9 @@ public class AsyncResultHolder<E> {
}
/**
- * Sets the result value to this holder.
+ * Sets the result value of this holder.
*
- * @param result the value which is set.
+ * @param result the value to set.
*/
public void set(final E result) {
synchronized(mLock) {
@@ -54,12 +54,12 @@ public class AsyncResultHolder<E> {
* Causes the current thread to wait unless the value is set or the specified time is elapsed.
*
* @param defaultValue the default value.
- * @param timeOut the time to wait.
- * @return if the result is set until the time limit then the result, otherwise defaultValue.
+ * @param timeOut the maximum time to wait.
+ * @return if the result is set before the time limit then the result, otherwise defaultValue.
*/
public E get(final E defaultValue, final long timeOut) {
try {
- if(mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
+ if (mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
return mResult;
} else {
return defaultValue;
diff --git a/java/src/com/android/inputmethod/latin/utils/FileUtils.java b/java/src/com/android/inputmethod/latin/utils/FileUtils.java
new file mode 100644
index 000000000..83c1e7c4d
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/utils/FileUtils.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.android.inputmethod.latin.utils;
+
+import java.io.File;
+
+/**
+ * A simple class to help with removing directories recursively.
+ */
+public class FileUtils {
+ public static boolean deleteRecursively(final File path) {
+ if (path.isDirectory()) {
+ for (final File child : path.listFiles()) {
+ deleteRecursively(child);
+ }
+ }
+ return path.delete();
+ }
+}
diff --git a/java/src/com/android/inputmethod/latin/utils/JsonUtils.java b/java/src/com/android/inputmethod/latin/utils/JsonUtils.java
new file mode 100644
index 000000000..764ef72ce
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/utils/JsonUtils.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.latin.utils;
+
+import android.util.JsonReader;
+import android.util.JsonWriter;
+import android.util.Log;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public final class JsonUtils {
+ private static final String TAG = JsonUtils.class.getSimpleName();
+
+ private static final String INTEGER_CLASS_NAME = Integer.class.getSimpleName();
+ private static final String STRING_CLASS_NAME = String.class.getSimpleName();
+
+ private static final String EMPTY_STRING = "";
+
+ public static List<Object> jsonStrToList(final String s) {
+ final ArrayList<Object> list = CollectionUtils.newArrayList();
+ final JsonReader reader = new JsonReader(new StringReader(s));
+ try {
+ reader.beginArray();
+ while (reader.hasNext()) {
+ reader.beginObject();
+ while (reader.hasNext()) {
+ final String name = reader.nextName();
+ if (name.equals(INTEGER_CLASS_NAME)) {
+ list.add(reader.nextInt());
+ } else if (name.equals(STRING_CLASS_NAME)) {
+ list.add(reader.nextString());
+ } else {
+ Log.w(TAG, "Invalid name: " + name);
+ reader.skipValue();
+ }
+ }
+ reader.endObject();
+ }
+ reader.endArray();
+ return list;
+ } catch (final IOException e) {
+ } finally {
+ close(reader);
+ }
+ return Collections.<Object>emptyList();
+ }
+
+ public static String listToJsonStr(final List<Object> list) {
+ if (list == null || list.isEmpty()) {
+ return EMPTY_STRING;
+ }
+ final StringWriter sw = new StringWriter();
+ final JsonWriter writer = new JsonWriter(sw);
+ try {
+ writer.beginArray();
+ for (final Object o : list) {
+ writer.beginObject();
+ if (o instanceof Integer) {
+ writer.name(INTEGER_CLASS_NAME).value((Integer)o);
+ } else if (o instanceof String) {
+ writer.name(STRING_CLASS_NAME).value((String)o);
+ }
+ writer.endObject();
+ }
+ writer.endArray();
+ return sw.toString();
+ } catch (final IOException e) {
+ } finally {
+ close(writer);
+ }
+ return EMPTY_STRING;
+ }
+
+ private static void close(final Closeable closeable) {
+ try {
+ if (closeable != null) {
+ closeable.close();
+ }
+ } catch (final IOException e) {
+ // Ignore
+ }
+ }
+}
diff --git a/java/src/com/android/inputmethod/latin/utils/LatinImeLoggerUtils.java b/java/src/com/android/inputmethod/latin/utils/LatinImeLoggerUtils.java
index e958a7e71..d14ba508b 100644
--- a/java/src/com/android/inputmethod/latin/utils/LatinImeLoggerUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/LatinImeLoggerUtils.java
@@ -35,7 +35,7 @@ public final class LatinImeLoggerUtils {
public static void onSeparator(final int code, final int x, final int y) {
// Helper method to log a single code point separator
// TODO: cache this mapping of a code point to a string in a sparse array in StringUtils
- onSeparator(new String(new int[]{code}, 0, 1), x, y);
+ onSeparator(StringUtils.newSingleCodePointString(code), x, y);
}
public static void onSeparator(final String separator, final int x, final int y) {
diff --git a/java/src/com/android/inputmethod/latin/utils/StaticInnerHandlerWrapper.java b/java/src/com/android/inputmethod/latin/utils/LeakGuardHandlerWrapper.java
index 44e5d17b4..8469c87b0 100644
--- a/java/src/com/android/inputmethod/latin/utils/StaticInnerHandlerWrapper.java
+++ b/java/src/com/android/inputmethod/latin/utils/LeakGuardHandlerWrapper.java
@@ -21,22 +21,22 @@ import android.os.Looper;
import java.lang.ref.WeakReference;
-public class StaticInnerHandlerWrapper<T> extends Handler {
- private final WeakReference<T> mOuterInstanceRef;
+public class LeakGuardHandlerWrapper<T> extends Handler {
+ private final WeakReference<T> mOwnerInstanceRef;
- public StaticInnerHandlerWrapper(final T outerInstance) {
- this(outerInstance, Looper.myLooper());
+ public LeakGuardHandlerWrapper(final T ownerInstance) {
+ this(ownerInstance, Looper.myLooper());
}
- public StaticInnerHandlerWrapper(final T outerInstance, final Looper looper) {
+ public LeakGuardHandlerWrapper(final T ownerInstance, final Looper looper) {
super(looper);
- if (outerInstance == null) {
- throw new NullPointerException("outerInstance is null");
+ if (ownerInstance == null) {
+ throw new NullPointerException("ownerInstance is null");
}
- mOuterInstanceRef = new WeakReference<T>(outerInstance);
+ mOwnerInstanceRef = new WeakReference<T>(ownerInstance);
}
- public T getOuterInstance() {
- return mOuterInstanceRef.get();
+ public T getOwnerInstance() {
+ return mOwnerInstanceRef.get();
}
}
diff --git a/java/src/com/android/inputmethod/latin/utils/LocaleUtils.java b/java/src/com/android/inputmethod/latin/utils/LocaleUtils.java
index 22045aa38..0c55484b4 100644
--- a/java/src/com/android/inputmethod/latin/utils/LocaleUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/LocaleUtils.java
@@ -30,9 +30,6 @@ import java.util.Locale;
* dictionary pack.
*/
public final class LocaleUtils {
- private static final HashMap<String, Long> EMPTY_LT_HASH_MAP = CollectionUtils.newHashMap();
- private static final String LOCALE_AND_TIME_STR_SEPARATER = ",";
-
private LocaleUtils() {
// Intentional empty constructor for utility class.
}
@@ -168,12 +165,14 @@ public final class LocaleUtils {
* Creates a locale from a string specification.
*/
public static Locale constructLocaleFromString(final String localeStr) {
- if (localeStr == null)
+ if (localeStr == null) {
return null;
+ }
synchronized (sLocaleCache) {
- if (sLocaleCache.containsKey(localeStr))
- return sLocaleCache.get(localeStr);
- Locale retval = null;
+ Locale retval = sLocaleCache.get(localeStr);
+ if (retval != null) {
+ return retval;
+ }
String[] localeParams = localeStr.split("_", 3);
if (localeParams.length == 1) {
retval = new Locale(localeParams[0]);
@@ -188,38 +187,4 @@ public final class LocaleUtils {
return retval;
}
}
-
- public static HashMap<String, Long> localeAndTimeStrToHashMap(String str) {
- if (TextUtils.isEmpty(str)) {
- return EMPTY_LT_HASH_MAP;
- }
- final String[] ss = str.split(LOCALE_AND_TIME_STR_SEPARATER);
- final int N = ss.length;
- if (N < 2 || N % 2 != 0) {
- return EMPTY_LT_HASH_MAP;
- }
- final HashMap<String, Long> retval = CollectionUtils.newHashMap();
- for (int i = 0; i < N / 2; ++i) {
- final String localeStr = ss[i * 2];
- final long time = Long.valueOf(ss[i * 2 + 1]);
- retval.put(localeStr, time);
- }
- return retval;
- }
-
- public static String localeAndTimeHashMapToStr(HashMap<String, Long> map) {
- if (map == null || map.isEmpty()) {
- return "";
- }
- final StringBuilder builder = new StringBuilder();
- for (String localeStr : map.keySet()) {
- if (builder.length() > 0) {
- builder.append(LOCALE_AND_TIME_STR_SEPARATER);
- }
- final Long time = map.get(localeStr);
- builder.append(localeStr).append(LOCALE_AND_TIME_STR_SEPARATER);
- builder.append(String.valueOf(time));
- }
- return builder.toString();
- }
}
diff --git a/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java b/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java
index 22c92446a..deb28a08d 100644
--- a/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ResourceUtils.java
@@ -227,19 +227,19 @@ public final class ResourceUtils {
final String keyboardHeightString = getDeviceOverrideValue(res, R.array.keyboard_heights);
final float keyboardHeight;
if (TextUtils.isEmpty(keyboardHeightString)) {
- keyboardHeight = res.getDimension(R.dimen.keyboardHeight);
+ keyboardHeight = res.getDimension(R.dimen.config_default_keyboard_height);
} else {
keyboardHeight = Float.parseFloat(keyboardHeightString) * dm.density;
}
final float maxKeyboardHeight = res.getFraction(
- R.fraction.maxKeyboardHeight, dm.heightPixels, dm.heightPixels);
+ R.fraction.config_max_keyboard_height, dm.heightPixels, dm.heightPixels);
float minKeyboardHeight = res.getFraction(
- R.fraction.minKeyboardHeight, dm.heightPixels, dm.heightPixels);
+ R.fraction.config_min_keyboard_height, dm.heightPixels, dm.heightPixels);
if (minKeyboardHeight < 0.0f) {
// Specified fraction was negative, so it should be calculated against display
// width.
minKeyboardHeight = -res.getFraction(
- R.fraction.minKeyboardHeight, dm.widthPixels, dm.widthPixels);
+ R.fraction.config_min_keyboard_height, dm.widthPixels, dm.widthPixels);
}
// Keyboard height will not exceed maxKeyboardHeight and will not be less than
// minKeyboardHeight.
diff --git a/java/src/com/android/inputmethod/latin/utils/StringUtils.java b/java/src/com/android/inputmethod/latin/utils/StringUtils.java
index 121aecf0f..df420417d 100644
--- a/java/src/com/android/inputmethod/latin/utils/StringUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/StringUtils.java
@@ -16,20 +16,15 @@
package com.android.inputmethod.latin.utils;
+import android.text.TextUtils;
+import android.util.Log;
+
import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.settings.SettingsValues;
-import android.text.TextUtils;
-import android.util.JsonReader;
-import android.util.JsonWriter;
-import android.util.Log;
-
import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.Locale;
@@ -39,6 +34,8 @@ public final class StringUtils {
public static final int CAPITALIZE_FIRST = 1; // First only
public static final int CAPITALIZE_ALL = 2; // All caps
+ private static final String EMPTY_STRING = "";
+
private StringUtils() {
// This utility class is not publicly instantiable.
}
@@ -48,6 +45,16 @@ public final class StringUtils {
return text.codePointCount(0, text.length());
}
+ public static String newSingleCodePointString(int codePoint) {
+ if (Character.charCount(codePoint) == 1) {
+ // Optimization: avoid creating an temporary array for characters that are
+ // represented by a single char value
+ return String.valueOf((char) codePoint);
+ }
+ // For surrogate pair
+ return new String(Character.toChars(codePoint));
+ }
+
public static boolean containsInArray(final String text, final String[] array) {
for (final String element : array) {
if (text.equals(element)) return true;
@@ -70,6 +77,20 @@ public final class StringUtils {
return containsInArray(text, extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT));
}
+ public static String joinCommaSplittableText(final String head, final String tail) {
+ if (TextUtils.isEmpty(head) && TextUtils.isEmpty(tail)) {
+ return EMPTY_STRING;
+ }
+ // Here either head or tail is not null.
+ if (TextUtils.isEmpty(head)) {
+ return tail;
+ }
+ if (TextUtils.isEmpty(tail)) {
+ return head;
+ }
+ return head + SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT + tail;
+ }
+
public static String appendToCommaSplittableTextIfNotExists(final String text,
final String extraValues) {
if (TextUtils.isEmpty(extraValues)) {
@@ -84,7 +105,7 @@ public final class StringUtils {
public static String removeFromCommaSplittableTextIfExists(final String text,
final String extraValues) {
if (TextUtils.isEmpty(extraValues)) {
- return "";
+ return EMPTY_STRING;
}
final String[] elements = extraValues.split(SEPARATOR_FOR_COMMA_SPLITTABLE_TEXT);
if (!containsInArray(text, elements)) {
@@ -357,7 +378,7 @@ public final class StringUtils {
return false;
}
- public static boolean isEmptyStringOrWhiteSpaces(String s) {
+ public static boolean isEmptyStringOrWhiteSpaces(final String s) {
final int N = codePointCount(s);
for (int i = 0; i < N; ++i) {
if (!Character.isWhitespace(s.codePointAt(i))) {
@@ -368,9 +389,9 @@ public final class StringUtils {
}
@UsedForTesting
- public static String byteArrayToHexString(byte[] bytes) {
+ public static String byteArrayToHexString(final byte[] bytes) {
if (bytes == null || bytes.length == 0) {
- return "";
+ return EMPTY_STRING;
}
final StringBuilder sb = new StringBuilder();
for (byte b : bytes) {
@@ -383,7 +404,7 @@ public final class StringUtils {
* Convert hex string to byte array. The string length must be an even number.
*/
@UsedForTesting
- public static byte[] hexStringToByteArray(String hexString) {
+ public static byte[] hexStringToByteArray(final String hexString) {
if (TextUtils.isEmpty(hexString)) {
return null;
}
@@ -399,67 +420,4 @@ public final class StringUtils {
}
return bytes;
}
-
- public static List<Object> jsonStrToList(String s) {
- final ArrayList<Object> retval = CollectionUtils.newArrayList();
- final JsonReader reader = new JsonReader(new StringReader(s));
- try {
- reader.beginArray();
- while(reader.hasNext()) {
- reader.beginObject();
- while (reader.hasNext()) {
- final String name = reader.nextName();
- if (name.equals(Integer.class.getSimpleName())) {
- retval.add(reader.nextInt());
- } else if (name.equals(String.class.getSimpleName())) {
- retval.add(reader.nextString());
- } else {
- Log.w(TAG, "Invalid name: " + name);
- reader.skipValue();
- }
- }
- reader.endObject();
- }
- reader.endArray();
- return retval;
- } catch (IOException e) {
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- }
- }
- return Collections.<Object>emptyList();
- }
-
- public static String listToJsonStr(List<Object> list) {
- if (list == null || list.isEmpty()) {
- return "";
- }
- final StringWriter sw = new StringWriter();
- final JsonWriter writer = new JsonWriter(sw);
- try {
- writer.beginArray();
- for (final Object o : list) {
- writer.beginObject();
- if (o instanceof Integer) {
- writer.name(Integer.class.getSimpleName()).value((Integer)o);
- } else if (o instanceof String) {
- writer.name(String.class.getSimpleName()).value((String)o);
- }
- writer.endObject();
- }
- writer.endArray();
- return sw.toString();
- } catch (IOException e) {
- } finally {
- try {
- if (writer != null) {
- writer.close();
- }
- } catch (IOException e) {
- }
- }
- return "";
- }
}
diff --git a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java
index 102a41b4e..fdbe81ab6 100644
--- a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java
@@ -197,7 +197,9 @@ public final class SubtypeLocaleUtils {
// es_US spanish F Español (EE.UU.) exception
// fr azerty F Français
// fr_CA qwerty F Français (Canada)
+ // fr_CH swiss F Français (Suisse)
// de qwertz F Deutsch
+ // de_CH swiss T Deutsch (Schweiz)
// zz qwerty F No language (QWERTY) in system locale
// fr qwertz T Français (QWERTZ)
// de qwerty T Deutsch (QWERTY)
@@ -298,7 +300,9 @@ public final class SubtypeLocaleUtils {
// es_US spanish F Es Español Español (EE.UU.) exception
// fr azerty F Fr Français Français
// fr_CA qwerty F Fr Français Français (Canada)
+ // fr_CH swiss F Fr Français Français (Suisse)
// de qwertz F De Deutsch Deutsch
+ // de_CH swiss T De Deutsch Deutsch (Schweiz)
// zz qwerty F QWERTY QWERTY
// fr qwertz T Fr Français Français
// de qwerty T De Deutsch Deutsch
diff --git a/java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java b/java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java
index 47ea1ea75..087a7f255 100644
--- a/java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/TypefaceUtils.java
@@ -22,6 +22,9 @@ import android.graphics.Typeface;
import android.util.SparseArray;
public final class TypefaceUtils {
+ private static final char[] KEY_LABEL_REFERENCE_CHAR = { 'M' };
+ private static final char[] KEY_NUMERIC_HINT_LABEL_REFERENCE_CHAR = { '8' };
+
private TypefaceUtils() {
// This utility class is not publicly instantiable.
}
@@ -31,7 +34,7 @@ public final class TypefaceUtils {
// Working variable for the following method.
private static final Rect sTextHeightBounds = new Rect();
- public static float getCharHeight(final char[] referenceChar, final Paint paint) {
+ private static float getCharHeight(final char[] referenceChar, final Paint paint) {
final int key = getCharGeometryCacheKey(referenceChar[0], paint);
synchronized (sTextHeightCache) {
final Float cachedValue = sTextHeightCache.get(key);
@@ -51,7 +54,7 @@ public final class TypefaceUtils {
// Working variable for the following method.
private static final Rect sTextWidthBounds = new Rect();
- public static float getCharWidth(final char[] referenceChar, final Paint paint) {
+ private static float getCharWidth(final char[] referenceChar, final Paint paint) {
final int key = getCharGeometryCacheKey(referenceChar[0], paint);
synchronized (sTextWidthCache) {
final Float cachedValue = sTextWidthCache.get(key);
@@ -66,11 +69,6 @@ public final class TypefaceUtils {
}
}
- public static float getStringWidth(final String string, final Paint paint) {
- paint.getTextBounds(string, 0, string.length(), sTextWidthBounds);
- return sTextWidthBounds.width();
- }
-
private static int getCharGeometryCacheKey(final char referenceChar, final Paint paint) {
final int labelSize = (int)paint.getTextSize();
final Typeface face = paint.getTypeface();
@@ -86,9 +84,25 @@ public final class TypefaceUtils {
}
}
- public static float getLabelWidth(final String label, final Paint paint) {
- final Rect textBounds = new Rect();
- paint.getTextBounds(label, 0, label.length(), textBounds);
- return textBounds.width();
+ public static float getReferenceCharHeight(final Paint paint) {
+ return getCharHeight(KEY_LABEL_REFERENCE_CHAR, paint);
+ }
+
+ public static float getReferenceCharWidth(final Paint paint) {
+ return getCharWidth(KEY_LABEL_REFERENCE_CHAR, paint);
+ }
+
+ public static float getReferenceDigitWidth(final Paint paint) {
+ return getCharWidth(KEY_NUMERIC_HINT_LABEL_REFERENCE_CHAR, paint);
+ }
+
+ // Working variable for the following method.
+ private static final Rect sStringWidthBounds = new Rect();
+
+ public static float getStringWidth(final String string, final Paint paint) {
+ synchronized (sStringWidthBounds) {
+ paint.getTextBounds(string, 0, string.length(), sStringWidthBounds);
+ return sStringWidthBounds.width();
+ }
}
}
diff --git a/java/src/com/android/inputmethod/latin/utils/UnigramProperty.java b/java/src/com/android/inputmethod/latin/utils/UnigramProperty.java
new file mode 100644
index 000000000..4feee4393
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/utils/UnigramProperty.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.android.inputmethod.latin.utils;
+
+import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.latin.BinaryDictionary;
+import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString;
+
+import java.util.ArrayList;
+
+// This has information that belong to a unigram. This class has some detailed attributes such as
+// historical information but they have to be checked only for testing purpose.
+@UsedForTesting
+public class UnigramProperty {
+ public final String mCodePoints;
+ public final boolean mIsNotAWord;
+ public final boolean mIsBlacklisted;
+ public final boolean mHasBigrams;
+ public final boolean mHasShortcuts;
+ public final int mProbability;
+ // mTimestamp, mLevel and mCount are historical info. These values are depend on the
+ // implementation in native code; thus, we must not use them and have any assumptions about
+ // them except for tests.
+ public final int mTimestamp;
+ public final int mLevel;
+ public final int mCount;
+ public final ArrayList<WeightedString> mShortcutTargets = CollectionUtils.newArrayList();
+
+ private static int getCodePointCount(final int[] codePoints) {
+ for (int i = 0; i < codePoints.length; i++) {
+ if (codePoints[i] == 0) {
+ return i;
+ }
+ }
+ return codePoints.length;
+ }
+
+ // This represents invalid unigram when the probability is BinaryDictionary.NOT_A_PROBABILITY.
+ public UnigramProperty(final int[] codePoints, final boolean isNotAWord,
+ final boolean isBlacklisted, final boolean hasBigram,
+ final boolean hasShortcuts, final int probability, final int timestamp,
+ final int level, final int count, final ArrayList<int[]> shortcutTargets,
+ final ArrayList<Integer> shortcutProbabilities) {
+ mCodePoints = new String(codePoints, 0 /* offset */, getCodePointCount(codePoints));
+ mIsNotAWord = isNotAWord;
+ mIsBlacklisted = isBlacklisted;
+ mHasBigrams = hasBigram;
+ mHasShortcuts = hasShortcuts;
+ mProbability = probability;
+ mTimestamp = timestamp;
+ mLevel = level;
+ mCount = count;
+ final int shortcutTargetCount = shortcutTargets.size();
+ for (int i = 0; i < shortcutTargetCount; i++) {
+ final int[] shortcutTargetCodePointArray = shortcutTargets.get(i);
+ final String shortcutTargetString = new String(shortcutTargetCodePointArray,
+ 0 /* offset */, getCodePointCount(shortcutTargetCodePointArray));
+ mShortcutTargets.add(
+ new WeightedString(shortcutTargetString, shortcutProbabilities.get(i)));
+ }
+ }
+
+ @UsedForTesting
+ public boolean isValid() {
+ return mProbability != BinaryDictionary.NOT_A_PROBABILITY;
+ }
+} \ No newline at end of file
diff --git a/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java b/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
index 635afe7cc..db628fe18 100644
--- a/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/UserHistoryDictIOUtils.java
@@ -70,10 +70,11 @@ public final class UserHistoryDictIOUtils {
/**
* Writes dictionary to file.
*/
+ @UsedForTesting
public static void writeDictionary(final DictEncoder dictEncoder,
final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams,
- final FormatOptions formatOptions) {
- final FusionDictionary fusionDict = constructFusionDictionary(dict, bigrams);
+ final FormatOptions formatOptions, final HashMap<String, String> options) {
+ final FusionDictionary fusionDict = constructFusionDictionary(dict, bigrams, options);
fusionDict.addOptionAttribute(USES_FORGETTING_CURVE_KEY, USES_FORGETTING_CURVE_VALUE);
fusionDict.addOptionAttribute(LAST_UPDATED_TIME_KEY,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis())));
@@ -91,11 +92,10 @@ public final class UserHistoryDictIOUtils {
* Constructs a new FusionDictionary from BigramDictionaryInterface.
*/
@UsedForTesting
- static FusionDictionary constructFusionDictionary(
- final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams) {
+ static FusionDictionary constructFusionDictionary(final BigramDictionaryInterface dict,
+ final UserHistoryDictionaryBigramList bigrams, final HashMap<String, String> options) {
final FusionDictionary fusionDict = new FusionDictionary(new PtNodeArray(),
- new FusionDictionary.DictionaryOptions(new HashMap<String, String>(), false,
- false));
+ new FusionDictionary.DictionaryOptions(options));
int profTotal = 0;
for (final String word1 : bigrams.keySet()) {
final HashMap<String, Byte> word1Bigrams = bigrams.getBigrams(word1);
diff --git a/java/src/com/android/inputmethod/latin/utils/UserHistoryForgettingCurveUtils.java b/java/src/com/android/inputmethod/latin/utils/UserHistoryForgettingCurveUtils.java
index 1992b2f5d..677035ed6 100644
--- a/java/src/com/android/inputmethod/latin/utils/UserHistoryForgettingCurveUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/UserHistoryForgettingCurveUtils.java
@@ -20,6 +20,9 @@ import android.util.Log;
import java.util.concurrent.TimeUnit;
+import com.android.inputmethod.annotations.UsedForTesting;
+
+@UsedForTesting
public final class UserHistoryForgettingCurveUtils {
private static final String TAG = UserHistoryForgettingCurveUtils.class.getSimpleName();
private static final boolean DEBUG = false;
@@ -118,18 +121,22 @@ public final class UserHistoryForgettingCurveUtils {
}
}
+ @UsedForTesting
/* package */ static int fcToElapsedTime(byte fc) {
return fc & 0x0F;
}
+ @UsedForTesting
/* package */ static int fcToCount(byte fc) {
return (fc >> 4) & 0x03;
}
+ @UsedForTesting
/* package */ static int fcToLevel(byte fc) {
return (fc >> 6) & 0x03;
}
+ @UsedForTesting
private static int calcFreq(int elapsedTime, int count, int level) {
if (level <= 0) {
// Reserved words, just return -1
@@ -158,6 +165,7 @@ public final class UserHistoryForgettingCurveUtils {
return calcFreq(elapsedTime, count, level);
}
+ @UsedForTesting
public static byte pushElapsedTime(byte fc) {
int elapsedTime = fcToElapsedTime(fc);
int count = fcToCount(fc);
@@ -173,6 +181,7 @@ public final class UserHistoryForgettingCurveUtils {
return calcFc(elapsedTime, count, level);
}
+ @UsedForTesting
public static byte pushCount(byte fc, boolean isValid) {
final int elapsedTime = fcToElapsedTime(fc);
int count = fcToCount(fc);
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index da9c61103..28a647b02 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -102,10 +102,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
&& ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG;
private static final boolean DEBUG_REPLAY_AFTER_FEEDBACK = false
&& ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG;
- // Whether the TextView contents are logged at the end of the session. true will disclose
- // private info.
- private static final boolean LOG_FULL_TEXTVIEW_CONTENTS = false
- && ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS_DEBUG;
// Whether the feedback dialog preserves the editable text across invocations. Should be false
// for normal research builds so users do not have to delete the same feedback string they
// entered earlier. Should be true for builds internal to a development team so when the text
@@ -168,9 +164,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
// U+E001 is in the "private-use area"
/* package for test */ static final String WORD_REPLACEMENT_STRING = "\uE001";
protected static final int SUSPEND_DURATION_IN_MINUTES = 1;
- // set when LatinIME should ignore an onUpdateSelection() callback that
- // arises from operations in this class
- private static boolean sLatinIMEExpectingUpdateSelection = false;
// used to check whether words are not unique
private Suggest mSuggest;
@@ -1126,12 +1119,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
new Object[] { applicationSpecifiedCompletions });
}
- public static boolean getAndClearLatinIMEExpectingUpdateSelection() {
- boolean returnValue = sLatinIMEExpectingUpdateSelection;
- sLatinIMEExpectingUpdateSelection = false;
- return returnValue;
- }
-
/**
* The IME is finishing; it is either being destroyed, or is about to be hidden.
*
@@ -1149,51 +1136,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
// if called from finishViews(), which is called from hideWindow() and onDestroy(). These
// are the situations in which we want to finish up the researchLog.
if (ic != null && !finishingInput) {
- final boolean isTextTruncated;
- final String text;
- if (LOG_FULL_TEXTVIEW_CONTENTS) {
- // Capture the TextView contents. This will trigger onUpdateSelection(), so we
- // set sLatinIMEExpectingUpdateSelection so that when onUpdateSelection() is called,
- // it can tell that it was generated by the logging code, and not by the user, and
- // therefore keep user-visible state as is.
- ic.beginBatchEdit();
- ic.performContextMenuAction(android.R.id.selectAll);
- CharSequence charSequence = ic.getSelectedText(0);
- if (savedSelectionStart != -1 && savedSelectionEnd != -1) {
- ic.setSelection(savedSelectionStart, savedSelectionEnd);
- }
- ic.endBatchEdit();
- sLatinIMEExpectingUpdateSelection = true;
- if (TextUtils.isEmpty(charSequence)) {
- isTextTruncated = false;
- text = "";
- } else {
- if (charSequence.length() > MAX_INPUTVIEW_LENGTH_TO_CAPTURE) {
- int length = MAX_INPUTVIEW_LENGTH_TO_CAPTURE;
- // do not cut in the middle of a supplementary character
- final char c = charSequence.charAt(length - 1);
- if (Character.isHighSurrogate(c)) {
- length--;
- }
- final CharSequence truncatedCharSequence = charSequence.subSequence(0,
- length);
- isTextTruncated = true;
- text = truncatedCharSequence.toString();
- } else {
- isTextTruncated = false;
- text = charSequence.toString();
- }
- }
- } else {
- isTextTruncated = true;
- text = "";
- }
final ResearchLogger researchLogger = getInstance();
// Assume that OUTPUT_ENTIRE_BUFFER is only true when we don't care about privacy (e.g.
// during a live user test), so the normal isPotentiallyPrivate and
// isPotentiallyRevealing flags do not apply
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONFINISHINPUTVIEWINTERNAL,
- isTextTruncated, text);
+ true /* isTextTruncated */, "" /* text */);
researchLogger.commitCurrentLogUnit();
getInstance().stop();
}
@@ -1213,9 +1161,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
public static void latinIME_onUpdateSelection(final int lastSelectionStart,
final int lastSelectionEnd, final int oldSelStart, final int oldSelEnd,
final int newSelStart, final int newSelEnd, final int composingSpanStart,
- final int composingSpanEnd, final boolean expectingUpdateSelection,
- final boolean expectingUpdateSelectionFromLogger,
- final RichInputConnection connection) {
+ final int composingSpanEnd, final RichInputConnection connection) {
String word = "";
if (connection != null) {
TextRange range = connection.getWordRangeAtCursor(WHITESPACE_SEPARATORS, 1);
@@ -1227,8 +1173,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
final String scrubbedWord = researchLogger.scrubWord(word);
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONUPDATESELECTION, lastSelectionStart,
lastSelectionEnd, oldSelStart, oldSelEnd, newSelStart, newSelEnd,
- composingSpanStart, composingSpanEnd, expectingUpdateSelection,
- expectingUpdateSelectionFromLogger, scrubbedWord);
+ composingSpanStart, composingSpanEnd, false /* expectingUpdateSelection */,
+ false /* expectingUpdateSelectionFromLogger */, scrubbedWord);
}
/**
@@ -1411,8 +1357,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
private static final LogStatement LOGSTATEMENT_MAINKEYBOARDVIEW_SETKEYBOARD =
new LogStatement("MainKeyboardViewSetKeyboard", false, false, "elementId", "locale",
"orientation", "width", "modeName", "action", "navigateNext",
- "navigatePrevious", "clobberSettingsKey", "passwordInput", "shortcutKeyEnabled",
- "hasShortcutKey", "languageSwitchKeyEnabled", "isMultiLine", "tw", "th",
+ "navigatePrevious", "clobberSettingsKey", "passwordInput",
+ "supportsSwitchingToShortcutIme", "hasShortcutKey", "languageSwitchKeyEnabled",
+ "isMultiLine", "tw", "th",
"keys");
public static void mainKeyboardView_setKeyboard(final Keyboard keyboard,
final int orientation) {
@@ -1425,7 +1372,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
kid.mLocale + ":" + kid.mSubtype.getExtraValueOf(KEYBOARD_LAYOUT_SET),
orientation, kid.mWidth, KeyboardId.modeName(kid.mMode), kid.imeAction(),
kid.navigateNext(), kid.navigatePrevious(), kid.mClobberSettingsKey,
- isPasswordView, kid.mShortcutKeyEnabled, kid.mHasShortcutKey,
+ isPasswordView, kid.mSupportsSwitchingToShortcutIme, kid.mHasShortcutKey,
kid.mLanguageSwitchKeyEnabled, kid.isMultiLine(), keyboard.mOccupiedWidth,
keyboard.mOccupiedHeight, keyboard.getKeys());
}