title: check whether lock was enabled or not
body: <p>I have to check whether system lock was enabled or not in settings.</p>
  
  <p>I used below line code</p>
  
  <pre><code>boolean b = android.provider.Settings.System.getInt(
                          getContentResolver(),Settings.System.LOCK_PATTERN_ENABLED, 0)==1;
  </code></pre>
  
  <p>It returns true if i set <code>pattern</code> lock and it false for if i set <code>pin/password</code> password.</p>
  
  <p>I need to check whether lock was enabled or not either it is <code>pattern/pin/password</code> lock in settings.</p>
  
  <p>My code is only works to <code>pattern</code> lock not to <code>pin/password</code> lock.</p>
  
  <p>So please tell me how to check for all type of locks.</p>