Android - How to determine the current lock state of a managed profile

289 Views Asked by At

Since of Android N / API24 it is now possible to lock a managed profile independent of the device lock. A user can split the locking behaviour by disabling the 'use one lock' security setting.

Does anyone know of a way to query the managed profile lock state when your app is running under the primary user?

There are events that are broadcast when the state of that lock changes but I need to be able to query the current lock state for a managed profile at run time or app start.

The events fired on state changes are: https://developer.android.com/reference/android/content/Intent.html#ACTION_MANAGED_PROFILE_UNLOCKED https://developer.android.com/reference/android/content/Intent.html#ACTION_MANAGED_PROFILE_UNAVAILABLE

0

There are 0 best solutions below