am 3518818e: am 8b6b5592: Merge "Treat all caps for gesture input." into jb-mr1-dev
* commit '3518818eaff64e0fd1c2e8483202deabd4dc9975': Treat all caps for gesture input.main
commit
9e928aa581
|
@ -309,10 +309,8 @@ public class Suggest {
|
||||||
final ArrayList<SuggestedWordInfo> suggestionsContainer =
|
final ArrayList<SuggestedWordInfo> suggestionsContainer =
|
||||||
new ArrayList<SuggestedWordInfo>(suggestionsSet);
|
new ArrayList<SuggestedWordInfo>(suggestionsSet);
|
||||||
final int suggestionsCount = suggestionsContainer.size();
|
final int suggestionsCount = suggestionsContainer.size();
|
||||||
final boolean isFirstCharCapitalized = wordComposer.wasAutoCapitalized();
|
final boolean isFirstCharCapitalized = wordComposer.wasShiftedNoLock();
|
||||||
// TODO: Handle the manual temporary shifted mode.
|
final boolean isAllUpperCase = wordComposer.isAllUpperCase();
|
||||||
// TODO: Should handle TextUtils.CAP_MODE_CHARACTER.
|
|
||||||
final boolean isAllUpperCase = false;
|
|
||||||
if (isFirstCharCapitalized || isAllUpperCase) {
|
if (isFirstCharCapitalized || isAllUpperCase) {
|
||||||
for (int i = 0; i < suggestionsCount; ++i) {
|
for (int i = 0; i < suggestionsCount; ++i) {
|
||||||
final SuggestedWordInfo wordInfo = suggestionsContainer.get(i);
|
final SuggestedWordInfo wordInfo = suggestionsContainer.get(i);
|
||||||
|
|
|
@ -265,7 +265,14 @@ public class WordComposer {
|
||||||
* @return true if all user typed chars are upper case, false otherwise
|
* @return true if all user typed chars are upper case, false otherwise
|
||||||
*/
|
*/
|
||||||
public boolean isAllUpperCase() {
|
public boolean isAllUpperCase() {
|
||||||
return (mCapsCount > 0) && (mCapsCount == size());
|
return mCapitalizedMode == CAPS_MODE_AUTO_SHIFT_LOCKED
|
||||||
|
|| mCapitalizedMode == CAPS_MODE_MANUAL_SHIFT_LOCKED
|
||||||
|
|| (mCapsCount > 0) && (mCapsCount == size());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean wasShiftedNoLock() {
|
||||||
|
return mCapitalizedMode == CAPS_MODE_AUTO_SHIFTED
|
||||||
|
|| mCapitalizedMode == CAPS_MODE_MANUAL_SHIFTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue