summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-06-22 21:29:19 -0700
committerAdam Powell <adamp@google.com>2011-06-22 21:29:19 -0700
commitfbca76965b96b31a8974e461ee1929867ef3327b (patch)
treeafc92417de7ec5dd9d266d99402dee9bf26701db /core
parentd9b0ee029fa4d098c7597b4074b9c59e558e6c38 (diff)
downloadframeworks_base-fbca76965b96b31a8974e461ee1929867ef3327b.zip
frameworks_base-fbca76965b96b31a8974e461ee1929867ef3327b.tar.gz
frameworks_base-fbca76965b96b31a8974e461ee1929867ef3327b.tar.bz2
Fix bug 4887033 - android.app.cts.AlertDialog_BuilderTest#testDisableCancelable
Change-Id: I659201124c4c6730046be55a918c64ca57a9f4db
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/AlertDialog.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 7a465c1..491fcfe 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -890,7 +890,10 @@ public class AlertDialog extends Dialog implements DialogInterface {
public AlertDialog create() {
final AlertDialog dialog = new AlertDialog(P.mContext, mTheme, false);
P.apply(dialog.mAlert);
- dialog.setCanceledOnTouchOutside(P.mCancelable);
+ dialog.setCancelable(P.mCancelable);
+ if (P.mCancelable) {
+ dialog.setCanceledOnTouchOutside(true);
+ }
dialog.setOnCancelListener(P.mOnCancelListener);
if (P.mOnKeyListener != null) {
dialog.setOnKeyListener(P.mOnKeyListener);