From b45f7ba27cd046204e07c8b980c162ce22b3f04a Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 26 Aug 2016 10:50:43 +0200 Subject: [PATCH] remove confusing messages when Privileged Extension not installed This was saying that the Privileged Extension is enabled but not properly configured. This is because the preference logic changed to default to on unless the user explicitly disabled it. So using the Privileged Extension based on whether its installed and whether the user has disabled it. related to ea0700d406101b7ed6907b1dbd2918dbc214f435 --- .../fdroid/installer/InstallerFactory.java | 17 +++++------------ .../fdroid/installer/PrivilegedInstaller.java | 1 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/installer/InstallerFactory.java b/app/src/main/java/org/fdroid/fdroid/installer/InstallerFactory.java index b35686e4e..c2ff1f8a8 100644 --- a/app/src/main/java/org/fdroid/fdroid/installer/InstallerFactory.java +++ b/app/src/main/java/org/fdroid/fdroid/installer/InstallerFactory.java @@ -20,7 +20,6 @@ package org.fdroid.fdroid.installer; import android.content.Context; -import android.util.Log; import org.fdroid.fdroid.Preferences; import org.fdroid.fdroid.Utils; @@ -47,17 +46,11 @@ public class InstallerFactory { && apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) { // special case for "F-Droid Privileged Extension" installer = new ExtensionInstaller(context); - } else if (isPrivilegedInstallerEnabled()) { - if (PrivilegedInstaller.isExtensionInstalledCorrectly(context) - == PrivilegedInstaller.IS_EXTENSION_INSTALLED_YES) { - Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller"); - - installer = new PrivilegedInstaller(context); - } else { - Log.e(TAG, "PrivilegedInstaller is enabled in prefs, but not working correctly!"); - // fallback to default installer - installer = new DefaultInstaller(context); - } + } else if (isPrivilegedInstallerEnabled() + && PrivilegedInstaller.isExtensionInstalledCorrectly(context) + == PrivilegedInstaller.IS_EXTENSION_INSTALLED_YES) { + Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller"); + installer = new PrivilegedInstaller(context); } else { installer = new DefaultInstaller(context); } diff --git a/app/src/main/java/org/fdroid/fdroid/installer/PrivilegedInstaller.java b/app/src/main/java/org/fdroid/fdroid/installer/PrivilegedInstaller.java index ee409c1c9..f964bed03 100644 --- a/app/src/main/java/org/fdroid/fdroid/installer/PrivilegedInstaller.java +++ b/app/src/main/java/org/fdroid/fdroid/installer/PrivilegedInstaller.java @@ -271,7 +271,6 @@ public class PrivilegedInstaller extends Installer { public static int isExtensionInstalledCorrectly(Context context) { // check if installed if (!isExtensionInstalled(context)) { - Log.e(TAG, "IS_EXTENSION_INSTALLED_NO"); return IS_EXTENSION_INSTALLED_NO; }