Revert "Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty."

This reverts commit 4567729c2ab96d7a14a4e220288cc3e4209c23c1.

Change-Id: I5a67441ef805010e2ae5c676dcba86a4c7ee1048
Fix broken XML parsing idiom.

Code that expected a single top level element in an XML file
was doing something like :

while (type != START_TAG) { next(); }

This would loop forever when the XML being parsed was empty,
where each call to XmlPullParser.next() would return END_DOCUMENT.

bug: https://code.google.com/p/android/issues/detail?id=64173
Change-Id: I7543203e976a8999ae471a6c2d629249a87011bb
p2p: Display P2P peer MAC address if device name is empty.

Display MAC address of a P2P peer in an invitation prompt
message on receiving invitation request from the P2P peer
with empty device name.

Change-Id: Icabeb91d666437746eb5a733ec582849eb7295a5
CRs-Fixed: 506109
Fix hardware home key behavior on wake-up

Change-Id: Ib489e4b8bb1d10591afc96c680c7865d61c959a0
Turn off carrier provisioning by default

Whether or not to use carrier provisioning is a setting hidden to the
end user that is currently not set. Unfortunately, on some carriers that
may result in it being set to yes, or effectively set to yes, without
other accompanying changes that must occur, such as setting a tethering
apn and possibly having a carrier provisioning app, resulting in hitting
a paywall when a tethering plan exists, or, worse having nothing happen
at all when you try to tether since the data doesn't have an apn set.

PS2: Rebased

Change-Id: I3b5b3cc86e3325302411f46e3fd5f7a7c1b9f57e

Change-Id: I3b5b3cc86e3325302411f46e3fd5f7a7c1b9f57e
base: Check for homeAsUp status when collapse actionbar widget

mHomeLayout should be visible if one of DISPLAY_SHOW_HOME or DISPLAY_HOME_AS_UP are set.
collapseItemActionView only checks for DISPLAY_SHOW_HOME, so applications that only uses
DISPLAY_HOME_AS_UP and uses an expandable/collapsible widget (like SearchView) doesn't
properly restore the home layout.
One sample of this behaviour is the DeskClock app. The CitiesActivity doesn't show the homeasup
indicator after collapse the searchview.

aosp change-id: https://android-review.googlesource.com/#/c/71093/

Change-Id: I2f225138771da6bd6b2a468ad616b90c2c0a9d35
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
XmlUtils#readThisMapXml should handle null keys.

Both readThisValueXml & writeThisValueXml have been
implemented to handle values with "null" names.

Change readThisMapXml to allow such names as well, and
map them to the null key in the resulting HashMap.
readThisListXml and readThisSetXml already support
null names.

bug: https://code.google.com/p/android/issues/detail?id=63463

Change-Id: I1c93976656e45e7733113eb67d29b6bad5d25f1f
Fix appwidgets not updating

Previously there was a bug where if an appwidget's update caused a
TransactionTooLargeException then the AppWidgetServiceImpl.Host's
callbacks were completely disabled, for all widgets.

The fix still allows a DeadObjectException or other RemoteException
to disable the host callbacks, as that would be caused by a bad host.

Fixes issue 28216 on the public tracker
https://code.google.com/p/android/issues/detail?id=28216

Change-Id: I5c5d5939d7211ed23cca69e6674de730b51b0f3e
Signed-off-by: Kevin Barry <kevin@teslacoilsw.com>
Framework: Fix blacklist support

Copy & Paste isn't a good friend for programmers ;)

Change-Id: Ic6ab81462530f614b9e896cb098590241accb192
Prevent nullPointerException by updateBondedBluetoothDevices

In some very rare cases difficult to identify, it seems that the
IBluetooth.getBondedDevices() returns a Set with a null element.

This patch will prevent calling getBondState() if the device is null to
avoid a nullPointerException.

Change-Id: I9bcad60c37e03c77ec39227e5c947c002a3ae2c7
Orig-Change-Id: I8845f0e6b8fdcda679bc71e2b5c33fd4a52f3ac5
Signed-off-by: Patrick Combes <patrick.combes@intel.com>
Reviewed-on: http://android.intel.com:8080/116592
Reviewed-by: Bondier, CedricX <cedricx.bondier@intel.com>
Reviewed-by: Chen, HuaqiangX <huaqiangx.chen@intel.com>
Reviewed-by: Yao, Yong <yong.yao@intel.com>
Reviewed-by: Aquilone, RaffaeleX <raffaelex.aquilone@intel.com>
Tested-by: Lestienne, ChristopheX <christophex.lestienne@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 90085