diff options
12 files changed, 34 insertions, 20 deletions
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 8cc66425c..77a46f9c7 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -183,6 +183,7 @@ /> <!-- TODO: This Bengali (Bangladesh) keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xa2144b0c" @@ -191,6 +192,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=bengali_akkhor,EmojiCapable" android:isAsciiCapable="false" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xbff5986c" @@ -369,6 +371,7 @@ /> <!-- TODO: This Hinglish keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_hi_ZZ" android:subtypeId="0x352eb37c" @@ -377,6 +380,7 @@ android:imeSubtypeExtraValue="AsciiCapable,KeyboardLayoutSet=qwerty,EmojiCapable" android:isAsciiCapable="true" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x35b7526a" @@ -549,6 +553,7 @@ /> <!-- TODO: This Myanmar keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xea266ea4" @@ -557,6 +562,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=myanmar,EmojiCapable,CombiningRules=MyanmarReordering" android:isAsciiCapable="false" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x3f12ee14" @@ -639,6 +645,7 @@ /> <!-- TODO: This Sinhala keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x5c6b3bde" @@ -647,6 +654,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=sinhala,EmojiCapable" android:isAsciiCapable="false" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x8e94d413" @@ -673,6 +681,7 @@ /> <!-- TODO: This Serbian Latin keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_sr_ZZ" android:subtypeId="0xf4a5569c" @@ -681,6 +690,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=serbian_qwertz,AsciiCapable,EmojiCapable" android:isAsciiCapable="true" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x48b4ff43" @@ -706,6 +716,7 @@ android:isAsciiCapable="false" /> <!-- TODO: Enabling/Disabling ta_LK subtype must be aligned with si_LK subtype. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x6ca12d84" @@ -714,6 +725,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=tamil,EmojiCapable" android:isAsciiCapable="false" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x785abbd9" @@ -764,6 +776,7 @@ /> <!-- TODO: This Uzbek keyboard is a preliminary layout. This isn't based on the final specification. --> + <!-- <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0xad5cf7f6" @@ -772,6 +785,7 @@ android:imeSubtypeExtraValue="KeyboardLayoutSet=uzbek,AsciiCapable,EmojiCapable" android:isAsciiCapable="true" /> + --> <subtype android:icon="@drawable/ic_ime_switcher_dark" android:label="@string/subtype_generic" android:subtypeId="0x93972eee" diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp index 365217a60..76c7fdd6f 100644 --- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp +++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp @@ -252,6 +252,9 @@ static void latinime_BinaryDictionary_getSuggestions(JNIEnv *env, jclass clazz, } else { dictionary->getPredictions(&prevWordsInfo, &suggestionResults); } + if (DEBUG_DICT) { + suggestionResults.dumpSuggestions(); + } suggestionResults.outputSuggestions(env, outSuggestionCount, outCodePointsArray, outScoresArray, outSpaceIndicesArray, outTypesArray, outAutoCommitFirstWordConfidenceArray, inOutWeightOfLangModelVsSpatialModel); diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h index e55c9eb8a..885118524 100644 --- a/native/jni/src/defines.h +++ b/native/jni/src/defines.h @@ -119,7 +119,7 @@ static inline void dumpWordInfo(const int *word, const int length, const int ran const int probability) { static char charBuf[50]; const int N = intArrayToCharArray(word, length, charBuf, NELEMS(charBuf)); - if (N > 1) { + if (N > 0) { AKLOGI("%2d [ %s ] (%d)", rank, charBuf, probability); } } diff --git a/native/jni/src/suggest/core/dictionary/dictionary.cpp b/native/jni/src/suggest/core/dictionary/dictionary.cpp index 8d3f8a9f8..7a69d3ceb 100644 --- a/native/jni/src/suggest/core/dictionary/dictionary.cpp +++ b/native/jni/src/suggest/core/dictionary/dictionary.cpp @@ -55,9 +55,6 @@ void Dictionary::getSuggestions(ProximityInfo *proximityInfo, DicTraverseSession suggest->getSuggestions(proximityInfo, traverseSession, xcoordinates, ycoordinates, times, pointerIds, inputCodePoints, inputSize, weightOfLangModelVsSpatialModel, outSuggestionResults); - if (DEBUG_DICT) { - outSuggestionResults->dumpSuggestions(); - } } Dictionary::NgramListenerForPrediction::NgramListenerForPrediction( diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java index 6f747b377..2134eb5fe 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/KeyboardLayoutSetSubtypesCountTests.java @@ -27,8 +27,8 @@ import java.util.ArrayList; @SmallTest public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase { - private static final int NUMBER_OF_SUBTYPES = 85; - private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 50; + private static final int NUMBER_OF_SUBTYPES = 78; + private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 47; private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2; @Override diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java index 62625890e..c39a392eb 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsBengaliBD.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.BengaliAkkhor; import com.android.inputmethod.keyboard.layout.LayoutBase; @@ -29,7 +29,7 @@ import java.util.Locale; /** * bn_BD: Bengali (Bangladesh)/bengali_akkhor */ -@SmallTest +@Suppress public final class TestsBengaliBD extends LayoutTestsBase { private static final Locale LOCALE = new Locale("bn", "BD"); private static final LayoutBase LAYOUT = new BengaliAkkhor(new BengaliBDCustomzier(LOCALE)); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java index 613b3bbc2..a8e872316 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsHinglish.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.Qwerty; @@ -30,7 +30,7 @@ import java.util.Locale; /* * hi_ZZ: Hinglish/qwerty */ -@SmallTest +@Suppress public final class TestsHinglish extends LayoutTestsBase { private static final Locale LOCALE = new Locale("hi", "ZZ"); private static final LayoutBase LAYOUT = new Qwerty(new HinglishCustomizer(LOCALE)); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java index b581e4a12..18baa6152 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsMyanmarMM.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.Myanmar; @@ -26,7 +26,7 @@ import java.util.Locale; /** * my_MM: Myanmar (Myanmar)/myanmar */ -@SmallTest +@Suppress public final class TestsMyanmarMM extends LayoutTestsBase { private static final Locale LOCALE = new Locale("my", "MM"); private static final LayoutBase LAYOUT = new Myanmar(LOCALE); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java index 7490d30ab..ea957e44f 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatin.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.SerbianQwertz; @@ -27,7 +27,7 @@ import java.util.Locale; /** * sr_ZZ: Serbian (Latin)/serbian_qwertz */ -@SmallTest +@Suppress public final class TestsSerbianLatin extends LayoutTestsBase { private static final Locale LOCALE = new Locale("sr", "ZZ"); private static final LayoutBase LAYOUT = new SerbianQwertz(new SerbianLatinCustomizer(LOCALE)); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java index 6d9351c9d..a1984735d 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsSerbianLatinQwerty.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.Qwerty; @@ -29,7 +29,7 @@ import java.util.Locale; /** * sr_ZZ: Serbian (Latin)/qwerty */ -@SmallTest +@Suppress public final class TestsSerbianLatinQwerty extends LayoutTestsBase { private static final Locale LOCALE = new Locale("sr", "ZZ"); private static final LayoutBase LAYOUT = new Qwerty(new SerbianLatinQwertyCustomizer(LOCALE)); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java index fd12a6a82..169de1f31 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbek.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.Uzbek; @@ -27,7 +27,7 @@ import java.util.Locale; /** * uz_UZ: Uzbek (Uzbekistan)/uzbek */ -@SmallTest +@Suppress public final class TestsUzbek extends LayoutTestsBase { private static final Locale LOCALE = new Locale("uz", "UZ"); private static final LayoutBase LAYOUT = new Uzbek(new UzbekCustomizer(LOCALE)); diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java index 4c33a8cc1..c210da163 100644 --- a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java +++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsUzbekQwerty.java @@ -16,7 +16,7 @@ package com.android.inputmethod.keyboard.layout.tests; -import android.test.suitebuilder.annotation.SmallTest; +import android.test.suitebuilder.annotation.Suppress; import com.android.inputmethod.keyboard.layout.LayoutBase; import com.android.inputmethod.keyboard.layout.Qwerty; @@ -28,7 +28,7 @@ import java.util.Locale; /** * uz_UZ: Uzbek (Uzbekistan)/qwerty */ -@SmallTest +@Suppress public final class TestsUzbekQwerty extends LayoutTestsBase { private static final Locale LOCALE = new Locale("uz", "UZ"); private static final LayoutBase LAYOUT = new Qwerty(new UzbekQwertyCustomizer(LOCALE)); |