Toggles: recreate toggles on theme change

AICP:
PS2: Update to PS2

Change-Id: If6ab6d345fc6ad8521430eb3bc59ea98fdb62a0a
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Toggle rewrite: wifi and signal

Also add activity indicators to signal and wifi tiles

PS3: Try to make wifi data indicators works, but no luck
PS4: Final fix for wifi data indicators

Change-Id: I6762f6530a2b9751d74dad9b806dd7e7a6682cf7
Fix FragmentTransaction replace() behavior

This is from AOSP Gerrit Review, was just Pushed, so not yet merged.
It is a definate problem though:
case OP_REPLACE should not remove only every other fragment.
It needs to be fixed. So here it is.
-----------------------------------

According to FragmentTransaction's reference, replace()
should be equivalent to remove()'ing every fragment in
a given container and then adding the specified fragment
to replace those that were removed.

Commit ee76efb74b5886f98cdfebfbefe9b69224e016fb broke
this intended behavior in the framework.

This patch makes it so that the removal loop doesn't
end prematurely. It also fixes an issue where the
replace operation would remove fragments regardless
of their container after encountering the first fragment
with a matching container ID.

Relevant issues:
http://b.android.com/43265
http://b.android.com/52112
http://b.android.com/53393
http://b.android.com/68856
http://b.android.com/70803

Change-Id: Ica4691746ab8979ed974a998e85324e4feacc5e3
Signed-off-by: Eddie Ringle <eddie.ringle@gmail.com>
screenrecord: update notification

Update show/hide pointer button for actual state

Change-Id: I02090f05b06896248483f3f9ff2eb22924a22476
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Revert "Fix build for app specific themes"

This reverts commit c5b42a28d591d8ee4cd2464b816abb289cd1fa36.

Change-Id: If3897699e482b0f147a952d9defd1107c681b1a6
Revert "Modify config to support app specific themes [1/4]"

This reverts commit ab8ada3a94c70dbf7401d7804b69b10f8a4c008b.

Change-Id: I6efb4c8c616fc70ed7a5a332ec4ed5c10b68ce2a
Modify config to support app specific themes [1/4]

Summary of Changes
1. The configuration now supports each app to have their own theme.
Each theme can include icons, styles (ie overlays) and font.

2. The theme config is serialized into a json string and stored
in secure settings.  This entry consolidates what was previously 3 separate
keys (style, icon, font) into a single field.

3. 'CustomTheme' was renamed to 'ThemeConfiguration'.

Note: This commit is for the configuration. Additional work needs to be done to
the framework and UI to support app specific themes.

Change-Id: I6f72f542829578201c57c54786456486f6a6e2e3
Revert " Audio: SetForceUse config check in AudioService"

This reverts commit 0af88afe6dc16760b57afa74ca42e40fbe6ff9cf.

- During playback over BT using the Google Play Music app,
  if BT is disconnected through the app and playback is resumed,
  it continues over BT and not the speaker.
- The original commit forces playback to continue over BT
  although it is disconnected.
- Reverting the commit fixes this issue and the issue
  addressed by the commit is also not observed after reversion.

CRs-Fixed: 679301
Change-Id: Ic4d0f13615c696a12401f7a8a58651b88f31e99b
Fix ResourceNotFoundException when updating  applied theme
(ThemeService.java only)

If the user has a theme applied and there is an update to that theme,
then the themed apps will crash. This is because the theme's APK path changes,
but the apps do not update their resources. Apps were not updating their resources
because updateConfiguration() determined that the config (which only has pkgName) hasn't changed.
The problem is fixed by first applying the default theme config and then re-applying the
updated theme.

Change-Id: I565d7105bc29d3aedb91ae9f2679720664456ba7
PS1: AICP'fied by removing quicksettings
PS2: Update commit message to clearly indicate the difference from original commit.
Bring RingtoneManager to CM code

Change-Id: I937a1ff5a1143e309f472b2cd4268a3299c0161b
FWB: HeadsUp timeout (1/2)

Destilled from SlimRom

Change-Id: Ie1ad1db9de625e24369330797d6d49d637b01958
IconPackHelper: Respect the original size of bitmap icons

When use icon packs on low-resolution devices, for example, my HDPI
phone, it seems that using the size returned by
getLauncherLargeIconSize() will cause a blurness on
some icons that are not included in the icon pack because of the compose
function.

This patch respects the original size of the icon if the icon is an
instance of BitmapDrawable but use the size returned by
getLauncherLargeIconSize() if the icon is an instance of PaintDrawable.
This will remove icon blurness on low-resolution devices.

Change-Id: Ifcb39020d934a9c7cb409e1206a179d64f99aa37
Respect DPM when deciding whether keyguard is disabled by profile.

Change-Id: I2fd50e1edd517956a59770a2ecd754cea0003c1c
Merge "IconPackHelper: Respect the original size of bitmap icons" into kitkat
Merge "Respect DPM when deciding whether keyguard is disabled by profile." into kitkat
AudioService: Show safe volume panel for non-interactive volume adjustments

If safe volume is active, apps calling mp.setVolume() to adjust the
headset to a value higher than the threshold will have the operation
fail silently because no volume dialog is active to pop up the
"do you wish to override" question.
This is particularly bad for peripherals that use the audio jack
(Square readers, Jawbone bands), since they usually require levels
close to maximum for proper communication and the app isn't prepared
to deal with a silent rejection of the requested volume.

Change-Id: I2047d199506106a87841b8b680007c5ab45b527b
Themes: Support applying components from multiple themes [1/3]

The current implementation assumes the components being passed
into the ThemeService belong to the same theme.  This patch uses
a Map instead of a List to pass in a mapping of components to
package names, allowing us to apply several components from
different themes.

Requesting a theme change now takes a Map<String, String> which
maps components to the theme package name they will be applied
from.
Example:
    Map<String, String> componentMap = new HashMap<String,String>();
    componentMap.add(ThemesColumns.MODIFIES_ICONS, "com.mytheme.blue");
    componentMap.add(ThemesColumns.MODIFIES_OVERLAYS, "com.mytheme.red");

    ThemeManager tm = (ThemeManager) contex.getSystemService(Context.THEME_SERVICE);
    tm.requestThemeChange(componentMap);

Change-Id: I13fa17eabecb824884fe522d5dc1822a4d7c55f4
Merge "AudioService: Show safe volume panel for non-interactive volume adjustments" into kitkat
Merge "Themes: Support applying components from multiple themes [1/3]" into kitkat
settingsprovider: set default values for some power menu options

Change-Id: I63989725f1d4c8baaab19d79cc3f48ac51ce029d
Signed-off-by: Arnav Gupta <championswimmer@aokp.co>