[Navigation bar] Allow "right to left" gesture to launch search panel

Symptom: "Bottom to up" gesture can launch search panel in portrait, but "right to left" gesture CANNOT in landscape.
Root Cause: Not handled.
Solution: Set swapXY to handle this in landscape case.

Change-Id: I1793280b3656af6912e6b4583b08e80a0a38e44a
Fix graphics corruption caused by HWUI caches

Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix AOSP build - DO NOT MERGE

Change-Id: I42b420c2ce89ce364a2809b28b827964e6923fa1
SystemUI: handle contact not found and close inputstream

If the favorite contact is deleted, SystemUI would crash trying
to get the information for it.

Additionally create the BitmapDrawable directly from the inputstream
and close it afterwards.

Change-Id: Ic83df9adcc3e3a4c8ea493811838755dc69c1931
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Fix the issue that the top of fullscreen dialog is clipped away

The visibility of status bar comes from the top fullscreen window,
not from the focused window.
That has to be taken into account during the calculation of the
decor rect. You can use mTopIsFullscreen for this purpose.

Change-Id: I6159eb2ee389885cf5ab507157f9451841364d2f
Merge pull request #11 from VlikeBanana/28.02

28.02
[1/2] Base: Speed up booting on multicore devices

- Add multithreading support to Installer/installd
- Parallelize package scanning
- Parallelize boot dexopt

Change-Id: Ia6b815bde0e5cdf996fdfdec3ba228bcde9e4e0b

Conflicts:
	services/java/com/android/server/pm/PackageManagerService.java
Merge pull request #12 from VlikeBanana/test

[1/2] Base: Speed up booting on multicore devices
Lockscreen Notifications [1/2]

My try on making notifications easily accessable from lockscreen.
Credits to ChameleonOS, I got the notification listener permission and some small other stuff from their ActiveDisplay implementation.

Lockscreen Notifications allow you to manage all your notifications directly on the lockscreen.

Features:
- Pocket mode turn screen on when phone is pulled out of pocket and turn it off when phone gets back in pocket
- Hide low priority notifications
- Hide non-clearable notifications
- Allow dismissing even non-clearable notifications from lockscreen
- Just turn screen on when there's currently a notification pending
- Toggle between expanded and normal notification view by longpressing
- Wake on new notification
- Configure notification count displayed at once
- Privacy Mode: disable showing notification content.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button

This should still be considered as beta, even if it seems to work very well for me.

Overlay setting:
dynamic width is disabled by default, to enable it for a specific device, add
<bool name="config_lnDynamicWidth">true</bool>
to yourdevicetree/overlay/frameworks/base/packages/Keyguard/res/values/config.xml

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Signed-off-by: kecinzer <kecinzer@gmail.com>
Animate Recents on High-End devices

This adds back the translucent background and animations
on high-end devices with more than sufficient RAM, so that
it does not feel so weird when launching recents screen.

Change-Id: I32d6b359ed374126827af03ecf4854ab2b949920
Merge pull request #13 from VlikeBanana/kt

Add LN and Animate Recents
Revert "[1/2] Base: Speed up booting on multicore devices"

This reverts commit 06fc9fba131efaf4d367d828d958c62c220821b7.
[1/2] Speed up booting on multicore devices.

1. Add multithreading support to Installer/installd.
2. Parallelize package scanning.
3. Parallelize boot dexopt.

Change-Id: Id42b2bf4a737f93f9ecd9b5819344adbb735f0fb
Merge pull request #14 from VlikeBanana/kf

Fix
Revert "Lockscreen Notifications [1/2]"

This reverts commit 30549cc6d044f0f564154c51ee6375fa576ade20.
Lockscreen Notifications [1/2]

My try on making notifications easily accessable from lockscreen.
Credits to ChameleonOS, I got the notification listener permission and some small other stuff from their ActiveDisplay implementation.

Lockscreen Notifications allow you to manage all your notifications directly on the lockscreen.

Features:
- Pocket mode turn screen on when phone is pulled out of pocket and turn it off when phone gets back in pocket
- Hide low priority notifications
- Hide non-clearable notifications
- Allow dismissing even non-clearable notifications from lockscreen
- Just turn screen on when there's currently a notification pending
- Toggle between expanded and normal notification view by longpressing
- Wake on new notification
- Configure notification count displayed at once
- Privacy Mode: disable showing notification content.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button

This should still be considered as beta, even if it seems to work very well for me.

Overlay setting:
dynamic width is disabled by default, to enable it for a specific device, add
<bool name="config_lnDynamicWidth">true</bool>
to yourdevicetree/overlay/frameworks/base/packages/Keyguard/res/values/config.xml

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Signed-off-by: kecinzer <kecinzer@gmail.com>
Recents: Google Recents

Featuring:

* Mr. Jingles - when you fully wiped everything off from recents, you'll have mr. jingles jiggling for you!
* More Google Now look alike

Changelog:

PS1: Inital Animation Release, drawables kanged from Google+ http://www.youtube.com/watch?v=Iff1yGtvooo
PS2: More improvements, oneshot=true, so it won't loop
PS3: Make it Google style, WHITE! (I may need user's feedback, something i feel the hate beyond us.) http://www.youtube.com/watch?v=4cE75HbPO-Q
PS4: Lighter white transparency at the background, used lighter gray context
PS5: Clear button, colored
PS12: Fix landscape layout

To-Do:

* Change Clear-All drawable to something more recenty like

Change-Id: I2207a0574a3c48aaf32b04f619be0f9242c350ab
Signed-off-by: pcarenza <pcarenza@gmail.com>

Conflicts:
	packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
	packages/SystemUI/res/layout/status_bar_recent_panel.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Frameworks: Slims ElectronBeam get some love (1/2)

Features:
- You can select different crt off animation modes if device overlay does not disable it at all
- disabled
- always horizontal (stock behaviour)
- always vertical (screen collapse from left and right to the middle)
- orientation dependent (means portrait = horizontal animation, landscape = vertical animation)
- some minor fixes/code style improvements to 4.3 implementation

Change-Id: I02543a242f8f570438f2ab97a19b6ffe1b4dba1c

Conflicts:
	services/java/com/android/server/power/ElectronBeam.java
Merge pull request #15 from VanillaUnicorn/slim

Frameworks: Slims ElectronBeam get some love (1/2)
Merge branch 'backup' of https://github.com/VanillaUnicorn/frameworks_base into backup