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
Themes: Set bounds on iconUpon

Change-Id: I90720b87ed6d5c30f342bd0e1c149e8a6e238d6e
Fix icon support for secondary users.

This fixes the problem when switching to a secondary user and
icons are currently applied.  Prior to this patch the secondary
user would see droids as their icons and apps would FC at start.

Change-Id: Icd4275eae5868612bf2a81b375ac4d0779a61395
Don't create idmap if app doesn't have resources.arsc

Some apps do not have a restable but some legacy themes
try to theme these apps anyways. In this case we skip
the idmap creation process.

Change-Id: I8bc60984299791733d4fe8c9bbcaa75eca6d736b
Add EventLog event for logging of attempts to call java.lang.Object.getClass

Bug: 13694467
Change-Id: I886c6ffb3a008d0cf701c1adc16c607cbf7dce39
Option to disable fullscreen keyboard 1/2

PS3: Move to AOKP Setings and remove system profiles derp that shouldn't even be there

Change-Id: I285f1156cd729e4e3107d5ce71cdd6685e22b9ff
Remove DEFAULT_THEME_APPLIED_ON_FIRST_BOOT

doApplyDefaultTheme should be able to apply the default theme, if
one exists, whenever applyDefaultTheme() is called.

Change-Id: Ia50b4089d122855a4ddde91a02eef33ed3f9eaf4
Add status bar and navigation bar to ThemesContract

Change-Id: I8048c735d7bbbfdb86ee5923b95bece6b4252bf7
Add previews to the themes contract.

Change-Id: I607a6eda1c63a701516d2bc78ca6b705841fbdf7
Merge tag 'android-4.4.4_r1' into HEAD

Android 4.4.4 Release 1

# gpg: Signature made Thu 19 Jun 2014 07:48:21 PM CEST using DSA key ID 9AB10E78
# gpg: Can't check signature: public key not found
WallpaperCropper: include wallpapers from themes!

Theme all the things!!!!!!!!!

Change-Id: Ie9d5d4dfe6533442188e38fa0b11742368246e37
Signed-off-by: Roman Birg <roman@cyngn.com>
Fix PackageManagerService WTF in systemReady()

This resolves the following error:
F/SystemServer(31979): BOOT FAILURE making Package Manager Service ready
F/SystemServer(31979): java.lang.SecurityException: Unable to find app for caller android.app.ActivityThread$ApplicationThread@42171630 (pid=31979) when registering receiver android.app.LoadedApk$ReceiverDispatcher$InnerReceiver@420d1130
F/SystemServer(31979):  at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:13157)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1506)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverAsUser(ContextImpl.java:1481)
F/SystemServer(31979):  at com.android.internal.content.PackageMonitor.register(PackageMonitor.java:84)
F/SystemServer(31979):  at com.android.server.pm.UserManagerService.systemReady(UserManagerService.java:237)
F/SystemServer(31979):  at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:11305)
F/SystemServer(31979):  at com.android.server.ServerThread.initAndLoop(SystemServer.java:1022)
F/SystemServer(31979):  at com.android.server.SystemServer.main(SystemServer.java:1372)
F/SystemServer(31979):  at java.lang.reflect.Method.invokeNative(Native Method)
F/SystemServer(31979):  at java.lang.reflect.Method.invoke(Method.java:515)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
F/SystemServer(31979):  at dalvik.system.NativeStart.main(Native Method)

TODO: Revisit this in the future when Google updates AOSP for multiple
system contexts.

Change-Id: I74be7a7a3ba1ede55a8ccae7c86e7650b27f435e
PackageManager: Fix logic around upgrading text display

* This code has all threads writing into the integer keeping track of
  the number of packages at once.
* Make this integer an atomic one, preventing all threads from racing
  when updating it.

Change-Id: I727306f8ab20edb7ec2a955ca20e6de0146c7737
Themes: Theme immersive mode cling.

Change-Id: I5521b93f69e859c40cfd62eb4a367562200074e9
base: don't show global actions if shutdown sequence was started

Change-Id: Icd77aa7529faf438dcc80e45434826465a11aab8
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Theme IME switcher alert dialog

Change-Id: I5344e9ddbacb1520080532d9cc1a7a5f5428e131
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Heads Up Notifications [1/2]

HeadsUp: Clean up.
Change-Id: I98f445e7a4c92a34a3d9f63e14135e92416875ff

Get this going for AOKP
Signed-off-by: task650 <task650@gmail.com>

Change-Id: I79620706ae6ec0adceb8fb1d20726c3ab5182763
Fix Location Toggle

When Device only/Off is chosen it will continue to cycle through whatever was previously selected. Also doesn't let you turn off location. Lets fix that.

Change-Id: I97a021df62f584873d675668796437dea54c2d75
Themes: Use INSTALL_LOCATION_INTERNAL_ONLY for legacy icon packs

If an icon pack is currently applied and is installed using forward
locking, the system will crash when the pack is updated.  Several
applications can have the pack attached to their resources and this
causes the system to crash because it cannot unmount the asec container
to finish the post install process.  Installing these packs to internal
storage without forward locking alleviates this issue.

This is done with theme packs as well, including legacy themes.

Change-Id: I155fc0bd671f3f9baaf2565d1c4d654a0a5348dc