Search in sources :

Example 1 with Location

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);
}
Also used : LocalDateTime(org.threeten.bp.LocalDateTime) Location(com.waz.api.Location)

Aggregations

Location (com.waz.api.Location)1 LocalDateTime (org.threeten.bp.LocalDateTime)1