aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-12-14 02:43:06 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-12-14 02:43:06 -0800
commit6652e4589981a0f06692b49e86d1a6f0784a434f (patch)
tree22b4a91ab6e3a9cc3ed8350749d53c82137d6d77 /java/src
parent90c12077b2c57afe34b5d9d02fd6a9dcdd9b0cfc (diff)
parent7a91deb685af73aaed09e1b0d6a3027e1b569aca (diff)
downloadlatinime-6652e4589981a0f06692b49e86d1a6f0784a434f.tar.gz
latinime-6652e4589981a0f06692b49e86d1a6f0784a434f.tar.xz
latinime-6652e4589981a0f06692b49e86d1a6f0784a434f.zip
Merge "Move Keyboard.themeName to KeyboardSwitcher and make it private"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Keyboard.java13
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java17
2 files changed, 15 insertions, 15 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Keyboard.java b/java/src/com/android/inputmethod/keyboard/Keyboard.java
index e3f219162..814b52398 100644
--- a/java/src/com/android/inputmethod/keyboard/Keyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/Keyboard.java
@@ -235,19 +235,6 @@ public class Keyboard {
return mProximityInfo.getNearestKeys(x, y);
}
- public static String themeName(int themeId) {
- // This should be aligned with theme-*.xml resource files' themeId attribute.
- switch (themeId) {
- case 0: return "Basic";
- case 1: return "BasicHighContrast";
- case 5: return "IceCreamSandwich";
- case 6: return "Stone";
- case 7: return "StoneBold";
- case 8: return "GingerBread";
- default: return null;
- }
- }
-
public static String printableCode(int code) {
switch (code) {
case CODE_SHIFT: return "shift";
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 165e9aec7..1f3006d9f 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -191,11 +191,11 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
if (DEBUG_CACHE) {
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": "
+ ((ref == null) ? "LOAD" : "GCed") + " id=" + id
- + " theme=" + Keyboard.themeName(keyboard.mThemeId));
+ + " theme=" + themeName(keyboard.mThemeId));
}
} else if (DEBUG_CACHE) {
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": HIT id=" + id
- + " theme=" + Keyboard.themeName(keyboard.mThemeId));
+ + " theme=" + themeName(keyboard.mThemeId));
}
keyboard.onAutoCorrectionStateChanged(mIsAutoCorrectionActive);
@@ -463,4 +463,17 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
}
}
}
+
+ private static String themeName(int themeId) {
+ // This should be aligned with theme-*.xml resource files' themeId attribute.
+ switch (themeId) {
+ case 0: return "Basic";
+ case 1: return "BasicHighContrast";
+ case 5: return "IceCreamSandwich";
+ case 6: return "Stone";
+ case 7: return "StoneBold";
+ case 8: return "GingerBread";
+ default: return null;
+ }
+ }
}