Lockscreen : Add custom background overlay

Adds an overlay on top of custom images/colors to better match
stock appearance.

https://jira.cyanogenmod.org/browse/CYAN-1280

Change-Id: I1210d208de912e7f6a1941284f1fe1ff0776ab48
Add missing ACTION_MEDIA_UNMOUNTED intent

When an SD card is removed without the user unmounting, the intent
ACTION_MEDIA_BAD_REMOVAL is fired but is missing the preceeding
ACTION_MEDIA_UNMOUNTED which is needed to keep UI consistency.

Now when bad media removal is detected an ACTION_MEDIA_UNMOUNTED
intent is sent before the ACTION_MEDIA_BAD_REMOVAL.

Change-Id: I133300f42bafab141351e796d7cfc13c15d133e0
NavRing : Fix FC on rotate

onAttachToWindow() is not guaranteed to be called prior to the framework
invoking commands on the panel. This patchset moves over initialization
over to onFinishInflate();

Reproduction steps :

1. Activate search panel view (long press home/swipe up from navbar)
2. Rotate device

Change-Id: I37b5b0de180040bdf1b521bcb8fc014b23c238df
Pie controls: Fix flickering nav bar in full screen

On rare occasions the pie service will deadlock. When this
happens, full screen mode can no longer hide the
navigation bar, since it is masked out internally.

This commit switchs from a self cooked mask mechanism within
the WindowManager to the private flag
WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR.

Note that this will avoid flickering when pie service get
stuck in the activation path, but it will not resolve the
deadlock.

Change-Id: I2b64867081b37d9d6070df8086975e4327d97f5d
Pie controls: Catching activation corner cases

As stated before there are still corner cases that may
deadlock pie controls.

This commit makes PieInputFilter respect ACTION_CANCEL,
simplifies monitoring mechanics in PieService and
fixes some corner cases in PieController that allowed that
activations got lost and thus pie controls got stuck.

Test case for PieController:
1) Enable pie controls
2) Enable top/bottom snap position for pie
2) Enable expanded desktop and check if it works
3) Disable expanded desktop
4) Lock your phone
5) Swipe from the top down/bottom up, as if you want to
   activate the pie from that position
6) Dismiss the notification tray and unlock your phone
   again
7) Enable extpanded desktop
8) Pie controls will no longer show up and
   "dumpsys pieservice" will show a active record.

Change-Id: Id9d2df6b2735a743eec2fd1ba809fd72be9474cc
Merge "Lockscreen : Add custom background overlay" into cm-10.1
Merge "NavRing : Fix FC on rotate" into cm-10.1
Merge "Pie controls: Fix flickering nav bar in full screen" into cm-10.1
Merge "Pie controls: Catching activation corner cases" into cm-10.1
Detect whether overflow button should be shown based on menu key state

Some devices may have hardware keys but not contain a hardware menu key.
Hardware keys are also able to remapped. The overflow button detection logic
currently does not take that into account. This change allows detects
whether any key is capable of emitting the MENU_ACTION keystroke in
order to determine whether the overflow button should be shown or not.

Change-Id: I8699bd0242560314f8eadc54b187c69c992cf875
Merge "Add missing ACTION_MEDIA_UNMOUNTED intent" into cm-10.1
framework: merge CyanogenMod

Change-Id: I453313edda78aaf1dfab1125f9c2d459b314829b
framework: revert pie change

Change-Id: I355e26bc66ba13244feaa8b9df3de88170652c43