frameworks: Smooth background gradient

Credit to UBER for the images

Change-Id: I3655e9917610348100fa6cb5cede66a63ca82538
fix possible buffer overrun and memory leak

Use snprintf instead of sprintf and fclose() before return.

Change-Id: I3ed193464cc0dc90e9935ae19162667ad367628b
Fix last signal bar being a pixel to high.

Thanks Adam!

Change-Id: Ic22c91c0f381d64e0f6cbb8dd341e919b9762047
Prevent MediaScanner infinite loop with invalid path

including double slash  "/storage/sdcard0/xx//xxx/xxxx"

Change-Id: I112a70c88b5ec662482b79c3151310b9b9b52e40
Remove duplicate code in Editor.java

Eliminate duplicates by calling resumeBlink()/suspendBlink().

Change-Id: Ia19ae1bf1a5c981700aa20be67ed9d557e2bfc56
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix a variety of small publicly-reported bugs.

Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
MediaFocusControl: Do not grant audio focus if notification stream is 0

Previously audio focus would be granted regardless of notification volume, meaning
that if notifications are muted the media stream would still be dimished for focus.
By checking if STREAM_NOTIFICATION is 0 and if a notification stream is
requesting focus, this no longer an issue.

PS1: Initial implement
PS2: Better implement in MediaFocusControl
PS3: Whitespace

Change-Id: Ie10a64e58ce77174a3bbdeaa936646d40c24404f
Signed-off-by: Evan Anderson <evan1124@gmail.com>
MediaFocusControl: Fix audio focus logic

This fixes commit 007e15d5d.

Should have been checking for when the notification stream is 0, not non-zero.

Change-Id: Idde589064082875d13a342445bb2b9de6b41e872
Signed-off-by: Evan Anderson <evan1124@gmail.com>
Use white switch thumb activated drawables, not holo blu light.

* These changes swithes like wifi/bluetooth in settings to white.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:
	core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png
	core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png
	core/res/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png
	core/res/res/drawable-xxhdpi/switch_thumb_activated_holo_dark.9.png
Notification long press fix
modify config values in frameworks and systemUI

Change-Id: I32b884b032e0ddeb701103e361840559daea2a2b

Conflicts:
	core/res/res/values/config.xml
Fix no recent apps text color

Change-Id: Iae5948e224d06023962e43f905756017b42f0637

Conflicts:
	packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
Use boost hints on dexopt

Change-Id: I541f83af99fde6b3a34b16dcb4f3870979de90cc

Conflicts:
	services/java/com/android/server/pm/PackageManagerService.java
allow wallpaper cropper to read sdcard

Signed-off-by: ChampionSwimmer <championswimmer@aokp.co>
Fix: Correct possible null pointer when enabling see through lockscreen

PS2: Remove unused variable

Change-Id: I28884cb18964b273539261b8c0f72cedf2e60666
Frameworks: Lockscreen Blur

  If user selects "See through" under screen security,
  the locksceen background will now appear transparent
  with the content behind it blurred.

Modificaitons made to the orginal commit to support Hammerhead and Flo.
It seems full HD images causes rendering artifacts. To prevent this,
we scale the image size to something more manageable.

PS2: Reduce calls to System.Settngs
     Move bitmap scaling to DisplayPowerController
PS3: Fix styling
PS4: Fixes: 1. Black wallpaper after turning off see through
            2. Wallpaper flicker on unlock when blur is enabled
PS5: Ignore status bar and nav bar when capturing screenshots
PS6: 1. Remove content observer and unnecessary calls from viewManager
     2. Restructure the flow of setting the custom image
         * now closely follows setting album art as lockscreen image

Change-Id: Ie72bab697726af5e145bd0192980885ea7222ecd

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java
	services/java/com/android/server/power/DisplayPowerController.java
Add CPU boosting hooks

 * Boost CPU to max during scrolling
 * Inspired by a patch from CodeAuora and CyanogenMod
Halo: selectively add boost hints

boost only at the start of moving the halo for both reversed and regular
interactions.  Also boost for launching tasks.

-VanirAOSP

Change-Id: I910fa0b13205f80c84894f252ed3668f887d4fed

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/halo/Halo.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/halo/Halo.java
Notification Shade: add boost hints to onTouchEvent override

PS2: rebase/fix merge conflicts

-VanirAOSP

Change-Id: I5ab5d5a5cc351da5ea3e1dda0d1aba77913a6dd7

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
fb: TRDS some tweaks and fixes (1/2)

some smaller issues fixed and optimizations:

- fix twilightmode was wrong assigned to wrong value
- ligtsensor mode after first immediattely switch it does
  not allow for 5sec to switch again....after the 5sec it switches
  to current state if the sensor changed its state in this time.
  This prevends on the one hand on bad light conditions a permanent
  switch between dark/light as well it does not bring the system into
  troubles due of to much configuration changes at the same time
- get rid completly of the observe for the UI_THEME_MODE value and
  handle all over the UIModeManager
- adapt slimActions and settings to this new behaviour/method
- some cleanup and minor fixes

Change-Id: I4b2401bf7bef992ad3112ae5ccc852cd29b46bd0

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java