I am able to unlock the screen when there is an incoming call and after that lock the screen again. After a restart of the device if I get first incoming call this logic is not working. On subsequent incoming calls the logic works.
Any help??
My code is:
String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
if (state.contentEquals("RINGING")) {
lock.disableKeyguard();
}
lock.reenableKeyguard();