summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-10-15 00:54:27 -0700
committerJeff Brown <jeffbrown@google.com>2010-10-15 16:03:35 -0700
commitd9dd44d867315478bbebfbe69bb952ea8138ac4e (patch)
treefcddbe24fe1ee1f8918ef00dc424bdabb7e897ce
parentfbccbe1d1670df6ae4bb3d0f7d686ad8802479e7 (diff)
downloadframeworks_native-d9dd44d867315478bbebfbe69bb952ea8138ac4e.zip
frameworks_native-d9dd44d867315478bbebfbe69bb952ea8138ac4e.tar.gz
frameworks_native-d9dd44d867315478bbebfbe69bb952ea8138ac4e.tar.bz2
Add support for secure system overlays. (DO NOT MERGE)
This change adds a new window type for secure system overlays created by the system itself from non-secure system overlays that might be created by applications that have the system alert permission. Secure views ignore the presence of secure system overlays. Bug: 3098519 Change-Id: I8f8398f4fdeb0469e5d71124c21bedf121bd8c07
-rw-r--r--include/ui/InputDispatcher.h1
-rw-r--r--libs/ui/InputDispatcher.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/ui/InputDispatcher.h b/include/ui/InputDispatcher.h
index 3599163..4955d47 100644
--- a/include/ui/InputDispatcher.h
+++ b/include/ui/InputDispatcher.h
@@ -183,6 +183,7 @@ struct InputWindow {
TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12,
TYPE_WALLPAPER = FIRST_SYSTEM_WINDOW+13,
TYPE_STATUS_BAR_PANEL = FIRST_SYSTEM_WINDOW+14,
+ TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15,
LAST_SYSTEM_WINDOW = 2999,
};
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp
index 6ba19d7..4112328 100644
--- a/libs/ui/InputDispatcher.cpp
+++ b/libs/ui/InputDispatcher.cpp
@@ -149,7 +149,8 @@ bool InputWindow::frameContainsPoint(int32_t x, int32_t y) const {
bool InputWindow::isTrustedOverlay() const {
return layoutParamsType == TYPE_INPUT_METHOD
- || layoutParamsType == TYPE_INPUT_METHOD_DIALOG;
+ || layoutParamsType == TYPE_INPUT_METHOD_DIALOG
+ || layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY;
}
@@ -1350,7 +1351,7 @@ void InputDispatcher::addMonitoringTargetsLocked() {
target.flags = 0;
target.xOffset = 0;
target.yOffset = 0;
- target.windowType = InputWindow::TYPE_SYSTEM_OVERLAY;
+ target.windowType = -1;
}
}