Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Commit

Permalink
Deprecate opt/datetimepicker
Browse files Browse the repository at this point in the history
Internal classes moved to package-private. Views loaded from XML and
public API classes marked deprecated.

Change-Id: I68ba08b68f4e7f3800a02ce34f91178deaa133e1
Fixes: 69630074
Test: make
  • Loading branch information
alanv committed Nov 27, 2017
1 parent 14f482d commit a5c1a0a
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 13 deletions.
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/AccessibleLinearLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

/**
* Fake Button class, used so TextViews can announce themselves as Buttons, for accessibility.
*
* @deprecated This module is deprecated. Do not use this class.
*/
@Deprecated
public class AccessibleLinearLayout extends LinearLayout {

public AccessibleLinearLayout(Context context, AttributeSet attrs) {
Expand Down
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/AccessibleTextView.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

/**
* Fake Button class, used so TextViews can announce themselves as Buttons, for accessibility.
*
* @deprecated This module is deprecated. Do not use this class.
*/
@Deprecated
public class AccessibleTextView extends TextView {

public AccessibleTextView(Context context, AttributeSet attrs) {
Expand Down
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/HapticFeedbackController.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

/**
* A simple utility class to handle haptic feedback.
*
* @deprecated This module is deprecated. Do not use this class.
*/
@Deprecated
public class HapticFeedbackController {
private static final int VIBRATE_DELAY_MS = 125;
private static final int VIBRATE_LENGTH_MS = 5;
Expand Down
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

/**
* Utility helper functions for time and date pickers.
*
* @deprecated This module is deprecated. Do not use this class.
*/
@Deprecated
public class Utils {

public static final int MONDAY_BEFORE_JULIAN_EPOCH = Time.EPOCH_JULIAN_DAY - 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import android.view.accessibility.AccessibilityEvent;
import android.widget.ViewAnimator;

public class AccessibleDateAnimator extends ViewAnimator {
class AccessibleDateAnimator extends ViewAnimator {
private long mDateMillis;

public AccessibleDateAnimator(Context context, AttributeSet attrs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Controller class to communicate among the various components of the date picker dialog.
*/
public interface DatePickerController {
interface DatePickerController {

void onYearSelected(int year);

Expand Down
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/date/DatePickerDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@

/**
* Dialog allowing users to select a date.
*
* @deprecated Use {@link android.app.DatePickerDialog}.
*/
@Deprecated
public class DatePickerDialog extends DialogFragment implements
OnClickListener, DatePickerController {

Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/date/DayPickerView.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/**
* This displays a list of months in a calendar format with selectable days.
*/
public abstract class DayPickerView extends ListView implements OnScrollListener,
abstract class DayPickerView extends ListView implements OnScrollListener,
OnDateChangedListener {

private static final String TAG = "MonthFragment";
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/date/MonthAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* An adapter for a list of {@link MonthView} items.
*/
public abstract class MonthAdapter extends BaseAdapter implements OnDayClickListener {
abstract class MonthAdapter extends BaseAdapter implements OnDayClickListener {

private static final String TAG = "SimpleMonthAdapter";

Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/date/MonthView.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* A calendar-like view displaying a specified month and the appropriate selectable day numbers
* within the specified month.
*/
public abstract class MonthView extends View {
abstract class MonthView extends View {
private static final String TAG = "MonthView";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* A DayPickerView customized for {@link SimpleMonthAdapter}
*/
public class SimpleDayPickerView extends DayPickerView {
class SimpleDayPickerView extends DayPickerView {

public SimpleDayPickerView(Context context, AttributeSet attrs) {
super(context, attrs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* An adapter for a list of {@link SimpleMonthView} items.
*/
public class SimpleMonthAdapter extends MonthAdapter {
class SimpleMonthAdapter extends MonthAdapter {

public SimpleMonthAdapter(Context context, DatePickerController controller) {
super(context, controller);
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/date/SimpleMonthView.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import java.util.Calendar;

public class SimpleMonthView extends MonthView {
class SimpleMonthView extends MonthView {

public SimpleMonthView(Context context) {
super(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@

/**
* A text view which, when pressed or activated, displays a blue circle around the text.
*
* @deprecated This module is deprecated. Do not use this class.
*/
@Deprecated
public class TextViewWithCircularIndicator extends TextView {

private static final int SELECTED_CIRCLE_ALPHA = 60;
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/date/YearPickerView.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* Displays a selectable list of years.
*/
public class YearPickerView extends ListView implements OnItemClickListener, OnDateChangedListener {
class YearPickerView extends ListView implements OnItemClickListener, OnDateChangedListener {
private static final String TAG = "YearPickerView";

private final DatePickerController mController;
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/time/AmPmCirclesView.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* Draw the two smaller AM and PM circles next to where the larger circle will be.
*/
public class AmPmCirclesView extends View {
class AmPmCirclesView extends View {
private static final String TAG = "AmPmCirclesView";

// Alpha level for selected circle.
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/time/CircleView.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Draws a simple white circle on which the numbers will be drawn.
*/
public class CircleView extends View {
class CircleView extends View {
private static final String TAG = "CircleView";

private final Paint mPaint = new Paint();
Expand Down
2 changes: 2 additions & 0 deletions src/com/android/datetimepicker/time/RadialPickerLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
* The primary layout to hold the circular picker, and the am/pm buttons. This view well measure
* itself to end up as a square. It also handles touches to be passed in to views that need to know
* when they'd been touched.
*
* @deprecated This module is deprecated. Do not use this class.
*/
public class RadialPickerLayout extends FrameLayout implements OnTouchListener {
private static final String TAG = "RadialPickerLayout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* View to show what number is selected. This will draw a blue circle over the number, with a blue
* line coming from the center of the main circle to the edge of the blue selection.
*/
public class RadialSelectorView extends View {
class RadialSelectorView extends View {
private static final String TAG = "RadialSelectorView";

// Alpha level for selected circle.
Expand Down
2 changes: 1 addition & 1 deletion src/com/android/datetimepicker/time/RadialTextsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* A view to show a series of numbers in a circular pattern.
*/
public class RadialTextsView extends View {
class RadialTextsView extends View {
private final static String TAG = "RadialTextsView";

private final Paint mPaint = new Paint();
Expand Down
3 changes: 3 additions & 0 deletions src/com/android/datetimepicker/time/TimePickerDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@

/**
* Dialog to set a time.
*
* @deprecated Use {@link android.app.TimePickerDialog}.
*/
@Deprecated
public class TimePickerDialog extends DialogFragment implements OnValueSelectedListener{
private static final String TAG = "TimePickerDialog";

Expand Down

0 comments on commit a5c1a0a

Please sign in to comment.