summaryrefslogtreecommitdiffstats
path: root/core/java/com/android
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:10 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:10 -0800
commit9266c558bf1d21ff647525ff99f7dadbca417309 (patch)
tree1630b1ba80f4793caf39d865528e662bdb1037fe /core/java/com/android
parentb798689749c64baba81f02e10cf2157c747d6b46 (diff)
downloadframeworks_base-9266c558bf1d21ff647525ff99f7dadbca417309.zip
frameworks_base-9266c558bf1d21ff647525ff99f7dadbca417309.tar.gz
frameworks_base-9266c558bf1d21ff647525ff99f7dadbca417309.tar.bz2
auto import from //branches/cupcake/...@126645
Diffstat (limited to 'core/java/com/android')
-rw-r--r--core/java/com/android/internal/app/AlertController.java25
-rw-r--r--core/java/com/android/internal/os/HandlerCaller.java6
-rw-r--r--core/java/com/android/internal/view/IInputMethod.aidl2
-rw-r--r--core/java/com/android/internal/view/IInputMethodManager.aidl10
4 files changed, 34 insertions, 9 deletions
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index 989f972..5c44b2d 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -27,7 +27,6 @@ import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
-import android.text.TextUtils.TruncateAt;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -172,11 +171,33 @@ public class AlertController {
mHandler = new ButtonHandler(di);
}
+ static boolean canTextInput(View v) {
+ if (v.onCheckIsTextEditor()) {
+ return true;
+ }
+
+ if (!(v instanceof ViewGroup)) {
+ return false;
+ }
+
+ ViewGroup vg = (ViewGroup)v;
+ int i = vg.getChildCount();
+ while (i > 0) {
+ i--;
+ v = vg.getChildAt(i);
+ if (canTextInput(v)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public void installContent() {
/* We use a custom title so never request a window title */
mWindow.requestFeature(Window.FEATURE_NO_TITLE);
- if (mView == null) {
+ if (mView == null || !canTextInput(mView)) {
mWindow.setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
}
diff --git a/core/java/com/android/internal/os/HandlerCaller.java b/core/java/com/android/internal/os/HandlerCaller.java
index e88a36f..a7081e3 100644
--- a/core/java/com/android/internal/os/HandlerCaller.java
+++ b/core/java/com/android/internal/os/HandlerCaller.java
@@ -115,11 +115,15 @@ public class HandlerCaller {
return mH.obtainMessage(what, 0, 0, arg1);
}
+ public Message obtainMessageI(int what, int arg1) {
+ return mH.obtainMessage(what, arg1);
+ }
+
public Message obtainMessageIO(int what, int arg1, Object arg2) {
return mH.obtainMessage(what, arg1, 0, arg2);
}
- public Message obtainMessageIO(int what, int arg1, int arg2, Object arg3) {
+ public Message obtainMessageIIO(int what, int arg1, int arg2, Object arg3) {
return mH.obtainMessage(what, arg1, arg2, arg3);
}
diff --git a/core/java/com/android/internal/view/IInputMethod.aidl b/core/java/com/android/internal/view/IInputMethod.aidl
index 87bf473..f650713 100644
--- a/core/java/com/android/internal/view/IInputMethod.aidl
+++ b/core/java/com/android/internal/view/IInputMethod.aidl
@@ -48,7 +48,7 @@ oneway interface IInputMethod {
void revokeSession(IInputMethodSession session);
- void showSoftInput();
+ void showSoftInput(boolean explicit);
void hideSoftInput();
}
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 1c9e797..2a15bdb 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -37,15 +37,15 @@ interface IInputMethodManager {
InputBindResult startInput(in IInputMethodClient client,
in EditorInfo attribute, boolean initial, boolean needResult);
void finishInput(in IInputMethodClient client);
- void showSoftInput(in IInputMethodClient client);
- void hideSoftInput(in IInputMethodClient client);
+ void showSoftInput(in IInputMethodClient client, int flags);
+ void hideSoftInput(in IInputMethodClient client, int flags);
void windowGainedFocus(in IInputMethodClient client,
- boolean viewHasFocus, int softInputMode, boolean first,
- int windowFlags);
+ boolean viewHasFocus, boolean isTextEditor,
+ int softInputMode, boolean first, int windowFlags);
void showInputMethodPickerFromClient(in IInputMethodClient client);
void setInputMethod(in IBinder token, String id);
- void hideMySoftInput(in IBinder token);
+ void hideMySoftInput(in IBinder token, int flags);
void updateStatusIcon(int iconId, String iconPackage);
boolean setInputMethodEnabled(String id, boolean enabled);