fixed download manager cancel
This commit is contained in:
parent
b8bb99173f
commit
20212963ba
1 changed files with 3 additions and 9 deletions
|
@ -57,7 +57,7 @@ public class BInstallerView extends View
|
||||||
private String baseDir;
|
private String baseDir;
|
||||||
|
|
||||||
private boolean isDownloading = false;
|
private boolean isDownloading = false;
|
||||||
private transient boolean downloadCanceled = false;
|
private volatile boolean downloadCanceled = false;
|
||||||
|
|
||||||
private long currentDownloadSize;
|
private long currentDownloadSize;
|
||||||
private String currentDownloadFile = "";
|
private String currentDownloadFile = "";
|
||||||
|
@ -133,7 +133,7 @@ public class BInstallerView extends View
|
||||||
}
|
}
|
||||||
if ( tidx_min != -1 )
|
if ( tidx_min != -1 )
|
||||||
{
|
{
|
||||||
tileStatus[tidx_min] = 0;
|
tileStatus[tidx_min] ^= tileStatus[tidx_min] & MASK_SELECTED_RD5;
|
||||||
startDownload( tidx_min );
|
startDownload( tidx_min );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,12 +258,6 @@ public class BInstallerView extends View
|
||||||
tilesVisible = false;
|
tilesVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopInstaller() {
|
|
||||||
downloadCanceled = true;
|
|
||||||
bmp = null;
|
|
||||||
tileStatus = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BInstallerView(Context context) {
|
public BInstallerView(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
|
@ -514,7 +508,7 @@ float tx, ty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// download button?
|
// download button?
|
||||||
if ( rd5Tiles > 0 && event.getX() > imgwOrig - btnw*scaleOrig && event.getY() > imghOrig-btnh*scaleOrig )
|
if ( ( rd5Tiles > 0 || isDownloading ) && event.getX() > imgwOrig - btnw*scaleOrig && event.getY() > imghOrig-btnh*scaleOrig )
|
||||||
{
|
{
|
||||||
toggleDownload();
|
toggleDownload();
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
Loading…
Reference in a new issue