Add focus support for SurfaceControlViewHost
This change introduces a new call for clients to request focus on their embedded views. In order to accomplish this, the owner of the SurfacePackage sends an input token that can identify the input channel of the embedded window. This token is forwarded as part of the focus request. WindowManager will authenticate the calling window and the relationship between the host and the embedded window. Once authenticated, the request will be forwarded to InputDispatcher. InputDispatcher will grant the focus to the SurfaceControlViewHost if the host window is currently focused or transfer focus back to the host window if the SurfaceControlViewHost is focused. Otherwise the request is dropped. In addition, SurfaceView, the host in this scenario, now overrides the onFocused function to transfer focus to and from the embedded view. Test: atest SurfaceControlViewHostTests Bug: 151179149 Change-Id: Ia95545a60d73db4c03679bce9747d2e275806838
Loading
Please register or sign in to comment