[2/2] Frameworks: HALO Forward port from jb.

Change-Id: Id1d6baa2ab95ecf405c02c5d82732d1f545fc10a
PS1: Initial port Fix conficts with notification LED Fix derp Major derp HALO Mods Rebase Fix blackist, code clean and added some TODOs
PS2: Fix build
PS3: Fix bubble sometimes doesn't respond on new notification
PS4: Align halo icon
PS5: Keep floating app in recents and disable transparent layer temporarily (NOT INCLUDED)
PS6: Fix conflict after recent merges
PS7: Cosmetic fixes: Fix buttons layout in status bar. Status bar button holders show halo + qs switch on notification and qs edit mode + notification switch on qs. Update new margins size. (PARTIALY INCLUDED)
PS8: Rebase Clean white spaces Toggle on/off from notification shade icon (remove red X) Standardize behavior (remove option to reverse tap/double tap)
PS9: Remove references to LayerActivity
PS14: Rebase
PS15: update halo strings to prevent conflict with latest changes
PS16: Wrap all things! Modify halo behavior
PS17: Get the correct activity stack: this makes all windows in the same stack to get the floating mode
PS18: Stop pop-out on rotation
      Catch "silent" notifications
PS19: Rebase
PS20: Rebase, fix conflicts with recent merges
PS21: Fix missing commit messages from previous undefined patchset (19) and other conflicts

Change-Id: I257b7109cc1efd146a1e7096143f45c4f9dc8f98

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/app/ActivityThread.java
	core/java/android/app/INotificationManager.aidl
	core/java/android/content/Intent.java
	core/java/android/provider/Settings.java
	core/res/res/values/cr_symbols.xml
	core/res/res/values/symbols.xml
	packages/SystemUI/AndroidManifest.xml
	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
	services/java/com/android/server/am/ActivityRecord.java
	services/java/com/android/server/am/ActivityStack.java
HALO: change holo blue to holo grey matching new drawables

Change-Id: Ib62b975cee90e009ce3ca149333e9b4ea27445c4
Remove duplicates
Halo master switch (1/2)

This commit remove halo button from status bar expanded and add a new option into halo settings allowing the user to enable or disable it using a checkbox

Change-Id: Ib3f4fbee4a2a63a02eab802cd9a5ff16b370b622

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_notify_halo_normal.png
	packages/SystemUI/res/drawable-hdpi/ic_notify_halo_pressed.png
	packages/SystemUI/res/drawable-mdpi/ic_notify_halo_normal.png
	packages/SystemUI/res/drawable-mdpi/ic_notify_halo_pressed.png
	packages/SystemUI/res/drawable-xhdpi/ic_notify_halo_normal.png
	packages/SystemUI/res/drawable-xhdpi/ic_notify_halo_pressed.png
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Flush cache on recents clear all longpress
[1/2] SystemUI: Add brightness slider to notification drawer

adds a brightness slider below the expanded statusbar header and
(if enabled) quick settings ribbons

also wrap an if around gesture recorder in the fling methods, only
call them if DEBUG is enabled.

Change-Id: I65077f5ddb20aa9f13813eedfaa0cb09a667eb88

Conflicts:

	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java
[1/2] fb: Change density on the fly

Change-Id: I7ee16d32ee882fea22367f49f69f4da744f3aa45

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	core/java/android/view/WindowManagerPolicy.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
	services/java/com/android/server/wm/WindowManagerService.java
[1/2][SQUASHED] Base: On-The-Go mode

Squashed on-the-go of following commits:
NamelessRom/android_frameworks_base@c9515a3
NamelessRom/android_frameworks_base@e28324c
NamelessRom/android_frameworks_base@755e04c
NamelessRom/android_frameworks_base@ede7578
NamelessRom/android_frameworks_base@7350979
NamelessRom/android_frameworks_base@19c8631
NamelessRom/android_frameworks_base@5c63f5a
NamelessRom/android_frameworks_base@2a15bce
NamelessRom/android_frameworks_base@1fa20bc
NamelessRom/android_frameworks_base@bfbfdae
NamelessRom/android_frameworks_base@90ac0f6

Change-Id: I8f8f109673613ae4c8a86f6b235c487203c8609c

Conflicts:
	core/java/com/android/internal/util/cm/QSConstants.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/util/cm/QSConstants.java
	core/res/res/values/cr_strings.xml
	core/res/res/values/cr_symbols.xml
	packages/SystemUI/res/values/cr_config.xml
	packages/SystemUI/res/values/cr_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/liquid_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java

Conflicts:
	core/res/res/values/config.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/QuietHoursTile.java

Conflicts:
	core/java/com/android/internal/util/liquid/QSConstants.java
	core/res/res/values/liquid_symbols.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java

Conflicts:
	core/res/res/values/liquid_strings.xml
	core/res/res/values/liquid_symbols.xml

Conflicts:
	core/java/com/android/internal/util/cm/QSConstants.java
	packages/SystemUI/res/values/config.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsController.java
On-The-Go: handle display orientation changes

Change-Id: Iad38e98a0c2a37be10c9b1e29fbf9f15b2a13852

Conflicts:
	packages/SystemUI/src/com/android/systemui/nameless/onthego/OnTheGoService.java
FWB: Allow disabling of FC dialogs (1/2)

Change-Id: If87aa74ebb45849f6e5fe3a53ce9beeaac28f624

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

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

Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java

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

Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java
Attempt to fix CROM-23: Proximity sensor always on while the device is in standby
It seems like this is redundant. This has existed from the very first version of this file, created by David96 on 16-Dec-2013.

Change-Id: If3beff9f6e7d9fd89a3da9e88c1a315aca8be848
Fix density on the fly and on the go mode
Revert "Attempt to fix CROM-23: Proximity sensor always on while the device is in standby"

This reverts commit 381d3d05d5de0cc700c5b100feae199d409108a9.
Fixing memory leak in RenderBufferCache

In our devices with higher resolution we have observed a memory
leak in the HWUI code. When there is GC or tree modification
and buffer size is greater than the default size, we make sure
buffer is deleted.

Change-Id: Idf7052ccaf43c8a784ce0e7bdab336dca29bffd8
Signed-off-by: Samsung <aosp@samsung.com>
Quick settings: change behavior of swipe to switch

Now it's working not only in bottom bar but in all QS area

Change-Id: I0cbc336c5a4a6c9a180325791dbd508c6983a1ec
Lockscreen Notifications: some fixes

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

Change-Id: I9388bcb899080cc023c146a083e554dcf8e57858
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
[Base] Disbale LN by default

Change-Id: I9f0054dbcd5a7ba4f7b6b6ec903fbdfd86df17a8

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
LN: Some fixes & cleanup

- Fix bug that the notification is launched when a button on it is pressed
- Show new notifications first

Change-Id: I87db92a7ee4eb9329ec1ec69008e612a619d5c91

Conflicts:
	packages/Keyguard/src/com/android/keyguard/NotificationHostView.java
LN: Fix FC on launching hangouts notification

Change-Id: Idf411bd2b4995f0b53767e99597efd98ce0596b3