The old code made invalid assumptions about read() behavior and
failed to clean up properly in case of error. This patch changes the
file reading to use IoUtils.readFileAsString, which handles that.
Bug: 21020457
Change-Id: If9b54955c20a20a4ed5e8381d0c7e9c920d0639a
1. We don't parse PAD options properly, leading in failure to
parse packets sent by DHCP servers that put the end of options
marker after pad options and at an odd offset.
2. We get the DhcpResults vendorInfo from the wrong option type
(60 instead of 43).
Fix these and add unit tests for the offer packets sent by a few
different DHCP servers.
Bug: 21955617
Bug: 22281295
Change-Id: I5d13f1a6a3ff0b53112f18f3db8792fa32ad2da3
Various fragments need backgrounds to protect their contents during
animation transitions.
Bug: 22232368
Change-Id: I4ce4c57650f9b64b3c6101d829dd484417585410
Users can try migrating primary storage while the current location
is missing/unmounted. Fail gracefully instead of runtime restarting.
Bug: 21927076
Change-Id: I40645f8ccea05154e7cbacd188f6cba5f4dbbdc4
Many things can happen while a private volume is ejected, so we need
to reconcile newly mounted volumes against known state.
First, user IDs can be recycled, so we store the serial number in the
extended attributes of the /data/user/[id] directory inode. Since a
serial number is always unique, we can quickly determine if a user
directory "10" really belongs to the current user "10". When we
detect a mismatched serial number, we destroy all data belonging to
that user. Gracefully handles upgrade case and assumes current serial
number is valid when none is defined.
Second, we destroy apps that we find no record of, either due to
uninstallation while the volume was unmounted, or reinstallation on
another volume.
When mounting a volume, ensure that data directories exist for all
current users. Similarly, create data directories on all mounted
volumes when creating a user. When forgetting a volume, gracefully
uninstall any apps that had been installed on that volume.
Bug: 20674082, 20275572
Change-Id: I4e3448837f7c03daf00d71681ebdc96e3d8b9cc9
Currently, the VPN code only looks at base interfaces, so if
464xlat is in use, it will never disconnect when its underlying
network has disconnected. Use getAllInterfaceNames().contains()
instead of just comparing the base interface name.
Bug: 19336810
Change-Id: Id1ba2c80a09cec5098c6f512acdc0a05a939e9f3
The default dialer and sms apps are provided by the telecomm
stak which is brought up asynchronously as a service to which
the system binds. Hence, by the time we grant default permissions
this service is not bound and we do not know the default dialer
(accidentally the default SMS app is available before the service
is up). Now the default permission grant code is robust to handle
both cases of the default sms and phone apps being available
at grant time or asynchronously.
bug:22208642
Change-Id: I6385a0432368731aa9caea046d57eccbfb5abac0