summaryrefslogtreecommitdiff
path: root/include/input
diff options
context:
space:
mode:
author Chris Ye <lzye@google.com> 2020-05-10 15:16:04 -0700
committer Winson Chung <winsonc@google.com> 2021-11-05 21:47:21 +0000
commit39bc6117dda8cf5f6f43846f18fc0fed87692efa (patch)
tree37368ec3af6b7a7291ff3e3535f352a46a5bb3a0 /include/input
parent62eaabc3242b5e4ae5da7d39928123fda570f0b2 (diff)
Change InputWindowInfo::isTrustedOverlay() to be permission and flag based.
Add private flag to WindowManager.LayoutParams. If the flag is set, check if caller has INTERNAL_SYSTEM_WINDOW permission. Bug: 155781676 Bug: 196389741 Test: atest WindowManagerServiceTests Change-Id: I58cf9f38c496e0ae8b2193dca45c0805e831bc9e Merged-In: I58cf9f38c496e0ae8b2193dca45c0805e831bc9e
Diffstat (limited to 'include/input')
-rw-r--r--include/input/InputWindow.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index 2dac5b62a7..271fdb3a2f 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -108,7 +108,6 @@ struct InputWindowInfo {
TYPE_ACCESSIBILITY_OVERLAY = FIRST_SYSTEM_WINDOW + 32,
TYPE_DOCK_DIVIDER = FIRST_SYSTEM_WINDOW + 34,
TYPE_NOTIFICATION_SHADE = FIRST_SYSTEM_WINDOW + 40,
- TYPE_TRUSTED_APPLICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 42,
LAST_SYSTEM_WINDOW = 2999,
};
@@ -163,6 +162,12 @@ struct InputWindowInfo {
bool hasFocus = false;
bool hasWallpaper = false;
bool paused = false;
+ /* This flag is set when the window is of a trusted type that is allowed to silently
+ * overlay other windows for the purpose of implementing the secure views feature.
+ * Trusted overlays, such as IME windows, can partly obscure other windows without causing
+ * motion events to be delivered to them with AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED.
+ */
+ bool trustedOverlay = false;
int32_t ownerPid = -1;
int32_t ownerUid = -1;
int32_t inputFeatures = 0;
@@ -175,20 +180,15 @@ struct InputWindowInfo {
void addTouchableRegion(const Rect& region);
bool touchableRegionContainsPoint(int32_t x, int32_t y) const;
- bool frameContainsPoint(int32_t x, int32_t y) const;
- /* Returns true if the window is of a trusted type that is allowed to silently
- * overlay other windows for the purpose of implementing the secure views feature.
- * Trusted overlays, such as IME windows, can partly obscure other windows without causing
- * motion events to be delivered to them with AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED.
- */
- bool isTrustedOverlay() const;
+ bool frameContainsPoint(int32_t x, int32_t y) const;
bool supportsSplitTouch() const;
bool overlaps(const InputWindowInfo* other) const;
status_t write(Parcel& output) const;
+
static InputWindowInfo read(const Parcel& from);
};