Skip to content

Commit

Permalink
Merge pull request #6838 from robolectric/piper_408776653
Browse files Browse the repository at this point in the history
Remove unnecessary TimePickerDialog constructor shadow
  • Loading branch information
hoisie committed Nov 17, 2021
2 parents a551ba1 + 5e17a9a commit a251f16
Showing 1 changed file with 0 additions and 22 deletions.
Expand Up @@ -3,13 +3,9 @@
import static org.robolectric.util.reflector.Reflector.reflector;

import android.app.TimePickerDialog;
import android.content.Context;
import android.widget.TimePicker;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.util.ReflectionHelpers.ClassParameter;
import org.robolectric.util.reflector.Accessor;
import org.robolectric.util.reflector.ForType;

Expand All @@ -18,24 +14,6 @@ public class ShadowTimePickerDialog extends ShadowAlertDialog {
@RealObject
protected TimePickerDialog realTimePickerDialog;

@Implementation
protected void __constructor__(
Context context,
int theme,
TimePickerDialog.OnTimeSetListener callBack,
int hourOfDay,
int minute,
boolean is24HourView) {

Shadow.invokeConstructor(TimePickerDialog.class, realTimePickerDialog,
ClassParameter.from(Context.class, context),
ClassParameter.from(int.class, theme),
ClassParameter.from(TimePickerDialog.OnTimeSetListener.class, callBack),
ClassParameter.from(int.class, hourOfDay),
ClassParameter.from(int.class, minute),
ClassParameter.from(boolean.class, is24HourView));
}

public int getHourOfDay() {
return reflector(TimePickerDialogProvider.class, realTimePickerDialog)
.getTimePicker()
Expand Down

0 comments on commit a251f16

Please sign in to comment.