Merge "Stop consuming input on error dialogs." into lmp-mr1-dev
This commit is contained in:
commit
83cbc5a758
@ -477,7 +477,6 @@ sp<InputWindowHandle> InputDispatcher::findTouchedWindowAtLocked(int32_t display
|
|||||||
const InputWindowInfo* windowInfo = windowHandle->getInfo();
|
const InputWindowInfo* windowInfo = windowHandle->getInfo();
|
||||||
if (windowInfo->displayId == displayId) {
|
if (windowInfo->displayId == displayId) {
|
||||||
int32_t flags = windowInfo->layoutParamsFlags;
|
int32_t flags = windowInfo->layoutParamsFlags;
|
||||||
int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
|
|
||||||
|
|
||||||
if (windowInfo->visible) {
|
if (windowInfo->visible) {
|
||||||
if (!(flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
|
if (!(flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
|
||||||
@ -489,11 +488,6 @@ sp<InputWindowHandle> InputDispatcher::findTouchedWindowAtLocked(int32_t display
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
|
|
||||||
// Error window is on top but not visible, so touch is dropped.
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1190,7 +1184,6 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
|
|||||||
int32_t y = int32_t(entry->pointerCoords[pointerIndex].
|
int32_t y = int32_t(entry->pointerCoords[pointerIndex].
|
||||||
getAxisValue(AMOTION_EVENT_AXIS_Y));
|
getAxisValue(AMOTION_EVENT_AXIS_Y));
|
||||||
sp<InputWindowHandle> newTouchedWindowHandle;
|
sp<InputWindowHandle> newTouchedWindowHandle;
|
||||||
sp<InputWindowHandle> topErrorWindowHandle;
|
|
||||||
bool isTouchModal = false;
|
bool isTouchModal = false;
|
||||||
|
|
||||||
// Traverse windows from front to back to find touched window and outside targets.
|
// Traverse windows from front to back to find touched window and outside targets.
|
||||||
@ -1202,13 +1195,6 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
|
|||||||
continue; // wrong display
|
continue; // wrong display
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
|
|
||||||
if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
|
|
||||||
if (topErrorWindowHandle == NULL) {
|
|
||||||
topErrorWindowHandle = windowHandle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t flags = windowInfo->layoutParamsFlags;
|
int32_t flags = windowInfo->layoutParamsFlags;
|
||||||
if (windowInfo->visible) {
|
if (windowInfo->visible) {
|
||||||
if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
|
if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
|
||||||
@ -1233,17 +1219,6 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is an error window but it is not taking focus (typically because
|
|
||||||
// it is invisible) then wait for it. Any other focused window may in
|
|
||||||
// fact be in ANR state.
|
|
||||||
if (topErrorWindowHandle != NULL && newTouchedWindowHandle != topErrorWindowHandle) {
|
|
||||||
injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
|
|
||||||
NULL, NULL, nextWakeupTime,
|
|
||||||
"Waiting because a system error window is about to be displayed.");
|
|
||||||
injectionPermission = INJECTION_PERMISSION_UNKNOWN;
|
|
||||||
goto Unresponsive;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Figure out whether splitting will be allowed for this window.
|
// Figure out whether splitting will be allowed for this window.
|
||||||
if (newTouchedWindowHandle != NULL
|
if (newTouchedWindowHandle != NULL
|
||||||
&& newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
|
&& newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
|
||||||
|
@ -64,11 +64,6 @@ struct InputWindowInfo {
|
|||||||
FLAG_NEEDS_MENU_KEY = 0x40000000,
|
FLAG_NEEDS_MENU_KEY = 0x40000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Private Window flags from WindowManager.LayoutParams
|
|
||||||
enum {
|
|
||||||
PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Window types from WindowManager.LayoutParams
|
// Window types from WindowManager.LayoutParams
|
||||||
enum {
|
enum {
|
||||||
FIRST_APPLICATION_WINDOW = 1,
|
FIRST_APPLICATION_WINDOW = 1,
|
||||||
@ -119,7 +114,6 @@ struct InputWindowInfo {
|
|||||||
sp<InputChannel> inputChannel;
|
sp<InputChannel> inputChannel;
|
||||||
String8 name;
|
String8 name;
|
||||||
int32_t layoutParamsFlags;
|
int32_t layoutParamsFlags;
|
||||||
int32_t layoutParamsPrivateFlags;
|
|
||||||
int32_t layoutParamsType;
|
int32_t layoutParamsType;
|
||||||
nsecs_t dispatchingTimeout;
|
nsecs_t dispatchingTimeout;
|
||||||
int32_t frameLeft;
|
int32_t frameLeft;
|
||||||
|
Loading…
Reference in New Issue
Block a user