This commit is contained in:
imkiva
2018-03-25 00:39:46 +08:00
parent 4b5a0a6372
commit 3341084f1c

View File

@ -65,15 +65,12 @@ final class SetupThread extends Thread {
final int totalReadBytesFinal = totalReadBytes; final int totalReadBytesFinal = totalReadBytes;
final int totalBytesFinal = totalBytes; final int totalBytesFinal = totalBytes;
activity.runOnUiThread(new Runnable() { activity.runOnUiThread(() -> {
@Override try {
public void run() { double progressFloat = ((double) totalReadBytesFinal) / ((double) totalBytesFinal) * 100.0;
try { progressDialog.setProgress((int) progressFloat);
double progressFloat = ((double) totalReadBytesFinal) / ((double) totalBytesFinal) * 100.0; } catch (RuntimeException ignore) {
progressDialog.setProgress((int) progressFloat); // activity dismissed
} catch (RuntimeException ignore) {
// activity dismissed
}
} }
}); });