public void update() { try { if (download.getFd() == null) { if (download.getNConnections() == 0) { name = download.getAuxInfoFilename(); } else { name = download.getAuxInfoFilename() + " - starting..."; } size = "?"; } else { name = download.getFd().getSubpath(); size = TextUtils.formatByteSize(download.getFd().getSize()); } percentComplete = download.getPercentComplete(); numberOfConnections = download.getNConnections(); speed = download.getBandwidth().getCPSHumanReadable(); complete = download.isComplete(); state = download.getState(); if (download.getBandwidth().hasGoodAverage()) { eta = formatETA(download.getETAInMinutes()); } else { eta = "?"; } } catch (IOException e) { if (T.t) { T.error("Exception while updating downloadwrapper: " + e); } } }