Revert "[WIP] Multi-window"

This reverts commit 6e43bbb9951c6d99d8a6a4196d00f5917de676e0.
DeviceUtils: filter out vibrator options for shorcutfeatures

if device does not support it

Change-Id: I738a1ddbbd05a3a1e4e519429e08b4a3344182fb
Revert "Update TRDS with google UI changes for 4.4"

This reverts commit d3b8aad3133c4515fe45143debe6dea5c2fa51e4.
Revert "Revert "Revert "Dark UI: DJL4.4 goes TRDS"""

This reverts commit 09a3a322fdf29ddde42a0816a4f062659c617388.
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
WindowManagerService: fix application transitions in expanded mode.

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

This reverts commit e026fe97698508e6df3c173727d58a00c8c7d841.

Change-Id: I46b400e1ba62107aa5da22f9d5265e95fe7e69c6
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
GlobalActions: collapse all panels if global action is shown

no idea what google really thought about it but the notification
drawer should collapse if it is open and the user does eg a longpress
on powerbutton to open the global actions dialog.

Change-Id: I0fe80de7d192961bcd805792560b2bcad8cbc07d
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: I2c3135b7eb3b87042b757c422f77ef9f5ed280a3
fb: TRDS 3.0 and new theme engine preparation (1/4)

For the one who do not know this feature see as reference
the first two versions here:

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

https://github.com/SlimRoms/frameworks_base/commit/3194015737b7944b4185fca007b8d167a0675cd8

we got now over a year now a lot experience how to handle the qualifier fallback
as well how to theme it and how to handle other apps. Based on this knowledge we
redid some parts of TRDS engine with following new features/additions and fixes
to have now a final perfect working TRDS

- compared to the old versions where it was needed on some apps to restart them
  in background this is not needed any more. All is handled about the internal
  AOSP resource handling and on qualifier change the caches are cleared
  and the apps get an onconfigurationchanged to restart the activity
  like it is doing on orientation change eg
- inverted folder is now depreciated and the new folders are holodark
  and hololight which allows on the one hand a dark theme (at least
  how TRDS started) and a light based theme hololight
- This name change is mainly because of the new theme engine which
  will come which uses this as base to add 2 external themes at the same
  time and give the user the ability to switch between them. But this is
  still in early stages and this commit is just the preparation for it
- Two new automodes are now integrated. User can enable the twilight modus
  which enables/disables holodark/hololight depending on the daytime...means
  on the evening it switches to holodark on normal day it is hololight.
  The other automode is based on light conditions....means that if it is
  dark outside it switches to holodark....if we have bright light conditions
  it switches immediatelly to hololight. Due of the resource cache handling now
  this happens immediatelly for the user and feels completly system integrated
  and happens without delay. A bit comparable to some navigation tool for cars
  which can switch automatically from dark to light and back
- currently the auto modes as well the manual mode switches between holodark
  and hololight. Due that we do not have currently anything hololight themed
  in the source hololight = stock theme. We will give the user the ability
  later when done to choose between which modes the user want to switch
  (stock/holodark/hololight). But this does not make sense at the moment.
  As soon as we have done the light theme or theme engine (lets see what
  comes first) we will open the ability to choose it. This is only a small code change
- a lot small tweaks and fixes went as well into the new version

Whatever this commit as usual adds the support for it. The themeing is done in the
other commits by kroz which is as well way more extended then on the older versions

cheers

PatchSets:
- minor code cleanup

PatchSet5:
- use one value for auto modes

PatchSet6:
- kill resource caches on configuration change

PatchSet7:
- register settings observer lol

PatchSet8:
- fix not assigment of config mode change (typo lol)

PatchsSet 9 -11:
- playing around aosp qualifier is not that flexible then I thought
whatever back in most parts to original implementation handling

PatchSet 12:
- now no restarts of any application needed any more like it was on 4.3...yeaaah
- fix wrong shifting in native adapter
- fix wrong call of twilightmode
- disable debug
- cleanup

PatchSet 13:
- fix lightsensor

Patchset 14:
- no need currently to recreate the navbar we can do if a theme needs it

Patchset 16:
- synchronize on sending config change
- only send if system is ready
- fire first update when system is ready

-rebase

Change-Id: Ic88838247c47d2a92b55d1cb1b00330f2d62fb88
fb: add theme switch (TRDS) to navbar and navring

and show toast if a mode is running wich does not support
lightsensors

- rebase

Change-Id: Ie89589e1e0343e734728f0db00171a4e137370bb
QS: add theme switcher tile (TRDS) 1/2

this adds a theme switcher tile

normal click: turn on/off dark/light theme
longpress: switch between the auto modes (manual/light sensor/twilight)

Change-Id: I62b8e11b5714c179ccbf1c1e341b47c84da0fb56
Keyguard: disable statusbar clock for dashclock, lockclock and desclock

afaik this was an original commit from Danesh and we extended it later.
Whatever thanks to him in this case :)

Change-Id: I67a370b0a76f938fa3e022e8c467f2d6ebca87c0
fb: add ticker entries only if we are not recreating statusbar

if both happens at the same time it will result in an systemUI crash.
Funny that since 2 years where this method exist no one discovered it.
Due to the new theme lightsensor mode we have way more switches so
maybe thats why I got it now

whatever we had already a check but the tick method can be called from
outside as well so just check if we are in the recreation or not and return
if we are in recreation process. Old check is now redundant and can be
removed

Change-Id: I0feeaaa16d14fc631124d155dc18ba346f788796