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
Add EventLog event for logging of attempts to call java.lang.Object.getClass

Bug: 13694467
Change-Id: I886c6ffb3a008d0cf701c1adc16c607cbf7dce39
Revert "Vpn: Setup routes."

This reverts commit cbea2045cbb27d57dc37a3d8d23766a4a89751b5.

Change-Id: I9f2309b2d5a1adb4a359fd9b415398b685a2ec95
Merge remote-tracking branch 'aosp/kitkat-mr2.1-release' into HEAD
Merge "Revert "Vpn: Setup routes."" into kk4.4
Keyguard: update correctly track title and info if screen turns on

AOSP issue - Force update both if screen turns on.

Change-Id: I3d3198534c3ccdaa0ad2f40a967cc092a7dc0a0c
Keyguard: don't try to fetch the badgeIcon if remoteClientPackage == null

Logcat shows....if client is lost there is no need to force an exception due that remoteClientPackage
in this case is null.

Change-Id: I80e612610f93c9d70c854b2fcb8fbf0c0d8f9e2a
Merge "FB: Add Dialpad key padding [2/3]" into kk4.4
Merge "Keyguard: update correctly track title and info if screen turns on" into kk4.4
Merge "Keyguard: don't try to fetch the badgeIcon if remoteClientPackage == null" into kk4.4
SystemUI: ES translations

When Bluetooth is off the tile in quick settings shos "BLUETOOTH DESACTIVADO".
That'a a long string that doesn't fit the tile.

Change-Id: I0cd6130debc9f43bcd0c2a29525d0e12a15bc9c3
TRDS: Fix Volume panel background

Volume panel is a bit out of the box compared to the normal theming.
Reapply the background via java code on theme change.

Change-Id: I0df41a95487f7c23d5fda5c2ec7df763c8e2f466
Please follow slim guidelines

3 patches put new custom symbols into the aosp symbols.xml

Our guidelines say that we put all changes which differ from aosp
into slim_symbols.xml

Change-Id: I3b8c2e5b079cefe53e0ec85b74446d5d157b069f
SlimRecents: Rework show top most task feature

recently introduced this feature needed a bit rework. Basic changes

- do not call settings provider on every preload to prevent high IO work.
  Use our observer for that
- Use internal flag logic to mark topmost task
- Move interpretation of the expanded state into the card
- Due that topmost task is always collapsed do not show expanded icon at all
- Minor cleanup

PS:
- set mFirstTask to null if it is not used

Change-Id: Ifaabc035b6b9bd2d4527d5b34a1bca9c80a74e32
SystemUI: Fix percentage charging color does not apply

How to reproduce:
Set colors to default. Try to set only charging color.

Result:
- nothing happens when you try to charge and it is out of the max and min levels

Expected behaviour
- user choosen color applies if the user charges and it is outside the max min levels

The JB style icon which was recently introduced broke the logic completely. Clean it a
bit up and apply the colors correctly depending on the choosen style.

NOTE for the future: We have since the JB style patch 2 different behaviours....text has now indication
during charge when it is outside the min max levels. All circle styles do not have this
indication. Nothing big but we are usually consistent and should think about it.

Whatever functioniallity wise it is fixed

Change-Id: I5029d09fbf1a7e4181b082ad55d9607bcf8a63cc
fb: translation - RU

Unified navbar translation
Thanks @Pixelase

Change-Id: I536e67d300b8052796239f789063816d8faeba44
Lockscreen Notifications [1/2]

My try on making notifications easily accessable from lockscreen.
Credits to ChameleonOS, I got the notification listener permission and some small other stuff from their ActiveDisplay implementation.

Lockscreen Notifications allow you to manage all your notifications directly on the lockscreen.

Features:
- Pocket mode turn screen on when phone is pulled out of pocket and turn it off when phone gets back in pocket
- Hide low priority notifications
- Hide non-clearable notifications
- Allow dismissing even non-clearable notifications from lockscreen
- Just turn screen on when there's currently a notification pending
- Toggle between expanded and normal notification view by longpressing
- Wake on new notification
- Configure notification count displayed at once
- Privacy Mode: Hide notifications content on secure lockscreen.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button, does not dismiss on going notifications, they must be swiped away

Overlay setting:
dynamic width is disabled by default, to enable it for a specific device, add
<bool name="config_lnDynamicWidth">true</bool>
to yourdevicetree/overlay/frameworks/base/packages/Keyguard/res/values/config.xml

PS3: Disabled by default
PS4: Removed many whitespaces

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Signed-off-by: kecinzer <kecinzer@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
	packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
	packages/SystemUI/res/layout/navigation_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
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>

HOVER: Ensure to clear after reparenting all notifications

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

HOVER: Fix notification content not being updated

Change-Id: I6f5e95cfff9b78cdabd1d9aa00e0577b0ab78508

HOVER: Match notification width on tablets too

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

Conflicts:

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

Change-Id: Ib381d9f3070b2a7aed71f4581bbfedb8e5cb7c9d

HOVER: Rework showing behavior on tablets

- Don't animate out statusbar on tablets
- Cleanup

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

HOVER: Don't process and/or show foreground app notifications

- Don't show notification of foreground app
- Animate the ticker in this case so user can see it

Inspired from changes linked here https://gerrit.paranoidandroid.co/#/c/4453/10

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