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
This commit is contained in:
Hans-Christoph Steiner 2016-08-26 10:50:43 +02:00
parent 0577ecfc53
commit b45f7ba27c
2 changed files with 5 additions and 13 deletions

View File

@ -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);
}

View File

@ -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;
}