Add support for secure system overlays.

Manual merge from Gingerbread.

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: Id876736fd8bf332ff9a5428bde59f5268aa49c3a
This commit is contained in:
Jeff Brown 2010-10-15 00:54:27 -07:00
parent 3af04dafbb
commit e68d9e0be4
2 changed files with 4 additions and 2 deletions

View File

@ -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,
};

View File

@ -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;
}
}