Fix Aapt so that duplicate package ID errors are not incorrectly reported.

Aapt falsely reports package ID conflicts unless base packages are included
in strictly ascending order based on their package IDs. This fix addresses
that issue while still detecting and reporting conflicts correctly when they
actually exist.

Change-Id: Ic8059b87f919641d086df88d1556f5fa0063739f
bless python versions newer than 2.6

Change-Id: Ic4bfb857586f1fd4aa9cfddf5984341a89b0cd4a
Signed-off-by: Li Li <lli5@nvidia.com>
Reviewed-on: http://git-master/r/347711
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Zu <pzu@nvidia.com>
Fix headset detection.

Original CM Commit below by Shelnutt2
Services.jar: Reworked computeNewHeadsetState function to
set state in a manor used in ics. This allows states such
as 129 and 130, which are used for 35MM_HEADSET to be
correctly registered as a new state.
NotificationManagerService: notifications with icon==0 are FINE WITH US

This warning reminds me of that saying about squeaky wheels... "the squeaky wheel gets PUNCHED IN THE HEAD"

Change-Id: I3e1a1e55ce3ce1f70c7b187a237625257bdbd591
Signed-off-by: pcarenza <pcarenza@gmail.com>
Remove derp from location manager service
Fix calculation of next DateChangedEvent time

Calendar.HOUR indicates the hour of the morning or afternoon. In the
morning this is no problem, but if this method is called after noon, it
will schedule the alarm for 12:00 the next day instead of 00:00.

Change-Id: Ibce239a6c7a41df85cf0c6ca3f45871a581eb7d9
PackageManager: Fix reconnection logic in Installer.

Change-Id: Id4b352647ed51aaf64bb85dff9030a25e295758f