FB: Add color values for ease of TRDS theming

This adds color values that I can use for TRDS theming.  I needed values
for colors that are white when TRDS is on and black when off, and vice
versa. Google is implementing framework public value redirects in the
smali code of several Google apps I'm trying to bring TRDS compatibility
to. This will make it much easier to redirect text colors.

PS6: Remove whitespaces. Sorry 'bout that!
PS7: Remove unnecessary duplicated colors in holodark.
Change-Id: Ia3f21b6891ca59d98b79d3ca6e32f6710d9321f3
Make sure slashes don't appear in the Quick Recording files

Change-Id: If246b1fa261fd37254d999f651231c9a2211f971
fb: translation - RU

Reverting "bootloader" translation, as original one looks prettier

Change-Id: I8417b40c97f3a18ec4cb0e69dd2ec35eb4ee5a42
QuickRecord: Fix crash on other languages

With the new multiple recordings,
	some languages parse the DateFormat
	where it was being split by the regex
	and incompatible recording files were
	formed.  Use a java formatted regex
	to remove the possibility of slashes
	sneaking in for different languages

Change-Id: I754f589cd9c3646151a6e7e7de228b1c71c8c0ca
Slim Recents: Option to show topmost task [1/2]

Change-Id: Ib39d9b87b0fd30b4d34d4292af39e891038f337a
Slim Recents: Always show topmost task collapsed

PS2: Also restore expanded state of topmost task when on homescreen
PS3: Fix code style

Change-Id: I64956410fb389d8e880979a84b51321d8b372217
Add class for identifying slim build type and version.

Change-Id: I844bc9d983459c4ac075c128414a3e37bda2b82e
SystemUI: Update circle battery UI to be in line with CM

Paranoid Android circle battery icon was too thin and had the wrong shade of white.

Fixes: AOSPA-179, community request

Fixed color to match other battery icons

PS2: Fixed spacing

Src: https://gerrit.paranoidandroid.co/#/c/4030/
How it looks/origin: https://paranoidandroid.atlassian.net/browse/AOSPA-179

Change-Id: I084bbacefb37fdf64368f80baa95d79e2bd8e2bc
fb: translation - RU

Better shake events translation

Change-Id: I0de2f73a34db3dc8ce4dfc0d28915f28548c2580
Megamerge from ParanoidAndroid

-Float
-Peek
-Hover
-Blacklist

Individual patches:

PEEK [1/2]

Sensors are fully disabled when screen is on. When you turn the screen off,
it will start polling both gyroscope and proximity sensor values. If it detects
using the gyroscope sensor that device is lying on a table, it disables proximity
polling. If it detects with proximity sensor that it is in your pocket, it disables
gyroscope polling. This way, we save some battery from the beginning. Later, when you
receive a notification, it enables a partial wakelock (CPU on but at low frequency),
and starts listening for movement, either from getting it out your pocket or lifting
off from the table. If it detects those events, it will turn on screen and show the notification.
Wakelock timeouts on 10 secs, so if you receive a notification and there is no movement in that time,
sensors will stop polling after that time, disabling peek interaction until a new notification comes.
Peek doesn't process low and min priority notifications.

https://plus.google.com/+ParanoidAndroidCorner/posts/3wppxakBSVR

Contributors:
@D4rKn3sSyS
@Anu6is
@BigBrother1984

Signed-off-by: Jesus David <jesdga95@gmail.com>
Signed-off-by: Curtis Mayers <curtis.mayers@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:

	packages/SystemUI/res/values/pa_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: I8fd01b8f0dae0a8fe0a0d1035c9625bc4aa82de3

Conflicts:
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

PEEK: Beautify bridging layers code

* Save new instances for Peek and PowerManager:
    Create it only in BaseStatusBar when start() method is called. That one
    will be passed throught the sub layers such like new helper class so another
    feature can check Peek state invocking from NotificationHelper class.
* Move phone listener to new helper class.
* Do not show Peek on sim pin lock screen.
* Process new incoming notifications only if screen is off, keep updating notification array separately.
* General cleanup.

Original Commit:
https://gerrit.paranoidandroid.co/#/c/4176/

Change-Id: I2a23e7618b695e1bef80aae57baefbe337f3db41

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

NotificationHelper: Create broadcast receiver for Peek app

Change-Id: I9a5e2ddc4db10746203972e4f024d31344f82727

[1/2] Prepare NotificationManagerService for new format

* Needed for blacklisting

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

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Apps: Add blacklist interface [1/2]

Include peek and floating mode implementations.
Applies to every floating mode launch way.

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

Conflicts:
	core/java/android/app/INotificationManager.aidl
	packages/SystemUI/res/values/cr_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	services/java/com/android/server/NotificationManagerService.java

HOVER [1/2]

Notifications refined:
The way you handle with the incoming notifications defines how much you enjoy your device.
Hover shows you those notifications when you need them in a beautiful card that briefly appears
on your screen. For a detailed look of the notification, you can swipe down to expand some more
info, or you can tap it to open the related app using PA’s floating mode.

