[1/2] Base: add support Tinted System bar

thanks to ChameleonOs and Thinking Bridge for the base code
also thanks to @MuhammadAG for Actionbar implementation (Xposed-Tinted-Status-Bar)

this allow statusbar an navigationbar background to follow color from Top and Bottom of application

see https://plus.google.com/107971916147063794392/posts/Eaqn5UAvKDt

as bonus, we can call blurbackground from here too :)

PS.6 :
   performance increase
   fix stability
   fix tinted statusbar cant turn off
   fix activity loading

PS.7 :
   improve performance
   smooth color change
   add more option xD

PS.8 :
   more stability
   improve color animation

PS.9 :
   fix FC some apps

PS.10 :
   stay away from broadcast
   make new API for communication with statusbar
   make color extractor more faster
   fix some bugs if disabled

PS.11 :
   remove gradient option this not working always
   fix where color not change if parent view has actionbar

PS.12 :
   fix white space xD

Change-Id: I40f533dd404a02e10a85fed78123c60ffd51f387
Revert "Revert "Camera: Adds support for meta data callbacks""

This reverts commit b71b0060052b3d2b33902dc69c6bd23aa88111a6.

Now it works :)

Change-Id: I6bd0b75d07026f601c4e9b71b3e62a8ca75c37b9
base: fix init handling of tinted system bar

force same behaviour like after changing setting

PS. 2 :
   fix initial background color

PS. 3 :
   make sure initial gradient is 0

Change-Id: I87eddcaa5223c1af15fa8c089f22ed9cb4774f7b
Base: fix logic tinted system bar

1. fix action bar make statusbar icon changes with same color action bar text
       if current action bar background is null
2. move log into each bartransition so we can track what is changes
3. make process not changing system bar color
      if current screen color is same with before (less draw)
4. always reset system bar color when launching new apps
5. fix color changes using 3rd party app keyboard

Change-Id: If53178e24caae7dff30636eda440d0e618702e3e
media: Configure audio encode parameters only for valid audio codec.

Added extra check for audio codec in profile
(Cherrypicked from commit eed39d0053dee6649424867418e511b918b3c634)

(cherry picked from commit 81dfde16ffb3fc8f6b110a3df2921a3d3361db10)
(cherry picked from commit 8069457a313853247f2017237e29bcf3b3eb2323)
(cherry picked from commit db4bf86a6b50ce84b5a678476ee08c12f0fe272b)

Change-Id: Ice218fb6357e49d6bdba98224a990357a47e8d7a
base: Reduce total number of background apps for low memory devices

Due to memory constraints, we anyway cannot fit the default number
of BG apps. So instead of killing background apps to
free up memory when launching, start with an already
reduced background set of apps.

Another side-effect is that launch latencies also improve.
This change is for low memory devices. (512MB RAM or less)

Change-Id: I9de0cb1734c0a386fc47cde71723e5c16825f5a3
[2/2] Base: Clock on lockscreen

Allow to enable status bar clock on lockscreen (default off)

Change-Id: I80014df8544b149dbf6fb5b846d922f4ed09427e
Base: improve color fetch calculation

this also fix calculation for device without navigation bar

Change-Id: I5ea3fb5dd18dadf1ced0255b3bf6554a7b50079c
base: Fix issue with hardware key disabler

- On devices such as the HTC EVO 4G LTE, when disabling hardware keys under Settings/Buttons it would
disable all H/W buttons but the recents key. This fixes that issue....

PS2 - added search key just in case

Change-Id: I44a3e4ab23322da935c6a63e75f77d43740cc1ea
Base: respect layout changes before sending color broadcast

currently tinted system bar process is smart enough to determine
   when system bar need to change the background color
   now this patch improve how this process is done when when there is
   layout or window changes

example:
   open app, press home button
   open other app, press home button
   open recent or Omniswitch, open one of apps in there
   open again recent or Omniswitch, open other apps
   now system bar will take responsibility to changes the background color

another example:
   open app that has many activities like G+
   open notifications menu or input a message to post
   see system bar will take this layout transition to changes background color

for a scroll view, currently still need a touch to take process, because
   "View" is not a layout transition, so there is no way to take this to call tinted
   system bar process

fix notifications icon color not update after added
cleanup unused function

Change-Id: I0c69ad963d1589d6aad7c0135ed1007cbd2b4bba
Base: fix and improve tinted system bar

this also fix :
navigation bar button color not update
action bar color extractor
network activity color not update
color progress not apply to current configuration (on rotation)
some apps FCs e.g Google Earth and Plumbers

Change-Id: I748a24ab5467a9936cbd8decb37295edaeb93f64
Merge remote-tracking branch 'omnirom/android-4.4' into kitkat
Base: allow to determine dominant color for notifications icon

this also fix current color after screen off

Change-Id: I7af3210a67219cf6af85852a108081aa784681e9
Merge remote-tracking branch 'omnirom/android-4.4' into kitkat