267cb2b284
Prior to this fix if the screen was off and a call was received, the onScreenTurnedOn() callback would bring up the FaceLock service, which would cover the phone interface. It now requires the call state to be CALL_STATE_IDLE to start FaceLock. When the phone interface closes, the user is left at the backup lock screen. Bringing FaceLock up after a call ends does not seem like the correct thing to do. While working near the FaceLock callback code, the sleepDevice() callback was removed because it is no longer used (Fix 5327896). Some cleanup was also done with regards to KeyguardViewManager. FaceLock calls were being made from the KeyguardViewManager in onScreenTurnedOn() and onScreenTurnedOff() via an interface to LockPatternKeyguardView. This level of indirection was removed because it can just be handled inside of the corresponding calls in LockPatternKeyguardView. Likewise the FaceLock functionality inside of hide() in KeyguardViewManager is now in onDetachedFromWindow() in LockPatternKeyguardView. Overall this is much cleaner, especially considering interfacing through KeyguardViewBase was a bit of a hack. Patch Set 2: - Now using KeyguardUpdateMonitor to get phone state - Removed unnecessary wrapper functions for hiding / viewing FaceLock area - These were really only there because at one point I was calling them from KeyguardViewManager and the naming was confusing - Removed if(DEBUG) from a couple of log messages that are actually warnings that shouldn't show up and I want to know if they happen even if I don't have DEBUG set to true Change-Id: Id7befc47dd421156ff6cdb3aaf62fc76fe9cfad2