FW_Base - ReOrder Audio stuff [1/2]

Change-Id: I9fb3c647727bf9f9223e2e0caf701b04dfc97b16
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
Revert "Frameworks base - Add network stats to status bar [1/2]"

This reverts commit c491576d95913676f85d972d8e6f5587691b9f32.

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/res/values/cr_styles.xml

Change-Id: I027b99d63641c61295ee1f063ea8cb503bb9522d
Signed-off-by: Stefano Mura [STELIX PippoX3] <ssspinni@gmail.com>
Rebase to cleaner looking traffic indicator [1/2]

Credit/Thanks to htchoi1995 and liquid0624

- http://i.imgur.com/3NzbfGc.png

AICPfy

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/res/values/dimens_custom.xml
	packages/SystemUI/res/values/styles_custom.xml

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java

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

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/cr_dimens.xml
Themes: Only process themes that are applied during boot

Currently, the PackageManagerService will process all themes and
ensure their resources are compiled and available to the system.
This is highly inefficient and can bog the system down when booting.

This patch will only process the themes that are currently applied
durring boot and lets the ThemeService take care of queuing up the
others for processing.   This reduces boot time considerably,
especially when the user has many themes installed.

Change-Id: I9b6298f5fbd07d7e5a594e94214404e6267c7687
Signed-off-by: STELIX <ssspinni@gmail.com>
Themes: Let ThemeService handle all theme processing [1/3]

Only themes that are applied will be processed inside of the
PackageManagerService, all others will be sent off to the
ThemeService.

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

Change-Id: I5f2ec628e1d22a05accc6727efb0c1387455f82f

Conflicts:
	core/res/res/values/cr_strings.xml
Export missing internal resource as symbol

Change-Id: Ibfb472c25cf20d1683c1c05d18c9815135b52958
Fix for "volume buttons change two volume steps per click" bug

This bug happens on all devices since CM9 or CM10 times.

To reproduce:
1) disable Settings/Buttons/Playback control
2) start music playback
3) turn off display
4) click on the volume buttons

When "Playback control" is enabled, the volume changes on the button up
event of short clicks only. When it is disabled, it changes on both
button down and up events. This fix cleans up the code and makes the
volume change only on button down when "Playback control" is disabled.

JIRA: CYAN-3202
Change-Id: If97218e35a8204ef602155f22b7eaaa5e13fb93c
Broadcast an intent to mediascanner after executing screencap

PS2: Fix for spaces in file names

After doing screencap /sdcard/test.png in shell the screenshot is captured
but the gallery is not updated.
So we should broadcast the intent android.intent.action.MEDIA_SCANNER_SCAN_FILE
for the image to show up in gallery.

Change-Id: I8e384865082c717842d70d376d5828d74a2ad780
Signed-off-by: Umair Khan <omerjerk@gmail.com>
WallpaperCropper: respect max wallpaper width

Some devices with high resolution screen only support 2048px wide
wallpaper (used to be fixed in I5b25bd931db0b2610e260921f28b92d8b0966aa6)

Pre-KitKat this works as follows:

- Launcher calls WallpaperManager.suggestDesiredDimensions and we
  limit the maximum size in that function
- The wallpaper setting application calls WallpaperManager
  .getDesiredMinimumWidth and respects that size

However, after KitKat, it is all broken because WallpaperCropper
now calculate its own dimension and does respect the value set by
getDesiredMinimumWidth (and it calls suggestDesiredDimensions,
which is supposed to be reserved for Launchers!)

Attempting to restore wallpaper setting by:

- Having WallpaperCropper respect config_wallpaperMaxWidth
- Having CMWallpaper (which copy pasted code from WallpaperCropper)
  respect getDesiredMinimumWidth
- For third party applications, if they respect getDesiredMinimumWidth,
  then they will work, but if they don't (i.e. uses WallpaperCropper's
  code), then there's nothing we can do.

Change-Id: Ib7da12a1c70befbeef2f305593d3841acbc45243
AppWidget: Make widget update quickly

Can't display the Power control widget after power on DUT for
3 mins. Because of the  update intent is received after power
on DUT for 3 mins.

Set the intent to foregound

CRs-Fixed: 707605

Change-Id: I5418c84a7dc79466be7a30bb3672ea41976badb0
frameworks/base: Fix delay in sending AUDIO_BECOMING_NOISY intent

AUDIO_BECOMING_NOISY intent is sent as background intent which causes
delay in receiving pause event. This delay caused audio leak. By
marking the event as FLAG_RECEIVER_FOREGROUND, this intent is
received sooner by Application.

Change-Id: Ib978cf8322dcddbc01f59824f95fa7800f9c35af
CRs-Fixed: 652549
NotificationPanelView: check if file exists rather than if its null

the file will always be non null, which turns this statement to true
rather check if the file exists before using it, which makes more sense

Change-Id: Ied61406773ffcdb0d4fb63bf34ae21c8dff00918
Heads up master switch (1/2)

Create a global heads up switch to enable/disable the same.
The user still need to set each app in Settings -> Apps

Change-Id: I650e230d275247251435c5cfeb728e375e927045

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
FB: Heads Up background color && transparency [2/2]

    PS: manual rebase

    PS: fix my retardedness

    PS: fix heads up TRDS background resources

    PS: clear content holder background prior to setting TRDS
            drawable so that correct drawable for TRDS state
            is set

    PS: revert non-TRDS background to AOSP gray (default
            system notification background color)

    PS: clean up some unused code

    PS: add capability to set custom heads up text color
    Change-Id: I3942c0ce178491e3429e5ae7eb24b43ba07a1f40

Change-Id: I1f7c115cf72e647e3639b77c24ceb05aa75cb9a8

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

Conflicts:
	core/java/android/provider/Settings.java
Add missing TRDS background to HEADS UP
localgroups: fix null pointer access

Change-Id: I2a5805fc00903bc427e62a924b06e10a48d0ffe3
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Refactor