Revamp default thumbnail

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/Recents.java
AOSB RecentApp : Add HTC Reflection Effect

PS1: support multi resolutions , hdpi, xhdpi , hdpi

PS2: generte small thumbnail to save memory in low resolutions

PS3: disable reflection effect if enable custon recent (slim)

thanks for Marc Landis from AOKP for the idea from 2 years
i just saw it when it suggested by liquid0624 my friend!

Stack help too :
http://stackoverflow.com/questions/22111468/thumbnail-reflection-with-drawable-instead-of-bitmap

Signed-off-by: hany <hany.alsamman@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
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
============================================
AICP PS1: background back to black ;)
AICP PS2: attempt to get a working darkswitch implementation

To-Do:
maybe add the possibiltiy to change between black and white according to dark
switch position

* Change Clear-All drawable to something more recenty like

Change-Id: I2ecac931bad9f1f393e1d98a17c59b8015a3fc57

Conflicts:
	packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
	packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
Frameworks: SlimRecents: go more inline with AOSP and add menu + new googly shortcuts

This commit changes the longpress behaviour. Like on stock aosp longpress opens the menu with this options

1. App info (like stock)

2. Play Store link to the app

3. Amazon store link to the app

Note: the store links are only shown if the app has the info that it was installed by one of this
stores. So stock apps (installed by system) or sideloaded apps do not show this link.

As well some backup apps break this entry on restore lol.

As well a bit cleanup on here and there and remove the close panel call on cancelPreload. Not needed

PS
- disable debug

PS
- set correct style
- disable one default debug

Conflicts:
	packages/SystemUI/res/values/fusion_styles.xml

Signed-off-by: Dragon7780 <Dragon7780@hotmail.nl>
Frameworks: fix the random fc on pinch

Well logic error from me which can lead in an recycle bitmap fc due of a race
condition. Reason is simple it the animation needs for whatever reason longer then
the removing the tasks the view is probably still visible and recycle of the bitmap
results in a fc.

To fix it just remove the tasks after the animation is done and we definitly know
that no items are visble which are recycled.

Change-Id: I7878e02e6fb1887f8d11304550e083d107095a4a
Frameworks: go kitkat + style tweaks and follow googles color sheme

Googles color sheme on cards is

card: ffffff
aditional content: f5f5f5
background: e5e5e5

first two we did...background not. Follow the color sheme due it has a better contrast.

As well remove the non google rounded edges.

Allow drawing behin status and navigation bar if the bars are translucent

PS:
- due it is now a system window ensure that all other system windows are closed when opening recents.
PS
- minor tweaks
PS
- remove one unused flag
PS
- respect app system ui visibility status and reflect it for smoother experience
PS
- bring back TYPE_RECENT_OVERLAY window layouparams back to live. It was never documented
nor depreciated. Was used in the past for GB recents and is even updated till today although
nothing in the system is using it.

Make it fully functionall (it is basically just an extended TYPE_SYSTEM_DIALOG) and allow
this window type to extend its content behind navigation bar.

PS
- minor fix...init the systemUI flags for the view allready on preload to prevent positioning
of the listview.
PS
- draw always behind navigation bar as long it is not immersive mode or hide navigation bar mode
- add more margin to the delete icon for kill all

Change-Id: If38036dded961fcf0a6d8c2e7d2ba44a8e1dd08a

Conflicts:
	core/java/android/view/IWindowManager.aidl
	services/java/com/android/server/wm/WindowManagerService.java
PackageManager: Fix reconnection logic in Installer.

Change-Id: Id4b352647ed51aaf64bb85dff9030a25e295758f
Frameworks: Recents to SlimActions Shortcuts (1/2)

Change-Id: I8a0d7598ba7a7b2b5740d498d9ad08ec2938a385
SystemUI: Notification Reminder New Layout && Fixes

Set mCurrOrientation on init

Reimagine Notification Reminder:
	Set beneath normal header.
	No more need to guess size...
	Needed update since apparently
	many users have issues here.

Music Sleep Timer && Reminder:
	set time to start of minute,
	not where we are now.

Change-Id: I9a80cd8b7d4cc6205328f737a3d202eacd1b2dd4

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/res/values/fusion_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Signed-off-by: Dragon7780 <Dragon7780@hotmail.nl>
Frameworks: Smart PullDown to SlimActions (1/2)

PS2: Dependant on bug fixes

Change-Id: I8023933cb064429aef84e4a027645108e18d2940

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Fix null check for BaseObj.equals.

Change-Id: I4f060697db175cbf0b5617c1220db853bbe53f1f
Avoid duplication of AppWindowToken in created Task

When WindowManagerService creates a new Task, it passes atoken to the
Task constructor. In this case atoken is added to mAppTokens list by
the Task constructor and then it is added manually again by calling
newTask.mAppTokens.add(atoken). As a result, the same atoken is present
in mAppTokens list twice.

When another window token is added to the list, it may be placed in
beetwen duplicated tokens and corresponding window will be hidden from
the screen by corresponding duplicated windows.
From user perspective it means that some windows will not be displayed
on the screen.

The issue is fixed by avoid adding atoken to mAppTokens list manually
when it was added already in Task constructor.

Change-Id: I10628e68186160fffdde07beb7d84ab3cecb7051
Harden NsdManager against null-dereference crashes

Due to race conditions or programming errors, the NsdManager
can attempt to process an asynchronous status message (and issue
a callback to the listener) after the listener has already been
removed from the NsdManager state.  This causes dereferencing of
null objects, and a crash.

Split out the three async-queue message cases:  these are ones
in which message.arg2 does not hold an NsdManager array index
and the code should not interpret this field as if it were.

Add an explicit check for "null listener" (the array index in the
message has already been released), log a warning, and exit early.

Safeguard accesses to the "NSD service type" string from a (possibly
null) NsdServiceInfo object... return a constant "?" string rather
than crashing.

Bug: 9016259

Change-Id: I40aabdfc65d86fdd0eaac7a1e7e56e6ff69796cf
Validate objects are from the correct context.

Change-Id: I7d87b0e253b8d2e36d1aed790cfe3a7dd23e158f
Fix descriptor leak after accepting connections

After accepting a connection on a listening socket and
storing the resulting FileDescriptor into a newly created
LocalSocketImpl, the new impl's "descriptor was created
locally and should be closed normally" flag should be set.

(cherrypicked from 3e7305c6bf6062b5cb1e2ddcec6c6d30b4a8bc0d)

Bug: 11805817
Change-Id: I0a1a7c62ec3fbcf647a44a22110ddc778d14e5f4