Regarding screen lock and unlock
<p>I am doing one application to lock and unlock a screen. I am using disableKeygaurd and reeanbleKeygaurd to lock and unlock. the below code i used to unlock:</p>

<pre><code>if(mKeyguardLock ==  null){
  mKeyGuardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
  mKeyguardLock = mKeyGuardManager.newKeyguardLock("****");
  mKeyguardLock.disableKeyguard();  
}
</code></pre>

<p>and for lock:</p>

<pre><code>if(mKeyguardLock != null){
 mKeyguardLock.reenableKeyguard();
 mKeyguardLock = null;
}
</code></pre>

<p>It is working fine. but problem is when user unexpectedly unlock a screen by dragging keygaurd(without using my app) then my app will not lock the screen for next time.. I want to work my application when user used unlock by dragging keygaurd also. what should I have to do this? 
Thanks in advance</p>
