In Android Q / Android 10
using USES_POLICY_DISABLE_KEYGUARD_FEATURES
of the keyguard_features
causes a security exception.
devicePolicyManager.setKeyguardDisabledFeatures(componentName, DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_NONE);
java.lang.SecurityException: Admin ComponentInfo{ ... } is not a device owner or profile owner, so may not use policy: disable-keyguard-features
Upon further inspection, I found that android pie has marked KEYGUARD_FEATURES
deprecated and removed it in android-q / Android 10
. Is there any other alternative to disable keyguard_features
Generally starting from Android P google started to deprecate Device Admin API completely - further there will be even more deprecations and SecurityExceptions. More info here
There are new ways to handle several deprecated Device Admin API usecases in terms of keyguard usage, though. From your question it is unclear for what do you need to use Device Admin API but here is the description of what has left from vast Device Admin API capabilities in context of keyguard and how to use it.
There are no ways to use this features starting from API 29. There are no workarounds available yet.
Here is described what can you do as IT admin for your company.
Generally - use custom devices with custom AOSP, root and patch, don't bother.
Sorry for the absence of a valid answer but currently there are no such.
Hope it will help you somehow either way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With