parent
a38d5615cc
commit
6065a6e984
|
@ -483,6 +483,7 @@ public class UpdateService extends Service implements OnNetworkStateListener,
|
|||
if (latestBuild != null) {
|
||||
File found = null;
|
||||
File[] files = new File(mConfig.getPathBase()).listFiles();
|
||||
if (files != null && files.length > 0) {
|
||||
for (File file : files) {
|
||||
String currName = file.getName();
|
||||
if (file.isFile() && currName.endsWith(".part")) {
|
||||
|
@ -492,6 +493,7 @@ public class UpdateService extends Service implements OnNetworkStateListener,
|
|||
file.delete(); // remove old .part files
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found != null) {
|
||||
long total = mPrefs.getLong(PREF_DOWNLOAD_SIZE, 1500000000L /* 1.5 GB */);
|
||||
final long current = found.length();
|
||||
|
|
Loading…
Reference in New Issue