Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java

Issue 23533041: Properly dismiss the InputDialogs in all cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java b/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java
index fffe130ff1e613b68b6bf17a4452b5cedbe1d800..bca0f01b39ea86a09228f2609fa261fbfba54414 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java
@@ -168,13 +168,7 @@ public class InputDialogContainer {
mDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
mContext.getText(android.R.string.cancel),
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- mDialogAlreadyDismissed = true;
- mInputActionDelegate.cancelDateTimeDialog();
- }
- });
+ (DialogInterface.OnClickListener) null);
mDialog.setButton(DialogInterface.BUTTON_NEUTRAL,
mContext.getText(R.string.date_picker_dialog_clear),
@@ -186,6 +180,16 @@ public class InputDialogContainer {
}
});
+ mDialog.setOnDismissListener(
+ new OnDismissListener() {
+ public void onDismiss(final DialogInterface dialog) {
+ if (!mDialogAlreadyDismissed) {
+ mDialogAlreadyDismissed = true;
+ mInputActionDelegate.cancelDateTimeDialog();
+ }
+ }
+ });
+
mDialogAlreadyDismissed = false;
mDialog.show();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698