* changes:
DHCP: Don't write options longer than 255 bytes.
DHCP: parsing robustness fixes.
DHCP: Add a hidden setting to use the legacy DHCP client.
DHCP: Add a Java DHCP client.
Add a protectFromVpn method that takes a FileDescriptor
DHCP: protocol changes.
DHCP: glue code.
DHCP: Ethernet/IP packet header changes.
DHCP: Minor cleanups to the packet code.
DHCP: Move the packet code to frameworks/base/services.
DHCP: Add a native method for making a DHCP socket.
DHCP: Add a superclass for DhcpStateMachine.
Add two utility methods for IPv4 netmasks.
1. Check the length of the fixed-length portions of the packet.
2. Catch BufferUnderflowException while parsing options.
Change-Id: If907f49f02a04a4a3360f46a3192e94ab099af0e
The behaviour of the client is intended to mirror the behaviour
of the current DhcpStateMachine + dhcpcd combination, except it
does not store leases across network changes.
Bug: 19704592
Change-Id: I110b58003da2d8293059d48a0181e16f7f7f145c
1. Define and add parsing code for MTU, max message size, T1, T2.
2. Add common TLVs (message size, hostname, vendor ID) to all
packets sent by the client.
3. Don't include requested IP and server ID in renew messages,
since the RFC says MUST NOT.
4. Don't hardcode the broadcast flag to true in DISCOVER packets,
use what the caller passed in.
5. Make some methods static.
Bug: 19704592
Change-Id: I42a0997e468b12e19cad9b403b98fe266e6cea73
1. Add a method to make a DhcpResults object from a DHCP packet.
2. Add a method to fetch the client MAC from the packet. This is
needed to check that the message is for us (lots of DHCP
messages are broadcast).
3. Add a length argument to the method that parses DHCP packets,
so the caller can use the same MTU-sized array all the time
instead of having to pass in a new array for every packet.
Bug: 19704592
Change-Id: I58223f5ec90fb5c762bc2934649e02f9122018b2
1. Support L2_ENCAP when building packets as well as when parsing.
2. Skip IP options when parsing DHCP packets.
Bug: 19704592
Change-Id: Ic27a45790ed1cf7cf5b82d63b6c0b64c909a570f
1. Delete the DhcpStateMachine, since we don't plan to use it.
2. Make all InetAddresses Inet4Addresses, since that's what they
are. In order to do this, define INADDR_ANY and
INADDR_BROADCAST, constants, since Inet4Address.{ANY,ALL} are
not Inet4Addresses but InetAddresses.
Bug: 19704592
Change-Id: I5a0499be889076992a60aaad0bd8be5ea66bd560
There's no need for it to be in frameworks/base/core, since it
will only be used by services.
Bug: 19704592
Change-Id: I2f5277eca848b7000ca46db575e8602eacb5c8bd
- Keep track of whether or not HUNs are allowed per-package.
- No impact on ranking, purely presentational.
- Simplify RankingHelper with a package table.
- Improve RankingHelper dump.
- Fix some warnings and typos.
Bug: 19776495
Change-Id: I28d69df69b576f4eabbb528eabecb1f736f0e830
Allows playback/TV device to use the API to turn off
TV/other device that accepts the command.
Bug: 19802768
Change-Id: I6440626c08efb1473bea5ab577e571d0bb92d4a1
Introduce a new device idle controller service that
monitor's the device state and determines when to go
in to idle mode. When in idle mode, all we do right
now is turn off network access the same as we do for
power save mode. Many more things should come in the
future -- stopping the alarm manager from scheduling
(most) alarms, telling GmsCore for it to stop doing
stuff, etc.
Battery stats now has state tracking for devie idle
mode, as well as events for the reasons we can come
out of idle mode (significant motion or the device
becoming active). Also added new events noting when
packages are installed.
Renamed the "low power" event in battery stats to
"power save" because the former was just way too
confusing.
Finally, fix buffer size reading kernel wake locks.
(Stupidly, just increasing the buffer size. Ideally
we should try to be smarter and grow our buffer to
fit the data available, but I'll leave that for
another time.)
Change-Id: I0be2062466c83ee9d890c6cf5a228d9cc4090eca
OEM unlock enabled bit is not computed in the checksum,
causing OEM Unlocking to be disabled after the second
reboot.
Bug: 19829441
Change-Id: I100bf5d3958b89323ee35b9e97b19c162209fcd7
Respect flags passed to startDrag (they used to be ignored).
Allow global drag&drop for text views.
Bug: 19548858
Change-Id: I981cfd617ebc6f5f2d59ebded798c22dc4920d38
The current implementation was okay since we mostly had
2 stacks (the home stack and 1 application stack), so moving the
application stack to the top meant the home stack was automatically
moved to the bottom. This is no longer the case if you have multiple
application stacks.
Change-Id: I8ec7cfdc3650a73a00c4e8dad869fb2bec2a4eac
New flag you pass in to startSession() to say you want it,
new callback on VoiceInteractionSession to receive it.
Change-Id: I61fdcfdee41a60d46036a2ef16681a9b4181115a
The nesting count for services depends on callbacks decrementing
ServiceRecord.executeNesting in response to remote service calls. If a
remote call fails the callback does not get made and the nesting count
gets out of sync. This causes orphans in the executingServices set.
This fix makes the callback locally when the remote call fails.
TransactionTooLargeExceptions caused by Intents containing large
amounts of data were being caught and not propagated to the calling
methods.
This fix propagates TransactionTooLargeExceptions back to the calling
methods.
Fixes bug 19698308.
Change-Id: I9eb6ae414d14d6b3a2709abb1f2bdfbd4cbc3c03
When starting an activity with Intent.FLAG_ACTIVITY_CLEAR_TOP flag,
the activity is destoried which can also cause its task to be removed
from its current stack if the activity process record is null. We now
recompute the stack for the activity task when this occurs so we
don't NPE later on.
Bug: 19552874
Change-Id: I50f51ca6dc32d4642f78d59cae93b0774bc6cdb7