Merge remote-tracking branch 'goog/master' into mergescriptpackage
commit
f4ae7ba881
|
@ -0,0 +1,58 @@
|
|||
<?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"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_styles_common" />
|
||||
<Row
|
||||
latin:keyWidth="8.182%p"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian1"
|
||||
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
|
||||
<Key
|
||||
latin:keyStyle="deleteKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="8.182%p"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian2" />
|
||||
<Key
|
||||
latin:keyStyle="enterKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="8.182%p"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shiftKeyStyle"
|
||||
latin:keyWidth="10.0%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian3" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_comma_period" />
|
||||
</Row>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/row_qwerty4" />
|
||||
</merge>
|
|
@ -0,0 +1,69 @@
|
|||
<?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"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_styles_common" />
|
||||
<Row
|
||||
latin:keyWidth="7.375%p"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="tabKeyStyle"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="7.969%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian1"
|
||||
latin:keyLabelFlags="disableAdditionalMoreKeys|disableKeyHintLabel" />
|
||||
<Key
|
||||
latin:keyStyle="deleteKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="7.227%p"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="toSymbolKeyStyle"
|
||||
latin:keyLabelFlags="alignLeft"
|
||||
latin:keyWidth="11.172%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian2" />
|
||||
<Key
|
||||
latin:keyStyle="enterKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="7.000%p"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shiftKeyStyle"
|
||||
latin:keyWidth="13.829%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian3" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/keys_comma_period" />
|
||||
<Key
|
||||
latin:keyStyle="shiftKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/row_qwerty4" />
|
||||
</merge>
|
|
@ -0,0 +1,26 @@
|
|||
<?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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<Keyboard
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rows_mongolian" />
|
||||
</Keyboard>
|
|
@ -0,0 +1,42 @@
|
|||
<?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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<KeyboardLayoutSet
|
||||
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
|
||||
<Element
|
||||
latin:elementName="alphabet"
|
||||
latin:elementKeyboard="@xml/kbd_mongolian"
|
||||
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>
|
|
@ -54,6 +54,7 @@
|
|||
lt: Lithuanian/qwerty
|
||||
lv: Latvian/qwerty
|
||||
mk: Macedonian/south_slavic
|
||||
mn: Mongolian/mongolian
|
||||
ms: Malay/qwerty
|
||||
nb: Norwegian Bokmål/nordic
|
||||
nl: Dutch/qwerty
|
||||
|
@ -311,6 +312,13 @@
|
|||
android:imeSubtypeMode="keyboard"
|
||||
android:imeSubtypeExtraValue="KeyboardLayoutSet=south_slavic"
|
||||
/>
|
||||
<subtype android:icon="@drawable/ic_subtype_keyboard"
|
||||
android:label="@string/subtype_generic"
|
||||
android:subtypeId="0xcdcfc3ab"
|
||||
android:imeSubtypeLocale="mn"
|
||||
android:imeSubtypeMode="keyboard"
|
||||
android:imeSubtypeExtraValue="KeyboardLayoutSet=mongolian"
|
||||
/>
|
||||
<subtype android:icon="@drawable/ic_subtype_keyboard"
|
||||
android:label="@string/subtype_generic"
|
||||
android:subtypeId="0x84c87c61"
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
<?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"
|
||||
>
|
||||
<!-- U+0444: "ф" CYRILLIC SMALL LETTER EF -->
|
||||
<Key
|
||||
latin:keyLabel="ф"
|
||||
latin:keyHintLabel="1"
|
||||
latin:additionalMoreKeys="1" />
|
||||
<!-- U+0446: "ц" CYRILLIC SMALL LETTER TSE -->
|
||||
<Key
|
||||
latin:keyLabel="ц"
|
||||
latin:keyHintLabel="2"
|
||||
latin:additionalMoreKeys="2" />
|
||||
<!-- U+0443: "у" CYRILLIC SMALL LETTER U -->
|
||||
<Key
|
||||
latin:keyLabel="у"
|
||||
latin:keyHintLabel="3"
|
||||
latin:additionalMoreKeys="3"
|
||||
latin:moreKeys="!text/more_keys_for_cyrillic_u" />
|
||||
<!-- U+0436: "ж" CYRILLIC SMALL LETTER ZHE -->
|
||||
<Key
|
||||
latin:keyLabel="ж"
|
||||
latin:keyHintLabel="4"
|
||||
latin:additionalMoreKeys="4" />
|
||||
<!-- U+044D: "э" CYRILLIC SMALL LETTER E -->
|
||||
<Key
|
||||
latin:keyLabel="э"
|
||||
latin:keyHintLabel="5"
|
||||
latin:additionalMoreKeys="5"
|
||||
latin:moreKeys="!text/more_keys_for_cyrillic_ie" />
|
||||
<!-- U+043D: "н" CYRILLIC SMALL LETTER EN -->
|
||||
<Key
|
||||
latin:keyLabel="н"
|
||||
latin:keyHintLabel="6"
|
||||
latin:additionalMoreKeys="6"
|
||||
latin:moreKeys="!text/more_keys_for_cyrillic_en" />
|
||||
<!-- U+0433: "г" CYRILLIC SMALL LETTER GHE -->
|
||||
<Key
|
||||
latin:keyLabel="г"
|
||||
latin:keyHintLabel="7"
|
||||
latin:additionalMoreKeys="7"
|
||||
latin:moreKeys="!text/more_keys_for_cyrillic_ghe" />
|
||||
<!-- U+0448: "ш" CYRILLIC SMALL LETTER SHA
|
||||
U+0449: "щ" CYRILLIC SMALL LETTER SHCHA -->
|
||||
<Key
|
||||
latin:keyLabel="ш"
|
||||
latin:keyHintLabel="8"
|
||||
latin:additionalMoreKeys="8"
|
||||
latin:moreKeys="щ" />
|
||||
<!-- U+04AF: "ү" CYRILLIC SMALL LETTER STRAIGHT U -->
|
||||
<Key
|
||||
latin:keyLabel="ү"
|
||||
latin:keyHintLabel="9"
|
||||
latin:additionalMoreKeys="9" />
|
||||
<!-- U+0437: "з" CYRILLIC SMALL LETTER ZE -->
|
||||
<Key
|
||||
latin:keyLabel="з"
|
||||
latin:keyHintLabel="0"
|
||||
latin:additionalMoreKeys="0" />
|
||||
<!-- U+043A: "к" CYRILLIC SMALL LETTER KA -->
|
||||
<Key
|
||||
latin:keyLabel="к" />
|
||||
</merge>
|
|
@ -0,0 +1,57 @@
|
|||
<?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"
|
||||
>
|
||||
<!-- U+0439: "й" CYRILLIC SMALL LETTER SHORT I -->
|
||||
<Key
|
||||
latin:keyLabel="й" />
|
||||
<!-- U+044B: "ы" CYRILLIC SMALL LETTER YERU -->
|
||||
<Key
|
||||
latin:keyLabel="ы" />
|
||||
<!-- U+0431: "б" CYRILLIC SMALL LETTER BE -->
|
||||
<Key
|
||||
latin:keyLabel="б" />
|
||||
<!-- U+04E9: "ө" CYRILLIC SMALL LETTER BARRED O -->
|
||||
<Key
|
||||
latin:keyLabel="ө" />
|
||||
<!-- U+0430: "а" CYRILLIC SMALL LETTER A -->
|
||||
<Key
|
||||
latin:keyLabel="а" />
|
||||
<!-- U+0445: "х" CYRILLIC SMALL LETTER HA -->
|
||||
<Key
|
||||
latin:keyLabel="х" />
|
||||
<!-- U+0440: "р" CYRILLIC SMALL LETTER ER -->
|
||||
<Key
|
||||
latin:keyLabel="р" />
|
||||
<!-- U+043E: "о" CYRILLIC SMALL LETTER O -->
|
||||
<Key
|
||||
latin:keyLabel="о" />
|
||||
<!-- U+043B: "л" CYRILLIC SMALL LETTER EL -->
|
||||
<Key
|
||||
latin:keyLabel="л" />
|
||||
<!-- U+0434: "д" CYRILLIC SMALL LETTER DE -->
|
||||
<Key
|
||||
latin:keyLabel="д" />
|
||||
<!-- U+043F: "п" CYRILLIC SMALL LETTER PE -->
|
||||
<Key
|
||||
latin:keyLabel="п" />
|
||||
</merge>
|
|
@ -0,0 +1,57 @@
|
|||
<?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"
|
||||
>
|
||||
<!-- U+044F: "я" CYRILLIC SMALL LETTER YA -->
|
||||
<Key
|
||||
latin:keyLabel="я" />
|
||||
<!-- U+0447: "ч" CYRILLIC SMALL LETTER CHE -->
|
||||
<Key
|
||||
latin:keyLabel="ч" />
|
||||
<!-- U+0451: "ё" CYRILLIC SMALL LETTER IO
|
||||
U+0435: "е" CYRILLIC SMALL LETTER IE -->
|
||||
<Key
|
||||
latin:keyLabel="ё"
|
||||
latin:moreKeys="е" />
|
||||
<!-- U+0441: "с" CYRILLIC SMALL LETTER ES -->
|
||||
<Key
|
||||
latin:keyLabel="с" />
|
||||
<!-- U+043C: "м" CYRILLIC SMALL LETTER EM -->
|
||||
<Key
|
||||
latin:keyLabel="м" />
|
||||
<!-- U+0438: "и" CYRILLIC SMALL LETTER I -->
|
||||
<Key
|
||||
latin:keyLabel="и" />
|
||||
<!-- U+0442: "т" CYRILLIC SMALL LETTER TE -->
|
||||
<Key
|
||||
latin:keyLabel="т" />
|
||||
<!-- U+044C: "ь" CYRILLIC SMALL LETTER SOFT SIGN
|
||||
U+044A: "ъ" CYRILLIC SMALL LETTER HARD SIGN -->
|
||||
<Key
|
||||
latin:keyLabel="ь"
|
||||
latin:moreKeys="ъ" />
|
||||
<!-- U+0432: "в" CYRILLIC SMALL LETTER VE
|
||||
U+044E: "ю" CYRILLIC SMALL LETTER YU -->
|
||||
<Key
|
||||
latin:keyLabel="в"
|
||||
latin:moreKeys="ю" />
|
||||
</merge>
|
|
@ -0,0 +1,52 @@
|
|||
<?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"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/key_styles_common" />
|
||||
<Row
|
||||
latin:keyWidth="9.091%p"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian1" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="9.091%p"
|
||||
>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian2" />
|
||||
</Row>
|
||||
<Row
|
||||
latin:keyWidth="8.711%p"
|
||||
>
|
||||
<Key
|
||||
latin:keyStyle="shiftKeyStyle"
|
||||
latin:keyWidth="10.8%p" />
|
||||
<include
|
||||
latin:keyboardLayout="@xml/rowkeys_mongolian3" />
|
||||
<Key
|
||||
latin:keyStyle="deleteKeyStyle"
|
||||
latin:keyWidth="fillRight" />
|
||||
</Row>
|
||||
<include
|
||||
latin:keyboardLayout="@xml/row_qwerty4" />
|
||||
</merge>
|
|
@ -56,7 +56,6 @@ import android.view.WindowManager;
|
|||
import android.view.inputmethod.CompletionInfo;
|
||||
import android.view.inputmethod.CorrectionInfo;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
|
||||
import com.android.inputmethod.accessibility.AccessibilityUtils;
|
||||
|
@ -142,7 +141,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
private SharedPreferences mPrefs;
|
||||
@UsedForTesting final KeyboardSwitcher mKeyboardSwitcher;
|
||||
private final SubtypeSwitcher mSubtypeSwitcher;
|
||||
private boolean mShouldSwitchToLastSubtype = true;
|
||||
private final SubtypeState mSubtypeState = new SubtypeState();
|
||||
|
||||
private boolean mIsMainDictionaryAvailable;
|
||||
private UserBinaryDictionary mUserDictionary;
|
||||
|
@ -366,6 +365,33 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
}
|
||||
}
|
||||
|
||||
static final class SubtypeState {
|
||||
private InputMethodSubtype mLastActiveSubtype;
|
||||
private boolean mCurrentSubtypeUsed;
|
||||
|
||||
public void currentSubtypeUsed() {
|
||||
mCurrentSubtypeUsed = true;
|
||||
}
|
||||
|
||||
public void switchSubtype(final IBinder token, final RichInputMethodManager richImm) {
|
||||
final InputMethodSubtype currentSubtype = richImm.getInputMethodManager()
|
||||
.getCurrentInputMethodSubtype();
|
||||
final InputMethodSubtype lastActiveSubtype = mLastActiveSubtype;
|
||||
final boolean currentSubtypeUsed = mCurrentSubtypeUsed;
|
||||
if (currentSubtypeUsed) {
|
||||
mLastActiveSubtype = currentSubtype;
|
||||
mCurrentSubtypeUsed = false;
|
||||
}
|
||||
if (currentSubtypeUsed
|
||||
&& richImm.checkIfSubtypeBelongsToThisImeAndEnabled(lastActiveSubtype)
|
||||
&& !currentSubtype.equals(lastActiveSubtype)) {
|
||||
richImm.setInputMethodAndSubtype(token, lastActiveSubtype);
|
||||
return;
|
||||
}
|
||||
richImm.switchToNextInputMethod(token, true /* onlyCurrentIme */);
|
||||
}
|
||||
}
|
||||
|
||||
public LatinIME() {
|
||||
super();
|
||||
mSubtypeSwitcher = SubtypeSwitcher.getInstance();
|
||||
|
@ -893,6 +919,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
// Make a note of the cursor position
|
||||
mLastSelectionStart = newSelStart;
|
||||
mLastSelectionEnd = newSelEnd;
|
||||
mSubtypeState.currentSubtypeUsed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1240,20 +1267,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
mRichImm.switchToNextInputMethod(token, false /* onlyCurrentIme */);
|
||||
return;
|
||||
}
|
||||
if (mShouldSwitchToLastSubtype) {
|
||||
final InputMethodManager imm = mRichImm.getInputMethodManager();
|
||||
final InputMethodSubtype lastSubtype = imm.getLastInputMethodSubtype();
|
||||
final boolean lastSubtypeBelongsToThisIme =
|
||||
mRichImm.checkIfSubtypeBelongsToThisImeAndEnabled(lastSubtype);
|
||||
if (lastSubtypeBelongsToThisIme && imm.switchToLastInputMethod(token)) {
|
||||
mShouldSwitchToLastSubtype = false;
|
||||
} else {
|
||||
mRichImm.switchToNextInputMethod(token, true /* onlyCurrentIme */);
|
||||
mShouldSwitchToLastSubtype = true;
|
||||
}
|
||||
} else {
|
||||
mRichImm.switchToNextInputMethod(token, true /* onlyCurrentIme */);
|
||||
}
|
||||
mSubtypeState.switchSubtype(token, mRichImm);
|
||||
}
|
||||
|
||||
private void sendDownUpKeyEventForBackwardCompatibility(final int code) {
|
||||
|
@ -1322,7 +1336,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
handleBackspace(spaceState);
|
||||
mDeleteCount++;
|
||||
mExpectingUpdateSelection = true;
|
||||
mShouldSwitchToLastSubtype = true;
|
||||
LatinImeLogger.logOnDelete(x, y);
|
||||
break;
|
||||
case Constants.CODE_SHIFT:
|
||||
|
@ -1378,7 +1391,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
handleCharacter(primaryCode, keyX, keyY, spaceState);
|
||||
}
|
||||
mExpectingUpdateSelection = true;
|
||||
mShouldSwitchToLastSubtype = true;
|
||||
break;
|
||||
}
|
||||
switcher.onCodeInput(primaryCode);
|
||||
|
|
|
@ -206,6 +206,11 @@ public final class RichInputMethodManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
public void setInputMethodAndSubtype(final IBinder token, final InputMethodSubtype subtype) {
|
||||
mImmWrapper.mImm.setInputMethodAndSubtype(
|
||||
token, mInputMethodInfoOfThisIme.getId(), subtype);
|
||||
}
|
||||
|
||||
public void setAdditionalInputMethodSubtypes(final InputMethodSubtype[] subtypes) {
|
||||
mImmWrapper.mImm.setAdditionalInputMethodSubtypes(
|
||||
mInputMethodInfoOfThisIme.getId(), subtypes);
|
||||
|
|
|
@ -954,7 +954,7 @@ const uint16_t BASE_CHARS[BASE_CHARS_SIZE] = {
|
|||
0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069,
|
||||
0x0049, 0x0131, 0x0049, 0x0069, 0x004a, 0x006a, 0x004b, 0x006b,
|
||||
0x0138, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c,
|
||||
0x006c, 0x0141, 0x0142, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e,
|
||||
0x006c, 0x004c, 0x006c, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e,
|
||||
0x006e, 0x02bc, 0x014a, 0x014b, 0x004f, 0x006f, 0x004f, 0x006f,
|
||||
0x004f, 0x006f, 0x0152, 0x0153, 0x0052, 0x0072, 0x0052, 0x0072,
|
||||
0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073,
|
||||
|
|
Loading…
Reference in New Issue