updated display for setting data transfer UI
This commit is contained in:
parent
a593423e3a
commit
db128fbc2a
|
@ -824,27 +824,29 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
|
||||||
String TotalUpload = "";
|
String TotalUpload = "";
|
||||||
String TotalDownload = "";
|
String TotalDownload = "";
|
||||||
|
|
||||||
try {
|
if (mService != null)
|
||||||
TotalUpload = mService.getInfo("traffic/written");
|
|
||||||
TotalDownload = mService.getInfo("traffic/read");
|
|
||||||
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.d(TAG,"Total bandwidth error"+e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
downloadText.setText(formatCount(datacount.Download) + " / " + formatTotal(Long.parseLong(TotalDownload)));
|
try {
|
||||||
uploadText.setText(formatCount(datacount.Upload) + " / " + formatTotal(Long.parseLong(TotalUpload)));
|
TotalUpload = mService.getInfo("traffic/written");
|
||||||
|
TotalDownload = mService.getInfo("traffic/read");
|
||||||
|
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.d(TAG,"Total bandwidth error"+e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
downloadText.invalidate();
|
try
|
||||||
uploadText.invalidate();
|
{
|
||||||
|
downloadText.setText(formatCount(datacount.Download) + " / " + formatTotal(Long.parseLong(TotalDownload)));
|
||||||
|
uploadText.setText(formatCount(datacount.Upload) + " / " + formatTotal(Long.parseLong(TotalUpload)));
|
||||||
|
|
||||||
|
downloadText.invalidate();
|
||||||
|
uploadText.invalidate();
|
||||||
|
}
|
||||||
|
catch (NumberFormatException nfe)
|
||||||
|
{
|
||||||
|
//just ignore/swallow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (NumberFormatException nfe)
|
|
||||||
{
|
|
||||||
//just ignore/swallow
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue