Skip to content

Commit

Permalink
Remove unnecessary TimePickerDialog constructor shadow
Browse files Browse the repository at this point in the history
The constructor shadow just calls the original constructor, so it's
redundant and can be removed.

PiperOrigin-RevId: 408776653
  • Loading branch information
hoisie committed Nov 17, 2021
1 parent d0d1696 commit 5e17a9a
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 5e17a9a

Please sign in to comment.