1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Prevent crash

This commit is contained in:
M66B 2019-07-05 20:54:07 +02:00
parent 4797737b79
commit 2a03d75639
2 changed files with 11 additions and 2 deletions

View file

@ -12,6 +12,15 @@ import static android.app.Activity.RESULT_CANCELED;
public class DialogFragmentEx extends DialogFragment {
private boolean once = false;
@Override
public void onStart() {
try {
super.onStart();
} catch (Throwable ex) {
Log.e(ex);
}
}
@Override
public void onDismiss(@NonNull DialogInterface dialog) {
sendResult(RESULT_CANCELED);

View file

@ -280,10 +280,10 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
return new TimePickerDialog(getActivity(), this,
return new TimePickerDialog(getContext(), this,
cal.get(Calendar.HOUR_OF_DAY),
cal.get(Calendar.MINUTE),
DateFormat.is24HourFormat(getActivity()));
DateFormat.is24HourFormat(getContext()));
}
public void onTimeSet(TimePicker view, int hour, int minute) {