Frameworks: Statusbar clock and date customizations

Some things changed on kitkat + our old code needed in general a bit
rework. All done with this patchset.

This commit add support for:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- color
- Date format
- Date style

Change-Id: I73d854ed5cfb57fa19e4b5554bb10cb2e1ce9b65
avoid crash if hardware accel fail

Change-Id: If259bdb16d6fc248cb2152d42e6dfc60948df7dc
[WIP] Multi-window

This is a big work in progress, which currently has some bugs,
but begins to look okay.

You can already multitask a little bit, by using the
app switcher and long-pressing an icon, then select "Add to
Split View".
Last window touched gets the key focus.

Code is very ugly, I know. Don't merge it, don't use it
for now. Unless you want to make your code ugly.

Enjoy :)

Change-Id: I4a03a84539fd3ac1273f0d3503fe8fafcd16be26

Conflicts:

	core/java/android/inputmethodservice/InputMethodService.java
	packages/SystemUI/res/values/custom_strings.xml
[1/2] Base: NavigationBar customization

Includes:

- Allows user to customize navigation bar.
  Features :
   - Choose from 1-6 # of buttons
   - Re-arrange / assign buttons
  Id: Idc9f5f401f15d207504e49de47666bb5510a06ca

- Navbar : Rework logic for determining orientation
  This patch introduces better checks for hybrid ui's.
  This should fix issues of small buttons due to incorrect ui determination
  Thanks Rolf Arne Schulze for testing :)
  Id: If5b61dc4764a98deedb5b801d11451fed2488cba

- Make navigation bar ready for per-user configuration.
  Also clean it up a bit.
  Id: Ic10bd161fce53bf30048a0cb927dcf1e2bfa7774

- Fix layout on N10
- Remove uncessary padding and logic
- Phone fixes
- Phone padding fixes

