am df3f09c2: Sync with jb-mr1-dev
* commit 'df3f09c2e7fab17fe39b52fc9da99ac6da3647dc': Add <uses-sdk> in manifest files of test apks Cancel the while-typing timer when user hits the spacebar Cleanup headers Add language switch key to 10" tablet Add a <uses-sdk> element in the LatinIME's manifest Add android::supportsRtl="true" Fix east slavic keyboard layoutsmain
commit
aeffee1111
|
@ -18,6 +18,8 @@
|
||||||
coreApp="true"
|
coreApp="true"
|
||||||
package="com.android.inputmethod.latin">
|
package="com.android.inputmethod.latin">
|
||||||
|
|
||||||
|
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
|
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
|
||||||
|
@ -26,7 +28,8 @@
|
||||||
<application android:label="@string/aosp_android_keyboard_ime_name"
|
<application android:label="@string/aosp_android_keyboard_ime_name"
|
||||||
android:icon="@drawable/ic_ime_settings"
|
android:icon="@drawable/ic_ime_settings"
|
||||||
android:backupAgent="BackupAgent"
|
android:backupAgent="BackupAgent"
|
||||||
android:killAfterRestore="false">
|
android:killAfterRestore="false"
|
||||||
|
android:supportsRtl="true">
|
||||||
|
|
||||||
<service android:name="LatinIME"
|
<service android:name="LatinIME"
|
||||||
android:label="@string/aosp_android_keyboard_ime_name"
|
android:label="@string/aosp_android_keyboard_ime_name"
|
||||||
|
|
|
@ -24,15 +24,36 @@
|
||||||
<switch>
|
<switch>
|
||||||
<case
|
<case
|
||||||
latin:languageCode="fa"
|
latin:languageCode="fa"
|
||||||
|
latin:languageSwitchKeyEnabled="true"
|
||||||
|
>
|
||||||
|
<Key
|
||||||
|
latin:keyStyle="languageSwitchKeyStyle" />
|
||||||
|
<Key
|
||||||
|
latin:keyStyle="spaceKeyStyle"
|
||||||
|
latin:keyWidth="24.141%p" />
|
||||||
|
<Key
|
||||||
|
latin:keyStyle="zwnjKeyStyle" />
|
||||||
|
</case>
|
||||||
|
<case
|
||||||
|
latin:languageCode="fa"
|
||||||
|
latin:languageSwitchKeyEnabled="false"
|
||||||
>
|
>
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
latin:keyWidth="32.188%p" />
|
latin:keyWidth="32.188%p" />
|
||||||
<!-- U+200C: "" ZERO WIDTH NON-JOINER
|
|
||||||
U+200D: "" ZERO WIDTH JOINER -->
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="zwnjKeyStyle" />
|
latin:keyStyle="zwnjKeyStyle" />
|
||||||
</case>
|
</case>
|
||||||
|
<case
|
||||||
|
latin:languageSwitchKeyEnabled="true"
|
||||||
|
>
|
||||||
|
<Key
|
||||||
|
latin:keyStyle="languageSwitchKeyStyle" />
|
||||||
|
<Key
|
||||||
|
latin:keyStyle="spaceKeyStyle"
|
||||||
|
latin:keyWidth="32.188%p" />
|
||||||
|
</case>
|
||||||
|
<!-- languageSwitchKeyEnabled="false" -->
|
||||||
<default>
|
<default>
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="spaceKeyStyle"
|
latin:keyStyle="spaceKeyStyle"
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="spaceKeyStyle"
|
latin:styleName="spaceKeyStyle"
|
||||||
latin:code="!code/key_space"
|
latin:code="!code/key_space"
|
||||||
latin:keyActionFlags="noKeyPreview" />
|
latin:keyActionFlags="noKeyPreview|enableLongPress" />
|
||||||
<!-- U+200C: ZERO WIDTH NON-JOINER
|
<!-- U+200C: ZERO WIDTH NON-JOINER
|
||||||
U+200D: ZERO WIDTH JOINER -->
|
U+200D: ZERO WIDTH JOINER -->
|
||||||
<key-style
|
<key-style
|
||||||
|
@ -99,6 +99,12 @@
|
||||||
latin:keyIconDisabled="!icon/shortcut_key_disabled"
|
latin:keyIconDisabled="!icon/shortcut_key_disabled"
|
||||||
latin:keyActionFlags="noKeyPreview"
|
latin:keyActionFlags="noKeyPreview"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
|
<key-style
|
||||||
|
latin:styleName="languageSwitchKeyStyle"
|
||||||
|
latin:code="!code/key_language_switch"
|
||||||
|
latin:keyIcon="!icon/language_switch_key"
|
||||||
|
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping|enableLongPress"
|
||||||
|
latin:altCode="!code/key_space" />
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="settingsKeyStyle"
|
latin:styleName="settingsKeyStyle"
|
||||||
latin:code="!code/key_settings"
|
latin:code="!code/key_settings"
|
||||||
|
|
|
@ -33,9 +33,8 @@
|
||||||
<include
|
<include
|
||||||
latin:keyboardLayout="@xml/rowkeys_east_slavic1"
|
latin:keyboardLayout="@xml/rowkeys_east_slavic1"
|
||||||
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
|
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="ъ" />
|
latin:keyLabel="!text/keylabel_for_east_slavic_row1_12" />
|
||||||
<Key
|
<Key
|
||||||
latin:keyStyle="deleteKeyStyle"
|
latin:keyStyle="deleteKeyStyle"
|
||||||
latin:keyWidth="fillRight" />
|
latin:keyWidth="fillRight" />
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
latin:keyLabel="е"
|
latin:keyLabel="е"
|
||||||
latin:keyHintLabel="5"
|
latin:keyHintLabel="5"
|
||||||
latin:additionalMoreKeys="5"
|
latin:additionalMoreKeys="5"
|
||||||
latin:moreKeys="!text/more_keys_for_cyrillic_ye" />
|
latin:moreKeys="!text/more_keys_for_cyrillic_ie" />
|
||||||
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
|
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="н"
|
latin:keyLabel="н"
|
||||||
|
@ -58,7 +58,8 @@
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="г"
|
latin:keyLabel="г"
|
||||||
latin:keyHintLabel="7"
|
latin:keyHintLabel="7"
|
||||||
latin:additionalMoreKeys="7" />
|
latin:additionalMoreKeys="7"
|
||||||
|
latin:moreKeys="!text/more_keys_for_cyrillic_ghe" />
|
||||||
<!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
|
<!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA -->
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="ш"
|
latin:keyLabel="ш"
|
||||||
|
@ -75,6 +76,5 @@
|
||||||
latin:additionalMoreKeys="0" />
|
latin:additionalMoreKeys="0" />
|
||||||
<!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
|
<!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="х"
|
latin:keyLabel="х" />
|
||||||
latin:moreKeys="!text/more_keys_for_cyrillic_ha" />
|
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
<!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
|
<!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="ж" />
|
latin:keyLabel="ж" />
|
||||||
<!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
|
|
||||||
<Key
|
<Key
|
||||||
latin:keyLabel="э" />
|
latin:keyLabel="!text/keylabel_for_east_slavic_row2_11" />
|
||||||
</merge>
|
</merge>
|
||||||
|
|
|
@ -154,8 +154,7 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSG_TYPING_STATE_EXPIRED:
|
case MSG_TYPING_STATE_EXPIRED:
|
||||||
cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator,
|
startWhileTypingFadeinAnimation(keyboardView);
|
||||||
keyboardView.mAltCodeKeyWhileTypingFadeinAnimator);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,7 +228,7 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
|
||||||
removeMessages(MSG_LONGPRESS_KEY);
|
removeMessages(MSG_LONGPRESS_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
|
private static void cancelAndStartAnimators(final ObjectAnimator animatorToCancel,
|
||||||
final ObjectAnimator animatorToStart) {
|
final ObjectAnimator animatorToStart) {
|
||||||
float startFraction = 0.0f;
|
float startFraction = 0.0f;
|
||||||
if (animatorToCancel.isStarted()) {
|
if (animatorToCancel.isStarted()) {
|
||||||
|
@ -241,18 +240,39 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
|
||||||
animatorToStart.setCurrentPlayTime(startTime);
|
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
|
@Override
|
||||||
public void startTypingStateTimer() {
|
public void startTypingStateTimer(Key typedKey) {
|
||||||
|
if (typedKey.isModifier() || typedKey.altCodeWhileTyping()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final boolean isTyping = isTypingState();
|
final boolean isTyping = isTypingState();
|
||||||
removeMessages(MSG_TYPING_STATE_EXPIRED);
|
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.mCode;
|
||||||
|
if (typedCode == Keyboard.CODE_SPACE || typedCode == Keyboard.CODE_ENTER) {
|
||||||
|
startWhileTypingFadeinAnimation(keyboardView);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sendMessageDelayed(
|
sendMessageDelayed(
|
||||||
obtainMessage(MSG_TYPING_STATE_EXPIRED), mParams.mIgnoreAltCodeKeyTimeout);
|
obtainMessage(MSG_TYPING_STATE_EXPIRED), mParams.mIgnoreAltCodeKeyTimeout);
|
||||||
if (isTyping) {
|
if (isTyping) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final MainKeyboardView keyboardView = getOuterInstance();
|
startWhileTypingFadeoutAnimation(keyboardView);
|
||||||
cancelAndStartAnimators(keyboardView.mAltCodeKeyWhileTypingFadeinAnimator,
|
|
||||||
keyboardView.mAltCodeKeyWhileTypingFadeoutAnimator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class PointerTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface TimerProxy {
|
public interface TimerProxy {
|
||||||
public void startTypingStateTimer();
|
public void startTypingStateTimer(Key typedKey);
|
||||||
public boolean isTypingState();
|
public boolean isTypingState();
|
||||||
public void startKeyRepeatTimer(PointerTracker tracker);
|
public void startKeyRepeatTimer(PointerTracker tracker);
|
||||||
public void startLongPressTimer(PointerTracker tracker);
|
public void startLongPressTimer(PointerTracker tracker);
|
||||||
|
@ -95,7 +95,7 @@ public class PointerTracker {
|
||||||
|
|
||||||
public static class Adapter implements TimerProxy {
|
public static class Adapter implements TimerProxy {
|
||||||
@Override
|
@Override
|
||||||
public void startTypingStateTimer() {}
|
public void startTypingStateTimer(Key typedKey) {}
|
||||||
@Override
|
@Override
|
||||||
public boolean isTypingState() { return false; }
|
public boolean isTypingState() { return false; }
|
||||||
@Override
|
@Override
|
||||||
|
@ -329,9 +329,7 @@ public class PointerTracker {
|
||||||
mListener.onPressKey(key.mCode);
|
mListener.onPressKey(key.mCode);
|
||||||
final boolean keyboardLayoutHasBeenChanged = mKeyboardLayoutHasBeenChanged;
|
final boolean keyboardLayoutHasBeenChanged = mKeyboardLayoutHasBeenChanged;
|
||||||
mKeyboardLayoutHasBeenChanged = false;
|
mKeyboardLayoutHasBeenChanged = false;
|
||||||
if (!key.altCodeWhileTyping() && !key.isModifier()) {
|
mTimerProxy.startTypingStateTimer(key);
|
||||||
mTimerProxy.startTypingStateTimer();
|
|
||||||
}
|
|
||||||
return keyboardLayoutHasBeenChanged;
|
return keyboardLayoutHasBeenChanged;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -956,9 +954,7 @@ public class PointerTracker {
|
||||||
public void onRegisterKey(Key key) {
|
public void onRegisterKey(Key key) {
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
detectAndSendKey(key, key.mX, key.mY);
|
detectAndSendKey(key, key.mX, key.mY);
|
||||||
if (!key.altCodeWhileTyping() && !key.isModifier()) {
|
mTimerProxy.startTypingStateTimer(key);
|
||||||
mTimerProxy.startTypingStateTimer();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,10 +21,10 @@
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
#include "proximity_info.h"
|
#include "proximity_info.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <cstring>
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
#include "proximity_info.h"
|
#include "proximity_info.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
#ifdef USE_MMAP_FOR_DICTIONARY
|
#ifdef USE_MMAP_FOR_DICTIONARY
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else // USE_MMAP_FOR_DICTIONARY
|
#else // USE_MMAP_FOR_DICTIONARY
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#endif // USE_MMAP_FOR_DICTIONARY
|
#endif // USE_MMAP_FOR_DICTIONARY
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "jni_common.h"
|
#include "jni_common.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "proximity_info.h"
|
#include "proximity_info.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <errno.h>
|
#include <cerrno>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
using namespace latinime;
|
using namespace latinime;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#ifndef LATINIME_JNI_COMMON_H
|
#ifndef LATINIME_JNI_COMMON_H
|
||||||
#define LATINIME_JNI_COMMON_H
|
#define LATINIME_JNI_COMMON_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: bigram_dictionary.cpp"
|
#define LOG_TAG "LatinIME: bigram_dictionary.cpp"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
class Dictionary;
|
|
||||||
class BigramDictionary {
|
class BigramDictionary {
|
||||||
public:
|
public:
|
||||||
BigramDictionary(const unsigned char *dict, int maxWordLength, int maxPredictions);
|
BigramDictionary(const unsigned char *dict, int maxWordLength, int maxPredictions);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,10 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <ctype.h>
|
#include <cctype>
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
#include <stdio.h>
|
#include <cstring>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: correction.cpp"
|
#define LOG_TAG "LatinIME: correction.cpp"
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef LATINIME_CORRECTION_H
|
#ifndef LATINIME_CORRECTION_H
|
||||||
#define LATINIME_CORRECTION_H
|
#define LATINIME_CORRECTION_H
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "correction_state.h"
|
#include "correction_state.h"
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: dictionary.cpp"
|
#define LOG_TAG "LatinIME: dictionary.cpp"
|
||||||
|
|
||||||
#include "binary_format.h"
|
#include "binary_format.h"
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
#include <stdio.h>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: proximity_info.cpp"
|
#define LOG_TAG "LatinIME: proximity_info.cpp"
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: proximity_info_state.cpp"
|
#define LOG_TAG "LatinIME: proximity_info_state.cpp"
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#ifndef LATINIME_PROXIMITY_INFO_STATE_H
|
#ifndef LATINIME_PROXIMITY_INFO_STATE_H
|
||||||
#define LATINIME_PROXIMITY_INFO_STATE_H
|
#define LATINIME_PROXIMITY_INFO_STATE_H
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
|
|
||||||
#define LOG_TAG "LatinIME: unigram_dictionary.cpp"
|
#define LOG_TAG "LatinIME: unigram_dictionary.cpp"
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,15 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "correction.h"
|
|
||||||
#include "correction_state.h"
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "proximity_info.h"
|
|
||||||
#include "words_priority_queue.h"
|
|
||||||
#include "words_priority_queue_pool.h"
|
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
class Correction;
|
||||||
|
class ProximityInfo;
|
||||||
class TerminalAttributes;
|
class TerminalAttributes;
|
||||||
|
class WordsPriorityQueuePool;
|
||||||
|
|
||||||
class UnigramDictionary {
|
class UnigramDictionary {
|
||||||
typedef struct { int first; int second; int replacement; } digraph_t;
|
typedef struct { int first; int second; int replacement; } digraph_t;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include <cstring> // for memcpy()
|
#include <cstring> // for memcpy()
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
#include "correction.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
#ifndef LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
#ifndef LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
||||||
#define LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
#define LATINIME_WORDS_PRIORITY_QUEUE_POOL_H
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <new>
|
|
||||||
#include "words_priority_queue.h"
|
#include "words_priority_queue.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.android.inputmethod.latin.tests">
|
package="com.android.inputmethod.latin.tests">
|
||||||
|
|
||||||
|
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||||
|
|
||||||
<application>
|
<application>
|
||||||
|
|
|
@ -20,12 +20,16 @@
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<!-- U+045E: "ў" CYRILLIC SMALL LETTER SHORT U -->
|
<!-- U+045E: "ў" CYRILLIC SMALL LETTER SHORT U -->
|
||||||
<string name="keylabel_for_east_slavic_row1_9">ў</string>
|
<string name="keylabel_for_east_slavic_row1_9">ў</string>
|
||||||
|
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
|
||||||
|
<string name="keylabel_for_east_slavic_row1_12">ё</string>
|
||||||
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
||||||
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
||||||
|
<!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
|
||||||
|
<string name="keylabel_for_east_slavic_row2_11">э</string>
|
||||||
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
|
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
|
||||||
<string name="keylabel_for_east_slavic_row3_5">і</string>
|
<string name="keylabel_for_east_slavic_row3_5">і</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
|
||||||
<string name="more_keys_for_cyrillic_ha">ъ</string>
|
<string name="more_keys_for_cyrillic_ie">ё</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
<string name="more_keys_for_cyrillic_soft_sign">ъ</string>
|
<string name="more_keys_for_cyrillic_soft_sign">ъ</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -20,16 +20,20 @@
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
||||||
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
||||||
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
|
<string name="keylabel_for_east_slavic_row1_12">ъ</string>
|
||||||
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
||||||
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
||||||
|
<!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
|
||||||
|
<string name="keylabel_for_east_slavic_row2_11">э</string>
|
||||||
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
||||||
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
||||||
<!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U -->
|
<!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U -->
|
||||||
<string name="more_keys_for_cyrillic_u">ү</string>
|
<string name="more_keys_for_cyrillic_u">ү</string>
|
||||||
|
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
|
||||||
|
<string name="more_keys_for_cyrillic_ie">ё</string>
|
||||||
<!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER -->
|
<!-- U+04A3: "ң" CYRILLIC SMALL LETTER EN WITH DESCENDER -->
|
||||||
<string name="more_keys_for_cyrillic_en">ң</string>
|
<string name="more_keys_for_cyrillic_en">ң</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
|
||||||
<string name="more_keys_for_cyrillic_ha">ъ</string>
|
|
||||||
<!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O -->
|
<!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O -->
|
||||||
<string name="more_keys_for_cyrillic_o">ө</string>
|
<string name="more_keys_for_cyrillic_o">ө</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
|
|
|
@ -20,14 +20,16 @@
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
||||||
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
||||||
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
|
<string name="keylabel_for_east_slavic_row1_12">ъ</string>
|
||||||
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
||||||
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
<string name="keylabel_for_east_slavic_row2_1">ы</string>
|
||||||
|
<!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
|
||||||
|
<string name="keylabel_for_east_slavic_row2_11">э</string>
|
||||||
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
||||||
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
||||||
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
|
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO -->
|
||||||
<string name="more_keys_for_cyrillic_ye">ё</string>
|
<string name="more_keys_for_cyrillic_ie">ё</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
|
||||||
<string name="more_keys_for_cyrillic_ha">ъ</string>
|
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
<string name="more_keys_for_cyrillic_soft_sign">ъ</string>
|
<string name="more_keys_for_cyrillic_soft_sign">ъ</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -20,12 +20,16 @@
|
||||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
<!-- U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
||||||
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
<string name="keylabel_for_east_slavic_row1_9">щ</string>
|
||||||
|
<!-- U+0457: "ї" CYRILLIC SMALL LETTER YI -->
|
||||||
|
<string name="keylabel_for_east_slavic_row1_12">ї</string>
|
||||||
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
|
<!-- U+0456: "і" CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I -->
|
||||||
<string name="keylabel_for_east_slavic_row2_1">і</string>
|
<string name="keylabel_for_east_slavic_row2_1">і</string>
|
||||||
|
<!-- U+0454: "є" CYRILLIC SMALL LETTER UKRAINIAN IE -->
|
||||||
|
<string name="keylabel_for_east_slavic_row2_11">є</string>
|
||||||
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
||||||
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
<string name="keylabel_for_east_slavic_row3_5">и</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+0491: "ґ" CYRILLIC SMALL LETTER GHE WITH UPTURN -->
|
||||||
<string name="more_keys_for_cyrillic_ha">ъ</string>
|
<string name="more_keys_for_cyrillic_ghe">ґ</string>
|
||||||
<!-- U+0457: "ї" CYRILLIC SMALL LETTER YI -->
|
<!-- U+0457: "ї" CYRILLIC SMALL LETTER YI -->
|
||||||
<string name="more_keys_for_east_slavic_row2_1">ї</string>
|
<string name="more_keys_for_east_slavic_row2_1">ї</string>
|
||||||
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
<!-- U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||||
|
|
|
@ -44,12 +44,13 @@
|
||||||
<string name="more_keys_for_nordic_row2_10"></string>
|
<string name="more_keys_for_nordic_row2_10"></string>
|
||||||
<string name="more_keys_for_nordic_row2_11"></string>
|
<string name="more_keys_for_nordic_row2_11"></string>
|
||||||
<string name="keylabel_for_east_slavic_row1_9"></string>
|
<string name="keylabel_for_east_slavic_row1_9"></string>
|
||||||
|
<string name="keylabel_for_east_slavic_row1_12"></string>
|
||||||
<string name="keylabel_for_east_slavic_row2_1"></string>
|
<string name="keylabel_for_east_slavic_row2_1"></string>
|
||||||
|
<string name="keylabel_for_east_slavic_row2_11"></string>
|
||||||
<string name="keylabel_for_east_slavic_row3_5"></string>
|
<string name="keylabel_for_east_slavic_row3_5"></string>
|
||||||
<string name="more_keys_for_cyrillic_u"></string>
|
<string name="more_keys_for_cyrillic_u"></string>
|
||||||
<string name="more_keys_for_cyrillic_ye"></string>
|
|
||||||
<string name="more_keys_for_cyrillic_en"></string>
|
<string name="more_keys_for_cyrillic_en"></string>
|
||||||
<string name="more_keys_for_cyrillic_ha"></string>
|
<string name="more_keys_for_cyrillic_ghe"></string>
|
||||||
<string name="more_keys_for_east_slavic_row2_1"></string>
|
<string name="more_keys_for_east_slavic_row2_1"></string>
|
||||||
<string name="more_keys_for_cyrillic_o"></string>
|
<string name="more_keys_for_cyrillic_o"></string>
|
||||||
<string name="more_keys_for_cyrillic_soft_sign"></string>
|
<string name="more_keys_for_cyrillic_soft_sign"></string>
|
||||||
|
|
Loading…
Reference in New Issue