Fixes the behaviour of cancel button

This commit is contained in:
Shobhit Agarwal 2018-01-24 00:09:35 +05:30
parent dd0f791e3f
commit 88e567354e
3 changed files with 3 additions and 3 deletions

View File

@ -713,7 +713,6 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
public void installCancel() {
if (isAppDownloading()) {
InstallManagerService.cancel(this, currentStatus.getUniqueKey());
adapter.clearProgress();
}
}

View File

@ -379,7 +379,6 @@ public final class AppUpdateStatusManager {
AppUpdateStatus entry = appMapping.get(key);
if (entry != null) {
Utils.debugLog(LOGTAG, "Remove APK " + entry.apk.apkName);
appMapping.remove(entry.apk.getUrl());
notifyRemove(entry);
}
}

View File

@ -246,7 +246,9 @@ public class DownloaderService extends Service {
private void sendBroadcast(Uri uri, String action, File file, String errorMessage, long repoId,
String originalUrlString) {
Intent intent = new Intent(action);
intent.setData(Uri.parse(originalUrlString));
if (originalUrlString != null) {
intent.setData(Uri.parse(originalUrlString));
}
if (file != null) {
intent.putExtra(Downloader.EXTRA_DOWNLOAD_PATH, file.getAbsolutePath());
}