SystemUI: Materialize volume panel in/out animation

* Thanks to @David96 that had the original idea, material
  oriented, already during kitkat times.

Signed-off-by: BigBrother1984 <carlosavignano@aospa.co>
Change-Id: Ic79d404c4a0d5bc0a83d20cd4e0d7d5ad7b7c90f
ColorFade: Fix memory leak when screen turns on/off

See https://code.google.com/p/android/issues/detail?id=79729#c177

Signed-off-by: Andre Saddler <ayysir@aospal.com>
Change-Id: I88c2366c8a10b074b58169ee5fc05c12e8d05a9b
[ActivityManager] Fix NPE when start activity

Symptom:
NPE occurs in line 1184 (resultStack.sendActivityResultLocked)
because resultStack is null.

Root cause:
When starting activity with FLAG_ACTIVITY_FORWARD_RESULT flag,
the resultRecord could be updated, but the resultStack is not
updated as well. In that case, the resultStack is still be
null. The exception will occurs if the activity is not
granted to launch due to permission denied.

Solution:
Update resultStack when resultRecord updates.

Change-Id: I91634e4f713c2e8dbd1a71f358a8fd9beed83ec7
Avoid tearing down process groups twice.

The second removal always triggers a warning.

Change-Id: Ieafa8374dbffdaff0d576de004a688cae6f8ac18
Enable native tracking for RS contexts to improve GC behavior.

This should prevent apps from leaking RS contexts as easily.

bug 18579193

Change-Id: I2d943ce4443ce7cb90ebdd3dd37d338eda6df3a2
SystemUI: fix MediaProjection cast crash

Clicking on the "cast" icon of an app using the MediaProjection API will
crash as the code assume that it is a device.

java.lang.ClassCastException: android.media.projection.MediaProjectionInfo cannot be cast to android.media.MediaRouter$RouteInfo
	at com.android.systemui.statusbar.policy.CastControllerImpl.startCasting(CastControllerImpl.java:177)
	at com.android.systemui.qs.tiles.CastTile$CastDetailAdapter.onDetailItemClick(CastTile.java:237)
	at com.android.systemui.qs.QSDetailItems$1.onClick(QSDetailItems.java:177)
	at android.view.View.performClick(View.java:4756)
	at android.view.View$PerformClick.run(View.java:19749)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:135)
	at android.app.ActivityThread.main(ActivityThread.java:5221)
	at java.lang.reflect.Method.invoke(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:372)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

Change-Id: Icfdf745c03da7bd1bbb228e06005f55324c1b8fa
SystemUI: fix battery icon patch for MSim

Change-Id: Ia3437069de3faeb0cc922b756e4c1db85e2a2524
Battery text mode: fix MSim crash

Change-Id: Iff1e39ee2b1bb8118f310a0f30b9bcc6baace243
frameworks: add keyguard wallpaper functionality to WallpaperManager

Adapted for cm-12.

Change-Id: I0eb1b5578b705c2ade4c0772fa86e09478b9f73e
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	core/res/res/values/cm_strings.xml
FW_Base - XuiMod: Toast Animations [1/2]

Change-Id: Ic4d1b573b8ed5c657e8e9b226c28944d6a0895ec
Signed-off-by: STELIX <ssspinni@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/slim_symbols.xml
Return: Listanimation Views and Interpolator [1/2]

PatchSet:
    - optimize more:
    - call provider values only when needed and do not fire them permanently.
      so just do it if scroll state changed.
    - as well go out of the setAnimation method as soon as possible. We
      handle here methods which get called 10000 times during scrolling
      so we need to be as fast as possible.

PS:
- initialize the animation modes default to off just to be sure

PS:
- move state change out of OnScrollListener
- reduce the provider value call to only one call

AICPfy lp5.0:
Bring it to Lollipop
Settings menues don't animate and fuck me if I know how to fix it

Change-Id: I5e49d858318420e76101fa6334ff766bd9496c83

Conflicts:
	core/java/android/provider/Settings.java
FWB: Custom scrolling values 1/2

ported/modified from https://gerrit.omnirom.org/#/c/4251/
originally written by Yanuar Harry <ai.the.smarties.physics@gmail.com>

AICP:
PS2: fix build
PS3: Use default values as defaults

Change-Id: I7f23fe736507f836137c5d6dc0b5fd2ad4a95462

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/view/ViewConfiguration.java

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/view/ViewConfiguration.java