SystemUI: don't crash when user disable default apps

If the user has disabled the default clock or calendar application,
System UI will crash when the user clicks the Clock or Calendar
from the notification bar. This patch fixes the issue.

Change-Id: Icdc3679cdd35b5b3a24086e1ada67d0defabc5cb
ChaosLab: Add annotation to be used when adding new features to the lab.

This should be used when adding completely new features to ChameleonOS,
and not for simple things that expand upon a current feature.

Change-Id: I37d7250424967d41ecfb885120627f5397b2f804
Re-implemented app sidebar

Change-Id: I296059a3cc688a567e7e90cccfdf4b8e824cfedf

Conflicts:

	core/java/android/provider/Settings.java
Make notification_header_bg a .9.png for better theming

Change-Id: I477872ac49b1bbb77e44b9aa9bedd4d27643ea4f
Use .9.png images for quick settings tile background.

Change-Id: I17cd77006e8da2fe629d63e0932c88041e81f07c
Remove weather panel background (it looks like shit now)

Change-Id: Ibdcdd9d951683a27c88ca80419a31758ae8a4a2c
Gesture Anywhere: Add gesture anywhere feature into the ChaOS Lab [1/2]

When enabled a user can activate the gesture anywhere view by touching
the designated trigger area.  If a gesture is recognized as one the user
has created and assigned to an action, that action will be performed.
Since this is part of the system UI and implemented as an overlay, it
will be available and usable system wide, with the exception of the
keyguard for obvious reasons.

Change-Id: Ic47abb7531cecbdd33d344b9a32402f6ffed7163
Gesture Anywhere: Adjust position on orientation change.

Also added hiding home, recent and search from navbar when
showing the GestureAnywhere view.

Change-Id: I1dd13f38af265d6966441f2cd99b78ea9b3d4d90
Gesture anywhere: Collapse if expanded when screen turns off.

Change-Id: I85c749182dab9e478d7337b3556c362eaa7dd74d
Identicons: Add identicons to ChaOS Lab [1/3]

When enabled, new contacts will be assigned a unique
5x5 identicon as the contact photo instead of the boring
default one.

PS2:
Make Identicon an abstract class so we can use it to
create different types of identicons.  For starters
we'll use the github style in GithubIdenticon.  This
opens up the door to other types.

PS3:
Season with some salt.

PS4:
Use PNG format and tag it using an iTXt chunk before the
IEND to tag it with "identicon_marker" indicating it is
an identicon.  We can use this to identify if a photo is
an identicon and if so do what we want with it, like
removing identicons.

PS5:
We'll stick with JPG format and add a comment block to
the end.

PS6:
Better...stronger...faster.

PS7:
Add the dot matrix identicon

PS8:
Rename PolkaDotsIdenticon to DotMatrixIdenticon

PS9:
Clean up for release and add proper ChaOS Lab annotations.

Change-Id: I95fdca30686a2993ba5c2a9024a3cf5935b5d360
Fix last signal bar being a pixel to high.

Thanks Adam!

Change-Id: Ic22c91c0f381d64e0f6cbb8dd341e919b9762047
fix possible buffer overrun and memory leak

Use snprintf instead of sprintf and fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
Hey, why we need this?

Change-Id: I5f96089a618adc415e14d6c6b22583c6e6300801
Signed-off-by: Kevin Liu <airk908@gmail.com>
Base_SystemUI: CA translations

Change-Id: I9698c88862fe090d8019d8ced8e792e80c1c2205
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/bam_symbols.xml