Add an activity to show an ime switch dialog
Bug: 4671417
Change-Id: I8e29dbfb3d0bbb9270888ac757f53542ce658ba9
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index aa32f74..23c079f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -375,6 +375,18 @@
</intent-filter>
</activity>
+ <activity android:name=".inputmethod.InputMethodDialogActivity"
+ android:theme="@android:style/Theme.Holo"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.SHOW_INPUT_METHOD_PICKER" />
+ <category android:name="android.intent.category.VOICE_LAUNCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="com.android.settings.SHORTCUT" />
+ </intent-filter>
+ </activity>
+
<activity android:name="Settings$InputMethodConfigActivity"
android:theme="@android:style/Theme.Holo"
android:label="@string/configure_input_method"
diff --git a/src/com/android/settings/inputmethod/InputMethodDialogActivity.java b/src/com/android/settings/inputmethod/InputMethodDialogActivity.java
new file mode 100644
index 0000000..4efbf05
--- /dev/null
+++ b/src/com/android/settings/inputmethod/InputMethodDialogActivity.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.inputmethod;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.inputmethod.InputMethodManager;
+
+public class InputMethodDialogActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).
+ showInputMethodPicker();
+ finish();
+ }
+}