summaryrefslogtreecommitdiff
path: root/libs/input/InputWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/input/InputWindow.cpp')
-rw-r--r--libs/input/InputWindow.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/libs/input/InputWindow.cpp b/libs/input/InputWindow.cpp
index ec28757933..85a2015e43 100644
--- a/libs/input/InputWindow.cpp
+++ b/libs/input/InputWindow.cpp
@@ -42,17 +42,18 @@ bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
&& y >= frameTop && y < frameBottom;
}
+// TODO(b/155781676): Remove and replace call points with trustedOverlay when that is ready.
bool InputWindowInfo::isTrustedOverlay() const {
- return layoutParamsType == TYPE_INPUT_METHOD
- || layoutParamsType == TYPE_INPUT_METHOD_DIALOG
- || layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
- || layoutParamsType == TYPE_STATUS_BAR
- || layoutParamsType == TYPE_NAVIGATION_BAR
- || layoutParamsType == TYPE_NAVIGATION_BAR_PANEL
- || layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY
- || layoutParamsType == TYPE_DOCK_DIVIDER
- || layoutParamsType == TYPE_ACCESSIBILITY_OVERLAY
- || layoutParamsType == TYPE_INPUT_CONSUMER;
+ return layoutParamsType == TYPE_INPUT_METHOD || layoutParamsType == TYPE_INPUT_METHOD_DIALOG ||
+ layoutParamsType == TYPE_MAGNIFICATION_OVERLAY || layoutParamsType == TYPE_STATUS_BAR ||
+ layoutParamsType == TYPE_NOTIFICATION_SHADE ||
+ layoutParamsType == TYPE_NAVIGATION_BAR ||
+ layoutParamsType == TYPE_NAVIGATION_BAR_PANEL ||
+ layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY ||
+ layoutParamsType == TYPE_DOCK_DIVIDER ||
+ layoutParamsType == TYPE_ACCESSIBILITY_OVERLAY ||
+ layoutParamsType == TYPE_INPUT_CONSUMER ||
+ layoutParamsType == TYPE_TRUSTED_APPLICATION_OVERLAY;
}
bool InputWindowInfo::supportsSplitTouch() const {
@@ -65,7 +66,7 @@ bool InputWindowInfo::overlaps(const InputWindowInfo* other) const {
}
status_t InputWindowInfo::write(Parcel& output) const {
- if (token == nullptr) {
+ if (name.empty()) {
output.writeInt32(0);
return OK;
}
@@ -73,6 +74,7 @@ status_t InputWindowInfo::write(Parcel& output) const {
status_t s = output.writeStrongBinder(token);
if (s != OK) return s;
+ output.writeInt32(id);
output.writeString8(String8(name.c_str()));
output.writeInt32(layoutParamsFlags);
output.writeInt32(layoutParamsType);
@@ -90,7 +92,6 @@ status_t InputWindowInfo::write(Parcel& output) const {
output.writeBool(hasFocus);
output.writeBool(hasWallpaper);
output.writeBool(paused);
- output.writeInt32(layer);
output.writeInt32(ownerPid);
output.writeInt32(ownerUid);
output.writeInt32(inputFeatures);
@@ -110,12 +111,8 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) {
return ret;
}
- sp<IBinder> token = from.readStrongBinder();
- if (token == nullptr) {
- return ret;
- }
-
- ret.token = token;
+ ret.token = from.readStrongBinder();
+ ret.id = from.readInt32();
ret.name = from.readString8().c_str();
ret.layoutParamsFlags = from.readInt32();
ret.layoutParamsType = from.readInt32();
@@ -133,7 +130,6 @@ InputWindowInfo InputWindowInfo::read(const Parcel& from) {
ret.hasFocus = from.readBool();
ret.hasWallpaper = from.readBool();
ret.paused = from.readBool();
- ret.layer = from.readInt32();
ret.ownerPid = from.readInt32();
ret.ownerUid = from.readInt32();
ret.inputFeatures = from.readInt32();