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

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

Issue 15965004: [Android] Simplify the month and time picker removing unused functionality (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 | content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java » ('j') | 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/DateTimePickerDialog.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java b/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java
index 29bca66d02d861fe0ebc9b5ea477d0296938650d..f8383199096e968f5fbfc7b8c76f98cc494501dd 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java
@@ -9,12 +9,11 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Build;
-import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.DatePicker;
-import android.widget.TimePicker;
import android.widget.DatePicker.OnDateChangedListener;
+import android.widget.TimePicker;
import android.widget.TimePicker.OnTimeChangedListener;
import org.chromium.content.R;
@@ -65,26 +64,7 @@ class DateTimePickerDialog extends AlertDialog implements OnClickListener,
int monthOfYear,
int dayOfMonth,
int hourOfDay, int minute, boolean is24HourView) {
- this(context, 0, callBack, year, monthOfYear, dayOfMonth,
- hourOfDay, minute, is24HourView);
- }
-
- /**
- * @param context The context the dialog is to run in.
- * @param theme the theme to apply to this dialog
- * @param callBack How the parent is notified that the date is set.
- * @param year The initial year of the dialog.
- * @param monthOfYear The initial month of the dialog.
- * @param dayOfMonth The initial day of the dialog.
- */
- public DateTimePickerDialog(Context context,
- int theme,
- OnDateTimeSetListener callBack,
- int year,
- int monthOfYear,
- int dayOfMonth,
- int hourOfDay, int minute, boolean is24HourView) {
- super(context, theme);
+ super(context, 0);
mCallBack = callBack;
@@ -177,30 +157,4 @@ class DateTimePickerDialog extends AlertDialog implements OnClickListener,
mTimePicker.setCurrentHour(hourOfDay);
mTimePicker.setCurrentMinute(minutOfHour);
}
-
- @Override
- public Bundle onSaveInstanceState() {
- Bundle state = super.onSaveInstanceState();
- state.putInt(YEAR, mDatePicker.getYear());
- state.putInt(MONTH, mDatePicker.getMonth());
- state.putInt(DAY, mDatePicker.getDayOfMonth());
- state.putInt(HOUR, mTimePicker.getCurrentHour());
- state.putInt(MINUTE, mTimePicker.getCurrentMinute());
- state.putBoolean(IS_24_HOUR, mTimePicker.is24HourView());
- return state;
- }
-
- @Override
- public void onRestoreInstanceState(Bundle savedInstanceState) {
- super.onRestoreInstanceState(savedInstanceState);
- int year = savedInstanceState.getInt(YEAR);
- int month = savedInstanceState.getInt(MONTH);
- int day = savedInstanceState.getInt(DAY);
- mDatePicker.init(year, month, day, this);
- int hour = savedInstanceState.getInt(HOUR);
- int minute = savedInstanceState.getInt(MINUTE);
- mTimePicker.setIs24HourView(savedInstanceState.getBoolean(IS_24_HOUR));
- mTimePicker.setCurrentHour(hour);
- mTimePicker.setCurrentMinute(minute);
- }
}
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698