diff --git a/leankeykeyboard/build.gradle b/leankeykeyboard/build.gradle index 65fbcb1..f1bfb53 100644 --- a/leankeykeyboard/build.gradle +++ b/leankeykeyboard/build.gradle @@ -14,8 +14,8 @@ android { applicationId "org.liskovsoft.leankeykeyboard.pro" minSdkVersion project.properties.minSdkVersion targetSdkVersion project.properties.targetSdkVersion - versionCode 135 - versionName "5.2.35" + versionCode 136 + versionName "5.2.36" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/leankeykeyboard/src/main/AndroidManifest.xml b/leankeykeyboard/src/main/AndroidManifest.xml index fcc7caf..f51f367 100644 --- a/leankeykeyboard/src/main/AndroidManifest.xml +++ b/leankeykeyboard/src/main/AndroidManifest.xml @@ -34,9 +34,7 @@ + android:launchMode="singleTop"> @@ -47,9 +45,7 @@ + android:launchMode="singleTop"> suggestions) { - String editorText = LeanbackUtils.getEditorText(mContext.getCurrentInputConnection()); + InputConnection connection = mContext.getCurrentInputConnection(); - if (editorText.isEmpty()) { - editorText = mLabel; - } + if (connection != null) { + String editorText = LeanbackUtils.getEditorText(connection); - if (editorText == null) { - return; - } + if (editorText.isEmpty()) { + editorText = mLabel; + } - if (suggestions.size() == 0) { - suggestions.add(editorText); - } else { - suggestions.set(0, editorText); + if (suggestions.size() == 0) { + suggestions.add(editorText); + } else { + suggestions.set(0, editorText); + } } }