Code example for KeyguardManager.KeyguardLock

Methods: disableKeyguard

0
		KeyguardManager keyguardManager = (KeyguardManager) super.context
				.getActivity().getSystemService(Activity.KEYGUARD_SERVICE);
		KeyguardLock lock = keyguardManager
				.newKeyguardLock(Activity.KEYGUARD_SERVICE);
		if (lock != null) {
			lock.disableKeyguard();
		} 
	} 
 
	@Kroll.method 
	public void enable() { 
		KeyguardManager keyguardManager = (KeyguardManager) super.context
				.getActivity().getSystemService(Activity.KEYGUARD_SERVICE);
		KeyguardLock lock = keyguardManager
				.newKeyguardLock(Activity.KEYGUARD_SERVICE);
		if (lock != null) {
			lock.reenableKeyguard();
		} 
	} 
 
Connect your IDE to all the code out there  Get Codota for Java