Fix up expanded desktop behaviour.

The expanded desktop mode had a number of issues:
- It didn't handle multi-user scenarios correctly
- In the keyguard, the status bar was shown while the navigation bar was
  hidden, which was inconsistent to the !keyguard case
- Live wallpaper sizing was incorrect when expanded desktop mode was
  enabled due wallpaper windows not being recalculated correctly after
  enabling expanded desktop

This patch should fix all of those items.

Change-Id: I976ffae3a56d411b00026f86b16efa9743a23293
Merge "Fix up expanded desktop behaviour." into cm-10.1
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
Navring: Fix shortcut for uninstalled app

Fix NPE when the user uninstalls an app that was assigned to a navring
shortcut before.

Change-Id: I3f02fca73cb30e2edbb35d089ad127b35d8233c0
FlingTracker can divide by zero and hang StatusBar in an infinite loop

if 2 events have the same timestamp then FlingTracker in PanelView will divide
by zero causing NaNs. the bug is usually triggered by rapid StatusBar up/down
dragging activity and updateCarrierLabelVisibility can then loop indefinitely
looking at NaNs. the user visible symptom is that StatusBar refuses to pull
down and is burning cpu time.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I0791c6bea953bf03346185fc6aaf44aaea79aace
IME : Fix sym key regression

http://review.cyanogenmod.org/#/c/25787/2 caused the "dismiss" arrow
for ime's to execute back action as well. Reproducible via :

Open sms app->Open message thread->Tap message field->Tap downward arrow on navbar

Expected behaviour : Keyboard should be dismissed
Actual behaviour : Keyboard is dismissed and user is taken to previous screen.

Change-Id: I6ab65b00464fb6e00849d7fd6c8bd438b23ee76b
Merge "FlingTracker can divide by zero and hang StatusBar in an infinite loop" into cm-10.1
Fix divisions by zero on boot.

Change I976ffae3a56d411b00026f86b16efa9743a23293 introduced a problem
where depending on the rotation settings the WM override display
configuration would be filled with invalid values.
Fix that by correctly checking that the display is ready prior to
setting the override configuration.

Change-Id: Ia3fd7603d9c1212cd32536803b4c12390a798606
Changed USB page icon from Android to Cid

Change-Id: I57386c2d555723adad99cafe8ae6d2e8f6fe8cbd
Set QS panel opening to outer 15% of statusbar

Prevent accidental opening of QS panel in stead of notification bar

Change-Id: Ibe5f6504333af2ce124be1efbd463fb56a51c2dd
Option to enable gfx effects (Framework)

Based on original commit by kladd

Change-Id: Icf1ea2dc952ccb9c2e8fafd237e80a671bd467f7
Revert "SystemUI: fix delay in applying am/pm setting for notification clock"

This reverts commit 9e40defc3b40ead29bdceddbf5f3ff69c910783a.
Revert "4.2 Transition: Notification Header datetime click"

This reverts commit 809a720254b7432e3b821a55d23e57b054163fcb.
Revert "SystemUI: Forward port Statusbar Clock and Date actions"

This reverts commit 8d6125c0badfbd75f5dd71863aad7e688e849e8d.
4.2 Transition: Notification Header datetime click

- Fixes tiny clickable area for much smaller 4.2 date string
- remaps clock behavior:
  - click does open deskclock now - same as clicking clock widgets now does
  - long click jumps directly to alarm setup

Change-Id: Ic4e3f623ef7b6bf4116242b479c681f2866b4c9c
Fix status bar Clock events

Change-Id: I675d92d8f9bb497c9299867f62873d309def4fc4
Add clock styles and Clock color picker

This commit is a combination of CM, AOKP and SlimROMs work

features:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- Fully customizable date in style and format
- Fully dynamic settings

Change-Id: Ied13570361e532374183b71998b50e15a0158d8c
[Framework] Port BatteryBar (2/2)

- Adds Battery bar with following features
- location set
- color
- aligment
- thickness
- animation

- dynamic slim settings

Change-Id: Iacb3e38505b0ab30bb3f9df54231aeb2c79c20f1