Add setFocusedWindow function stub
This function, once implemented, will set focus on the specified
window. This is the first step in changing focus selection from
setInputWindows and using explicit call which will help us more
easily decouple z-order from focus selection and support focus
for SurfaceViewHost surfaces.
Bug: 151179149
Test: presubmit
Test: go/wm-smoke
Test: atest inputflinger_tests
Change-Id: Ib2254b4ab3ba8d579dfe49ddf3286f8ce2eecf9e
diff --git a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
index 272b0a6..f97c880 100644
--- a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
+++ b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
@@ -18,6 +18,7 @@
#define _UI_INPUT_INPUTDISPATCHER_INPUTDISPATCHERINTERFACE_H
#include <InputListener.h>
+#include <android/FocusRequest.h>
#include <android/os/ISetInputWindowsListener.h>
#include <input/InputApplication.h>
#include <input/InputTransport.h>
@@ -148,6 +149,11 @@
*/
virtual bool transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken) = 0;
+ /**
+ * Sets focus on the specified window.
+ */
+ virtual void setFocusedWindow(const FocusRequest&) = 0;
+
/* Registers input channels that may be used as targets for input events.
*
* This method may be called on any thread (usually by the input manager).