Possible Duplicate:
Lock the Android device programmatically
Does the application have the ability to lock the screen? I have tried the following code, but nothing happens.
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.reenableKeyguard();