Frameworks: Advanced low battery indicator options (1/2)

Based on a idea I saw on Liquid and from CR3C0 (thanks guys) which we
modified to an extended version

This commit introduces following new SlimBean modes to indicate low battery

     * 0 = show dialog + play sound (default)
     * 1 = fire notification + play sound
     * 2 = show dialog only
     * 3 = fire notification only
     * 4 = play sound only
     * 5 = none

Due that notification is a unique SlimBean feature some words on it. Notification
behaviour is the same as Pop-up. User can dismiss it manually or it is
dismissed automatically if charger is connected, click on notification opens
PowerUsageSummary. Also you get a status bar ticker message about the notification
and notification is always on first place of list. And last if vibration is enabled
notification vibrates.

Patchsets:
 - codestyle corrections

Patchst
 - add PowerUsageSummary intent

cheers

Change-Id: I2097afad8a090d2557a1e545cf978c87ca77d6c1
frameworks/base: Fix the random UI corruption

On low memory device, when a view goes to background. Its HW layer cache
will be destroyed to release memory. There is a very rare case that the
hardware render is not valid when destroy the layer, so the layer is not
destroyed and reused when the view comes to foreground. But the GL
context has changed, so the view is not rendered correctly due to its
HW layer cache. To fix this issue, destroy the layer in a safelyRun. Make
sure the layer is destroyed correctly.

Change-Id: I1c714e1d53db7353d5169e874a7cd0f527c3f67b
CRs-Fixed: 623239
frameworks/base: Fix change propagating issue

destroyLayer() function has been modified in kk. It is not correct
to propagate the UI corruption fix from jb to kk without considering
the new changes made in kk. This change is to make it align with
the new code in kk.

Change-Id: I34d11b230b9390fe8a989ab6f9c7d3a48d586205
Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::isTrustedOverlay()

This fixes a bug where a View with filterTouchesWhenObscured will have
all touches filtered when in magnification accessibility mode. This is
due to magnification being a separate Window over top of the running
Activity. The method onFilterTouchEventForSecurity in View will then
always return false when filterTouchesWhenObscured is enabled on the
View. By adding the magnification Window to the list of Trusted Overlays
we can ensure that touches will work properly with this property enabled.

Change-Id: I07706588a625682d05da5cb19f401139eb08a54c
Signed-off-by: houst0nn <houstonn@gmail.com>
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
Never load launcher on long press recents

Related: AOSPA-279

Change-Id: I7860d84c4eb36fe0f592dfc4d5b2769040abf182
Merge "Recents: Launch as Floating App" into kitkat
Merge "frameworks/base: Fix the random UI corruption" into kitkat
Merge "frameworks/base: Fix change propagating issue" into kitkat
Fix for launch app in floating mode from recents

Change-Id: I216b02a60cd46b7fef49e04fe090169c4703bcb6
Align text labels in all un-align tiles

Change-Id: I1c7830978f1eb3fb1cb6520d42b2beca846024ac
Merge "Frameworks: Advanced low battery indicator options (1/2)" into kitkat
Merge "Fix for launch app in floating mode from recents" into kitkat
SystemUI: Update circle battery UI to be in line with CM

Paranoid Android circle battery icon was too thin and had the wrong shade of white. 

Fixes: AOSPA-179, community request 

Fixed color to match other battery icons

PS2: Fixed spacing

Change-Id: I084bbacefb37fdf64368f80baa95d79e2bd8e2bc
Merge "SystemUI: Update circle battery UI to be in line with CM" into kitkat
Merge "Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::isTrustedOverlay()" into kitkat
Merge "Align text labels in all un-align tiles" into kitkat
Merge remote-tracking branch 'aospa/kitkat' into kitkat