Themes: Add categories to theme change intent.

The following categories are available:

org.cyanogenmod.intent.category.MODS_HOMESCREEN
org.cyanogenmod.intent.category.MODS_LOCKSCREEN
org.cyanogenmod.intent.category.MODS_ICONS
org.cyanogenmod.intent.category.MODS_FONTS
org.cyanogenmod.intent.category.MODS_BOOTANIM
org.cyanogenmod.intent.category.MODS_NOTIFICATIONS
org.cyanogenmod.intent.category.MODS_ALARMS
org.cyanogenmod.intent.category.MODS_RINGTONES
org.cyanogenmod.intent.category.MODS_OVERLAYS

Change-Id: Ic444278d1d712cb6207bb10574a471524a8fed41
Keyguard: Avoid unneeded SIM dialog show() calls

This commit makes the progress dialog's show() get called only once each time the SIM unlock process is started.

It was reported that a phone can be frozen by entering the PIN code for the SIM card "too quickly". This leaves the user with a device on which the screen is filled with a non-cancellable dialog box saying that the SIM card is being unlocked. The logs inform that Keyguard experienced a success and no explicit errors could be seen there and only the dialog stayed around, all leading to believe the issue is with how the progress dialog is being showed and later hidden (or simply dismissed), in which case this show() call reduction might be benefitial.

Change-Id: I5519dd30afcb043e4fc6d08748b296c93bb70589
PEEK: Sensors improvements

- Bring some fixes to the algorithm thanks to @D4rKn3sSyS
- Cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I5c55fd5136f915d4f7c49006030ea019e3c02fb8
DocumentsUI: Remove catch-all statements

This removes several "catch (Exception)" statements which violates the Android code
style guidelines and hides problems.

I left some catch-all statements in, as they seem to be intended like this (grep for
"catch (Exception").

I suggest we do not merge this before we are sure that we fixed any problems. One problem
is a crash when deleting items (I'm currently working to fix that).

PS 2: Add exception to log.
Change-Id: I483c320c7ee256acd993dd2a509c031fa5e3f09e
DocumentsUI: Handle NPE gracefully

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-956

Change-Id: I8d50d71a9c91486dfc9e5da01538c6b5a626f054
frameworks/Documents: ES translations

Change-Id: I289b56f1b9ecdfe1d37633eb64b24eea5c927d9f
Fix Icon size in DocumentsUI

For XXHDPI devices if you go into Settings/Display and Notification light and select a custom value (application) you will see a GIANT icon.

Before - http://i.imgur.com/DRkua3T.png

After - http://i.imgur.com/f7xW4tY.png

Change-Id: Ia355bddc515906134c8b3b4e67d381aaacceec78
DocumentsUI: DE-Translation (add custom strings)

Change-Id: I3f632829baf221c92322d202f81d240919fdcb28
Replaced custom strings with Android defaults

PS2: also replaced menu_cut/copy/paste with strings from android.R.string

Change-Id: I7695b283faa66c6997fad372b31de2c678d222d0
HOVER: Theme Engine compatibilities and some resources tweaks

Use default notification dimens, avoid setting a custom one.
A bit of cleanup too.

Notifications:
Hardcode dimensions to android defaults. Avoid themes to change them,
Ribbons feature (present on CM based roms mostly) needs that.

Thanks to +John Xionidis to help me trick this out for full CM11 made themes :)

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Iae27bd4d25cba9248db249cb4e07bd88f5c97b02
Fix DocumentsUI FC

Change-Id: I2bfd4ea83db53ee83683a4754b49b15cc2abeaca
Themes: Get resources with an explicit theme attached.

Change-Id: If04e82a13250f520d70b58991586c8ce38f0ecb1
Don't log an error if we cannot open icon hash

The icons will end up being processed if we cannot access the hash
so let's just fail gracefully and silently.

Change-Id: I6368ee9bb47a9d52351fff22283ffac2de625b71
Themes: Set bounds on iconUpon

Change-Id: I90720b87ed6d5c30f342bd0e1c149e8a6e238d6e
tests: Hide new private APIs

Add missing @hide
This should have been done in If04e82a13250f520d70b58991586c8ce38f0ecb1 to avoid

/opt/jenkins/android/workspace/android/cm-11.0/out/target/common/obj/PACKAGING/public_api.txt:24102:
error 4: Added public method android.test.mock.MockPackageManager.getThemedResourcesForApplication
/opt/jenkins/android/workspace/android/cm-11.0/out/target/common/obj/PACKAGING/public_api.txt:24103:
error 4: Added public method android.test.mock.MockPackageManager.getThemedResourcesForApplication

Change-Id: Ib40279065c937b130322350c1dbdf5b0b43506e3
PackageManagerService: Prevent sending a SIGKILL while the device shutting down

This avoid potential NPE when cleanup theme related data

Change-Id: Ifc7b5f7a21af32464feb32012336cfbe4b7de2ff
Keyguard: Distinguish the TextView id of pinEntry

Both KeyguardSimPinView and KeyguardPinView have the same id of pinEntry
for their TextView of the password. When one of them is created in the
mSecurityViewContainer, the other one will get the wrong TextView of the
same id pinEntry.

Change the id pinEntry in KeyguardSimPinView to simPinEntry.

This fixes CYAN-3822,CYAN-3887

CRs-Fixed: 661955

Change-Id: Ia75d1d1f74530e6671d534000f9ce49cb1f814c4
Make sure slashes don't appear in the Quick Recording files

Change-Id: If246b1fa261fd37254d999f651231c9a2211f971
QuickRecord: Fix crash on other languages

With the new multiple recordings,
	some languages parse the DateFormat
	where it was being split by the regex
	and incompatible recording files were
	formed.  Use a java formatted regex
	to remove the possibility of slashes
	sneaking in for different languages

Change-Id: I754f589cd9c3646151a6e7e7de228b1c71c8c0ca
Framework changes for moving applications to external volume

* Add static functions for retrieving external apps volume information
* Determine external apps volume using the 'externalApps' attribute in
  storage_list.xml
* Allow moving applications to an external volume regardless if the
  internal storage is emulated or not
* Check if app moving is disabled

Thanks to Pierre-Hugues Husson for identifying an issue causing the
SD card state to be incorrect (ie. SD card appearing unmounted when a
USB drive is unplugged)

Change-Id: I5561c2cf3f558b729c89663852173a532994a47a