change progress default return value

This commit is contained in:
Chumva 2018-07-18 13:00:34 +03:00
parent b2fb723768
commit cc7c4e3678

View file

@ -111,16 +111,16 @@ public abstract class BasicProgressAsyncTask<Tag, Params, Progress, Result> exte
public int getProgressPercentage() {
if (work > 0) {
int progressPercentage = (progress * 100) / work;
if (progressPercentage <= 100 && progressPercentage >= 0) {
if (progressPercentage <= 100) {
return progressPercentage;
} else {
return 0;
return 99;
}
}
if (progress <= 100 && progress >= 0) {
if (progress <= 100) {
return progress;
} else {
return 0;
return 99;
}
}