Fix crash when using the device owner permission at Android < 7

This commit is contained in:
Jonas Lochmann 2019-09-23 00:00:00 +00:00
parent d36e2ad9ca
commit 2ea9893a11
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -356,7 +356,7 @@ class AndroidIntegration(context: Context): PlatformIntegration(maximumProtectio
if ( if (
(getCurrentProtectionLevel() == ProtectionLevel.DeviceOwner) && (getCurrentProtectionLevel() == ProtectionLevel.DeviceOwner) &&
(!BuildConfig.storeCompilant) && (!BuildConfig.storeCompilant) &&
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
) { ) {
val failedApps = policyManager.setPackagesSuspended( val failedApps = policyManager.setPackagesSuspended(
deviceAdmin, deviceAdmin,