Bluetooth: pause music player on A2dp service disconnect

When A2dp service disconnects as part of SSR, it marks a2dp state
as unavailable in Audio module but does not pause music player, as
a result when bluedroid stack restarts as part of sub system restart,
media player does not pause and music continues to play on device
speaker.
This change helps to pause the media player, in addition to marking
a2dp as unavailable, so that media player pauses when a2dp service
forcibly disconnects as part of sub system restart with A2dp in
connected state.

CRs-Fixed: 590462
Change-Id: I05ee5bcc808eb438156b64181d54e8ccabe1e186
Bluetooth: Add Total track number.

Add support to add total number of tracks in
Meta-data

Change-Id: I5b1287f791615adcd4f920fe5c7cae0c7c7b04ea
CRs-Fixed: 627869
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>
Fix issue in PhoneNumberUtils.compareLoosely

There is an issue with MMS delivery report where
even if the report was received the status is shown
as pending.

If the number of matched digits is greater than or
equal to MIN_MATCH and if one of the input strings
index has reached the lower limit,
PhoneNumberUtils.compareLoosely should return true.
Currently, it doesn't return true as it is expecting
the index to be < 0 which will not happen for the
following case where country code + number is without
"+" prefix or the number is without country code-

This patch fixes the issue by checking the index <= 0.

Change-Id: Ia16723f8d2b94ddf282ab6b0ab9892d34323902d
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 64234
Avoid strict mode warning when persisting sync state

We need to be sure that the write of the SyncManager state is complete
when broadcast of ACTION_SHUTDOWN is complete, so doing it
asynchronously is not an alternative.

This will remove the strict mode warning.

Change-Id: I01897bcc4bc0226cc3b49d4a6361d0572614c74c
MSimNetworkController: Set debug to false.

Change-Id: I292d6d4fd94ed4f86d6c39c230912e12c6124037
Keyguard: Move test app translations to the correct place

Google messed up again with translations.
This change is needed because it interferes with our translations
which happen to use same string names as the Keyguard test app.

Change-Id: I593ab5f004f09e1b33c5ba7ef3d1bb19ffc643b4
Merge remote-tracking branch 'upstream/android-4.4' into android-4.4
Small correction in power menu -> volume/mute selection to avoid graphic glitch

	modified:   core/res/res/drawable/ic_audio_vol.xml
	modified:   core/res/res/drawable/ic_audio_vol_mute.xml
	deleted:    core/res/res/layout/global_actions_silent_mode.xml
	modified:   policy/src/com/android/internal/policy/impl/GlobalActions.java