Loading libs/gui/WindowInfo.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->writeBool(replaceTouchableRegionWithCrop) ?: parcel->writeStrongBinder(touchableRegionCropHandle.promote()) ?: parcel->writeStrongBinder(windowToken); parcel->writeStrongBinder(focusTransferTarget); // clang-format on return status; } Loading Loading @@ -175,7 +176,9 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { parcel->read(touchableRegion) ?: parcel->readBool(&replaceTouchableRegionWithCrop) ?: parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?: parcel->readNullableStrongBinder(&windowToken); parcel->readNullableStrongBinder(&windowToken) ?: parcel->readNullableStrongBinder(&focusTransferTarget); // clang-format on if (status != OK) { Loading libs/gui/android/gui/FocusRequest.aidl +0 −9 Original line number Diff line number Diff line Loading @@ -23,15 +23,6 @@ parcelable FocusRequest { */ @nullable 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. * If the specified focused token matches the currently focused window, the call will succeed. * Set this to "null" if this call should succeed no matter what the currently focused token * 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 libs/gui/include/gui/WindowInfo.h +5 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,11 @@ struct WindowInfo : public Parcelable { Type layoutParamsType = Type::UNKNOWN; ftl::Flags<Flag> layoutParamsFlags; // The input token for the window to which focus should be transferred when this input window // can be successfully focused. If null, this input window will not transfer its focus to // any other window. sp<IBinder> focusTransferTarget; void setInputConfig(ftl::Flags<InputConfig> config, bool value); void addTouchableRegion(const Rect& region); Loading libs/gui/tests/EndToEndNativeInputTest.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -272,8 +272,6 @@ public: FocusRequest request; request.token = mInputInfo.token; request.windowName = mInputInfo.name; request.focusedToken = nullptr; request.focusedWindowName = ""; request.timestamp = systemTime(SYSTEM_TIME_MONOTONIC); request.displayId = displayId; t.setFocusedWindow(request); Loading libs/gui/tests/WindowInfo_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ TEST(WindowInfo, Parcelling) { i.applicationInfo.name = "ApplicationFooBar"; i.applicationInfo.token = new BBinder(); i.applicationInfo.dispatchingTimeoutMillis = 0x12345678ABCD; i.focusTransferTarget = new BBinder(); Parcel p; i.writeToParcel(&p); Loading Loading @@ -101,6 +102,7 @@ TEST(WindowInfo, Parcelling) { ASSERT_EQ(i.replaceTouchableRegionWithCrop, i2.replaceTouchableRegionWithCrop); ASSERT_EQ(i.touchableRegionCropHandle, i2.touchableRegionCropHandle); ASSERT_EQ(i.applicationInfo, i2.applicationInfo); ASSERT_EQ(i.focusTransferTarget, i2.focusTransferTarget); } TEST(InputApplicationInfo, Parcelling) { Loading Loading
libs/gui/WindowInfo.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->writeBool(replaceTouchableRegionWithCrop) ?: parcel->writeStrongBinder(touchableRegionCropHandle.promote()) ?: parcel->writeStrongBinder(windowToken); parcel->writeStrongBinder(focusTransferTarget); // clang-format on return status; } Loading Loading @@ -175,7 +176,9 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { parcel->read(touchableRegion) ?: parcel->readBool(&replaceTouchableRegionWithCrop) ?: parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?: parcel->readNullableStrongBinder(&windowToken); parcel->readNullableStrongBinder(&windowToken) ?: parcel->readNullableStrongBinder(&focusTransferTarget); // clang-format on if (status != OK) { Loading
libs/gui/android/gui/FocusRequest.aidl +0 −9 Original line number Diff line number Diff line Loading @@ -23,15 +23,6 @@ parcelable FocusRequest { */ @nullable 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. * If the specified focused token matches the currently focused window, the call will succeed. * Set this to "null" if this call should succeed no matter what the currently focused token * 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
libs/gui/include/gui/WindowInfo.h +5 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,11 @@ struct WindowInfo : public Parcelable { Type layoutParamsType = Type::UNKNOWN; ftl::Flags<Flag> layoutParamsFlags; // The input token for the window to which focus should be transferred when this input window // can be successfully focused. If null, this input window will not transfer its focus to // any other window. sp<IBinder> focusTransferTarget; void setInputConfig(ftl::Flags<InputConfig> config, bool value); void addTouchableRegion(const Rect& region); Loading
libs/gui/tests/EndToEndNativeInputTest.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -272,8 +272,6 @@ public: FocusRequest request; request.token = mInputInfo.token; request.windowName = mInputInfo.name; request.focusedToken = nullptr; request.focusedWindowName = ""; request.timestamp = systemTime(SYSTEM_TIME_MONOTONIC); request.displayId = displayId; t.setFocusedWindow(request); Loading
libs/gui/tests/WindowInfo_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ TEST(WindowInfo, Parcelling) { i.applicationInfo.name = "ApplicationFooBar"; i.applicationInfo.token = new BBinder(); i.applicationInfo.dispatchingTimeoutMillis = 0x12345678ABCD; i.focusTransferTarget = new BBinder(); Parcel p; i.writeToParcel(&p); Loading Loading @@ -101,6 +102,7 @@ TEST(WindowInfo, Parcelling) { ASSERT_EQ(i.replaceTouchableRegionWithCrop, i2.replaceTouchableRegionWithCrop); ASSERT_EQ(i.touchableRegionCropHandle, i2.touchableRegionCropHandle); ASSERT_EQ(i.applicationInfo, i2.applicationInfo); ASSERT_EQ(i.focusTransferTarget, i2.focusTransferTarget); } TEST(InputApplicationInfo, Parcelling) { Loading