Commit 70ec8c25 authored by miguelg's avatar miguelg Committed by Commit bot

Do not special case the accept button of the time picker.

BUG=412458

Review URL: https://codereview.chromium.org/587613002

Cr-Commit-Position: refs/heads/master@{#295731}
parent a31e5b91
......@@ -327,10 +327,4 @@ public class ApiCompatibilityUtils {
return intent.getTargetPackage();
}
}
public static boolean datePickerRequiresAccept() {
// TODO(miguelg) use the final code for the L
// https://crbug.com/399198
return Build.VERSION.SDK_INT < 20; /* CUR_DEVELOPMENT */
}
}
......@@ -16,7 +16,6 @@ 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;
......@@ -247,11 +246,11 @@ public class InputDialogContainer {
mDialog = new WeekPickerDialog(mContext, new MonthOrWeekListener(dialogType),
year, week, min, max);
}
if (ApiCompatibilityUtils.datePickerRequiresAccept()) {
mDialog.setButton(DialogInterface.BUTTON_POSITIVE,
mContext.getText(R.string.date_picker_dialog_set),
(DialogInterface.OnClickListener) mDialog);
}
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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment