only set installer to privext on versions where its required

To limit the possible oddness of having the installer package being
something different than F-Droid, only set it to priv ext on android-24
and newer, since its required there.
This commit is contained in:
Hans-Christoph Steiner 2017-03-31 20:07:38 +02:00
parent a9a37747cb
commit 21fd522e95

View File

@ -23,7 +23,7 @@ public class PackageManagerCompat {
* That enforces the uninstaller being the same as the installer,
* so set the package name to that.
*/
if (PrivilegedInstaller.isDefault(context)) {
if (Build.VERSION.SDK_INT >= 24 && PrivilegedInstaller.isDefault(context)) {
mPm.setInstallerPackageName(packageName, "org.fdroid.fdroid.privileged");
} else {
mPm.setInstallerPackageName(packageName, "org.fdroid.fdroid");