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 44bf207b3b6d7f2de6523420c20ebb2ef1b67fa4..f2c91e6a9c6304bb69b330bd9fd41e68a16ef879 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 |
@@ -16,6 +16,7 @@ import android.widget.DatePicker; |
import android.widget.ListView; |
import android.widget.TimePicker; |
+import org.chromium.base.ApiCompatibilityUtils; |
import org.chromium.content.R; |
import org.chromium.content.browser.input.DateTimePickerDialog.OnDateTimeSetListener; |
import org.chromium.content.browser.input.MultiFieldTimePickerDialog.OnMultiFieldTimeSetListener; |
@@ -246,10 +247,11 @@ public class InputDialogContainer { |
mDialog = new WeekPickerDialog(mContext, new MonthOrWeekListener(dialogType), |
year, week, min, max); |
} |
- |
- mDialog.setButton(DialogInterface.BUTTON_POSITIVE, |
- mContext.getText(R.string.date_picker_dialog_set), |
- (DialogInterface.OnClickListener) mDialog); |
+ if (ApiCompatibilityUtils.datePickerRequiresAccept()) { |
+ mDialog.setButton(DialogInterface.BUTTON_POSITIVE, |
+ mContext.getText(R.string.date_picker_dialog_set), |
+ (DialogInterface.OnClickListener) mDialog); |
+ } |
mDialog.setButton(DialogInterface.BUTTON_NEGATIVE, |
mContext.getText(android.R.string.cancel), |