Fix systemui crash on boot

The process com.android.systemui would crash after phone booting with a
java.lang.NullPointerException when the signal status style is set to text

Change-Id: Ia7b58fa93b8591d0571b90a57a2fe0fe823b3f45
Fix ResourceNotFoundException when updating  applied theme

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.

SystemUI was crashing with a NPE while verifying this fix, so a NP check was added to SystemUI as well.

Change-Id: I00e32fc1535b4d279fcb37c35f868501ecc1dd19
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
Restore lazy loading of LoadedApk resources

This was broken in 8fff544ec349593cfa61ae2f5ec59419fff666b6. Since that change,
resources are always initialized in getPackageInfo(), even if they haven't been
loaded before (mResources == null).

It shouldn't be necessary in *any* case to preload the resources at this point.
Anything using the resources should call LoadedApk.getResources(), which will
initialize them just when needed. Setting mResources to null resets the cache
and will force a reload the next time the resources are requested.

Change-Id: I9bc9986297478e99752b1e2b9bd04dab3dcc9656
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
Merge pull request #19 from CarbonDev/kk

update