OSDN Git Service

Add new MotionEvent flag for partially obscured windows.
authorMichael Wright <michaelwr@google.com>
Tue, 22 Mar 2016 23:52:13 +0000 (16:52 -0700)
committerMichael Wright <michaelwr@google.com>
Thu, 31 Mar 2016 22:50:05 +0000 (15:50 -0700)
commitcdcd8f2b25a4bf32bb7506fc98ba541d274c9a31
tree97c48382953203975b7c2b0cc8f798e6efbdac8d
parente98a9a910692cf7dee3bac2b58cf5f08c59db38f
Add new MotionEvent flag for partially obscured windows.

Due to more complex window layouts resulting in lots of overlapping
windows, the policy around FLAG_WINDOW_IS_OBSCURED has changed to
only be set when the point at which the window was touched is
obscured. Unfortunately, this doesn't prevent tapjacking attacks that
overlay the dialog's text, making a potentially dangerous operation
seem innocuous. To avoid this on particularly sensitive dialogs,
introduce a new flag that really does tell you when your window is
being even partially overlapped.

We aren't exposing this as API since we plan on making the original
flag more robust. This is really a workaround for system dialogs
since we generally know their layout and screen position, and that
they're unlikely to be overlapped by other applications.

Bug: 26677796
Change-Id: I9e336afe90f262ba22015876769a9c510048fd47
include/input/Input.h
services/inputflinger/InputDispatcher.cpp
services/inputflinger/InputDispatcher.h
services/inputflinger/InputWindow.cpp
services/inputflinger/InputWindow.h