Revert "Framework: QuickRecord Tile (1/2)"

This reverts commit 52f08bd1cdad4e63a0f95c3dfcb79c8425bfe2ac.

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

Change-Id: Iffbbb91513e2b26ef0201494ee8efe79917a3e52
Revert "SystemUI: Pimp-up QuickRecord Tile"

This reverts commit 7f6a17e99101db7c0c8e35856d8f1eac1b8129fe.
Revert "Framework: QuickRecord Tile (1/2)"

This reverts commit 12302b127ccea358ada41570c20f28ba0cf8334c.

Conflicts:
	core/res/res/drawable-xxhdpi/ic_shortcut_search.png
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/QuickRecordTile.java

Change-Id: Id621eada14631d4484cf9873336e7b29c13f1030
framework: Add sound recorder tile (1/2)

Add a sound recorder tile to quicksettings.

Change-Id: I23907ebeb884729c0e92f8b57a6cda10022ac24d
[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:
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
[1/3] Subtle Vibration when outgoing call is connected

Other parts of these patches are on packages/services/Telephony & packages/apps/InCallUI repos

Change-Id: I5b4ba3db4e5d0507058a6be53e5ee722a6bd72c6

Conflicts:
	core/java/android/provider/Settings.java
SystemUI: prevent NPE on clear recents double press

Pressing Clear all button twice fast or while the list
is clearing but not yet fully cleared causes sysui to crash due to
mRecentTaskDescriptions being null: (http://pastebin.com/2gRFvf8k)

Change-Id: I23d10edfd336041739fe80352ee01987e671dbd7
NotificationHelper: Create broadcast receiver for Peek app

Store showing state.

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationHelper.java

Change-Id: Ia3f995164df74c4dcebf54eb6e004d0b1b79943b
SystemUI: Extend swipe helper (Part1)

I was not happy with long press on notifications and recents
to open apps in floating mode. The long press duration kinda
breaks the UI interaction flow, which prevented me from
actually using floating windows. Therefore, I've created a
private modification, which enables floating mode for
notifications and recents by swiping to the left. This
greatly improves usability without strongly deviating from
stock UI experience, in strict accordance with PA's
philosophy.  Changes are surgically implemented to keep the
probability of merge conflicts rather low. The code was
successfully tested on mako, hammerhead, tilapia, and manta.
Let the team discuss and decide whether or not this is a
worthy extension to PA.

Changes are split into two commits.

- Extending SwipeHelper:
SwipeHelper can now distinguish between directions LEFT,
RIGHT, UP, DOWN and can fire an abstract trigger 'event'. A
trigger direction can be specified and when a swipe in this
direction occurs dismissable children will not be dismissed,
instead they will be snapped back.  Whenever a child is
swiped far or fast enough in that direction an event is
triggered and the onChildTriggerd() callback is issued. This
callback was added to the SwipeHelper.Callback interface and
therefore requires all its implementations to realize this
method, such as probably Hover, which is sadly not open
source (yet?).

Change-Id: Ida06195913f022463d29ca22092e81fb8993ad50
SystemUI: Swipe to float for notifications and recents (Part2)

I was not happy with long press on notifications and recents
to open apps in floating mode. The long press duration kinda
breaks the UI interaction flow, which prevented me from
actually using floating windows. Therefore, I've created a
private modification, which enables floating mode for
notifications and recents by swiping to the left. This
greatly improves usability without strongly deviating from
stock UI experience, in strict accordance with PA's
philosophy. Changes are surgically implemented to keep the
probability of merge conflicts rather low. The code was
successfully tested on mako, hammerhead, tilapia, and manta.
Let the team discuss and decide whether or not this is a
worthy extension to PA.

Changes are split into two commits.

- Swipe recents for floating window:
Recents ScrollViews set separate trigger directions on
SwipeHelper (LEFT for vertical and DOWN for horizontal).
Directions are chosen as the opposite of the 'natural'
swipe-to-dismiss direction performed by the clear-all
button. onChildTriggered() will open the app in floating
window mode. To confirm this behavior for horizontal and
vertical recents views, separate settings confirmation
dialogs are shown with appropriate PA-style graphics (Gimp
sources on request).

- Swipe status bar notification for floating window:
Analogous to recents, here the NotificationRowLayout sets
the trigger direction to LEFT. It also got its own
confirmation dialog together with new hint graphics. After a
child is triggered, the app is started in floating window
mode by performing a click causing the notification to
disappear (exactly as it would anyway, if the app would have
been opened in 'normal' full-screen mode).

Change-Id: Ib32e2c88033b1c143bd8dc8fa7394b002060d526

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values-de/pa_strings.xml
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
DocumentsUI: Handle NPE gracefully

Cherry-picked from OmniROM.

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

Change-Id: I8d50d71a9c91486dfc9e5da01538c6b5a626f054
DocumentsUI: Remove catch-all statements

This removes several "catch (Exception)" statements which violates the Android code
style guidelines and hides problems.

I left some catch-all statements in, as they seem to be intended like this (grep for
"catch (Exception").

I suggest we do not merge this before we are sure that we fixed any problems. One problem
is a crash when deleting items (I'm currently working to fix that).

PS 2: Add exception to log.
Change-Id: I483c320c7ee256acd993dd2a509c031fa5e3f09e