Merge "A new power button mode to hide the IME when shown" into oc-dev

am: eb9fb8e0d0

Change-Id: I67cf177275889be09b2b4ecf2f9ae3589846d853
This commit is contained in:
Yohei Yukawa
2017-04-18 01:23:30 +00:00
committed by android-build-merger
6 changed files with 76 additions and 4 deletions

View File

@@ -303,13 +303,16 @@ public abstract class WindowManagerInternal {
* hidden, no matter how WindowManagerService will react / has reacted
* to corresponding API calls. Note that this state is not guaranteed
* to be synchronized with state in WindowManagerService.
* @param dismissImeOnBackKeyPressed {@code true} if the software keyboard is shown and the back
* key is expected to dismiss the software keyboard.
* @param targetWindowToken token to identify the target window that the IME is associated with.
* {@code null} when application, system, or the IME itself decided to
* change its window visibility before being associated with any target
* window.
*/
public abstract void updateInputMethodWindowStatus(@NonNull IBinder imeToken,
boolean imeWindowVisible, @Nullable IBinder targetWindowToken);
boolean imeWindowVisible, boolean dismissImeOnBackKeyPressed,
@Nullable IBinder targetWindowToken);
/**
* Returns true when the hardware keyboard is available.

View File

@@ -1536,6 +1536,18 @@ public interface WindowManagerPolicy {
*/
public void setLastInputMethodWindowLw(WindowState ime, WindowState target);
/**
* An internal callback (from InputMethodManagerService) to notify a state change regarding
* whether the back key should dismiss the software keyboard (IME) or not.
*
* @param newValue {@code true} if the software keyboard is shown and the back key is expected
* to dismiss the software keyboard.
* @hide
*/
default void setDismissImeOnBackKeyPressed(boolean newValue) {
// Default implementation does nothing.
}
/**
* Show the recents task list app.
* @hide