Added support for multiple navigation key bars

System UI was build with the assumption that there is only one
navigation bar at a time, and that this bar is managed by
Phone UI, Tablet UI or TV UI.

This commit adds simple call back facilities at BaseStatusBar
for both, navigation key hints and menu key visibility change
events. These call backs are wired up in Phone UI, Tablet UI
and the TV UI stub.

This allows us to have more than on navigation key bar
in the UI and define those navigation bars directly
in BaseStatusBar, where it is available for all UIs.

Patch Set 2:
* CyanogenMod Code Style
* Added documentation.
* One interface for all
* Added setDisabledFlags() to the list

Change-Id: Id4de440e21c2f5c78b5e185030f9c5e0f7e6bef7
Bringing basic pie controls to CyanogenMod. (1/2)

Based on the multiple navigation key bar patch, this commit adds
basic pie controls to CyanogenMod. The implementation is inspired
by Paranoid Android but is completely rewritten.
The aim was to get as little intersection with existing code as
possible and provide a farily easy interface to extent these
controls by new slices (inherited from PieSlice).

The pie controls are only active when expanded screen is turned on.

Based on this commit there is another one that adds more optimizations
for Phone UI to pie controls. And there is a seperate commit for
the settings app, too.

Patch Set 2:
* Cyanogen Code Style.
* Some simplifications in PieSysInfo.java

Patch Set 3:
* Fixed NPE when pie controls are completely deactivated
* Preserve state of menu button

Patch Set 4:
* Fix display of Wifi SSID
* Some cleanup and coding style changes

Patch Set 5:
* Fix NPE when not connected to Wifi
* Remove AM/PM from time display (overlayed the other info)
* Fix menu button handling

Patch Set 6:
* Remove trailing whitespace in 12 hour time format

Patch Set 7:
* Tune colors
* Improve battery level and operator printout
* Remove some unused imports

Patch Set 8:
* Some refactoring on pie trigger management
* Copyright fix
* Make debug on PieLayout less noisy

Patch Set 9:
* Fix NPE one devices with no GSM/CDMA/LTE
* New color proposal
* Haptic feedback now respects system setting

Patch Set 10:
* Factor out haptic feedback into separate method

Patch Set 11:
* Prepare for "always on"
* David's color scheme

Change-Id: I90de7252d8301282d396c29bc9e9943acf7f2766
Add pie control optimizations for Phone UI.

This commit brings some pie control tweaks to the Phone UI. These
tweaks make the pie controls react to several conditions that are
are special to the Phone UI. That means that this piece of code
is more deeply embedded within the SystemUI code.

This mostly adds the foloowing behaviour, that is Phone UI
dependent:
* Disable BOTTOM trigger when notification area is expanded
* Disable LEFT and RIGHT trigger when a keyguard is active
* Enable search light feature

Patch Set 3:
* CyanogenMod Code Style.
* setDisabledFlags now belongs to navigation bar callbacks

Patch Set 5:
* Removed duplicated .observe()

Patch Set 10:
* Fixed unintended trigger activation

Patch Set 13:
* Searchlight opens directly on the bottom (on the lock screen)

Patch Set 15:
* Fix conflict/rebase

Change-Id: I551745b69791adca75190c54282be19d85db75a9
Fix pie controls being disabled by launcher gestures.

Some launchers have gestures for expanding/collapsing the status bar
from swipe gestures which call the respective StatusBarService methods
even if the status bar isn't visible due to expanded desktop. Because of
that, the status bar code internally thinks the expansion is carried out
(even if invisible), thus disabling the bottom pie controls in the
process.
Fix that by making PhoneStatusBar aware of it being hidden by expanded
desktop and ignoring the expand call in that case.

Change-Id: If386ca953517d9b5efcb6cb9054f5c5e6a9e0bc4
Merge Navigation Bar and Pie Controls button config (1/2)

Based on the commit series for pie controls, this commit
makes the Navigation Bar and Pie Controls share
the same button layout. However, there is no button layout
editor for pie controls, which makes the navigation bar
the leading entity when it comes to button layouts.

This commit introduces:
* A common notion of navigation buttons used in CyanogenMod.
  (class NavigationButtons)
* Some setting constants changes to avoid clashes with PA.
* Removal of the pie search key, since it is no longer needed.
* Sophisticated key event injection.
* Virtual key sound effect

Change-Id: Id68f8d0b597d7d89c55c3f66f994e632d014f006