Merge "Close windows on ACTION_UP when touched outside" into qt-dev

am: 89ebf3f674

Change-Id: I845e4979cb3e7cc32775b9ac8083ee0802d6a390
This commit is contained in:
Siarhei Vishniakou
2019-05-29 15:00:30 -07:00
committed by android-build-merger

View File

@@ -1301,7 +1301,7 @@ public abstract class Window {
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public boolean shouldCloseOnTouch(Context context, MotionEvent event) {
final boolean isOutside =
event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(context, event)
event.getAction() == MotionEvent.ACTION_UP && isOutOfBounds(context, event)
|| event.getAction() == MotionEvent.ACTION_OUTSIDE;
if (mCloseOnTouchOutside && peekDecorView() != null && isOutside) {
return true;