Loading libs/gui/SurfaceComposerClient.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -1417,17 +1417,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setInput return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFocusedWindow( const sp<IBinder>& token, const sp<IBinder>& focusedToken, nsecs_t timestampNanos, int32_t displayId) { FocusRequest request; request.token = token; request.focusedToken = focusedToken; request.timestamp = timestampNanos; request.displayId = displayId; return setFocusedWindow(request); } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFocusedWindow( const FocusRequest& request) { mInputWindowCommands.focusRequests.push_back(request); Loading libs/gui/include/gui/SurfaceComposerClient.h +0 −2 Original line number Diff line number Diff line Loading @@ -522,8 +522,6 @@ public: #ifndef NO_INPUT Transaction& setInputWindowInfo(const sp<SurfaceControl>& sc, const InputWindowInfo& info); Transaction& setFocusedWindow(const sp<IBinder>& token, const sp<IBinder>& focusedToken, nsecs_t timestampNanos, int32_t displayId); Transaction& setFocusedWindow(const FocusRequest& request); Transaction& syncInputWindows(); #endif Loading libs/gui/tests/EndToEndNativeInputTest.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -202,8 +202,14 @@ public: void requestFocus() { SurfaceComposerClient::Transaction t; t.setFocusedWindow(mInputInfo.token, nullptr, systemTime(SYSTEM_TIME_MONOTONIC), 0 /* displayId */); FocusRequest request; request.token = mInputInfo.token; request.windowName = mInputInfo.name; request.focusedToken = nullptr; request.focusedWindowName = ""; request.timestamp = systemTime(SYSTEM_TIME_MONOTONIC); request.displayId = 0; t.setFocusedWindow(request); t.apply(true); } Loading libs/input/android/FocusRequest.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ parcelable FocusRequest { * Input channel token used to identify the window that should gain focus. */ IBinder token; @utf8InCpp String windowName; /** * The token that the caller expects currently to be focused. If the * specified token does not match the currently focused window, this request will be dropped. Loading @@ -30,6 +31,7 @@ parcelable FocusRequest { * is. */ @nullable IBinder focusedToken; @utf8InCpp String focusedWindowName; /** * SYSTEM_TIME_MONOTONIC timestamp in nanos set by the client (wm) when requesting the focus * change. This determines which request gets precedence if there is a focus change request Loading Loading
libs/gui/SurfaceComposerClient.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -1417,17 +1417,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setInput return *this; } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFocusedWindow( const sp<IBinder>& token, const sp<IBinder>& focusedToken, nsecs_t timestampNanos, int32_t displayId) { FocusRequest request; request.token = token; request.focusedToken = focusedToken; request.timestamp = timestampNanos; request.displayId = displayId; return setFocusedWindow(request); } SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFocusedWindow( const FocusRequest& request) { mInputWindowCommands.focusRequests.push_back(request); Loading
libs/gui/include/gui/SurfaceComposerClient.h +0 −2 Original line number Diff line number Diff line Loading @@ -522,8 +522,6 @@ public: #ifndef NO_INPUT Transaction& setInputWindowInfo(const sp<SurfaceControl>& sc, const InputWindowInfo& info); Transaction& setFocusedWindow(const sp<IBinder>& token, const sp<IBinder>& focusedToken, nsecs_t timestampNanos, int32_t displayId); Transaction& setFocusedWindow(const FocusRequest& request); Transaction& syncInputWindows(); #endif Loading
libs/gui/tests/EndToEndNativeInputTest.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -202,8 +202,14 @@ public: void requestFocus() { SurfaceComposerClient::Transaction t; t.setFocusedWindow(mInputInfo.token, nullptr, systemTime(SYSTEM_TIME_MONOTONIC), 0 /* displayId */); FocusRequest request; request.token = mInputInfo.token; request.windowName = mInputInfo.name; request.focusedToken = nullptr; request.focusedWindowName = ""; request.timestamp = systemTime(SYSTEM_TIME_MONOTONIC); request.displayId = 0; t.setFocusedWindow(request); t.apply(true); } Loading
libs/input/android/FocusRequest.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ parcelable FocusRequest { * Input channel token used to identify the window that should gain focus. */ IBinder token; @utf8InCpp String windowName; /** * The token that the caller expects currently to be focused. If the * specified token does not match the currently focused window, this request will be dropped. Loading @@ -30,6 +31,7 @@ parcelable FocusRequest { * is. */ @nullable IBinder focusedToken; @utf8InCpp String focusedWindowName; /** * SYSTEM_TIME_MONOTONIC timestamp in nanos set by the client (wm) when requesting the focus * change. This determines which request gets precedence if there is a focus change request Loading