fb: Slims navbar and navring customizations

add back our navbar and navring tweeks. This is a completly overworked
version compared to the one we carry about a year now. Small glitches
we had are now all fixed. As well it does not need to register extra observers
code was much slimmed down and improved.

Beside that we adapt the 4.4 navbar changes to our system so that it it
consistent with the new 4.4 UI

This patch adds:
- Navbar up to 5 buttons
- navring up to 5 buttons
- dynamic menu behaviour
- landscape navbar options as well now on tablets
- button glow color
- button icon color
- navrign and navbar user can set system or custom icons
- navbar height and width
- enable/disable navbar and navring
- actions are vor navbar and available for the whole system over SlimActions.java
	back
	custom app or activtiy
	home
	kill app
	last app
	notification drawer
	ime switcher
	power menu
	qs pannel
	recents screen
	screen off
	screenshot
	search
	torch if it is available on the device
- navring has targets for handling vib/mute/sound
- added Color class based on blk_jacks idea which first grey an icon out
  and then color it. This gives way better results. As well it fits now
  perfectly with the new 4.4 UI. Put it on a central place so that it is
  from everywhere available. notification shortcuts adapted to the new class
  place
- complete new icons thanks to kroz who has redone all for xxhdpi
- our slim special swipe drag drop press longpress options support
  like on 4.3 this two features
- a lot lot fixes as well on current google code

Change-Id: I8899930b0c84387145e6749271c676bb37efeab9

fb: fetch navbar glow color from color.xml

better for new theming engine which will come in future

and now I will start doing again usefull patches lol. Just
needed to do something other.

Change-Id: I35dde45e47c59a2407c191d0077f0adb91f32381

Fix: external storage problem NavRing and NavBar applications

If the user binds an app which is located on the
external sdcard and is rebooting the button icon
will be left blank because the navring/navbar is already
constructed before the sdcard is mounted. To avoid
this we listen to the app available intents.
If it is not available the ring target/navbar button shows the none icon.
 When available it shows the
correct app icon. So that the user can clearly see
this app is accessable or not. As well when the
user goes into mass storage mode or does
unmount the sdcard or whatever case could
happen that the application is not there.

Reference:
https://review.slimroms.net:8443/#/c/12364/
https://review.slimroms.net:8443/#/c/12363/

Change-Id: Ib5ee29f1b30cff50d4c64f059259666a7618c090

fb: color system icons on navring like the other by default

otherwise it does not fit with the default rin targets

Change-Id: I78ba40dc3d71ee5cd3dd0d484bee91c17090f68b

fb: controll user case when user freeze or uninstalls or reinstall apps

till now on navbar navring or powermenu it still shows the app icon
or it does not show any icon after reboot. For UX it is way better
to clearly show the User that she/he has disabled or uninstalled an app
which is binded. If this is the case the Icon changes to the error
none icon....on PowerMenu as well in settings and Error string will be shown
So the user clearly know that he either needs to bind this action to another
one. Or to restore the accidentaly removed app. If the user restores the
Icon of course it shows immediately again up

As well I removed the observer for shortcuts widgets completly and moved
the observing values into the already existend PhoneStatusBar observer.
So we do not have currently on all the systemUI another one then the
actual from AOSP

Change-Id: I25623dc12ba4c1ae6ee6a106aa903d3c28c92a92

fb: give the system proper values back if it is a hw key or navbar device

as well allow this behaviour to be overwritten by system.prop like
it is suggested by google.

Needed to show eg the menu button in apps correct on the different
device types

Change-Id: Ic6145fb70ec9b67802d6d7a5ce70c21f3452cdcd

fb: add big menu support back

some in our team as well user want it urgently so we do it for
now till new Slim recents is back then we handle it so or so in
another way and do not need the recents button anymore and can
use the big menu button as permanent and get rid off the smal
3dot completly,

Change-Id: I785b83140725f3f3e8b274081d764a0e35b8946c

fb: small derp

lol I forgot to add it to the last commit...needs to be checked it it is a key
action to apply the correct vibration

Change-Id: I27a39abe32e9214d1fee1ff87c7b96b4d00f9ad4

fb: allow navring to show without assisten application

this commit adresses two problems

1. If the user does not install google now eg the navring does not
show up anymore even when other targets are assigned. Due that we moved
the disable/enable controll completley into searchpanelview which
calls DelegateHelper to disable it we just can remove the check
here in BaseStatusbar

2. On camera widget the navring is disabled and gets enabled afterwards.
This is of course a problem if we do not have targets assigned at all.
To fix it check for existend targets on the navigation ring

Change-Id: I1aa83fc8274995d9c1e9b88c76977977589502a6

fb: cleanup and let the navring stay and not

