From 8a6a62833b2491e854193ddc1a8915da1711da72 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Tue, 17 Nov 2015 18:54:26 +1100 Subject: [PATCH] Alert update notification when saving details to DB. --- F-Droid/src/org/fdroid/fdroid/RepoUpdater.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java index 2658b4514..f4919884d 100644 --- a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java +++ b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java @@ -196,10 +196,7 @@ public class RepoUpdater { // JarEntry can only read certificates after the file represented by that JarEntry // has been read completely, so verification cannot run until now... assertSigningCertFromXmlCorrect(); - - Log.i(TAG, "Repo signature verified, saving app metadata to database."); - persister.commit(repoDetailsToSave); - + commitToDb(); } catch (SAXException | ParserConfigurationException | IOException e) { throw new UpdateException(repo, "Error parsing index", e); } finally { @@ -213,6 +210,14 @@ public class RepoUpdater { } } + private void commitToDb() throws UpdateException { + Log.i(TAG, "Repo signature verified, saving app metadata to database."); + if (progressListener != null) { + progressListener.onProgress(new ProgressListener.Event(PROGRESS_COMMITTING)); + } + persister.commit(repoDetailsToSave); + } + private void assertSigningCertFromXmlCorrect() throws SigningException { // no signing cert read from database, this is the first use