use of com.waz.api.Location in project wire-android by wireapp.
the class DevicesPreferencesUtil method getActivationSummary.
private static String getActivationSummary(Context context, OtrClient otrClient) {
LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault());
String time = ZTimeFormatter.getSeparatorTime(context, now, LocalDateTime.ofInstant(otrClient.getRegTime(), ZoneId.systemDefault()), DateFormat.is24HourFormat(context), ZoneId.systemDefault(), false);
Location location = otrClient.getRegLocation();
String regLocation = location == null ? "" : location.getDisplayName();
return context.getString(R.string.pref_devices_device_activation_summary, time, StringUtils.isBlank(regLocation) ? UNKNOWN_LOCATION : regLocation);
}
Aggregations