am 6652e458: Merge "Move Keyboard.themeName to KeyboardSwitcher and make it private"
* commit '6652e4589981a0f06692b49e86d1a6f0784a434f': Move Keyboard.themeName to KeyboardSwitcher and make it privatemain
commit
4a7adcbace
|
@ -235,19 +235,6 @@ public class Keyboard {
|
||||||
return mProximityInfo.getNearestKeys(x, y);
|
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) {
|
public static String printableCode(int code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case CODE_SHIFT: return "shift";
|
case CODE_SHIFT: return "shift";
|
||||||
|
|
|
@ -191,11 +191,11 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
|
||||||
if (DEBUG_CACHE) {
|
if (DEBUG_CACHE) {
|
||||||
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": "
|
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": "
|
||||||
+ ((ref == null) ? "LOAD" : "GCed") + " id=" + id
|
+ ((ref == null) ? "LOAD" : "GCed") + " id=" + id
|
||||||
+ " theme=" + Keyboard.themeName(keyboard.mThemeId));
|
+ " theme=" + themeName(keyboard.mThemeId));
|
||||||
}
|
}
|
||||||
} else if (DEBUG_CACHE) {
|
} else if (DEBUG_CACHE) {
|
||||||
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": HIT id=" + id
|
Log.d(TAG, "keyboard cache size=" + mKeyboardCache.size() + ": HIT id=" + id
|
||||||
+ " theme=" + Keyboard.themeName(keyboard.mThemeId));
|
+ " theme=" + themeName(keyboard.mThemeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
keyboard.onAutoCorrectionStateChanged(mIsAutoCorrectionActive);
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue