Merge branch 'issue-1295' into 'master'

Fixes the behaviour of cancel button

Closes #1295

See merge request fdroid/fdroidclient!628
This commit is contained in:
Hans-Christoph Steiner 2018-01-26 12:39:08 +00:00
commit 1959657092
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());
}