mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-02-05 04:32:12 -05:00
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 ea0700d406
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user