[1/2] FW: LockScreen Notifications by AOSPAL

THANKS AOSPAL -> David L.-W <david.leppla.weber@gmail.com>

Port from: http://review.carbon-rom.com/#/c/1399/

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

This should still be considered as beta, even if it seems to work very well for me.

Lockscreen Notifications: Make "wake on notifications" user configurable

and some other small changes that hopefully will improve battery live

Lockscreen notifications: make height user configurable [1/2]

Lockscreen Notifications: fix possible NPE

Lockscreen Notifications: try on fixing notifications sometimes not responding

Lockscreen Notifications: always scroll to bottom so one sees the newest notification first

Lockscreen Notificaitons: Fix NPE while on setup wizard on clean flash

Lockscreen Notifications: several fixes

- fix notification not responding when removed and added in a short period of time (e.g. gravity screen start/stop)
- just unlock screen on notification click when there's an activity to start
- fix notification hide animation
- just wake screen on reposted notifications when it's not ongoing (wake on notification before made the device stay awake for ever when a download/countdown or something similiar was running)

PS3: Fixes & New Options (privacy, position)

Lockscreen Notifications: just scroll down in "showAllNotifications"

Lockscreen Notifications: Copyright

Lockscreen Notifications: make offset top user configurable & add privacy mode [1/2]

Lockscreen Notifications: Fix possible NPE

Lockscreen Notifications: make width dynamic (WRAP_CONTENT)

PS4: clean whitespace
PS5: hope this fix the bug
PS6: Off by default
PS7: Fix logic
     Fix IllegalArgumentException

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

This reverts commit 38b969ba5a73f40ae56cdb48cf8f00ddf854f645.

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/symbols.xml
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java

Change-Id: I891342d33f7b784ee9840900e05dd0a2d440513a
Revert "Make the lock screen camera widget configurable (1/2)"

Change-Id: Icbac5455d447ac19be288355ddc4837ad75c874e
Revert "NavigationBar : Customization"

This reverts commit ad97960bd783da565bb022724165d2d695656786.

Change-Id: If459190064ba8b17aec3ce19eb363ec07bd1e1e6
Custom Navigation Ring FW part

Made our own SearchPanelView. If they make any significant changes to
the SearchPanelView Ill port them over for now we can just use ours.

Change-Id: I30eb8eebba2697efc513506554c88ced7958cc07
SystemUI: add customizable navigation bar

Change-Id: Ibad1ecf52c7db0ac352892aed7529de68476c092
Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: fix alt back icon; navbar button fc

Change-Id: I61cb2a3d5ad024922016a1ff03564bc114bd0f0b
Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: add legacy menu button back

Change-Id: I32d687c2dd2682036ceee1032b777b9b10987ffd
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Revert "Revert "Make the lock screen camera widget configurable (1/2)""

Change-Id: Ic25f287da9b296a88a85b46633ab471f6a29a43d
Fix batterybar in navbar && fix navbar layouts

Change-Id: I6c0d568e4fc0b4ef5aedc835bdc54b212c1e96c2
Updated drawables for navbar

Replaced old icons with edited and centered kitkat ones.

Change-Id: I9d996c19763c6e46c5495e790955a35f65cdfde9
Signed-off-by: kecinzer <kecinzer@gmail.com>
SystemUI: update custom nav bar icons

Give them a drop shadow like the new buttons

Change-Id: Iff7d0b1230e824925c98faba99f1a0daa07f0dd4
Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: update navigation bar layouts

For tablets, mimic stock button paddings.
Except for when 5 buttons are used, then
distribute them equally across the navbar.

PS1: moved dimems from dimens_custom to pac_dimens

Change-Id: I99ccc07d31bc7b719c44be74f164d88d7dc542d5
Signed-off-by: Roman Birg <romanbirg@gmail.com>
raise max keygaurd widgets from 5 to 20

Change-Id: If7ec6ef850cd43db2dc79e0780e48644d326999b
trds: consistent glow for menu dropdown and popup

Change-Id: I248872cbd67471495f8b95036d995f25e2ca4459
Fix appwidgets not updating

Previously there was a bug where if an appwidget's update caused a
TransactionTooLargeException then the AppWidgetServiceImpl.Host's
callbacks were completely disabled, for all widgets.

The fix still allows a DeadObjectException or other RemoteException
to disable the host callbacks, as that would be caused by a bad host.

Fixes issue 28216 on the public tracker
https://code.google.com/p/android/issues/detail?id=28216

Change-Id: I5c5d5939d7211ed23cca69e6674de730b51b0f3e
Signed-off-by: Kevin Barry <kevin@teslacoilsw.com>
UsbDebuggingManager: Fix multiple NPEs toggling USB debugging

Change-Id: I7ac039fe51a32d35ef00eaa71accb85cd57d4d8a
Signed-off-by: atl4ntis <atl4ntis@gmail.com>
Don't rely on gcc extensions

Variable-length arrays of non-POD data types are a gcc extension
not currently supported by clang.

Change-Id: I9cd1aed742ac70e642771ff455582727fbafaec2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
XmlUtils#readThisMapXml should handle null keys.

Both readThisValueXml & writeThisValueXml have been
implemented to handle values with "null" names.

Change readThisMapXml to allow such names as well, and
map them to the null key in the resulting HashMap.
readThisListXml and readThisSetXml already support
null names.

bug: https://code.google.com/p/android/issues/detail?id=63463

Change-Id: I1c93976656e45e7733113eb67d29b6bad5d25f1f
Fix memory leak in PatchCache

Patch object should be deleted when removing its corresponding
cache entry from PatchCache.

Change-Id: I8dfd7f557f6e5c6e9a9c04ba915372790e6f34f5
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>