Loading java/res/values/donottranslate-altchars.xml +2 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ <string name="alternates_for_currency_euro">¢,£,$,¥,₱</string> <string name="alternates_for_currency_pound">¢,$,€,¥,₱</string> <string name="alternates_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\\\\\|:-\\\\\\\\ ,:\'(|:\'( ,:-D|:-D "</string> <string name="alternates_for_punctuation">"\?,!,\\,,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_web_tab_punctuation">".,\?,!,\\,,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_web_tab_punctuation">".,\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="keylabel_for_popular_domain">".com"</string> <!-- popular web domains for the locale - most popular, displayed on the keyboard --> <string name="alternates_for_popular_domain">".net,.org,.gov,.edu"</string> Loading java/src/com/android/inputmethod/keyboard/Key.java +0 −4 Original line number Diff line number Diff line Loading @@ -338,10 +338,6 @@ public class Key { mPressed = false; } public boolean isInside(int x, int y) { return mKeyboard.isInside(this, x, y); } /** * Detects if a point falls on this key. * @param x the x-coordinate of the point Loading java/src/com/android/inputmethod/keyboard/KeyDetector.java +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class KeyDetector { int primaryIndex = NOT_A_KEY; for (final int index : mKeyboard.getNearestKeys(touchX, touchY)) { final Key key = keys.get(index); final boolean isInside = key.isInside(touchX, touchY); final boolean isInside = mKeyboard.isInside(key, touchX, touchY); final int distance = key.squaredDistanceToEdge(touchX, touchY); if (isInside || (mProximityCorrectOn && distance < mProximityThresholdSquare)) { final int insertedPosition = sortNearbyKeys(index, distance); Loading java/src/com/android/inputmethod/keyboard/PointerTracker.java +17 −8 Original line number Diff line number Diff line Loading @@ -560,15 +560,24 @@ public class PointerTracker { } } private void showKeyPreview(int keyIndex) { // The modifier key, such as shift key, should not show its key preview. If accessibility is // turned on, the modifier key should show its key preview. private boolean isKeyPreviewNotRequired(int keyIndex) { final Key key = getKey(keyIndex); if (key != null && !key.mEnabled) return; // The modifier key, such as shift key, should not be shown as preview when multi-touch is // supported. On the other hand, if multi-touch is not supported, the modifier key should // be shown as preview. If accessibility is turned on, the modifier key should be shown as // preview. if (mHasDistinctMultitouch && isModifier() && !mIsAccessibilityEnabled) if (!key.mEnabled) return true; if (mIsAccessibilityEnabled) return false; // Such as spacebar sliding language switch. if (mKeyboard.needSpacebarPreview(keyIndex)) return false; final int code = key.mCode; return isModifierCode(code) || code == Keyboard.CODE_DELETE || code == Keyboard.CODE_ENTER || code == Keyboard.CODE_SPACE; } private void showKeyPreview(int keyIndex) { if (isKeyPreviewNotRequired(keyIndex)) return; mProxy.showKeyPreview(keyIndex, this); } Loading Loading
java/res/values/donottranslate-altchars.xml +2 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ <string name="alternates_for_currency_euro">¢,£,$,¥,₱</string> <string name="alternates_for_currency_pound">¢,$,€,¥,₱</string> <string name="alternates_for_smiley">":-)|:-) ,:-(|:-( ,;-)|;-) ,:-P|:-P ,=-O|=-O ,:-*|:-* ,:O|:O ,B-)|B-) ,:-$|:-$ ,:-!|:-! ,:-[|:-[ ,O:-)|O:-) ,:-\\\\\\\\|:-\\\\\\\\ ,:\'(|:\'( ,:-D|:-D "</string> <string name="alternates_for_punctuation">"\?,!,\\,,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_web_tab_punctuation">".,\?,!,\\,,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_punctuation">"\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="alternates_for_web_tab_punctuation">".,\\,,\?,!,:,-,\',\",(,),/,;,+,&,\@"</string> <string name="keylabel_for_popular_domain">".com"</string> <!-- popular web domains for the locale - most popular, displayed on the keyboard --> <string name="alternates_for_popular_domain">".net,.org,.gov,.edu"</string> Loading
java/src/com/android/inputmethod/keyboard/Key.java +0 −4 Original line number Diff line number Diff line Loading @@ -338,10 +338,6 @@ public class Key { mPressed = false; } public boolean isInside(int x, int y) { return mKeyboard.isInside(this, x, y); } /** * Detects if a point falls on this key. * @param x the x-coordinate of the point Loading
java/src/com/android/inputmethod/keyboard/KeyDetector.java +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class KeyDetector { int primaryIndex = NOT_A_KEY; for (final int index : mKeyboard.getNearestKeys(touchX, touchY)) { final Key key = keys.get(index); final boolean isInside = key.isInside(touchX, touchY); final boolean isInside = mKeyboard.isInside(key, touchX, touchY); final int distance = key.squaredDistanceToEdge(touchX, touchY); if (isInside || (mProximityCorrectOn && distance < mProximityThresholdSquare)) { final int insertedPosition = sortNearbyKeys(index, distance); Loading
java/src/com/android/inputmethod/keyboard/PointerTracker.java +17 −8 Original line number Diff line number Diff line Loading @@ -560,15 +560,24 @@ public class PointerTracker { } } private void showKeyPreview(int keyIndex) { // The modifier key, such as shift key, should not show its key preview. If accessibility is // turned on, the modifier key should show its key preview. private boolean isKeyPreviewNotRequired(int keyIndex) { final Key key = getKey(keyIndex); if (key != null && !key.mEnabled) return; // The modifier key, such as shift key, should not be shown as preview when multi-touch is // supported. On the other hand, if multi-touch is not supported, the modifier key should // be shown as preview. If accessibility is turned on, the modifier key should be shown as // preview. if (mHasDistinctMultitouch && isModifier() && !mIsAccessibilityEnabled) if (!key.mEnabled) return true; if (mIsAccessibilityEnabled) return false; // Such as spacebar sliding language switch. if (mKeyboard.needSpacebarPreview(keyIndex)) return false; final int code = key.mCode; return isModifierCode(code) || code == Keyboard.CODE_DELETE || code == Keyboard.CODE_ENTER || code == Keyboard.CODE_SPACE; } private void showKeyPreview(int keyIndex) { if (isKeyPreviewNotRequired(keyIndex)) return; mProxy.showKeyPreview(keyIndex, this); } Loading