PS6: Added RTL support (http://review.cyanogenmod.org/#/c/55059/)
PS7: Navbar: Fix MDPI & HDPI landscape layout (http://review.cyanogenmod.org/#/c/56098/)

OmniGears part: https://gerrit.omnirom.org/#/c/3156/

Change-Id: I5bcdd53e8344e8ce137088544a4a3964655c53af
[1/2] Base: Navigation bar height/width

All credits to SlimRoms / kufikugel

Change-Id: I97af1fbd5a2e7df2337abc6c825b4905f576a48b
[1/3]Base: All in One Animation Control

Allow configure System, ListView, Scroll, and Keyboard Animation

base from
AOKP Animation Control https://github.com/AOKP/frameworks_base/commit/015c9cf00a8e49aea22d70b57b0af87c9134be73
thanks to Steve Spear <stephen.k.spear@gmail.com>

ListView Animation https://gerrit.omnirom.org/#/c/2863/
thanks to jkl5616<jkl5616@gmail.com>

Keyboard Animation https://github.com/zst123/XuiMod/commit/975cd531a9a847769b2af306495643a55ec44aaa
thanks to zst123 for patches

with slight modification to OmniRom

Scrolling Animation https://github.com/zst123/XuiMod/commit/48c180cfa762617f59b4ceb3da50a6c28befe24f
thanks to zst123 for patches

Change-Id: I878e2e845c75a5e7ccf5de69383b18478de60d65
[1/3] Base: Remove Active display

Change-Id: Ia305a67eed1a57c61598af803c688389f9f30e45

Conflicts:

	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/custom_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
[1/2] Base: Lockscreen Notifications

PS11:
    Lockscreen Notifications: several fixes

    - fix notification not responding when removed and added in a short period of time (e.g. gravity screen start/stop)
    - just unlock screen on notification click when there's an activity to start
    - fix notification hide animation
    - just wake screen on reposted notifications when it's not ongoing (wake on notification before made the device stay awake for ever when a download/countdown or something similiar was running)

PS12/13:
    Lockscreen Notifications: Bring inline with AOSPAL implementation
    Lockscreen Notifications: Fix possible NPE
    [1/2 ]Lockscreen Notifications: make offset top user configurable & add privacy mode
    Lockscreen Notifications: Copyright
    Lockscreen Notifications: just scroll down in "showAllNotifications"

PS14:
    Lockscreen Notifications: Fix recognizing of settings update

PS15:
    Lockscreen Notifications: make width dynamic (WRAP_CONTENT)

PS16:
    Lockscreen Notifications: make animations a bit faster

Change-Id: I342b9fa6266c4c64f04121a8a2938de6532082b4
[1/2] Base: Double tap to sleep

Double tap statusbar to sleep.

OmniGears: https://gerrit.omnirom.org/#/c/4611/

Change-Id: I4c54718e8ec8774677d13917b3a7ffa3b4b18cb5
[1/2] Base: Option to enable Notification Light when screen is on

This makes it possible to let the Notification LED flash even when the screen is on

Change-Id: I58be9646cdc84d4765342a5ab45b4641c3d5daba

Conflicts:

	core/java/android/provider/Settings.java
[1/3] Base: Add MobileNetwork Flip Tile

base from

https://gerrit.paranoidandroid.co/457

with moarr changes to OmniRom

toggle Network Flip Tile

for device support 4G (GSM)
toggle will change into 2G only => 3G only => 2G/3G auto => 2G/3G pref => 4G lte => back to 2G only

for device support 4G (CDMA)
toggle will change into cdma/evdo auto => cdma only => evdo only => 4G lte => back to cdma/evdo auto

for device unsupport 4G (GSM)
toggle will change into 2G only => 3G only => 2G/3G auto => 2G/3G pref => back to 2G only

for device unsupport 4G (CDMA)
toogle will change into cdma/evdo auto => cdma only => evdo only => back to cdma/evdo auto

4G toggle requires that at least one (1) of the following configs
must be present in the device's build.prop in order to use it:
telephony.lteOnCdmaDevice=1
telephony.lteOnGsmDevice=1

Change-Id: I7183dddeab7b4bdd4562015dd3958f3b069039e4

Conflicts:

	packages/SystemUI/res/values/custom_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsBasicNetworkTile.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
[1/2] Base: Add an option to change the device hostname

This adds an option to modify the device hostname used
in ip resolution. This is useful when connecting to the
android device in a dynamic dhcp environment.

Change-Id: I56da8b49899e2a8c1a34bf8eee618e048ba7d82d
[1/4] Base: TRDS 3.0 and new theme engine preparation

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

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/slim_symbols.xml

Conflicts:
	core/res/res/values/symbols.xml

Conflicts:
	core/java/android/provider/Settings.java

Change-Id: Ifcce5a11318460dcec166cb255e9462343215692

Conflicts:

	core/java/android/provider/Settings.java
	core/res/res/values/symbols.xml
Base: TRDS dark base theme

Change-Id: Ie25abfbf5258ac479ca8bc91033f6892bbbc6741
QS: Reflect location mode in different QS drawables

Credits for the drawables to SlimRoms!

Change-Id: I8ca0ccdca9d95a2b4a76fa3490f14a21c452b5d4
base: show notification count overlay only on notifications > 1

Change-Id: Ib52f7c365193f26f6ff983bd87fc7aaa9b63c46e
TRDS: Dark DocumentsUI

for Downloads app

PS:
- fix settings

Change-Id: I87d49e97b8a0a67bd4d85f0137eb0960155428cb
Base: Follow 4.4 UI

Follow on seekbars new UI guideline for 4.4

google forgot some things.....seekbar is one example

Change-Id: Ib281c3a5364f5c4168c7e3b0e419a18a12b18e82

fb: correct seeker fb style for 4.4

based on this commit https://github.com/SlimRoms/frameworks_base/commit/a845169c128c19825a69a0ebdf2e4d366fdd67ad

the idea was good but bad done. A middle in the night action lol.
Problem is that holo light themed app cannot handle the white seekbar of course
So add the complete seekbar into the Holo.Light switch to support both cases

Holo: white seekbar
Holo.Light: drak gray seekbar

Change-Id: Ic493219cf520ce622e80b467e58599e3cb72ec65

fb: global menu follow new 4.4 UI

the sound indicator is still ICS blue...change it to white
In general we should consider to change all tab_selected
files into a Holo.Light switch due it is already defined in styles.xml

but thats work for our themer :p

Change-Id: I90fd3e02bc3e9b229d104afc63f42c8cd2680df1

fb: change alert dialog to new 4.4 UI guidelines and add

Holo / Holo.Light switch to reflect it proper on the
different app styles

Change-Id: I5ffee96e2c2e467bcf1cb8c017a2c776329132dd

Update missing google UI changes for 4.4

thanks to kroz other things are now as well consistent to the new
google UI style

Change-Id: Icf00c216377377e577fdf660628d450c07f1170a

fb: changed all open forgoten UI from google into new UI

thanks kroz

Change-Id: Ic2f560fd07365448ffd06a54a08963c8fac2dff9

Update the color of the expandable volume panel icon

This still retains the old settings icon since it
happens to fit perfectly. Pressing it does indeed
show you a bunch of sliders like the icon indicates.

Also add xhdpi and xxhdpi versions.

Change-Id: I944a325c8871e1afc9d7163b0f23f7f9d8ae070a

Change-Id: Ie0e75fce17816ecc87a895a2d493e03399ca86b7
[1/2] Base: recover last location state during on/off switch

Based on this SlimRoms commit:
https://gerrit.slimroms.net/#/c/1421

Settings: https://gerrit.omnirom.org/#/c/4875/

Change-Id: Ia2484c9266d0276fd2d8bd0dc160487422e6063d
Lockscreen: See through (1/2)

Add the ability to see through lockscreen.
Adapted to kitkat from jellybean by @BigBrother1984

Signed-off-by: D4rKn3sSyS <jesdga95@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS2:

* Adding missing sem-colon.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: I9057a6e302a5a824799844f27e8f64ff677a520a

PS3:

* Replace and remove undefined mContext.
* Define the boolean enableScreenRotation inside new method.
* Whitespaces clean up.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS4:

* Restore mContext in setKeyguardParams().

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS5:

* Fixes for setKeyguardParams() and maybeCreateKeyguardLocked() methods, kitkat changed some things.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS6:

* Missing sem-colon.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS7: Fix all the things.

* Effects doesn't vanish after first unlock.
* Created condition in updateShowWallpaper() method that just return if see through is activated, he was restoring the wallpaper at second lock.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS8: Cosmetic changes.

* Correct java style name to seeThrough() and place it above updateShowWallpaper().

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS9: Other cosmetic changes.

* Better name to the see through boolean.
* Removed a space nitpick.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS10:

* We had two booleans for the same thing, ditch the one defined in one class only and take the global.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: I06d952f85baf284961a24c8c9f90b29f4aef719a

Conflicts:

	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	services/java/com/android/server/wm/WindowAnimator.java