Skip to content

Commit ade026f

Browse files
author
Amith Yamasani
committed
Avoid launching dialogs twice from double-clicking a preference.
Bug: 6500628 Only create the dialog if another one doesn't already exist. Change-Id: Ie9be06a58c369299bcb67526e668785e6735a307
1 parent a0e0d58 commit ade026f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/android/preference/DialogPreference.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
261261

262262
@Override
263263
protected void onClick() {
264+
if (mDialog != null && mDialog.isShowing()) return;
265+
264266
showDialog(null);
265267
}
266268

0 commit comments

Comments
 (0)