Loading core/java/android/app/AlertDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,8 @@ public class AlertDialog extends Dialog implements DialogInterface { final float x = ev.getX(); final float y = ev.getY(); if (mCancelable && (x < 0 || x > width || y < 0 || y > height)) { if (mCancelable && (x < 0 || x > width || y < 0 || y > height) && mDecor != null && isShowing()) { cancel(); return true; } Loading core/java/android/app/Dialog.java +1 −2 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ public class Dialog implements DialogInterface, Window.Callback, */ public boolean onTouchEvent(MotionEvent event) { if (mCancelable && mCanceledOnTouchOutside && event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(event)) { && isOutOfBounds(event) && mDecor != null && mShowing) { cancel(); return true; } Loading Loading @@ -998,7 +998,6 @@ public class Dialog implements DialogInterface, Window.Callback, */ public void cancel() { if (mCancelMessage != null) { // Obtain a new message so this dialog can be re-used Message.obtain(mCancelMessage).sendToTarget(); } Loading Loading
core/java/android/app/AlertDialog.java +2 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,8 @@ public class AlertDialog extends Dialog implements DialogInterface { final float x = ev.getX(); final float y = ev.getY(); if (mCancelable && (x < 0 || x > width || y < 0 || y > height)) { if (mCancelable && (x < 0 || x > width || y < 0 || y > height) && mDecor != null && isShowing()) { cancel(); return true; } Loading
core/java/android/app/Dialog.java +1 −2 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ public class Dialog implements DialogInterface, Window.Callback, */ public boolean onTouchEvent(MotionEvent event) { if (mCancelable && mCanceledOnTouchOutside && event.getAction() == MotionEvent.ACTION_DOWN && isOutOfBounds(event)) { && isOutOfBounds(event) && mDecor != null && mShowing) { cancel(); return true; } Loading Loading @@ -998,7 +998,6 @@ public class Dialog implements DialogInterface, Window.Callback, */ public void cancel() { if (mCancelMessage != null) { // Obtain a new message so this dialog can be re-used Message.obtain(mCancelMessage).sendToTarget(); } Loading