PhoneWindowPolicy: Fix NPE race condition by excessive screen on delay

When screen on has an excessive delay mTopFullscreenOpaqueWindowState could
not be initialized. This derives in a NPE from a Power key press. If
mTopFullscreenOpaqueWindowState = null then PREVENT_POWER_KEY can be safelly
ignored

Change-Id: I04ce5d88f6f9abf02b2bbcdce4a2acad2f6451fa
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
keyboard: re-add code to detect lid state

This was lost in the cm-11 merge. Without this, a change in lid state
isn't generated to light up the keyboard backlight

Change-Id: Ief35cebcb62da13afe1ae7531d69ab58e196be9e
Merge "keyboard: re-add code to detect lid state" into cm-11.0
Merge "PhoneWindowPolicy: Fix NPE race condition by excessive screen on delay" into cm-11.0