25292 Commits

Author SHA1 Message Date
John Spurlock
606f1c9c9d Merge "HUN: Implement per-package config." 2015-03-20 20:20:09 +00:00
Rubin Xu
ec32b56cc2 Add DelegatedCertInstaller API in DPMS
Allow device/profile owner to delegate certificate APIs to third-party
certificate installer apps.

Bug: 19551274
Change-Id: Iaf9abb5ecb1dc0975fa98ea14408fe392d52fbf4
2015-03-20 10:11:29 +00:00
Lorenzo Colitti
f2104b11a8 Merge changes Iddc971c7,If907f49f,I5505bd2c,I110b5800,I9aeb29c2, ...
* 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.
2015-03-20 08:29:26 +00:00
Lorenzo Colitti
06ac4b8dd1 DHCP: Don't write options longer than 255 bytes.
Change-Id: Iddc971c7ac97253af3063850cde3dee10c3829ff
2015-03-20 16:32:44 +09:00
Lorenzo Colitti
b05c9234e6 DHCP: parsing robustness fixes.
1. Check the length of the fixed-length portions of the packet.
2. Catch BufferUnderflowException while parsing options.

Change-Id: If907f49f02a04a4a3360f46a3192e94ab099af0e
2015-03-20 16:32:43 +09:00
Lorenzo Colitti
e7d4243be9 DHCP: Add a Java DHCP client.
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
2015-03-20 16:32:41 +09:00
Lorenzo Colitti
fe5ffce09c DHCP: protocol changes.
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
2015-03-20 16:32:39 +09:00
Lorenzo Colitti
86bff86778 DHCP: glue code.
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
2015-03-20 16:32:39 +09:00
Lorenzo Colitti
7f7cc61159 DHCP: Ethernet/IP packet header changes.
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
2015-03-20 16:32:38 +09:00
Lorenzo Colitti
51697effe9 DHCP: Minor cleanups to the packet code.
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
2015-03-20 16:32:37 +09:00
Lorenzo Colitti
eca9b9bd8b DHCP: Move the packet code to frameworks/base/services.
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
2015-03-20 16:32:36 +09:00
Jinsuk Kim
e37628c031 Merge "CEC: Expose API sendStandby()" 2015-03-20 04:28:18 +00:00
John Spurlock
1d881a1e98 HUN: Implement per-package config.
- 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
2015-03-20 00:04:11 -04:00
Jinsuk Kim
8d115eb18f CEC: Expose API sendStandby()
Allows playback/TV device to use the API to turn off
TV/other device that accepts the command.

Bug: 19802768
Change-Id: I6440626c08efb1473bea5ab577e571d0bb92d4a1
2015-03-20 10:02:34 +09:00
Phil Burk
9b58c85524 Merge "AudioService: fix String cast crash when mediaserver killed" 2015-03-20 00:28:30 +00:00
Vladislav Kaznacheev
fca29e7d49 Merge "Start respecting View.DRAG_FLAG_GLOBAL flag." 2015-03-20 00:15:43 +00:00
Phil Burk
1a7700793d AudioService: fix String cast crash when mediaserver killed
Bug: 19847028
Change-Id: I45668fbd08e87df69fe3867473a09c387589ca8a
Signed-off-by: Phil Burk <philburk@google.com>
2015-03-19 17:01:16 -07:00
Craig Mautner
efadd572b9 Merge "Fix bad nesting count when remote calls fail." 2015-03-19 23:31:52 +00:00
Dianne Hackborn
79ec42e6a3 Merge "First stab at device idle mode." 2015-03-19 23:05:16 +00:00
Paul Mclean
3756b40992 Merge "AudioService: fix crash when mediaserver killed" 2015-03-19 22:02:42 +00:00
Phil Burk
413d307c2c AudioService: fix crash when mediaserver killed
Bug: 19847028
Change-Id: I4acacd8a6d20317d180a6994158abc0b2957280c
Signed-off-by: Phil Burk <philburk@google.com>
2015-03-19 14:59:20 -07:00
Bryce Lee
9fc0b6fb1f am b45d3926: am 8320cf2d: Merge "Fix wrong intent being passed in PhoneWindowManager." into lmp-mr1-modular-dev
* commit 'b45d3926f327948c486c92ddc7fdb97dbc98e401':
  Fix wrong intent being passed in PhoneWindowManager.
2015-03-19 21:37:45 +00:00
Andres Morales
2566dbde3f am e39ab2ae: am f342e5e0: am ca0391eb: am c8f952ce: Write correct checksum when formatting partition
* commit 'e39ab2ae9c844d9f553f7214b5f80856b9389311':
  Write correct checksum when formatting partition
2015-03-19 18:47:52 +00:00
Andres Morales
e39ab2ae9c am f342e5e0: am ca0391eb: am c8f952ce: Write correct checksum when formatting partition
* commit 'f342e5e0ae85fa7929e9b2eb4213bbc85dbcf61c':
  Write correct checksum when formatting partition
2015-03-19 18:41:31 +00:00
Andres Morales
f342e5e0ae am ca0391eb: am c8f952ce: Write correct checksum when formatting partition
* commit 'ca0391eb524b0adad79160c48682c4edf6f49ed2':
  Write correct checksum when formatting partition
2015-03-19 18:35:07 +00:00
Andres Morales
ca0391eb52 am c8f952ce: Write correct checksum when formatting partition
* commit 'c8f952ce9f9cadc0d38745e455c0a6388bc68a47':
  Write correct checksum when formatting partition
