[RK3288][Android6.0] 调试笔记 --- 软硬键盘同时使用【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/78748313
Platform: RK3288
OS: Android 6.0
Kernel: 3.10.92
硬件接上USB扫描枪后,被认为是一个USB物理键盘,这时候,系统会默认关闭软键盘。
通过如下方法可以让软硬键盘都打开。
kris@eco:~/rk3288/frameworks/base$ g df core/java/android/inputmethodservice/InputMethodService.java
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 61e02fd..11b8c7a 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -1157,8 +1157,12 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public boolean onEvaluateInputViewShown() {
Configuration config = getResources().getConfiguration();
+ /*
return config.keyboard == Configuration.KEYBOARD_NOKEYS
|| config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES;
+ */
+
+ return true;
}
/**