Revert "[1/3] fb: Change density on the fly"

This reverts commit ad44c878c3a297cca27352c0568400606612bab4.

Conflicts:
	core/java/android/view/IWindowManager.aidl
	core/java/android/view/WindowManagerPolicy.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/java/com/android/server/wm/WindowManagerService.java

Change-Id: I4b05f2187f77eb26d0a6ff9e31ef18f07109be60
Merge remote-tracking branch 'upstream/ose' into ose
Merge remote-tracking branch 'upstream/ose' into ose
How did this sneak in...
[1/2] Add battery level around unlock ring

PS2:
added missing change in KeyguardSelectorView.java

Change-Id: Ia4dbc2335657c096c34349ec67c4adfec0aeb91b

Conflicts:
	core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
	packages/Keyguard/src/com/android/keyguard/KeyguardSelectorView.java

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/widget/multiwaveview/GlowPadView.java

Conflicts:
	core/java/android/provider/Settings.java
LockScreen: allow long-press actions from hardware keys (1/2)

Allow following actions with button long-presses on lockscreen:
- toggle flashlight (if available)
- play/pause/next/previous track selection
- toggle silent mode

Allow customizing of back, menu, and home buttons. Search
button events are completely ignored on the lockscreen.

Auto-detect hardware keys, only show appropriate menu
options based on the actual hardware keys available on the
device (or completely hide if there are no hardware keys).

Based largely on Danny Baumann's work from gingerbread.

Ported from CM10
Change-Id: Iff32736d00ca5d4122f64a6a861bbb0a1de9cca9

Fix home/menu unlock with long press hardware key
- Forward port of commit 2a572ee
Change-Id: Ic2eb85542f8052fe1662244fe5e72ba12a98608b

Keyguard: Fix for home wake/unlock
sometimes device is waking and unlocking during the same keypress.
Change-Id: I72ea7611d39aac0cd03dfd5aa7036aeef7600140

Use sticky broadcast to convey torch state (1/2).
It doesn't really make sense to store the (non-persistent) state of the
torch in a (persistent) setting. As the torch is sending a broadcast
anyway, make that broadcast sticky and use it to convey the state.

Also unify the torch constants (actions, extras, activity names) at a
common place.
Change-Id: If845bef27cc79990794aa748dce18cfea3bac1f5

Fix Home/Menu/Back keys' unlock
Change-Id: Ibd3842b6ad8e037a2a9f8eb581e7c55900017b0f

LockScreen: allow hardware key longpress to put device to sleep
Change-Id: I54260e21c462bcabd9b6383e22f44d644630b4d3

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Lockscreen blur and blur radius (1/2)

Change-Id: Iab92bc2adfc2c861cd4f1baccdba2409a5deb788

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Lockscreen Blur: Disable if music is playing

Some apps don't employ full screen album art.
In that case album art doesn't override wallpaper & content behind screen is clearly visible.
This fixes that issue.

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	services/java/com/android/server/power/DisplayPowerController.java
	services/java/com/android/server/wm/WindowAnimator.java
[SQUASHED] 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

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

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Lockscreen Notifications: Make "wake on notifications" user configurable

and some other small changes that hopefully will improve battery live

Conflicts:
	core/java/android/provider/Settings.java

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

Conflicts:
	core/java/android/provider/Settings.java

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)

Lockscreen Notifications: just scroll down in "showAllNotifications"

Lockscreen Notifications: Copyright

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

Conflicts:
	core/java/android/provider/Settings.java

Lockscreen Notifications: Fix possible NPE

Lockscreen Notifications: make width dynamic (WRAP_CONTENT)

Lockscreen Notifications: make animations a bit faster

Lockscreen Notifications: fix notifications disappearing on orientation change

Lockscreen Notifications: disable dynamic width for devices <= xhdpi

Lockscreen Notification: fix default settings derp

Lockscreen Notifications: fix phone turning on in pocket

[1/2] Base: Lockscreen notifications: Allow apps to be excluded from being displayed

&& respect quiet hours

Credits to 0xD34D / ChameleonOS for the original implementation for Active Display

Change-Id: Ie0df1faedb275b1cf131d75d69d9d9cafc828dd9

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/NotificationViewManager.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/NotificationViewManager.java

Lockscreen Notifications: make dynamic width a device 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

Lockscreen Notifications: rewrite add notification logic

There were some problems with notifications getting replaced while the user was currently dragging them.
This commit should fix that by always waiting until animations and user input are finished before replacing a notification view.

Conflicts:
	packages/Keyguard/src/com/android/keyguard/NotificationViewManager.java

Lockscreen Notifications: dismiss all button, improve animations, cleanup

Conflicts:
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/NotificationHostView.java
	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/KeyguardTouchDelegate.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Lockscreen Notifications: fix show/hide of show all button

& fix endless SystemUI FC when SystemUI is killed

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

Lockscreen Notifications: fix NPE

Lockscreen Notifications: Custom background color [1/2]

Conflicts:
	core/java/android/provider/Settings.java

Lockscreen Notifications: try to fix occasionally SystemUI FC on boot

Lockscreen Notifications: fix FC when an expanded notification gets reposted without bigContentView

Lockscreen notifications: Add "show all notifications" navbar button

Change-Id: I0cd5b13e5644de36d24d4d693838bd7080f55412

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
	packages/SystemUI/res/layout/navigation_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Lockscreen Notifications: dismiss all button, improve animations, cleanup

Change-Id: I77665e37d823c619680312b73d5ebb1e6e437ffd

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

Conflicts:
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	core/java/com/android/internal/statusbar/IStatusBarService.aidl
	packages/Keyguard/src/com/android/keyguard/NotificationViewManager.java
	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
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/java/com/android/server/StatusBarManagerService.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Lockscreen Notifications: some fixes

Conflicts:
	core/java/android/provider/Settings.java

Keyguard: LN: fix and harden against null pointer exceptions

Change-Id: Iff66791bb35b911e837b0a1747a72effdce507e3

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	packages/Keyguard/res/layout-land/keyguard_host_view.xml
	packages/Keyguard/res/layout-port/keyguard_host_view.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/NotificationHostView.java
	packages/Keyguard/src/com/android/keyguard/NotificationViewManager.java
	packages/SystemUI/res/layout/glow_pad_container.xml
	packages/SystemUI/res/layout/navigation_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
[SQUASHED] Custom lockscreen wallpaper [1/2]

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	services/java/com/android/server/power/DisplayPowerController.java

Custom Wallpaper: use PNG and fix derp

This should fix the bad lockscreen wallpaper quality after reboot.

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Lockscreen Notifications: add back dynamic width as an option (1/2)

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/res/values/config.xml
	packages/Keyguard/src/com/android/keyguard/NotificationHostView.java
Gesture Lockscreen [1/2]

Change-Id: I370d40d47459d64adf709d4caee1c27c75922cfd

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/widget/LockPatternUtils.java
	packages/Keyguard/res/values/liquid_strings.xml
Fixes
Merge remote-tracking branch 'upstream/ose' into ose
Fixes
Merge remote-tracking branch 'upstream/ose' into ose
Fixes
Merge remote-tracking branch 'upstream/ose' into ose
Fixes
Merge remote-tracking branch 'upstream/ose' into HEAD
Fix