Loading libs/gui/WindowInfo.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ bool WindowInfo::operator==(const WindowInfo& info) const { info.inputConfig == inputConfig && info.displayId == displayId && info.replaceTouchableRegionWithCrop == replaceTouchableRegionWithCrop && info.applicationInfo == applicationInfo && info.layoutParamsType == layoutParamsType && info.layoutParamsFlags == layoutParamsFlags && info.isClone == isClone; info.layoutParamsFlags == layoutParamsFlags; } status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { Loading Loading @@ -124,8 +124,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->write(touchableRegion) ?: parcel->writeBool(replaceTouchableRegionWithCrop) ?: parcel->writeStrongBinder(touchableRegionCropHandle.promote()) ?: parcel->writeStrongBinder(windowToken) ?: parcel->writeBool(isClone); parcel->writeStrongBinder(windowToken); // clang-format on return status; } Loading Loading @@ -176,8 +175,7 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { parcel->read(touchableRegion) ?: parcel->readBool(&replaceTouchableRegionWithCrop) ?: parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?: parcel->readNullableStrongBinder(&windowToken) ?: parcel->readBool(&isClone); parcel->readNullableStrongBinder(&windowToken); // clang-format on if (status != OK) { Loading libs/gui/include/gui/WindowInfo.h +2 −2 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ struct WindowInfo : public Parcelable { static_cast<uint32_t>(os::InputConfig::SPY), INTERCEPTS_STYLUS = static_cast<uint32_t>(os::InputConfig::INTERCEPTS_STYLUS), CLONE = static_cast<uint32_t>(os::InputConfig::CLONE), // clang-format on }; Loading Loading @@ -236,8 +238,6 @@ struct WindowInfo : public Parcelable { void setInputConfig(ftl::Flags<InputConfig> config, bool value); bool isClone = false; void addTouchableRegion(const Rect& region); bool touchableRegionContainsPoint(int32_t x, int32_t y) const; Loading libs/gui/tests/WindowInfo_test.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ TEST(WindowInfo, Parcelling) { i.applicationInfo.name = "ApplicationFooBar"; i.applicationInfo.token = new BBinder(); i.applicationInfo.dispatchingTimeoutMillis = 0x12345678ABCD; i.isClone = true; Parcel p; i.writeToParcel(&p); Loading Loading @@ -102,7 +101,6 @@ TEST(WindowInfo, Parcelling) { ASSERT_EQ(i.replaceTouchableRegionWithCrop, i2.replaceTouchableRegionWithCrop); ASSERT_EQ(i.touchableRegionCropHandle, i2.touchableRegionCropHandle); ASSERT_EQ(i.applicationInfo, i2.applicationInfo); ASSERT_EQ(i.isClone, i2.isClone); } TEST(InputApplicationInfo, Parcelling) { Loading libs/input/android/os/InputConfig.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,10 @@ enum InputConfig { * It is not valid to set this configuration if {@link #TRUSTED_OVERLAY} is not set. */ INTERCEPTS_STYLUS = 1 << 15, /** * The window is a clone of another window. This may be treated differently since there's * likely a duplicate window with the same client token, but different bounds. */ CLONE = 1 << 16, } services/surfaceflinger/Layer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2418,7 +2418,7 @@ WindowInfo Layer::fillInputInfo(const ui::Transform& displayTransform, bool disp // If the layer is a clone, we need to crop the input region to cloned root to prevent // touches from going outside the cloned area. if (isClone()) { info.isClone = true; info.inputConfig |= WindowInfo::InputConfig::CLONE; if (const sp<Layer> clonedRoot = getClonedRoot()) { const Rect rect = displayTransform.transform(Rect{clonedRoot->mScreenBounds}); info.touchableRegion = info.touchableRegion.intersect(rect); Loading Loading
libs/gui/WindowInfo.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ bool WindowInfo::operator==(const WindowInfo& info) const { info.inputConfig == inputConfig && info.displayId == displayId && info.replaceTouchableRegionWithCrop == replaceTouchableRegionWithCrop && info.applicationInfo == applicationInfo && info.layoutParamsType == layoutParamsType && info.layoutParamsFlags == layoutParamsFlags && info.isClone == isClone; info.layoutParamsFlags == layoutParamsFlags; } status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { Loading Loading @@ -124,8 +124,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->write(touchableRegion) ?: parcel->writeBool(replaceTouchableRegionWithCrop) ?: parcel->writeStrongBinder(touchableRegionCropHandle.promote()) ?: parcel->writeStrongBinder(windowToken) ?: parcel->writeBool(isClone); parcel->writeStrongBinder(windowToken); // clang-format on return status; } Loading Loading @@ -176,8 +175,7 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { parcel->read(touchableRegion) ?: parcel->readBool(&replaceTouchableRegionWithCrop) ?: parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?: parcel->readNullableStrongBinder(&windowToken) ?: parcel->readBool(&isClone); parcel->readNullableStrongBinder(&windowToken); // clang-format on if (status != OK) { Loading
libs/gui/include/gui/WindowInfo.h +2 −2 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ struct WindowInfo : public Parcelable { static_cast<uint32_t>(os::InputConfig::SPY), INTERCEPTS_STYLUS = static_cast<uint32_t>(os::InputConfig::INTERCEPTS_STYLUS), CLONE = static_cast<uint32_t>(os::InputConfig::CLONE), // clang-format on }; Loading Loading @@ -236,8 +238,6 @@ struct WindowInfo : public Parcelable { void setInputConfig(ftl::Flags<InputConfig> config, bool value); bool isClone = false; void addTouchableRegion(const Rect& region); bool touchableRegionContainsPoint(int32_t x, int32_t y) const; Loading
libs/gui/tests/WindowInfo_test.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ TEST(WindowInfo, Parcelling) { i.applicationInfo.name = "ApplicationFooBar"; i.applicationInfo.token = new BBinder(); i.applicationInfo.dispatchingTimeoutMillis = 0x12345678ABCD; i.isClone = true; Parcel p; i.writeToParcel(&p); Loading Loading @@ -102,7 +101,6 @@ TEST(WindowInfo, Parcelling) { ASSERT_EQ(i.replaceTouchableRegionWithCrop, i2.replaceTouchableRegionWithCrop); ASSERT_EQ(i.touchableRegionCropHandle, i2.touchableRegionCropHandle); ASSERT_EQ(i.applicationInfo, i2.applicationInfo); ASSERT_EQ(i.isClone, i2.isClone); } TEST(InputApplicationInfo, Parcelling) { Loading
libs/input/android/os/InputConfig.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,10 @@ enum InputConfig { * It is not valid to set this configuration if {@link #TRUSTED_OVERLAY} is not set. */ INTERCEPTS_STYLUS = 1 << 15, /** * The window is a clone of another window. This may be treated differently since there's * likely a duplicate window with the same client token, but different bounds. */ CLONE = 1 << 16, }
services/surfaceflinger/Layer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2418,7 +2418,7 @@ WindowInfo Layer::fillInputInfo(const ui::Transform& displayTransform, bool disp // If the layer is a clone, we need to crop the input region to cloned root to prevent // touches from going outside the cloned area. if (isClone()) { info.isClone = true; info.inputConfig |= WindowInfo::InputConfig::CLONE; if (const sp<Layer> clonedRoot = getClonedRoot()) { const Rect rect = displayTransform.transform(Rect{clonedRoot->mScreenBounds}); info.touchableRegion = info.touchableRegion.intersect(rect); Loading