diff --git a/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardController.java b/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardController.java index d3625a3..ecdb2bb 100644 --- a/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardController.java +++ b/leankeykeyboard/src/main/java/com/google/android/leanback/ime/LeanbackKeyboardController.java @@ -5,6 +5,7 @@ import android.graphics.Rect; import android.inputmethodservice.InputMethodService; import android.inputmethodservice.Keyboard.Key; import android.os.Handler; +import android.text.InputType; import android.util.Log; import android.view.KeyEvent; import android.view.MotionEvent; @@ -688,10 +689,12 @@ public class LeanbackKeyboardController implements LeanbackKeyboardContainer.Voi initInputView(); } - // prevent accidental kbd pop-up on FireTV devices - // more info: https://forum.xda-developers.com/fire-tv/general/guide-change-screen-keyboard-to-leankey-t3527675/page2 - int maskAction = info.imeOptions & EditorInfo.IME_MASK_ACTION; - mShowInput = maskAction != 0; + //// prevent accidental kbd pop-up on FireTV devices + //// more info: https://forum.xda-developers.com/fire-tv/general/guide-change-screen-keyboard-to-leankey-t3527675/page2 + //int maskAction = info.imeOptions & EditorInfo.IME_MASK_ACTION; + //mShowInput = maskAction != 0; + + mShowInput = info.inputType != InputType.TYPE_NULL; } public boolean showInputView() { diff --git a/leankeykeyboard/src/main/java/com/google/leanback/ime/LeanbackImeService.java b/leankeykeyboard/src/main/java/com/google/leanback/ime/LeanbackImeService.java index 46b2634..1b1976c 100644 --- a/leankeykeyboard/src/main/java/com/google/leanback/ime/LeanbackImeService.java +++ b/leankeykeyboard/src/main/java/com/google/leanback/ime/LeanbackImeService.java @@ -53,7 +53,7 @@ public class LeanbackImeService extends InputMethodService { @SuppressLint("NewApi") public LeanbackImeService() { - if (!this.enableHardwareAcceleration()) { + if (!enableHardwareAcceleration()) { Log.w("LbImeService", "Could not enable hardware acceleration"); } }