am 317b2ea1: Merge "Add android.provider.Settings.EXTRA_INPUT_METHOD_ID" into honeycomb
* commit '317b2ea16a9ba681ee185d5b7a0c385a1fdbe1d5':
Add android.provider.Settings.EXTRA_INPUT_METHOD_ID
diff --git a/api/11.xml b/api/11.xml
index d668883..4c822fe 100644
--- a/api/11.xml
+++ b/api/11.xml
@@ -163566,6 +163566,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_INPUT_METHOD_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""input_method_id""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="Settings.NameValueTable"
extends="java.lang.Object"
diff --git a/api/current.xml b/api/current.xml
index 854119e..60e9400 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -165050,6 +165050,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_INPUT_METHOD_ID"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""input_method_id""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="Settings.NameValueTable"
extends="java.lang.Object"
@@ -261810,7 +261821,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="t" type="T">
+<parameter name="arg0" type="T">
</parameter>
</method>
</interface>
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 1d817ea..6f23215 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -285,6 +285,13 @@
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
+ * To tell which input method's subtypes are displayed in the settings, add
+ * {@link #EXTRA_INPUT_METHOD_ID} extra to this Intent with the input method id.
+ * If there is no extra in this Intent, subtypes from all installed input methods
+ * will be displayed in the settings.
+ *
+ * @see android.view.inputmethod.InputMethodInfo#getId
+ * <p>
* Input: Nothing.
* <p>
* Output: Nothing.
@@ -555,6 +562,8 @@
public static final String EXTRA_AUTHORITIES =
"authorities";
+ public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
+
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 18a6fe0..5ae8394 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -118,7 +118,6 @@
private static final int NOT_A_SUBTYPE_ID = -1;
private static final String NOT_A_SUBTYPE_ID_STR = String.valueOf(NOT_A_SUBTYPE_ID);
- private static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
private static final String SUBTYPE_MODE_KEYBOARD = "keyboard";
private static final String SUBTYPE_MODE_VOICE = "voice";
@@ -1645,7 +1644,7 @@
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
if (!TextUtils.isEmpty(inputMethodId)) {
- intent.putExtra(EXTRA_INPUT_METHOD_ID, inputMethodId);
+ intent.putExtra(Settings.EXTRA_INPUT_METHOD_ID, inputMethodId);
}
mContext.startActivity(intent);
}