mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Prevent crash
This commit is contained in:
parent
4797737b79
commit
2a03d75639
2 changed files with 11 additions and 2 deletions
|
@ -12,6 +12,15 @@ import static android.app.Activity.RESULT_CANCELED;
|
||||||
public class DialogFragmentEx extends DialogFragment {
|
public class DialogFragmentEx extends DialogFragment {
|
||||||
private boolean once = false;
|
private boolean once = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
try {
|
||||||
|
super.onStart();
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
sendResult(RESULT_CANCELED);
|
sendResult(RESULT_CANCELED);
|
||||||
|
|
|
@ -280,10 +280,10 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||||
cal.set(Calendar.SECOND, 0);
|
cal.set(Calendar.SECOND, 0);
|
||||||
cal.set(Calendar.MILLISECOND, 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.HOUR_OF_DAY),
|
||||||
cal.get(Calendar.MINUTE),
|
cal.get(Calendar.MINUTE),
|
||||||
DateFormat.is24HourFormat(getActivity()));
|
DateFormat.is24HourFormat(getContext()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTimeSet(TimePicker view, int hour, int minute) {
|
public void onTimeSet(TimePicker view, int hour, int minute) {
|
||||||
|
|
Loading…
Reference in a new issue