Extract isDownloading check into method of status class.
This is also going to be used elsewhere.
This commit is contained in:
parent
8e2a099e51
commit
7d1fac2729
@ -691,8 +691,7 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAppDownloading() {
|
public boolean isAppDownloading() {
|
||||||
return currentStatus != null &&
|
return currentStatus != null && currentStatus.isDownloading();
|
||||||
(currentStatus.status == AppUpdateStatusManager.Status.PendingDownload || currentStatus.status == AppUpdateStatusManager.Status.Downloading);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -184,6 +184,10 @@ public final class AppUpdateStatusManager {
|
|||||||
copy.progressMax = progressMax;
|
copy.progressMax = progressMax;
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDownloading() {
|
||||||
|
return status == Status.Downloading || status == Status.PendingDownload;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user