summaryrefslogtreecommitdiff
path: root/libs/gui/WindowInfo.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-03-07 18:55:55 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-03-07 18:55:55 +0000
commit813c67feff60b84bf252ffa033d5dfac2b93f974 (patch)
tree42c8a8efa35d9c7539c4c59f6fbcc837f99a7d19 /libs/gui/WindowInfo.cpp
parentd61e371bfdccda9c02659c2058c608ce1b955685 (diff)
parent032141ea6963b22047bdbba3983b42010030864d (diff)
Merge "WindowInfo: Cleanup reading from parcel" into tm-dev
Diffstat (limited to 'libs/gui/WindowInfo.cpp')
-rw-r--r--libs/gui/WindowInfo.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/libs/gui/WindowInfo.cpp b/libs/gui/WindowInfo.cpp
index b02bae49d3..2312a8cf0d 100644
--- a/libs/gui/WindowInfo.cpp
+++ b/libs/gui/WindowInfo.cpp
@@ -145,12 +145,14 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) {
return status;
}
- layoutParamsFlags = Flags<Flag>(parcel->readInt32());
- layoutParamsType = static_cast<Type>(parcel->readInt32());
float dsdx, dtdx, tx, dtdy, dsdy, ty;
- int32_t touchOcclusionModeInt;
+ int32_t lpFlags, lpType, touchOcclusionModeInt, inputConfigInt;
+ sp<IBinder> touchableRegionCropHandleSp;
+
// clang-format off
- status = parcel->readInt32(&frameLeft) ?:
+ status = parcel->readInt32(&lpFlags) ?:
+ parcel->readInt32(&lpType) ?:
+ parcel->readInt32(&frameLeft) ?:
parcel->readInt32(&frameTop) ?:
parcel->readInt32(&frameRight) ?:
parcel->readInt32(&frameBottom) ?:
@@ -166,32 +168,28 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) {
parcel->readInt32(&touchOcclusionModeInt) ?:
parcel->readInt32(&ownerPid) ?:
parcel->readInt32(&ownerUid) ?:
- parcel->readUtf8FromUtf16(&packageName);
- // clang-format on
-
- if (status != OK) {
- return status;
- }
-
- touchOcclusionMode = static_cast<TouchOcclusionMode>(touchOcclusionModeInt);
-
- inputConfig = Flags<InputConfig>(parcel->readInt32());
- // clang-format off
- status = parcel->readInt32(&displayId) ?:
+ parcel->readUtf8FromUtf16(&packageName) ?:
+ parcel->readInt32(&inputConfigInt) ?:
+ parcel->readInt32(&displayId) ?:
applicationInfo.readFromParcel(parcel) ?:
parcel->read(touchableRegion) ?:
- parcel->readBool(&replaceTouchableRegionWithCrop);
+ parcel->readBool(&replaceTouchableRegionWithCrop) ?:
+ parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?:
+ parcel->readNullableStrongBinder(&windowToken);
// clang-format on
if (status != OK) {
return status;
}
- touchableRegionCropHandle = parcel->readStrongBinder();
+ layoutParamsFlags = Flags<Flag>(lpFlags);
+ layoutParamsType = static_cast<Type>(lpType);
transform.set({dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1});
+ touchOcclusionMode = static_cast<TouchOcclusionMode>(touchOcclusionModeInt);
+ inputConfig = Flags<InputConfig>(inputConfigInt);
+ touchableRegionCropHandle = touchableRegionCropHandleSp;
- status = parcel->readNullableStrongBinder(&windowToken);
- return status;
+ return OK;
}
// --- WindowInfoHandle ---