summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-12-15 05:19:19 +0900
committersatok <satok@google.com>2010-12-16 14:19:56 +0900
commit217f548e79ab1ac3dd9e5be8fb6feaa6dcbe4000 (patch)
tree6d05fef265101df6cdf8e68afe3819fd5ed0d6fd /services
parent6cb3b52df4f2ec4cc5f361886377657986e9dd19 (diff)
downloadframeworks_base-217f548e79ab1ac3dd9e5be8fb6feaa6dcbe4000.zip
frameworks_base-217f548e79ab1ac3dd9e5be8fb6feaa6dcbe4000.tar.gz
frameworks_base-217f548e79ab1ac3dd9e5be8fb6feaa6dcbe4000.tar.bz2
Change "more" button to call InputMethodConfigure in Settings
- Open input methods config fragment in Settings application - Add input to showInputMethodAndSubtypeEnabler Change-Id: I3f5c8a6a136aeb91326aa87475edee76517a8467
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java30
1 files changed, 24 insertions, 6 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 95200fa..21c9f7d 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -99,6 +99,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
static final int MSG_SHOW_IM_PICKER = 1;
static final int MSG_SHOW_IM_SUBTYPE_PICKER = 2;
static final int MSG_SHOW_IM_SUBTYPE_ENABLER = 3;
+ static final int MSG_SHOW_IM_CONFIG = 4;
static final int MSG_UNBIND_INPUT = 1000;
static final int MSG_BIND_INPUT = 1010;
@@ -120,6 +121,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
// If IME doesn't support the system locale, the default subtype will be the first defined one.
private static final int DEFAULT_SUBTYPE_ID = 0;
+ 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";
@@ -1313,14 +1315,13 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
}
public void showInputMethodAndSubtypeEnablerFromClient(
- IInputMethodClient client, String topId) {
- // TODO: Handle topId for setting the top position of the list ActivityManagerNative
+ IInputMethodClient client, String inputMethodId) {
synchronized (mMethodMap) {
if (mCurClient == null || client == null
|| mCurClient.client.asBinder() != client.asBinder()) {
Slog.w(TAG, "Ignoring showInputMethodAndSubtypeEnablerFromClient of: " + client);
}
- mHandler.sendEmptyMessage(MSG_SHOW_IM_SUBTYPE_ENABLER);
+ mHandler.sendEmptyMessage(MSG_SHOW_IM_SUBTYPE_ENABLER, inputMethodId);
}
}
@@ -1428,7 +1429,15 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
return true;
case MSG_SHOW_IM_SUBTYPE_ENABLER:
- showInputMethodAndSubtypeEnabler();
+ args = (HandlerCaller.SomeArgs)msg.obj;
+ try {
+ showInputMethodAndSubtypeEnabler((String)args.arg1);
+ } catch (RemoteException e) {
+ }
+ return true;
+
+ case MSG_SHOW_IM_CONFIG:
+ showConfigureInputMethods();
return true;
// ---------------------------------------------------------
@@ -1624,11 +1633,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
showInputMethodMenuInternal(true);
}
- private void showInputMethodAndSubtypeEnabler() {
+ private void showInputMethodAndSubtypeEnabler(String inputMethodId) {
Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_AND_SUBTYPE_ENABLER);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ intent.putExtra(EXTRA_INPUT_METHOD_ID, inputMethodId);
+ mContext.startActivity(intent);
+ }
+
+ private void showConfigureInputMethods() {
+ Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP);
mContext.startActivity(intent);
}
@@ -1763,7 +1781,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
mDialogBuilder.setPositiveButton(com.android.internal.R.string.more_item_label,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
- showInputMethodAndSubtypeEnabler();
+ showConfigureInputMethods();
}
});
}