FireTV fix (update2)

This commit is contained in:
Yuriy Liskov
2018-03-26 00:02:20 +03:00
parent 0ed1761b8e
commit 5d94ae66ac
2 changed files with 8 additions and 5 deletions

View File

@@ -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() {

View File

@@ -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");
}
}