From c3c2ed94ff5df23bb05b5f8ab6218b2be8ae3470 Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Thu, 27 Jul 2017 18:24:01 -0700 Subject: [PATCH] DO NOT MERGE Remove window obscurement information. If ACTION_OUTSIDE_EVENTS contain information about whether the touch is obscured, then a pattern of invisible, untouchable, unfocusable SYSTEM_ALERT_WINDOWS can be placed across the screen to determine approximate locations of touch events without the user knowing. Bug: 31097064 Test: cts-tradefed run cts --class android.security.cts.MotionEventTest Change-Id: I081a483c491dd384e252f0b615affee96038fdda --- services/input/InputDispatcher.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 10a639e7aaad9..f13e523fad695 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -1239,13 +1239,10 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, if (maskedAction == AMOTION_EVENT_ACTION_DOWN && (flags & InputWindowInfo::FLAG_WATCH_OUTSIDE_TOUCH)) { - int32_t outsideTargetFlags = InputTarget::FLAG_DISPATCH_AS_OUTSIDE; - if (isWindowObscuredAtPointLocked(windowHandle, x, y)) { - outsideTargetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED; - } mTempTouchState.addOrUpdateWindow( - windowHandle, outsideTargetFlags, BitSet32(0)); + windowHandle, InputTarget::FLAG_DISPATCH_AS_OUTSIDE, + BitSet32(0)); } } }