diff options
| author | 2024-06-20 20:42:50 +0000 | |
|---|---|---|
| committer | 2024-06-20 20:42:50 +0000 | |
| commit | 3dd03323aa8825a0c7bf4dcc1ed6d6c3b88a3d7f (patch) | |
| tree | e05639565a22611c334a83a35a998f3fba3e1f1a /libs/gui/WindowInfo.cpp | |
| parent | 447d0a33acc9827809d1049023b05e4cac05fc70 (diff) | |
| parent | bb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (diff) | |
Merge "Merge 24Q3 (ab/11976889) to aosp-main-future" into aosp-main-future
Diffstat (limited to 'libs/gui/WindowInfo.cpp')
| -rw-r--r-- | libs/gui/WindowInfo.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libs/gui/WindowInfo.cpp b/libs/gui/WindowInfo.cpp index 86bf0ee745..82d2554340 100644 --- a/libs/gui/WindowInfo.cpp +++ b/libs/gui/WindowInfo.cpp @@ -73,14 +73,6 @@ void WindowInfo::addTouchableRegion(const Rect& region) { touchableRegion.orSelf(region); } -bool WindowInfo::touchableRegionContainsPoint(int32_t x, int32_t y) const { - return touchableRegion.contains(x, y); -} - -bool WindowInfo::frameContainsPoint(int32_t x, int32_t y) const { - return x >= frame.left && x < frame.right && y >= frame.top && y < frame.bottom; -} - bool WindowInfo::supportsSplitTouch() const { return !inputConfig.test(InputConfig::PREVENT_SPLITTING); } @@ -154,7 +146,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const { parcel->writeInt32(ownerUid.val()) ?: parcel->writeUtf8AsUtf16(packageName) ?: parcel->writeInt32(inputConfig.get()) ?: - parcel->writeInt32(displayId) ?: + parcel->writeInt32(displayId.val()) ?: applicationInfo.writeToParcel(parcel) ?: parcel->write(touchableRegion) ?: parcel->writeBool(replaceTouchableRegionWithCrop) ?: @@ -183,7 +175,8 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { } float dsdx, dtdx, tx, dtdy, dsdy, ty; - int32_t lpFlags, lpType, touchOcclusionModeInt, inputConfigInt, ownerPidInt, ownerUidInt; + int32_t lpFlags, lpType, touchOcclusionModeInt, inputConfigInt, ownerPidInt, ownerUidInt, + displayIdInt; sp<IBinder> touchableRegionCropHandleSp; // clang-format off @@ -206,7 +199,7 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { parcel->readInt32(&ownerUidInt) ?: parcel->readUtf8FromUtf16(&packageName) ?: parcel->readInt32(&inputConfigInt) ?: - parcel->readInt32(&displayId) ?: + parcel->readInt32(&displayIdInt) ?: applicationInfo.readFromParcel(parcel) ?: parcel->read(touchableRegion) ?: parcel->readBool(&replaceTouchableRegionWithCrop) ?: @@ -229,6 +222,7 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) { ownerPid = Pid{ownerPidInt}; ownerUid = Uid{static_cast<uid_t>(ownerUidInt)}; touchableRegionCropHandle = touchableRegionCropHandleSp; + displayId = ui::LogicalDisplayId{displayIdInt}; return OK; } |