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: I12f0900090f1ec3ed002d63d4260a8080aec077e

Conflicts:
	core/res/res/values/cr_symbols.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/UserTile.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Recents: Google Recents

Featuring:

* Mr. Jingles - when you fully wiped everything off from recents, you'll have mr. jingles jiggling for you!
* More Google Now look alike

Changelog:

PS1: Inital Animation Release, drawables kanged from Google+ http://www.youtube.com/watch?v=Iff1yGtvooo
PS2: More improvements, oneshot=true, so it won't loop
PS3: Make it Google style, WHITE! (I may need user's feedback, something i feel the hate beyond us.) http://www.youtube.com/watch?v=4cE75HbPO-Q
PS4: Lighter white transparency at the background, used lighter gray context
PS5: Clear button, colored
PS12: Fix landscape layout
============================================
AICP PS1: background back to black ;)
AICP PS2: attempt to get a working darkswitch implementation

To-Do:
maybe add the possibiltiy to change between black and white according to dark
switch position

* Change Clear-All drawable to something more recenty like

Change-Id: I2ecac931bad9f1f393e1d98a17c59b8015a3fc57

Conflicts:
	packages/SystemUI/res/layout/status_bar_recent_item.xml
	packages/SystemUI/res/layout/status_bar_recent_panel.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
AOSB Recent App iPhoney UI

PS1:
Use CM RecentsHorizontalScrollView

PS2:
Remove commented out line and add method descriptions.

PS3:
Persist locked tasks.

PS4:
Use persistentTaskId.

PS5:
Fix landscape layout

PS6:
Check NavBar Height size Set Clean Image layout

PS7:
Fix UI animation

PS8:
Add pressed drawables

PS9:
Apps can be locked and unlocked from being clearable in
the recents panel by selecting the option in the popup
menu when long pressing the item

thanks for: CM Team , wfmtooopa , 0xD34D

Signed-off-by: hany <hany.alsamman@gmail.com>

Conflicts:
	packages/SystemUI/res/layout/status_bar_recent_item.xml
	packages/SystemUI/res/layout/status_bar_recent_panel.xml
	packages/SystemUI/res/values/probam_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Conflicts:
	packages/SystemUI/res/values/cr_strings.xml
Revamp default thumbnail
AOSB RecentApp : Add HTC Reflection Effect

PS1: support multi resolutions , hdpi, xhdpi , hdpi

PS2: generte small thumbnail to save memory in low resolutions

PS3: disable reflection effect if enable custon recent (slim)

thanks for Marc Landis from AOKP for the idea from 2 years
i just saw it when it suggested by liquid0624 my friend!

Stack help too :
http://stackoverflow.com/questions/22111468/thumbnail-reflection-with-drawable-instead-of-bitmap

Signed-off-by: hany <hany.alsamman@gmail.com>
Fix recent clear button grey circle

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Remove Google Recents
AOSB Recents
Frameworks: Port BatteryBar (1/2)

{x} Adds Battery bar with following features:
{x} location set
{x} color
{x} aligment
{x} thickness
{x} charging animation

Change-Id: Ie9a168121dc569ec3af068a4bda6b46a4e896b2d

Frameworks: update battery bar default color to match kitkat ui (1/2)

Change-Id: I4fc0b51abb29ac0a9f0b86e4d0ad3519f697b0f6

Conflicts:
	core/java/android/provider/Settings.java
PA Torch
Update Recents Clear Button
Frameworks: SlimRecents - add TRDS

replaced xml drawable with 9patch drawable to remove the overdraw

moved opt cards drawables into opt cards repo

Change-Id: I8ca379337298dcfc33b9ea288ea15440a2e0b0b4
TRDS: Dark DocumentsUI

for Downloads app

PS:
- fix settings

Change-Id: I87d49e97b8a0a67bd4d85f0137eb0960155428cb

Conflicts:
	packages/DocumentsUI/AndroidManifest.xml
	packages/DocumentsUI/res/layout/activity.xml
	packages/DocumentsUI/res/layout/fragment_save.xml
	packages/DocumentsUI/res/layout/item_doc_grid.xml
	packages/DocumentsUI/res/values/colors.xml
	packages/DocumentsUI/res/values/styles.xml
fb: TRDS dark base theme

Change-Id: Ie25abfbf5258ac479ca8bc91033f6892bbbc6741
Revert "QS: smaller tiles: Fix the text labels on small screen devices"

This reverts commit 734a91952cb517785bddc1c614ec36002a64cd45.
Revert "QS: Make it possible to show smaller tiles (1/2)"

This reverts commit bcf05b18b5667b01c1be8af67fd1e81c0423f375.
Update PNGS
Extended QS Options (1/2)
- 3, 4 or 5 tiles per row
- Duplicate tiles quantity in landscape mode

Change-Id: I992ca27632b2d106dfa1b903fda08afe7a49b9ea

Conflicts:

	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/QuickSettingsTile.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/quicksettings/UserTile.java
QS Extended Tiles
Extended QS Options: fix force close on theme changes

Change-Id: I1df69f417f58d413c932c2121dad5166c30a56f7

Conflicts:

	packages/SystemUI/res/values/cr_dimens.xml