summaryrefslogtreecommitdiff
path: root/libs/gui/WindowInfo.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2021-08-16 12:15:11 -0700
committer Prabir Pradhan <prabirmsp@google.com> 2021-08-16 12:18:21 -0700
commit817f606392e4c6fbadc2a60d59c11378ea83b222 (patch)
tree4a7ec5948acbf9ad96906603f5c8a374b8cab5cf /libs/gui/WindowInfo.cpp
parentf334812daa74bb651590334f60229262dad11b81 (diff)
Write displayOrientation value when WindowInfo is parceled
The expected displayOrientation value was not being sent to other processes in WindowInfo because it was not being parceled/unparceled. Here, we ensure that the displayOrientation value is correctly parceled. Bug: 179274888 Test: adb shell dumpsys input Change-Id: Ic3e72a6ec45ffa0bd3a5b407389fccd7a5f036a6
Diffstat (limited to 'libs/gui/WindowInfo.cpp')
-rw-r--r--libs/gui/WindowInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/WindowInfo.cpp b/libs/gui/WindowInfo.cpp
index 6b68e1a93b..b2ef7aabc9 100644
--- a/libs/gui/WindowInfo.cpp
+++ b/libs/gui/WindowInfo.cpp
@@ -54,8 +54,8 @@ bool WindowInfo::operator==(const WindowInfo& info) const {
info.frameLeft == frameLeft && info.frameTop == frameTop &&
info.frameRight == frameRight && info.frameBottom == frameBottom &&
info.surfaceInset == surfaceInset && info.globalScaleFactor == globalScaleFactor &&
- info.transform == transform && info.displayWidth == displayWidth &&
- info.displayHeight == displayHeight &&
+ info.transform == transform && info.displayOrientation == displayOrientation &&
+ info.displayWidth == displayWidth && info.displayHeight == displayHeight &&
info.touchableRegion.hasSameRects(touchableRegion) && info.visible == visible &&
info.trustedOverlay == trustedOverlay && info.focusable == focusable &&
info.touchOcclusionMode == touchOcclusionMode && info.hasWallpaper == hasWallpaper &&
@@ -97,6 +97,7 @@ status_t WindowInfo::writeToParcel(android::Parcel* parcel) const {
parcel->writeFloat(transform.dtdy()) ?:
parcel->writeFloat(transform.dsdy()) ?:
parcel->writeFloat(transform.ty()) ?:
+ parcel->writeUint32(displayOrientation) ?:
parcel->writeInt32(displayWidth) ?:
parcel->writeInt32(displayHeight) ?:
parcel->writeBool(visible) ?:
@@ -154,6 +155,7 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) {
parcel->readFloat(&dtdy) ?:
parcel->readFloat(&dsdy) ?:
parcel->readFloat(&ty) ?:
+ parcel->readUint32(&displayOrientation) ?:
parcel->readInt32(&displayWidth) ?:
parcel->readInt32(&displayHeight) ?:
parcel->readBool(&visible) ?: