Themes: Only kill launchers if overlays or icons changed

There is no need to kill the launcher for every coponent changed.
The only ones that really concern us in regards to killing launchers
are MODIFIES_OVERLAYS and MODIFIES_ICONS

Change-Id: I3b32a20431f242f58c1708f72418322f0a5db44e
Automatic translation import

Change-Id: I17521692be355f1074f718641cd8c8a7da3a22b3
Revert "Lockscreen blur and blur radius (1/2)"

This reverts commit c2507d9206c3b372a82ebf4cb79af81f296f6006.

Change-Id: Id19ea3b8e5337028545bf3f2cd81410cea09b6ee
BlurManager

* Hello guys, this is my BlurManager implemented as a system service + internal API.
The usage is very simple. At the moment you can retrieve a blurred wallpaper, a blurred screenshot of the running activity or blur your custom bitmap.
I'm also working in another api to blur custom views.

To get a blurred screenshot you have to call the prepare() void.

* An interface void will be called once the bitmap is ready returning the blurred bitmap.

You can check my other upcoming commit for blurring recents panel to understand how it works but im sure you'll get it easyli.

This is a little gift for Sean :)

Change-Id: I1b01a287f9b40520bd11f5c74810d98f3d2d1415
Merge "Themes: Update provider with components that were applied" into kitkat3
Merge "Themes: Load correct common resources" into kitkat3
Merge "Revert "Add support for allow-permission extension."" into kitkat3
Themes: Update provider with components that were applied

There may be times when one or more components do not get applied
so we should remove them from the component map and then update
the provider after all changes have been made.

Change-Id: I75d2a674d84c6a0de3f0b613d1dfc50654c2d181
Themes: Load correct common resources

In order to support theming separate packages we need to make sure
we load that theme's common resources.  We were currently loading
the system wide theme's common resources which is incorrect for
package level theming.

Change-Id: Ie594458be9b6b3f4a25c56c9c5c9ba5bd8cf063a
Revert "Add support for allow-permission extension."

This is not currently in use and can be replaced by a better solution.

This reverts commit 33110a0b2f4cdfd2ee6911a479d1fbbcd14bc389.

Change-Id: I672381398c8d09275226a0ef4ead408e2ccbd040
Allow granting permissions based on signature in <allow-permission/>

This patch allows us to either specify a sharedUserId or a package
signature to use when granting the specific permission.

Change-Id: I8aed78d40316e0e94ac1bfefc7c4a3016a2a9a6b
Merge "Allow granting permissions based on signature in <allow-permission/>" into kitkat3
Themes: Build icon cache when applying icons

The theme service will schedule building of the icon cache when
an icon pack is applied.  This will allow the icon cache to be
populated immediately after icons are applied rather than build
it up as icons are requested.

Change-Id: I453eda5f6298ff79e22827c622a0eddcab9c721d
Revert "[1/2] Frameworks: Wakelock Blocker"

This reverts commit b1ccc178e1eaf7823c3d3f116bfd3ae79f341a87.

Change-Id: Icc4d843dffb733f9a32f05e04fe8d754c4ca7e60
Automatic translation import

Change-Id: I18e0d6c8efcc6a3ff8b4e516f10e1d7b091e427e
Fix translations

Change-Id: Icf55b9b050e4bd0ee64c8ac71227bd936c0a2054
Automatic translation import

Change-Id: I1a3541f7be70e22c709c837cfebf9ea1b5c9875e
Automatic translation import

Change-Id: Ib76bf32fc48c7085b988b9fb2a28cf6f93f5d87a
hwui: Fix a sporadic crash seen during CTS runs

 * It's possible (due to race conditions) that a patch might be
   scheduled for removal twice. Just print a warning and continue
   instead of asserting and crashing.

Change-Id: I42865f6717816a743cc49ba15b839e6c3b57ed83
Fix attribute resolution in theme lookup

[Fixes Known Issues]
1. (CM) Chrome beta crashing w/ Hexo applied and menu button is pressed.
2. (AOSP) TextAppearance - fontFamily attr is incorrect (looked up in wrong package!) when
    a string value is defined in a style, and that style is set as the app's theme.

[Terminology]
1) Theme:    is the standard android definition of a theme.
             e.g in your manifest you may set android:theme="@style/foo"
2) CM-Theme: will be a Cyanogen theme. e.g. "Hexo"

3) Block: Also called index. Can be considered the cookie or ID to lookup a package in the resources.
          When a CM-Theme is applied, block 0 is framework, block 1 is the app, and block 2 is the
          CM-Theme.

[Background]
When a value for an attribute has not been found, the last resort is to look at a theme's base value.
This is done by using theme->getAttribute(...) which will return the value. The value is
unresolved if its a reference type. The block value will also be returned.

Since the value may be a reference and therefore unresolved, a call is then made to
ResTable::resolveReference(..) to do the final resolution. As part of its input, resolveReference
takes a block as a starting point.

In the case where resolveReference(...) is asked to resolve something that is not a reference,
for example, a string type, then it will simply return the same value and block. *Important* The block
value is then saved for the next call to get an attribute value. So if this block value is wrong
it will remain incorrect.

Therefore if resolveReference is passed the wrong starting block with a string value, then the wrong
block will be returned.

[Example]
1. 0x0101009b (android:attr/textColorLink) is first attribute to be looked up.
2. textColorLink has a value of 0x01020123 which maps to theme id 0x01020111. The block for theme
is "2" so block is set to 2. The value for this attribute is put into the array.
3. 0x010103ac (android:attr/fontFamily) is the next attribute to be looked up.
4. fontFamily is found in the theme as type string. The value is 0x7b9 (1977) and newblock variable
   is set to 1 since this value is found in the app's string pool. The block variable still == 2.
5. resolveReference() is called with block=2. The function does nothing and returns block=2.
   The fontFamily thus is stored wtih value=1977 and a block value of "2" instead of "0".

Change-Id: I2b979911b1b8ffb79c4cf310ae60682c84c11fcb