Merge branch 'privext-updates' into 'master'

InstallerFactory: Check for privext before checking if apk to be installed is privext

Closes #911

See merge request !459
This commit is contained in:
Hans-Christoph Steiner 2017-03-31 17:45:11 +00:00
commit e2ab447315

View File

@ -45,12 +45,12 @@ public class InstallerFactory {
}
Installer installer;
if (apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
// special case for installing "Privileged Extension" with root
installer = new ExtensionInstaller(context, apk);
} else if (PrivilegedInstaller.isDefault(context)) {
if (PrivilegedInstaller.isDefault(context)) {
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
installer = new PrivilegedInstaller(context, apk);
} else if (apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
// special case for installing "Privileged Extension" with root
installer = new ExtensionInstaller(context, apk);
} else {
installer = new DefaultInstaller(context, apk);
}