Check for phone screenlocks, specifically passwords/pincode
<p>I need to check if this app has security (screenlocks), enabled. I have found out how to check for pattern_locks like this  </p>

<pre><code>boolean b = android.provider.Settings.Secure.getInt(
                getContentResolver(),Settings.Secure.LOCK_PATTERN_ENABLED, 0)==1;
</code></pre>

<p>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...<br>
Is this really the only way?</p>
