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: I8d61fe7294dcb67ee7d0d7de88d90d2051c310e6
Add android_system_label to symbols.xml

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

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

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

Screen is on but dispatcher is not enabled yet.

Change-Id: Ib98d595563ed3df5c7a1e6e4d5a4da83a721537c
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: Ib71df0a72c0a47a1f7231b02379dc951c1f93e52
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: I046279ca7ba851a283ee67ea19202890f7b3f343
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: I21a0f517cf087ea5aa8b8dd535e20b46e361a52b