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
Implement animateExpandSettingsPanel for TabletStatusBar

Change-Id: Id8dd2b40068bbace2f9c6dc7c9620f1cf1a48e00
Merge remote-tracking branch 'cm/cm-10.1' into cm-10.1
Fix expand tablet settings panel commit

Change-Id: Id7947242aaf40d01cb4e092ad78aeef84dd8921f
Merge remote-tracking branch 'cm/cm-10.1' into cm-10.1

Conflicts:
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Change-Id: I40101223e92eb54ce05f968ee110e89225a50e98
Fix merge derp

Change-Id: I2208936324add08d6b4179d7f315da189cf7df0a
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
Added hungarian translation for pie control

Change-Id: I4ae51271baed646da96645162a6080772585a0cd
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
SystemUI: Update Polish translation

Change-Id: I11b27d9c4709db1a4c30e023345f5e3bdf74a0b6
Add logic to show the notification and settings panel in expanded desktop

Change-Id: I5fd5ded1e5fd58ec5a3e37b6e7897f3df651354d
Merge branch 'cyanogenmod' into cm-10.1
Fix navigation bar not showing when switching from tablet to phone ui

Change-Id: I57bb0a0a9a365779f62f75d3f8138168771ce3bd
Revert fix up expanded desktop behavior

Change-Id: I5813096334a45086a45f4679c30c904e9366e1b7
Only change expanded desktop state when statusbar is hidden

Change-Id: I40848e0cf1daf061e5e4330f7ca178080f719262
SystemUI: Danish for pie controls

Change-Id: I51b948e1b0a8e11b2cae8bc363d12ba65cdcc539