I need to check if this app has security (screenlocks), enabled. I have found out how to check for pattern_locks like this
boolean b = android.provider.Settings.Secure.getInt(
getContentResolver(),Settings.Secure.LOCK_PATTERN_ENABLED, 0)==1;
But the other two evades me. I have found a bit about password using the DevicePolicyManager which requires a broadcast receiver and enormous amount of permissions/policies…
Is this really the only way?
After intensive research, I have found that there are no method besides the DevicePolicyManager.
Also I have heard that this Pattern check, might be removed soon, so be warned.