Introducing Hover:
https://plus.google.com/107979589566958860409/posts/DC4KyDd1cDC
https://plus.google.com/107979589566958860409/posts/BtWoGpNd8Fq

This is revision 4 of the original base by @D4rKn3sSyS . Hover works by moving the
notification view from statusBar container to Hover’s one and re-themes notifications
in the process. When hover is active it is the owner of the view, special care must
be taken to not  manipulate the statusbar reference while hoveris active.
Hover’s view state is managed by a handler based timer. When any touch event is received
or a gesture completed the timer is restarted, upon expiration of the timer hover is
hidden or will show next notification in the list if there is one (or more) to show.
The timer along with animation listeners  regulates the rate at which Hover can process new
notifications, acting as a spam filter for noisy applications. Upon first run a dialog is
displayed explaining Hover to new users. More infos in code’s documentation.

Todo:
- Swipe up to dismiss only the hover window not the notification in status bar.
- Transparent support has been tweaked a bit but needs a more proper solution
- Edge gap fix for Theme Engine themes overriding notifications draws
- Long press action(s)
- MInor tweaks noted in the code’s comments

CONTRIBUTORS:
@D4rKn3sSyS
@BigBrother1984
@Anu6is
@beerbong
@aaronpoweruser
@David96
@linuxman94

Drawables by @arzbhatia

Signed-off-by: Jesus David <jesdga95@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Signed-off-by: Curtis Mayers <curtis.mayers@gmail.com>
Signed-off-by: Yamil Ghazi <stevewatersy@gmail.com>
Signed-off-by: Aaron Gascoigne <atlrudeboi1@gmail.com>
Signed-off-by: David L.-W. <david.leppla.weber@gmail.com>
Signed-off-by: Evan Anderson <evan@thelinuxman.us>

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/pa_dimens.xml
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/input/InputWindow.cpp

PS2: replace incallUI background for our non-intrusive
Change-Id: I5898103671d7b82c89a6ffcee5a30cf79f22341a

Conflicts:
	core/java/android/app/INotificationManager.aidl
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/res/values/cr_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/java/com/android/server/NotificationManagerService.java

FWBase - Floating Window: Welcome back

* Port squashed jellybean floating window to kitkat.

Floating window contributors:
@drcmda
@beerbong
@D4rKn3sSyS

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

Merge notification manager service changes.

Change-Id: I823ce054549c7a7da2759097e3e08fbeacb9d3cb
Signed-off-by: MURA Stefano [STELIX PippoX3] <ssspinni@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

FWBase - Kill floating activities running in the same thread when tapping outside

This change makes all activities from the same app to be finished when
we tap outside the halo window. Other apps running in different threads
(floating or not) won't be finished.

Port from here:
https://github.com/ParanoidAndroid/android_frameworks_base/commit/f489f45ab2ba5dd4991c241917f7f4b0fd74b884

Change-Id: I14e2e181c502093b3180b11e5e7eb2f81e3ee456
Signed-off-by: MURA Stefano [STELIX PippoX3] <ssspinni@gmail.com>

Dismiss IME when floating window is dismissed

Previously the IME would be stuck on screen if the
floating window was dismissed while it was showing.

Change-Id: I8ca61b07ed89bae85eabd8db23f87b6f1f0b179f
Signed-off-by: Evan Anderson <evan@thelinuxman.us>

FWBase - Launch floating notifications from notification panel (long click)
FWBase - Floating mode in blacklist

* Status bar - long click on notification select 'floating mode' option

fix derp in floating notification launch

Notification long press fix

Conflicts:
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/pa_strings.xml

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Signed-off-by: MURA Stefano [STELIX PippoX3] <ssspinni@gmail.com>

Change-Id: I334fbb4f2ec9684bc3fa7d348f5c6609ad090d59

Conflicts:
	core/res/res/values/cr_strings.xml
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/cr_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Also blacklist floating

Change-Id: Id952c9860caea926d1ced9bd12d82c256eb73a90

HOVER: Fix a couple of things:

- Handle Ticker properly. Update mTicking, call related statements
  and disable ticker for blacklisted apps only when hover is off.
- Remove a bad patch when you release your finger, there is no need and
  along with showCurrentNotification() call at setNotification() can even
  be a bad call.
- Notification removal is already done at BaseStatusBar. Remove useless code.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Change-Id: I2de29a9507388273b9b6277f6ee1098f38d49238

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Frameworks: Store dialpad showing state (1/2)

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

Floating window: Fix possible NPE

Avoid possible NPE if app provides no interface such as pushbullet's
test notification & other apps which provide one.

Commit	20d229364be729d2ea35f5f2453d37819c1ad286

PEEK: Sensors improvements

- Bring some fixes to the algorithm thanks to @D4rKn3sSyS
- Cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
FB: Add Dialpad key padding [2/3]

Add top and bottom padding to Dialpad number keys to make the layout seem
        less crowded.

Change-Id: I04f02963da82df5ebfbfa2936c3060355169b479