From fdfc55d3db4c999c1510de20367bdd7ddbf497f8 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Fri, 1 Sep 2017 00:22:21 -0700 Subject: [PATCH] Introduce a custom intent action to close software keyboard This CL introduces a custom intent action for apps to ask AOSP Keyboard to close its software keyboard with guarding it with a signature-protected permission. Any app that is signed with the same signature as AOSP Keyboard can have the following line in AndroidManifest.xml to request AOSP Keyboard to close its software keyboard as follows. sendBroadcast(new Intent("com.android.inputmethod.latin.HIDE_SOFT_INPUT") .setPackage("com.android.inputmethod.latin")); Test: Manually verified with a test app. Fixes: 65270710 Change-Id: I4fd2e3a7336ec66c70582a2f274a200cbf035a7f --- java/AndroidManifest.xml | 17 +++++++++ .../android/inputmethod/latin/LatinIME.java | 37 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml index 9bb16c7ff..dedece55c 100644 --- a/java/AndroidManifest.xml +++ b/java/AndroidManifest.xml @@ -35,6 +35,23 @@ + + +