Loading api/current.xml +57 −0 Original line number Diff line number Diff line Loading @@ -94279,6 +94279,17 @@ visibility="public" > </constructor> <method name="getBackDisposition" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getCandidatesHiddenVisibility" return="int" abstract="false" Loading Loading @@ -95004,6 +95015,19 @@ <parameter name="charCode" type="char"> </parameter> </method> <method name="setBackDisposition" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="disposition" type="int"> </parameter> </method> <method name="setCandidatesView" return="void" abstract="false" Loading Loading @@ -95130,6 +95154,39 @@ visibility="public" > </method> <field name="BACK_DISPOSITION_DEFAULT" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BACK_DISPOSITION_WILL_DISMISS" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BACK_DISPOSITION_WILL_NOT_DISMISS" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="InputMethodService.InputMethodImpl" extends="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl" core/java/android/inputmethodservice/InputMethodService.java +45 −9 Original line number Diff line number Diff line Loading @@ -220,6 +220,33 @@ public class InputMethodService extends AbstractInputMethodService { static final String TAG = "InputMethodService"; static final boolean DEBUG = false; /** * The back button will close the input window. */ public static final int BACK_DISPOSITION_DEFAULT = 0; // based on window /** * This input method will not consume the back key. */ public static final int BACK_DISPOSITION_WILL_NOT_DISMISS = 1; // back /** * This input method will consume the back key. */ public static final int BACK_DISPOSITION_WILL_DISMISS = 2; // down /** * @hide * The IME is active. It may or may not be visible. */ public static final int IME_ACTIVE = 0x1; /** * @hide * The IME is visible. */ public static final int IME_VISIBLE = 0x2; InputMethodManager mImm; int mTheme = 0; Loading Loading @@ -271,6 +298,7 @@ public class InputMethodService extends AbstractInputMethodService { boolean mIsInputViewShown; int mStatusIcon; int mBackDisposition; final Insets mTmpInsets = new Insets(); final int[] mTmpLocation = new int[2]; Loading Loading @@ -394,9 +422,9 @@ public class InputMethodService extends AbstractInputMethodService { showWindow(true); } // If user uses hard keyboard, IME button should always be shown. if (!onEvaluateInputViewShown()) { mImm.setIMEButtonVisible(mToken, true); } boolean showing = onEvaluateInputViewShown(); mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition); if (resultReceiver != null) { resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN Loading Loading @@ -704,9 +732,9 @@ public class InputMethodService extends AbstractInputMethodService { hideWindow(); } // If user uses hard keyboard, IME button should always be shown. if (!onEvaluateInputViewShown()) { mImm.setIMEButtonVisible(mToken, true); } boolean showing = onEvaluateInputViewShown(); mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition); } } Loading Loading @@ -736,6 +764,14 @@ public class InputMethodService extends AbstractInputMethodService { return mWindow; } public void setBackDisposition(int disposition) { mBackDisposition = disposition; } public int getBackDisposition() { return mBackDisposition; } /** * Return the maximum width, in pixels, available the input method. * Input methods are positioned at the bottom of the screen and, unless Loading Loading @@ -1378,7 +1414,7 @@ public class InputMethodService extends AbstractInputMethodService { if (!wasVisible) { if (DEBUG) Log.v(TAG, "showWindow: showing!"); mImm.setIMEButtonVisible(mToken, true); mImm.setImeWindowStatus(mToken, IME_ACTIVE, mBackDisposition); onWindowShown(); mWindow.show(); } Loading @@ -1394,7 +1430,7 @@ public class InputMethodService extends AbstractInputMethodService { } mInputViewStarted = false; mCandidatesViewStarted = false; mImm.setIMEButtonVisible(mToken, false); mImm.setImeWindowStatus(mToken, 0, mBackDisposition); if (mWindowVisible) { mWindow.hide(); mWindowVisible = false; Loading core/java/android/view/inputmethod/InputMethodManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -531,9 +531,9 @@ public final class InputMethodManager { } /** @hide */ public void setIMEButtonVisible(IBinder imeToken, boolean visible) { public void setImeWindowStatus(IBinder imeToken, int vis, int backDisposition) { try { mService.setIMEButtonVisible(imeToken, visible); mService.setImeWindowStatus(imeToken, vis, backDisposition); } catch (RemoteException e) { throw new RuntimeException(e); } Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,6 @@ oneway interface IStatusBar void animateCollapse(); void setLightsOn(boolean on); void setMenuKeyVisible(boolean visible); void setIMEButtonVisible(in IBinder token, boolean visible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); } core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ interface IStatusBarService void setIconVisibility(String slot, boolean visible); void removeIcon(String slot); void setMenuKeyVisible(boolean visible); void setIMEButtonVisible(in IBinder token, boolean visible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); // ---- Methods below are for use by the status bar policy services ---- // You need the STATUS_BAR_SERVICE permission Loading Loading
api/current.xml +57 −0 Original line number Diff line number Diff line Loading @@ -94279,6 +94279,17 @@ visibility="public" > </constructor> <method name="getBackDisposition" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getCandidatesHiddenVisibility" return="int" abstract="false" Loading Loading @@ -95004,6 +95015,19 @@ <parameter name="charCode" type="char"> </parameter> </method> <method name="setBackDisposition" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="disposition" type="int"> </parameter> </method> <method name="setCandidatesView" return="void" abstract="false" Loading Loading @@ -95130,6 +95154,39 @@ visibility="public" > </method> <field name="BACK_DISPOSITION_DEFAULT" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BACK_DISPOSITION_WILL_DISMISS" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="BACK_DISPOSITION_WILL_NOT_DISMISS" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="InputMethodService.InputMethodImpl" extends="android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl"
core/java/android/inputmethodservice/InputMethodService.java +45 −9 Original line number Diff line number Diff line Loading @@ -220,6 +220,33 @@ public class InputMethodService extends AbstractInputMethodService { static final String TAG = "InputMethodService"; static final boolean DEBUG = false; /** * The back button will close the input window. */ public static final int BACK_DISPOSITION_DEFAULT = 0; // based on window /** * This input method will not consume the back key. */ public static final int BACK_DISPOSITION_WILL_NOT_DISMISS = 1; // back /** * This input method will consume the back key. */ public static final int BACK_DISPOSITION_WILL_DISMISS = 2; // down /** * @hide * The IME is active. It may or may not be visible. */ public static final int IME_ACTIVE = 0x1; /** * @hide * The IME is visible. */ public static final int IME_VISIBLE = 0x2; InputMethodManager mImm; int mTheme = 0; Loading Loading @@ -271,6 +298,7 @@ public class InputMethodService extends AbstractInputMethodService { boolean mIsInputViewShown; int mStatusIcon; int mBackDisposition; final Insets mTmpInsets = new Insets(); final int[] mTmpLocation = new int[2]; Loading Loading @@ -394,9 +422,9 @@ public class InputMethodService extends AbstractInputMethodService { showWindow(true); } // If user uses hard keyboard, IME button should always be shown. if (!onEvaluateInputViewShown()) { mImm.setIMEButtonVisible(mToken, true); } boolean showing = onEvaluateInputViewShown(); mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition); if (resultReceiver != null) { resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN Loading Loading @@ -704,9 +732,9 @@ public class InputMethodService extends AbstractInputMethodService { hideWindow(); } // If user uses hard keyboard, IME button should always be shown. if (!onEvaluateInputViewShown()) { mImm.setIMEButtonVisible(mToken, true); } boolean showing = onEvaluateInputViewShown(); mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition); } } Loading Loading @@ -736,6 +764,14 @@ public class InputMethodService extends AbstractInputMethodService { return mWindow; } public void setBackDisposition(int disposition) { mBackDisposition = disposition; } public int getBackDisposition() { return mBackDisposition; } /** * Return the maximum width, in pixels, available the input method. * Input methods are positioned at the bottom of the screen and, unless Loading Loading @@ -1378,7 +1414,7 @@ public class InputMethodService extends AbstractInputMethodService { if (!wasVisible) { if (DEBUG) Log.v(TAG, "showWindow: showing!"); mImm.setIMEButtonVisible(mToken, true); mImm.setImeWindowStatus(mToken, IME_ACTIVE, mBackDisposition); onWindowShown(); mWindow.show(); } Loading @@ -1394,7 +1430,7 @@ public class InputMethodService extends AbstractInputMethodService { } mInputViewStarted = false; mCandidatesViewStarted = false; mImm.setIMEButtonVisible(mToken, false); mImm.setImeWindowStatus(mToken, 0, mBackDisposition); if (mWindowVisible) { mWindow.hide(); mWindowVisible = false; Loading
core/java/android/view/inputmethod/InputMethodManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -531,9 +531,9 @@ public final class InputMethodManager { } /** @hide */ public void setIMEButtonVisible(IBinder imeToken, boolean visible) { public void setImeWindowStatus(IBinder imeToken, int vis, int backDisposition) { try { mService.setIMEButtonVisible(imeToken, visible); mService.setImeWindowStatus(imeToken, vis, backDisposition); } catch (RemoteException e) { throw new RuntimeException(e); } Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,6 @@ oneway interface IStatusBar void animateCollapse(); void setLightsOn(boolean on); void setMenuKeyVisible(boolean visible); void setIMEButtonVisible(in IBinder token, boolean visible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); }
core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ interface IStatusBarService void setIconVisibility(String slot, boolean visible); void removeIcon(String slot); void setMenuKeyVisible(boolean visible); void setIMEButtonVisible(in IBinder token, boolean visible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); // ---- Methods below are for use by the status bar policy services ---- // You need the STATUS_BAR_SERVICE permission Loading