No capitalization for inputs from the symbols keyboard. bug: 2220892
Change-Id: I832e855e8882c0ccbc48505acce5b605761cd93amain
parent
f5d9b3d4e4
commit
40c86618c1
|
@ -1138,7 +1138,10 @@ public class LatinIME extends InputMethodService
|
||||||
|| keyCodes[0] > Character.MAX_CODE_POINT) {
|
|| keyCodes[0] > Character.MAX_CODE_POINT) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
primaryCode = new String(keyCodes, 0, 1).toUpperCase().charAt(0);
|
primaryCode = keyCodes[0];
|
||||||
|
if (mKeyboardSwitcher.isAlphabetMode()) {
|
||||||
|
primaryCode = Character.toUpperCase(primaryCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mPredicting) {
|
if (mPredicting) {
|
||||||
if (mKeyboardSwitcher.getInputView().isShifted() && mComposing.length() == 0) {
|
if (mKeyboardSwitcher.getInputView().isShifted() && mComposing.length() == 0) {
|
||||||
|
|
|
@ -274,6 +274,10 @@ public class LatinKeyboard extends Keyboard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* package */ boolean isAlphaKeyboard() {
|
||||||
|
return mIsAlphaKeyboard;
|
||||||
|
}
|
||||||
|
|
||||||
public void setExtension(int resId) {
|
public void setExtension(int resId) {
|
||||||
mExtensionResId = resId;
|
mExtensionResId = resId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -590,7 +590,7 @@ public class LatinKeyboardBaseView extends View implements View.OnClickListener
|
||||||
dismissPopupKeyboard();
|
dismissPopupKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
private CharSequence adjustCase(CharSequence label) {
|
protected CharSequence adjustCase(CharSequence label) {
|
||||||
if (mKeyboard.isShifted() && label != null && label.length() < 3
|
if (mKeyboard.isShifted() && label != null && label.length() < 3
|
||||||
&& Character.isLowerCase(label.charAt(0))) {
|
&& Character.isLowerCase(label.charAt(0))) {
|
||||||
label = label.toString().toUpperCase();
|
label = label.toString().toUpperCase();
|
||||||
|
|
|
@ -111,6 +111,19 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected CharSequence adjustCase(CharSequence label) {
|
||||||
|
Keyboard keyboard = getKeyboard();
|
||||||
|
if (keyboard.isShifted()
|
||||||
|
&& keyboard instanceof LatinKeyboard
|
||||||
|
&& ((LatinKeyboard) keyboard).isAlphaKeyboard()
|
||||||
|
&& label != null && label.length() < 3
|
||||||
|
&& Character.isLowerCase(label.charAt(0))) {
|
||||||
|
label = label.toString().toUpperCase();
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function checks to see if we need to handle any sudden jumps in the pointer location
|
* This function checks to see if we need to handle any sudden jumps in the pointer location
|
||||||
* that could be due to a multi-touch being treated as a move by the firmware or hardware.
|
* that could be due to a multi-touch being treated as a move by the firmware or hardware.
|
||||||
|
|
Loading…
Reference in New Issue