Private flags are masked in correct variable
Newly added private flags were being masked in the public flag variable
as opposed to the correct privateFlags variable.
bug:11033280
bug:11043194
Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 9e7a15d..274009f 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -474,6 +474,7 @@
const InputWindowInfo* windowInfo = windowHandle->getInfo();
if (windowInfo->displayId == displayId) {
int32_t flags = windowInfo->layoutParamsFlags;
+ int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
if (windowInfo->visible) {
if (!(flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
@@ -486,7 +487,7 @@
}
}
- if (flags & InputWindowInfo::FLAG_SYSTEM_ERROR) {
+ if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
// Error window is on top but not visible, so touch is dropped.
return NULL;
}
@@ -1215,13 +1216,14 @@
continue; // wrong display
}
- int32_t flags = windowInfo->layoutParamsFlags;
- if (flags & InputWindowInfo::FLAG_SYSTEM_ERROR) {
+ int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
+ if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
if (topErrorWindowHandle == NULL) {
topErrorWindowHandle = windowHandle;
}
}
+ int32_t flags = windowInfo->layoutParamsFlags;
if (windowInfo->visible) {
if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
diff --git a/services/input/InputWindow.h b/services/input/InputWindow.h
index 136870a..28fa7ab 100644
--- a/services/input/InputWindow.h
+++ b/services/input/InputWindow.h
@@ -59,13 +59,13 @@
FLAG_TURN_SCREEN_ON = 0x00200000,
FLAG_DISMISS_KEYGUARD = 0x00400000,
FLAG_SPLIT_TOUCH = 0x00800000,
- FLAG_HARDWARE_ACCELERATED = 0x01000000,
- FLAG_HARDWARE_ACCELERATED_SYSTEM = 0x02000000,
- FLAG_SLIPPERY = 0x04000000,
- FLAG_NEEDS_MENU_KEY = 0x08000000,
- FLAG_KEEP_SURFACE_WHILE_ANIMATING = 0x10000000,
- FLAG_COMPATIBLE_WINDOW = 0x20000000,
- FLAG_SYSTEM_ERROR = 0x40000000,
+ FLAG_SLIPPERY = 0x20000000,
+ FLAG_NEEDS_MENU_KEY = 0x40000000,
+ };
+
+ // Private Window flags from WindowManager.LayoutParams
+ enum {
+ PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100,
};
// Window types from WindowManager.LayoutParams
@@ -117,6 +117,7 @@
sp<InputChannel> inputChannel;
String8 name;
int32_t layoutParamsFlags;
+ int32_t layoutParamsPrivateFlags;
int32_t layoutParamsType;
nsecs_t dispatchingTimeout;
int32_t frameLeft;