SystemUI: fix duplicate day in notification pulldown header

showing the "day of the week" once is enough in the 1st line
in notification header besides the clock.
this removes the 2nd "day of the week" in the 2nd line.

Change-Id: Ia8258eceb8a5921b6b3d194e0bb7b72408ce9a5a
SystemUI: Allow theming battery via theme chooser

Change-Id: Iebea2dab0ed89baa14c0f18a4c8f487cdb8313a6
fb: add DeviceUtils helper class

for common calls we need later on several places

initial push with only display type support

Change-Id: Ic8856512d8a7540eda3e4ba8d28f3eec3e6961d0
Revert "Add back navigation ring customization."

This reverts commit 312b5233d9bd95b94f1bae0384606b42df8ed1b0.

Change-Id: I81af5e522eadf17c92ecca7691ec16b1eb6f5e32
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
Rollback CM's lockscreen shortcuts

Revert "Fix indention."

This reverts commit 2bdfbff849377a38c9440a9aa24a4c276df4b6c5.

Revert "Framework : Lockscreen - Customizable shortcuts"

This reverts commit e1735f0abfe1794c7d64011054bf20ba7545f8c1.

Change-Id: I3ee466b4f81dcf53c637ca8f9f00f20fe6164062
Frameworks: Port Lockscreen Targets and Shortcuts to SlimKat

First thanks to PA and CM which gave us partly code and some ideas.
Still some parts of the original implementation are/were buggy as well
we needed to ehance it.

Whatever the new Slim version is now ready and seems to be completly bug
free.

- Configurable lockscreen targets...on tablets 8 on phone either 5 or 8
- configurable lockscreen shortcuts only on phones...up to 5 shortcuts
- Centralazing some methods....using now then rounded corner on custom
  images systemwide...means on all other shorcut features we have
- multiDpi compatible
- new settings logic
- instance handling of all dialogs like we do on all other places
  way nicer this way
- tons of fixes

Change-Id: Ib3752204aa6876bd5b9d619c002df78d8e4bd109
Return: Listanimation Views and Interpolator [1/2]

PatchSet:
    - optimize more:
    - call provider values only when needed and do not fire them permanently.
      so just do it if scroll state changed.
    - as well go out of the setAnimation method as soon as possible. We
      handle here methods which get called 10000 times during scrolling
      so we need to be as fast as possible.

PS:
- initialize the animation modes default to off just to be sure

PS:
- move state change out of OnScrollListener
- reduce the provider value call to only one call

Change-Id: I5e49d858318420e76101fa6334ff766bd9496c83
Added sahlnaskh arabic font and give it higher precedence than DroidNaskh

sahlnaskh font is a fork of DroidNaskh font with some issues fixed.
Details of fixes are in https://github.com/khaledhosny/sahl-naskh

This should fix Jira issue: http://jira.omnirom.org/browse/OMNI-307

Change-Id: I9251eaf6c22288428f49916aa798be4ff3eaaead
Keyguard: Fix PIN layout on sw320dp-mdpi devices

Fix a long standing lockscreen layout problem that was introduced in 4.2

Before: http://i.imgur.com/9sVKHRR.png
After: http://i.imgur.com/DLY4DRu.png

Change-Id: Ia3cdc0d10217a0a2504a7287f480d9f036e66eee
lights: Add music light support (2/2)

Change-Id: I734e0d09bf9b01c149d456035eaa8ea5db009dad
Add double tap sleep feature to secure lockscreens.

In its current state double tap works on the status bar on unsecure
lockscreens this adds the feature to pin, password, and pattern
lockscreens.

 - pin and password: double tap the text entry view.
 - pattern: double tap anywhere on the pattern view.

Patch Set 3:
 - add to slide lockscreen(glowpad): double tap glow pad to sleep
 - update commit message

Change-Id: I70eeae4acaa61b44feab661082bcfdbac7b9dfc3
Signed-off-by: baked <travp624@gmail.com>
Fixed race condition in Spinner.DialogPopup on null reference.

NullPointerException is triggered when DialogPopup is
dismissed due to object mPopup being null when not showing.
Race condition is triggered when dialog is dismissed before
touch event to dismiss dialog has been processed properly.

Fixed by adding a null check prior to accessing mPopup object.

Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606
server: Treat non-default route as host route

When constructing ip route command in addRouteWithMetric,
we used to check whether the given route is a host route.
In some cases, the isHostRoute() check can return false for
non-default routes. To make this check more foolproof,
check whether a route is non-default in order to treat it
as a host route.

Change-Id: I5e396e67e1c82bbe22600c47f1e52cc7c750cdc6
Bluetooth: Fix to avoid framework reboot during monkey.

A case where monkey is running & sometimes framework is
disconnected due to unhandled java Exception during the
unbinding of HID device service on unsuccessful unbinding.
Handling java Illegal Argument exception while unbinding
HID device service solves this issue.

Change-Id: I61a5620e756119d25f2a235e67d6404b216f4cbf
CRs-Fixed: 601533
ProcessCpuTracker: Fix ArrayIndexOutofBoundsException in tempSpeeds

If time_in_state file is not available mCpuSpeeds is created with size 0
and subsequent call if the file becomes available there is an
ArrayIndexOutofBoundsException.
This change avoids the crash by breaking out of the loop, also adds error
logging

CRs-Fixed: 553569
Change-Id: Id5e219ca1cd3f058f714aecd5902ec2f6c11ae03
SysUI: Battery: properly fix color settings

* Frame isn't black in first boot or the color is resetted
* User don't have to set battery color to make system color work in another variable

Change-Id: I50fb346256c006315c3dd455ed3c53050eb122c1
Merge "SysUI: Battery: properly fix color settings" into kk
Merge "Return: Listanimation Views and Interpolator [1/2]" into kk
Merge "Added sahlnaskh arabic font and give it higher precedence than DroidNaskh" into kk