dimiss on targetchange....user seems to like it more
this way.

Change-Id: I73b36ef7a09dc08615fef522a8913a53b27b4763

fb: enable navbar for hw key devices

we moved this part into PhoneWindowManager which controlls the navbar.
Due that we allow on all devices a navbar the check on PhoneStatusBar
is not needed and prevend the navbar on comming up on hw key devices

Change-Id: Ia3aef15389007cba1b3905b5de9f084578b4aca3

fb: do not inflate twice

small derp does not effect anything but as we know inflating is slow

Change-Id: Ie31a5b9dbcab4141aac1b96dbec294d53f818e2e

fb: slightly adjust navigationring background drawable size

for custom icons to fit the system icons

Change-Id: I068cd0a463484f0f1b3ed0f210701290be364b7a

fb: fix possible NPE on back button transition

Change-Id: Ia6e30a9d94f292e7616b846f159b61fed9f502cc

fb: navigationbar use always slimactions and add contentdescription

No need to use the AOSP implementation at all...we can send all actions
over SlimActions....so remove AOSP implementation and clean up

As well add contentdescription for accessibility events like talkback
for ppl who are not able to see. Gives the user all information back
needed.

Change-Id: I8f82f1139f1248d9cf8e762d6669bb75ae4e205f

fb: google please cleanup your translations.....systemUI cleanup

it is really at the moment a nightmare to see compile errors when
getting 100000 of warnings. Whatever we removed already on some
packages the warnings....but still a lot are there

This commit cleans up SystemUI

Change-Id: I4e246e1cfc13bb18eb75624510e53731821ff553

fb: google please cleanup your translations....fb cleanup

it is really at the moment a nightmare to see compile errors when
getting 100000 of warnings. Whatever we removed already on some
packages the warnings....but still a lot are there

Change-Id: I1cc3abee5b4820d9c56b89056f1ea7e4d798947b

fb: fix pixelated results on picture resizing/coloring on features which use it

- turn on the filter for resizing
- use a Rect with the image dimesions and apply it
  for drawing the new colored or gray icons

this solves all issues we had on several fetures which allows
coloring/resizing

Change-Id: Icea4f20c06701f41b954406eaf67939d87310b87

Frameworks: Slim Shortcuts

PS2: Screenshot, Reboot, Last-App
PS3: Forgot earlier derp fixed elsewhere.
PS4: Clean-up
PS5: No change.  Create Dependant.
PS6: Fix blank activities sometimes.

Change-Id: I9c5e7dbdeaa727fca9a7317c3546ff9aa67ef4bf

DeviceUtils: filter out vibrator options for shorcutfeatures

if device does not support it

Change-Id: I738a1ddbbd05a3a1e4e519429e08b4a3344182fb

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

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

Framework: Chamber of Secrets (1/2) [WIP]

PS5: Add long settings.
PS6: Remove Chamber if setting
	not active. Also prevent
	alert from retracting
	when device is rotated.
PS7: Whitespace
PS8: Add color-parsing to integers.
	Allows you to use "red",
	"green", "#ff0099cc", etc
	as input-values.  Fancy.
PS9: String Change
PS10: Null string check.
PS11: Null string ::: don't process code.

Change-Id: I47d85ddcfb71c207a983584e08166bc85ab7d588

SystemUI: Sleep Screen Shortcut

PS2: typo

Change-Id: I3ee9611db49b7d8cd84508ab4959fbcb9ce6d59f

SystemUI: Extra Slim Shortcuts && Cleanup

Some cleanup of slim shortcuts
	& implement method to allow
	user to toggle toggleable
	settings to the preferred state.
	Much easier to use with confidence
	knowing you'll be in the correct state.

Change-Id: I897ee4567426d0314952b9860a487ab445795dfc

Framework: Get Shortcut Name (1/2)

Chamber of Secrets:
	Allow user to set intent name.
	This allows the intent to show up,
	for example, in custom tiles with
	a name that makes sense to the user.

AppHelper:
	Add shortcut preferred to returns

CustomTile:
	Use shortcut preferred

Change-Id: I96ef4b22b3d340056248b8215ea2a4f04e1015e4

fb: add bottom margin to stock default battery icon

We set the layout parameters programmatically so the fix from
google does not take effect. To solve set the bottom margin
programmatically based on the current display density

Change-Id: I9caa0e729afa19eb7cb852a1df6ad036a2839d1b

Frameworks: Fix 0% battery QS tile

when tile is recreated. Fetch the values from
BatteryController

Change-Id: Id0539016e1c479ac1f75535647d91a26f69a76b5

Change-Id: I8899930b0c84387145e6749271c676bb37efeab9

Conflicts:
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_ime.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_land.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home_land.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_menu.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_recent.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_recent_land.png