diff options
author | 2011-10-27 22:57:58 -0700 | |
---|---|---|
committer | 2011-10-27 22:57:58 -0700 | |
commit | 6f811bd13fb69bf57267b75abd8c84d31a580d7d (patch) | |
tree | c1b83b81c67cbdccbf35aa70f51a6224c831481c /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 3122cf8daa8bc7334bfe22a86798ede036d3a4e7 (diff) | |
parent | 8fbf29e2d54027a17993cd0d4ad486e3454b56f6 (diff) | |
download | latinime-6f811bd13fb69bf57267b75abd8c84d31a580d7d.tar.gz latinime-6f811bd13fb69bf57267b75abd8c84d31a580d7d.tar.xz latinime-6f811bd13fb69bf57267b75abd8c84d31a580d7d.zip |
Merge "Make some private method static"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 2e07a6d9b..5b7428e33 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1180,7 +1180,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } // "ic" must not be null - private void maybeRemovePreviousPeriod(final InputConnection ic, CharSequence text) { + private static void maybeRemovePreviousPeriod(final InputConnection ic, CharSequence text) { // When the text's first character is '.', remove the previous period // if there is one. final CharSequence lastOne = ic.getTextBeforeCursor(1, 0); @@ -1192,7 +1192,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } // "ic" may be null - private void removeTrailingSpaceWhileInBatchEdit(final InputConnection ic) { + private static void removeTrailingSpaceWhileInBatchEdit(final InputConnection ic) { if (ic == null) return; final CharSequence lastOne = ic.getTextBeforeCursor(1, 0); if (lastOne != null && lastOne.length() == 1 @@ -1210,12 +1210,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return true; } - private boolean isAlphabet(int code) { - if (Character.isLetter(code)) { - return true; - } else { - return false; - } + private static boolean isAlphabet(int code) { + return Character.isLetter(code); } private void onSettingsKeyPressed() { @@ -2078,7 +2074,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } // "ic" must not be null - private boolean sameAsTextBeforeCursor(final InputConnection ic, CharSequence text) { + private static boolean sameAsTextBeforeCursor(final InputConnection ic, CharSequence text) { CharSequence beforeText = ic.getTextBeforeCursor(text.length(), 0); return TextUtils.equals(text, beforeText); } @@ -2132,7 +2128,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar return true; } - private boolean revertSwapPunctuation(final InputConnection ic) { + private static boolean revertSwapPunctuation(final InputConnection ic) { // Here we test whether we indeed have a space and something else before us. This should not // be needed, but it's there just in case something went wrong. final CharSequence textBeforeCursor = ic.getTextBeforeCursor(2, 0); |