[1/2] base: expandable volume panel and tweaks

* Ditch aosp volume panel and use expandable as default, hardcode it.
* Add VOLUME_LINK_NOTIFICATION option to allow adjusting notification
  and ringer separately (default=1).
* Add VOLUME_ADJUST_SOUNDS_ENABLED option to allow disabling
  the volume adjust sound (default=1).
* Replace old Settings slider icon with new KitKat cog icon

Signed-off-by: Ricky Salinas <rsalinas1@mail.usf.edu>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: I94e0f944f76ee9751663de8ac40d99a342884259
Fix: Linked volumes

Check for linked volumes a little earlier than we previously did.
This ensures the correct value is set after boot.

Change-Id: I207680bed1b849351d6cbb283ae415621fab58b4
Update API
Move volume adjust sound option to more native place (1/2).

Our new UX concept includes saving more settings headers possible.
Move this into Volumes settings fragment. Also update description string.

Change-Id: Icee918dc35a4248e4dcdb4c9aa6af9d2ff68f220
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Audio: make safe headset volume user configurable

Conflicts:
	media/java/android/media/AudioService.java

Conflicts:
	core/java/android/provider/Settings.java
Option to use volume keys to control media volume any time
Original commit pawitp (https://github.com/pawitp)

Conflicts:
	media/java/android/media/AudioService.java
base: fix enable/disable of notification light

http://jira.omnirom.org/browse/OMNI-86

Change-Id: I1a252c2553462302e416517288bb944de1558956

Conflicts:

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

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
status bar: quick settings pulldown, left or right side option

Quick pulldown sometimes flips when it should not

The new code simply checks to see that the Event was a pull down event and that the event started in the top status bar.
If this is the case, then the quick panel is swapped to (without flip)

Special Thanks to my daughter Jenny fo painstakingly reproducing this bug.

Fix the flipping animation sometimes being played when pulling the quick
settings with two fingers

Finally fix incorrect flipping to quick settings
quick Settings: swipe to switch
notification light clean up

Credits:@Altaf-Mahdi
Android L softkeys
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

Conflicts:
	packages/SystemUI/res/values/ras_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
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.

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

Change-Id: If3d6338f657915754bd6cb9cb987df62c17aa6d0

Conflicts:
	services/java/com/android/server/NotificationManagerService.java
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: Ie6d6f46b2e23be60f991520ed480c2866fb2d0e3
Launch floating notifications from notification panel (long click)

 * 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

Conflicts:
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/ras_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Recents: Launch as Floating App

Ported from JB 4.3
Based on hybrid (Aaron) and Halo (Jesus) implementation

Signed-off-by: Alexis Rico <sferadev@gmail.com>
Change-Id: I84f4d3928af5c6ddd96a9a173a1c24e85ff606dd
Conflicts:
	packages/SystemUI/res/menu/recent_popup_menu.xml
	packages/SystemUI/res/values-ca/pa_strings.xml
	packages/SystemUI/res/values-es/pa_strings.xml
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Conflicts:
	packages/SystemUI/res/menu/recent_popup_menu.xml
	packages/SystemUI/res/values/ras_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Fix for launch app in floating mode from recents

Change-Id: I216b02a60cd46b7fef49e04fe090169c4703bcb6
Keep app when opening floating window from recents panel
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.

Original id from PA gerrit -> Change-Id: I8ca61b07ed89bae85eabd8db23f87b6f1f0b179f
Signed-off-by: Evan Anderson <evan@thelinuxman.us>

Change-Id: If38e65f61ba309d22306bf4b37c3c55630c006ed

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
[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

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