Add support for secure views.
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the input manager whenever another visible window is partly or wholly obscured the target of a touch event so that applications can filter touches accordingly. Added a "filterTouchesWhenObscured" attribute to View which can be used to enable filtering of touches when the view's window is obscured. Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
This commit is contained in:
@@ -34,9 +34,17 @@ public final class InputWindow {
|
||||
// Dispatching timeout.
|
||||
public long dispatchingTimeoutNanos;
|
||||
|
||||
// Window frame position.
|
||||
// Window frame area.
|
||||
public int frameLeft;
|
||||
public int frameTop;
|
||||
public int frameRight;
|
||||
public int frameBottom;
|
||||
|
||||
// Window visible frame area.
|
||||
public int visibleFrameLeft;
|
||||
public int visibleFrameTop;
|
||||
public int visibleFrameRight;
|
||||
public int visibleFrameBottom;
|
||||
|
||||
// Window touchable area.
|
||||
public int touchableAreaLeft;
|
||||
|
||||
@@ -5218,6 +5218,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
final Rect frame = child.mFrame;
|
||||
inputWindow.frameLeft = frame.left;
|
||||
inputWindow.frameTop = frame.top;
|
||||
inputWindow.frameRight = frame.right;
|
||||
inputWindow.frameBottom = frame.bottom;
|
||||
|
||||
final Rect visibleFrame = child.mVisibleFrame;
|
||||
inputWindow.visibleFrameLeft = visibleFrame.left;
|
||||
inputWindow.visibleFrameTop = visibleFrame.top;
|
||||
inputWindow.visibleFrameRight = visibleFrame.right;
|
||||
inputWindow.visibleFrameBottom = visibleFrame.bottom;
|
||||
|
||||
switch (child.mTouchableInsets) {
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user