mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-11 11:35:07 -05:00
fix a crash
This commit is contained in:
parent
899fadb916
commit
8d1047d05c
@ -88,11 +88,15 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
|||||||
if (mDatePickerResultCount++ == 0) {
|
if (mDatePickerResultCount++ == 0) {
|
||||||
GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
|
GregorianCalendar date = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
|
||||||
date.set(year, monthOfYear, dayOfMonth);
|
date.set(year, monthOfYear, dayOfMonth);
|
||||||
long numDays = (date.getTimeInMillis() / 86400000) - (mOriginalExpiryDate.getTimeInMillis() / 86400000);
|
if (mOriginalExpiryDate != null) {
|
||||||
if (numDays == 0)
|
long numDays = (date.getTimeInMillis() / 86400000) - (mOriginalExpiryDate.getTimeInMillis() / 86400000);
|
||||||
setExpiryDate(mOriginalExpiryDate);
|
if (numDays == 0)
|
||||||
else
|
setExpiryDate(mOriginalExpiryDate);
|
||||||
|
else
|
||||||
|
setExpiryDate(date);
|
||||||
|
} else {
|
||||||
setExpiryDate(date);
|
setExpiryDate(date);
|
||||||
|
}
|
||||||
if (mEditorListener != null) {
|
if (mEditorListener != null) {
|
||||||
mEditorListener.onEdited();
|
mEditorListener.onEdited();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user