[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.

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

Change-Id: I76a4f52a7cb97bbf6da42ac38ac5e3bad9e69672

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar_expanded.xml
	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
Framework: Quiet Hours System Sounds (1/2)

Change-Id: I52c79a9fec98b5c75f88fc644766e830d5f6148e

Conflicts:
	packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
HOVER: swipe right to dismiss only from hover anb left to dismiss from all (hover, status bar and notfication drawer)

- Minor change since all code was done by @kufikugel in Slim Head Up and the method was already changed by me to fit their code.
Again a BIG thanks to him!

Change-Id: I688970e2013ca899bb050c61d2f7cea299298cd9
QuickSettings : Register/unregister cast tile one time

Don't do these operations every time the parent is visible/invisible,
it causes jank.

Repro:

Turn on wifi on a network w/ chromecast
Swipe down quick settings panel really fast

Change-Id: I3dfcd3610abe96e1bfdab06ef3b876ccf5140ceb
Workaround to update PIE resources on theme changes without need to reboot or eneble/disable

- Here we dettach and attach PIE to simulate disable/enable action

Change-Id: I201178f35b8baafeb1608536e7e3b517662330e9

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
SlimActions: Attempt to fix preloads with PIE in slimroms recent panel

- Do all related with recent panel when "action.equals(ButtonsConstants.ACTION_RECENTS" in a attempt to fix sometimes blank slimroms recent panel in preloads using PIE. SlimActions.java dictates PIE key actions

Change-Id: Id2a917d6f1b627002f2649aac39714369dd533ed
HOVER: touch to hide (1/2)

- Allow users to configure touching outside to instant hide HOVER notifications

PS: This commit brings back the -> private static final int LONG_FADE_OUT_DELAY along with a new simple method public void startFiveSecHideCountdown(). While i was working on this feature i've noted a bad behavior in hover notification timeout implementation thats was if we just set, for example 15 seconds of timeout, the touch outside would read this as hide timeout in expanded hover notifications. 3 or 5 seconds are good but anything above that is too much. Back to normal with the new method fixing 5 seconds as the maximum

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/Hover.java

Change-Id: I55df8d73c2270c55e7eeea0c7c77bc98c761429d

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/Hover.java
Ensure to add Persistent Apps to LruProcess List on app restart

This change will ensure to add Persistent Apps to mLruProcesses
if not already present while restarting.Previously, on some
occasions, the process was not getting added to the list
resulting in SecurityException as this process was not found
in the mLruProcesses.

Change-Id: I26813a794e01aae316dffd3cf2bb38ab66ac69a9
NetworkManagementService: Change exception type thrown on IPv6

Changed the exception type thrown from IllegalStateException to
RemoteException whenever the IPv6 tethering rules fail to apply. The
IllegalStateException is not caught by the caller causing the JVM
to crash. By throwing RemoteException, the caller will catch and
print and error message instead of crashing.

CRs-Fixed: 662171
Change-Id: I92fadd43479a330f09bb20f699a4b9852123ab68
[View] Clear Hardware-Layers before system destroys HardwareRenderer​.

Symptom: Sometimes HardwareLayer display is corrupted.

Root Cause: In some cases, ViewRootImpl destroys HardwareRenderer​ without
clearing HardwareLayers in the view hirarchy. If the system trims memory fully
and kill the glContext at the same time, HardwareLayer may corrupt.

Solution: Clear Hardware-Layers before system destroys HardwareRenderer​.

Reproduce steps: Modify the cache's trim memory mechanism to make it easier to
trim fully, HardwareLayers implemented in app will easily be corrupted.
Modification of the cache is not required but make it easier to reproduce.

Change-Id: If57c802cdacf8dc37cbbcc199e74f9482834f981
[ActivityManager] Prevent coredump file may not complete for testing.

Sympton:
During testing, skip kill native crash process manually because it will continue to die by default.

Root Cause:
Large process may take some time to do coredump.In auto test, crash process will be killed immediately that results incomplete coredump file.

Solution:
If the tester (IActivityController) will handle app crash event,
Do not kill native crashed process if the rom is debuggable.

Change-Id: Ia360af147d694125d440e5ba2f958c4759a50494
Fix a bug that the RecentTask list of other’s may show up to non-primary users.

When switching to a newly created user, the user may face this bug when he opens the RecentTask screen.
A possible bug scenario is described as follows:
A user id of a removed user may be recycled when created a new user.
However, mRecentTasks is not correctly controlled so that old information may still remain and be possibly mapped to wrong user.
This patch prevents this bug by explicitly removing old information in mRecentTasks when removing existing user.

Change-Id: I1874dbd604598a5d740ae1e034981e21214c15c6
Signed-off-by: Eunae Kim <eunae.kim@lge.com>
Revert " Audio: SetForceUse config check in AudioService"

This reverts commit e219739622d165629cc19f98fc866b57c9905238.

Change-Id: Ieacf567a139039e54c449067f2a95e442d23b0ec