2015-03-19 18:27:54 +00:00
Dianne Hackborn
8ad2af7e5b First stab at device idle mode.
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
2015-03-19 11:10:55 -07:00
Andres Morales
c8f952ce9f Write correct checksum when formatting partition
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
2015-03-19 17:18:01 +00:00
Benjamin Franz
bff46bac80 Add DO policy to disable safe boot mode.
Bug: 19615843
Change-Id: I14dbe911995ec216c57bd285d6b7b04c9684591a
2015-03-19 09:19:18 +00:00
Alan Viverette
eef3bcbbe4 Merge "Replace usages of deprecated Resources.getColor() and getColorStateList()" 2015-03-19 01:54:09 +00:00
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Bryce Lee
d8379b907f am 8b8a0451: am 8bc23e82: Merge "Add Assist global action for wear to different from VOICE_ASSIST" into lmp-mr1-modular-dev
* commit '8b8a045133e0466e964b4094269585708805b90a':
  Add Assist global action for wear to different from VOICE_ASSIST
2015-03-19 00:32:17 +00:00
Mathieu Chartier
75f1ba5a81 am f792e016: am 437ac8f8: Merge "Add JIT late override property"
* commit 'f792e01606b988ab84190217529cca53da8db3f5':
  Add JIT late override property
2015-03-18 23:51:12 +00:00
Bart Sears
8b1c27c5ab am f5353e9d: am 91281bbd: resolved conflicts for merge of cc86bc0c to lmp-mr1-modular-dev
* commit 'f5353e9dda15fe49023083ec7ca2131feed7787d':
  Prevent activities from being started during setup wizard.
2015-03-18 23:51:02 +00:00
Mark Salyzyn
2d5b2c7dc1 am 6a9cd7b0: am e2c8e504: Merge "logd: optimize statistics"
* commit '6a9cd7b0d4215d9e20ed59e6ab0c328c81cd842b':
  logd: optimize statistics
2015-03-18 23:49:08 +00:00
Vladislav Kaznacheev
c3debf29d6 Start respecting View.DRAG_FLAG_GLOBAL flag.
Respect flags passed to startDrag (they used to be ignored).
Allow global drag&drop for text views.

Bug: 19548858
Change-Id: I981cfd617ebc6f5f2d59ebded798c22dc4920d38
2015-03-18 16:32:21 -07:00
Wale Ogunwale
92acaf2074 Always position home stack either at the top or bottom of the list.
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
2015-03-18 16:11:51 -07:00
Mathieu Chartier
f792e01606 am 437ac8f8: Merge "Add JIT late override property"
* commit '437ac8f8445b078041171eff56ce7ffbd1cf6766':
  Add JIT late override property
2015-03-18 23:09:21 +00:00
Mathieu Chartier
437ac8f844 Merge "Add JIT late override property" 2015-03-18 22:56:55 +00:00
Mathieu Chartier
7a49028aa2 Add JIT late override property
Required for JIT debug property since user builds can't restart
the shell.

Bug: 19735273

Change-Id: I1983852e80010c344b45e0bb459de47c56adfce8
2015-03-18 15:18:52 -07:00
Mark Salyzyn
6a9cd7b0d4 am e2c8e504: Merge "logd: optimize statistics"
* commit 'e2c8e504d143c42c25d7e61a18f50cccb80f0c4d':
  logd: optimize statistics
2015-03-18 20:25:54 +00:00
Dianne Hackborn
27eac1d58f Add ability to get a screenshot for assist.
New flag you pass in to startSession() to say you want it,
new callback on VoiceInteractionSession to receive it.

Change-Id: I61fdcfdee41a60d46036a2ef16681a9b4181115a
2015-03-17 16:45:51 -07:00
Julia Reynolds
1cc84c992c Merge "Allow initializers to clear reset protection data during device setup." 2015-03-17 22:13:32 +00:00
Filip Gruszczynski
6bc51303b5 am d0663e03: am 7bd2feda: Merge "Add animation to zeroing burn in protection." into lmp-mr1-modular-dev
* commit 'd0663e03657704db8e9006a0a3aa919ed28c6d03':
  Add animation to zeroing burn in protection.
2015-03-17 20:47:48 +00:00
Craig Mautner
5f2bb4c9bc Fix bad nesting count when remote calls fail.
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
2015-03-17 13:46:50 -07:00
Wale Ogunwale
ee0f4b4d0b Merge "Recompute focus stack if cleared while starting an activity." 2015-03-17 20:22:37 +00:00
Wale Ogunwale
86920fe630 Recompute focus stack if cleared while starting an activity.
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
2015-03-17 13:20:24 -07:00
John Spurlock
d799f70187 Merge "Audio: Flag volume adjustments from hardware keys." 2015-03-17 19:19:01 +00:00
Filip Gruszczynski
a483a1d85e am 81c47fc2: am 86318d76: Merge "Option for going home when going to sleep for devices without physical button." into lmp-mr1-modular-dev
* commit '81c47fc23a0a15dddf37d96d28305e8b5e5ca2da':
  Option for going home when going to sleep for devices without physical button.
2015-03-17 19:06:58 +00:00
Wale Ogunwale
0cb1034717 Merge "Convert some log points to in AMS to use ActivityManagerDebugConfig class." 2015-03-17 19:03:00 +00:00