Show Subtype Icon properly in the system status bar
- Added API for getting the current subtype
- Added functions for show/hide status icon
Change-Id: Ifcaad00f7f4c658cdb3af367387476bbf316eb19
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 8e355d6..7cb6291 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -33,6 +33,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewRoot;
+import android.view.inputmethod.InputMethodSubtype;
import com.android.internal.os.HandlerCaller;
import com.android.internal.view.IInputConnectionWrapper;
@@ -1411,6 +1412,17 @@
}
}
+ public InputMethodSubtype getCurrentInputMethodSubtype() {
+ synchronized (mH) {
+ try {
+ return mService.getCurrentInputMethodSubtype();
+ } catch (RemoteException e) {
+ Log.w(TAG, "IME died: " + mCurId, e);
+ return null;
+ }
+ }
+ }
+
void doDump(FileDescriptor fd, PrintWriter fout, String[] args) {
final Printer p = new PrintWriterPrinter(fout);
p.println("Input method client state for " + this + ":");