fb: fix recents animation on new immersive mode

thanks here as well for identify the problem to Kiril.
But I changed the implementation. Beside that we give the user
the ability to setup different navbar heights IMO there is absolutly
no need to use an observer to get the status. We can fetch this
from WindowManagerService to get all needed information.

So at least this patch fetches needed values from WindowManager
and calculates in the missing heights

Change-Id: I3ae57ba0a575624f8aea75ce8d48041f5a1c1c42
WindowManagerService: fix application transitions in expanded mode.

Change-Id: If7d3fc3ab566dedc3a5b38cd0a6dc3185f494e20
fb: small cleanup and fixes in navbar transitions

this commit fixes several things

- cleanup: no need to go every time trough all calculations if back
button is not present

- force to set alpha value for backbutton on disableflag
changes (merge derp from 4.4.1 merge)

- new introduced workaround from google to animate the altbackkey->backkey
on password lockscreen should not depend on home button view existence and
should only call for the respective disable flags which are always present
from the system. As well which is needed for our navbar call the animation
values from whatever button is existend which behaves like home (so all buttons
only recents and back button not)

whatever still to do if the user uses password as keyguard method
google introduced a workaround to give the altbackicon->backicon
same transition then all other icons....but this workaround is not
really good working and has off timings compared to the other buttons.
Will be fixed in a seperate patchset and should be submitted back to
google as well.

Change-Id: I7eb77d5ce7ab38e1058086d3aecdd1c19803876d
fb: post time-critical systemui flags to window manager

thanks Kiril for this suggestion. We are already using window
manager for other things in immersive mode....so nice addition
to fix a race condition

Change-Id: I5d818214d7864014fa77c0d562d2908110d93303
[SystemUI] Notifaction customizations [1/2]

- notification drawer background

- notification transparency

Change-Id: I5bbc21ccac27b8e8f86c74358f5c4e4f9c88a757
SystemUI: fix wrong statusbar background.

If we turned off screen while some panel was visible than
background of PhoneStatusBarView will not be updated because we receiving single
panelExpansionChanged call and after super.panelExpansionChanged mFadingPanel
will be null (onAllPanelsCollapsed cause this).

Allow updating background when mFadingPanel is null.

Change-Id: Ib123f27500790c1b7ec787b7e433372629daa08d
framework: fix screenshot and rotation animation for devices with abnormal hw rotation

port foreward from cm10.1:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I14b6e2403b9be345a1a591138f8a3a12ca8e4f89
fix for screenshot animation glitch in portrait

edits by Stefano Semeraro aka Suxsem.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6
BatteryService: fix FC on boot until battery stat is present

updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.

I/SystemServer(  502): Battery Service
E/System  (  502): ******************************************
E/System  (  502): ************ Failure starting core service
E/System  (  502): java.lang.NullPointerException
E/System  (  502): 	at com.android.server.BatteryService$Led.updateLightsLocked(BatteryService.java:735)
E/System  (  502): 	at com.android.server.BatteryService.updateLedPulse(BatteryService.java:709)
E/System  (  502): 	at com.android.server.BatteryService.access$1600(BatteryService.java:86)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.update(BatteryService.java:860)
E/System  (  502): 	at com.android.server.BatteryService$SettingsObserver.observe(BatteryService.java:822)
E/System  (  502): 	at com.android.server.BatteryService.<init>(BatteryService.java:187)
E/System  (  502): 	at com.android.server.ServerThread.initAndLoop(SystemServer.java:328)
E/System  (  502): 	at com.android.server.SystemServer.main(SystemServer.java:1309)
E/System  (  502): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/System  (  502): 	at java.lang.reflect.Method.invoke(Method.java:515)
E/System  (  502): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
E/System  (  502): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/System  (  502): 	at dalvik.system.NativeStart.main(Native Method)

Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f
[SystemUI] Squash commits of quick settings [1/2]

Squash of quick settings from slimrom

Include:

https://github.com/SlimRoms/frameworks_base/commit/d85304fac9bde550beeeeca0dba2cd49686f20d7

Quick Settings Pulldown
https://github.com/SlimRoms/frameworks_base/commit/cfc1eb63afab2df03b720ea375cb9ee93298745b

    fb: qs tweeks

    - fix fc problem on tablets
    - fix filtering of unsupported tiles
    - add music tile options (disable artwork, disable track title optional)
    - add instance handling as well to the tile chooser dialog
    - add cancel button to chooser dialog
    - battery tile short press now battery stats - longpress batteryicon settings
    - rotation tile lonpress - rotation settings
    - collapse drawer on go to sleep tile

https://github.com/SlimRoms/frameworks_base/commit/4bc584e721c9558657deca7ac9de31b7f0ca3af3

QS: make dynamic tiles configurable (1/2)

instead of using a bunch of provider settings var
like it was on 4.3 and almost all other roms are doing
use one and split like we do for the normal tiles. This
is more consistent and saves us to observe a bunch of values
As well this is integrated into the one layout screen we have. So
all QS related is easy and logical usable for the user on one
screen
https://github.com/SlimRoms/frameworks_base/commit/8a25648e21513382018c1d465ab902d1778d2d98

SystemUI: add CHANGE_NETWORK_MODE permission

Required for 2G/3G quick settings toggle

fb: fix qs battery tile on normal icon due of left over

I forgot to commit a change so on icon and icon percentage there
was still a margin set. Remove the magin to fix it

fb: allow to disable quicksettings

on 4.3 we had an extra settings option for it. Due that we want
to reduce the settings to improve the UX and due that
we are doing it this way on all dslv settings we change
the old 4.3 way.

Now it is very easy like dslv.....remove all tiles and QS
is completly disabled and cannot be opend any more. Notification
drawer shows the settings icon on the top right in this case.
As well compared to 4.3 this works on phones and tablets

Change-Id: I4cebc43e41cb5f54d17a4e8b3c94bb2a79d0879c
TODO: add a hint for the user in settings when disabled like in dslv

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

QS: music tile update on Uri change

gives the user a bit better feeling when changing
the tile settings in Settings due it does react
immediately

Change-Id: I162477bb65eab7e0283aae135aeb013f99e38abc

QS: enable haptic feedback and change Alarm tile longpress

nice idea from xploid to have haptic feedback on the tiles
just a bit to complicated to do on every tile

so activate it centralized

as well change the longressbehaviour of alarm tile to the
normal onClick behaviour

Change-Id: I4cebc43e41cb5f54d17a4e8b3c94bb2a79d0879c
PhoneWindowManager: fix navbar behavior in expanded mode after 4.4.2 merge.

Change-Id: I7a139ef76050ebac815be6611cf4cabc8fde65f2
Revert "SystemUI: do not collapse panels if keyevent was canceled."

This reverts commit e026fe97698508e6df3c173727d58a00c8c7d841.

Change-Id: I9f8a5f681c2cec6f9882d9decf225d692a572dbd
systemUI: split the broadcast receiver in phonestatusbar

The current filters we need do not play nice together and
cause excesive delays on receiving the screen on and off
broadcast. Split them to have both proper working. This solves
as well reported issue that notification pannel stays open

Change-Id: I1075d3c6a7e8c59ea158dee8f8b622e78b651622