HALO: update halo resources on status bar recreation.

- This commit update the state of halo exoanded status bar icon on theme changes

Change-Id: I9775d9e41fc8df452a0e8db6807a8dd099d22868
Return system theme when SecurityException is caught.

Isolated processes cannot access content resolvers so a SecurityException
will be thrown when calling getBootTheme.  This catches that
exception and returns sSystemTheme.

Change-Id: If4077adef4c657b80ba2c52a6610126dabe4ffdf
PackageManager: Fix concurrent access to shared state

Stop multiple threads from all calling add on the same HashMap.

Cleanup the use of a boolean flag by removing concurrent writes
to it.

Change-Id: Ib49345ebdbcfb68353c9aa3e461594ae5702bee0
Add android_system_label to symbols.xml

Signed-off-by: Peter Carenza <pcarenza@gmail.com>

Conflicts:
	core/res/res/values/symbols.xml

Change-Id: I5cb274b9c5f205778398fd9faa68701d3cf8d9c5
resume: fix recents showing up when waking the device with the home button

Screen is on but dispatcher is not enabled yet.

Change-Id: I16e487ef5da7dee76c71b9c6b1106b94e6b05e39
Fix problem with BootAnimation exit

After the completion of each animation part, the boot animation must
sleep for the number of frames specified in part.pause. If this is
done in a single sleep statement, it is possible that the boot animation
will continue to display long after surface flinger has finished booting.

To address that, the pause between parts is done in a loop and on each
iteration, the property that surface flinger sets to indicate that animation
should exit is checked.  This minimizes, but doesn't remove, the likelihood
that the bootanimation is visible when the UI comes up.

Change-Id: I1367f961daed716db72c87f196fe38f6de209725
Signed-off-by: Russell Webb <russell.webb@intel.com>
[ActivityManager]: Update home process when home activity resumed

Symptom:
  When switch between two home activities, the home process might not be updated to the correct one. In that case, the home activity might be killed easily.

Root Cause:
  The home process is updated only when a home activity is newly created or being restarted. ActivityManager did not update the home process when simply resume a home activity.

Solution:
  Update home process when home activity resumed

Reproduce Steps:
  1. Install a launcher application, such as Apex Launcher
  2. Press home key to change to Apex Launcher by "Just once" option
  3. Press home key to switch back to original home activity by "Just once" option.
     (The home process is still the Apex Launcher's process because ActivityManager does not update the home process when resuming the original home activity.)

Change-Id: I9d3ce6761a2d82d56ff9ff85f00ae74ab3f0cd29
Improve how battery stats collects network stats.

This optimizes the path for battery stats to collect
per-uid network usage.  It now collects wifi and mobile
usage separately, with a path that allows it to recycle
all data structures and filter out stats it isn't
interested in before they come back to java.

This is setting us up for the actual goal, to collect
mobile stats independently each time the mobile radio
goes down, allowing us to distribute mobile radio usage
across uids based on the number of packets they transferred
during a session.

(cherry pick from commit d0c5b9abed60b7bc056d026bf0f2b2235410fb70)

Change-Id: I52e17229ca3893536aebbc3b0cbda7a320c67877
Merge changes I52e17229,I9d3ce676,I1367f961,I16e487ef,I5cb274b9, ... into kitkat

* changes:
  Improve how battery stats collects network stats.
  [ActivityManager]: Update home process when home activity resumed
  Fix problem with BootAnimation exit
  resume: fix recents showing up when waking the device with the home button
  Add android_system_label to symbols.xml
  PackageManager: Fix concurrent access to shared state
  Return system theme when SecurityException is caught.
  HALO: update halo resources on status bar recreation.