Better UX handling on identity key mismatches.

1) Migrate from GSON to Jackson everywhere.

2) Add support for storing identity key conflicts on message rows.

3) Add limited support for surfacing identity key conflicts in UI.
This commit is contained in:
Moxie Marlinspike
2015-01-15 13:35:35 -08:00
parent 4397b55ceb
commit 00d7b5c284
76 changed files with 2395 additions and 721 deletions

View File

@@ -17,6 +17,10 @@
package org.thoughtcrime.securesms.util;
import android.content.Context;
import android.text.format.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;
import org.thoughtcrime.securesms.R;
@@ -71,4 +75,17 @@ public class DateUtils extends android.text.format.DateUtils {
return DateUtils.formatDateTime(c, timestamp, formatFlags);
}
}
public static SimpleDateFormat getDetailedDateFormatter(Context context) {
String dateFormatPattern;
if (DateFormat.is24HourFormat(context)) {
dateFormatPattern = "MMM d, yyyy HH:mm:ss zzz";
} else {
dateFormatPattern = "MMM d, yyyy hh:mm:ssa zzz";
}
return new SimpleDateFormat(dateFormatPattern, Locale.getDefault());
}
}