Move the logic of transferTouchFocusToImeWindow to IMMS.

It would better move logic of transferTouchFocusToImeWindow
from WindowManagerService to InputMethodManagerService.

Bug: 149574510
Test: atest CtsAutoFillServiceTestCases
Test: atest CtsInputMethodTestCases
Change-Id: I268b09781e5eb7c77c4912efdc8fd5d6936ada27
This commit is contained in:
lpeter
2020-03-05 20:32:16 +08:00
parent 3fe090f737
commit 133fce0171
8 changed files with 112 additions and 41 deletions

View File

@@ -16,7 +16,9 @@
package android.hardware.input;
import android.annotation.NonNull;
import android.hardware.display.DisplayViewport;
import android.os.IBinder;
import android.view.InputEvent;
import java.util.List;
@@ -59,4 +61,21 @@ public abstract class InputManagerInternal {
* Set whether the input stack should deliver pulse gesture events when the device is asleep.
*/
public abstract void setPulseGestureEnabled(boolean enabled);
/**
* Atomically transfers touch focus from one window to another as identified by
* their input channels. It is possible for multiple windows to have
* touch focus if they support split touch dispatch
* {@link android.view.WindowManager.LayoutParams#FLAG_SPLIT_TOUCH} but this
* method only transfers touch focus of the specified window without affecting
* other windows that may also have touch focus at the same time.
*
* @param fromChannelToken The channel token of a window that currently has touch focus.
* @param toChannelToken The channel token of the window that should receive touch focus in
* place of the first.
* @return {@code true} if the transfer was successful. {@code false} if the window with the
* specified channel did not actually have touch focus at the time of the request.
*/
public abstract boolean transferTouchFocus(@NonNull IBinder fromChannelToken,
@NonNull IBinder toChannelToken);
}