From 90290f830a7fcbb2b4ef0e109937846fc43bac11 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Mon, 9 Nov 2015 23:01:36 +1100 Subject: [PATCH] Send "inserting" message to notifications while committing temp provider. Right now it says "50%" always, will need to think whether to ditch the percentage completely, or to have the temp app/apk providers emit progress events some how too. --- F-Droid/src/org/fdroid/fdroid/RepoUpdater.java | 1 + F-Droid/src/org/fdroid/fdroid/UpdateService.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java index 1d36baee5..2658b4514 100644 --- a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java +++ b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java @@ -53,6 +53,7 @@ public class RepoUpdater { private static final String TAG = "RepoUpdater"; public static final String PROGRESS_TYPE_PROCESS_XML = "processingXml"; + public static final String PROGRESS_COMMITTING = "committing"; public static final String PROGRESS_DATA_REPO_ADDRESS = "repoAddress"; @NonNull diff --git a/F-Droid/src/org/fdroid/fdroid/UpdateService.java b/F-Droid/src/org/fdroid/fdroid/UpdateService.java index b618a2455..11effd97a 100644 --- a/F-Droid/src/org/fdroid/fdroid/UpdateService.java +++ b/F-Droid/src/org/fdroid/fdroid/UpdateService.java @@ -505,8 +505,6 @@ public class UpdateService extends IntentService implements ProgressListener { @Override public void onProgress(ProgressListener.Event event) { String message = ""; - // TODO: Switch to passing through Bundles of data with the event, rather than a repo address. They are - // now much more general purpose then just repo downloading. String repoAddress = event.getData().getString(RepoUpdater.PROGRESS_DATA_REPO_ADDRESS); String downloadedSize = Utils.getFriendlySize(event.progress); String totalSize = Utils.getFriendlySize(event.total); @@ -515,6 +513,9 @@ public class UpdateService extends IntentService implements ProgressListener { case RepoUpdater.PROGRESS_TYPE_PROCESS_XML: message = getString(R.string.status_processing_xml_percent, repoAddress, downloadedSize, totalSize, percent); break; + case RepoUpdater.PROGRESS_COMMITTING: + message = getString(R.string.status_inserting, 50); + break; } sendStatus(this, STATUS_INFO, message, percent); }