21560 Commits

Author SHA1 Message Date
Paul Jensen
bfd17b75a6 Add ConnectivityManager.reportNetworkConnectivity() API
This new API allows reporting networks that are perceived to provide Internet
connectivity and networks that are not.  This allows the framework to avoid
needlessly reevaluating networks where the apps perception matches the
framework's perception.  This was not possible with the prior API,
reportBadNetwork.

Bug: 16214361
Change-Id: Id4409bd7538854bd837231fb50e693c10a62b4f2
2015-04-13 18:48:54 +00:00
Paul Jensen
31a94f48bf Add ConnectivityManager.getActiveNetwork().
Rework NetID allocation in ConnectivityService so registerNetworkAgent() can
return the allocated NetID.

Bug: 19416463
Change-Id: I68e395552cf27422c80b4dfae5db5d56a0d68f5d
2015-04-10 14:03:13 +00:00
Paul Jensen
e75b9e3555 Non-functional code cleanup of ConnectivityService.
1. Remove ConnectivityService.findConnectionTypeForIface() as this can be done
   just as easily with supported APIs now.
2. Avoid making copies of Network objects as this precludes reuse of Network
   internals (e.g. socket factory, connection pool).

Change-Id: I52f92e35d769d8350471f485e408169608630082
2015-04-08 07:46:49 -04:00
Lorenzo Colitti
c2abb2bf5e Deal with null characters in string options.
This currently truncates all strings at the first NULL character,
except for vendorInfo, which is an opaque string.

Bug: 19985674
Change-Id: Ie53b2c55eb8a5204d7b2c7e2d8587743d923647a
2015-04-01 13:55:34 +09:00
Vinit Deshpande
5d16c59af7 Merge "Don't log errors if the receive thread is stopped." into m-wireless-dev 2015-03-31 21:02:01 +00:00
Lorenzo Colitti
f5c17221d4 Don't log errors if the receive thread is stopped.
Change-Id: I75ddc9b68f0a61a9a7a78026ed97a8a7c5109cc3
2015-03-31 07:07:03 +09:00
Bart Sears
998fb1975f am 4a26c391: Merge "CEC: Explicitly turn on screen for remote control passthrough" into lmp-mr1-dev
automerge: e6687a7

* commit 'e6687a756cf4f6def71d920f80bb5898c081c4e1':
  CEC: Explicitly turn on screen for remote control passthrough
2015-03-30 16:20:48 +00:00
Bart Sears
e6687a756c am 4a26c391: Merge "CEC: Explicitly turn on screen for remote control passthrough" into lmp-mr1-dev
* commit '4a26c391d08dfa6a3c189293f0fc163b817b1b49':
  CEC: Explicitly turn on screen for remote control passthrough
2015-03-27 21:15:24 +00:00
Bart Sears
4a26c391d0 Merge "CEC: Explicitly turn on screen for remote control passthrough" into lmp-mr1-dev 2015-03-27 20:48:38 +00:00
Christopher Tate
8b301dba07 am dbe0dd16: When scanning unbundled apps, only install the expected APK tree
automerge: d291cd4

* commit 'd291cd4040dcaa26d0f5cff637b11011d55fe25b':
  When scanning unbundled apps, only install the expected APK tree
2015-03-27 05:24:50 +00:00
Christopher Tate
d291cd4040 am dbe0dd16: When scanning unbundled apps, only install the expected APK tree
* commit 'dbe0dd160e93feef1335830a36e86ae83b19b793':
  When scanning unbundled apps, only install the expected APK tree
2015-03-27 00:32:25 +00:00
Christopher Tate
dbe0dd160e When scanning unbundled apps, only install the expected APK tree
We now make sure, when scanning post-factory app installs, that we do not
accidentally activate a "leaked" or otherwise superfluous APK tree that the
scan algorithm happens to encounter before the one that we expect a priori
based on the persisted package-installation state.  When we find such an
extraneous installation we ignore it in favor of the expected one, similarly
to the policy used when collecting system-bundled packages that have been
updated.

Even if we find an unexpected APK for the package, if the expected one
turns out to be absent we fall back to the existing "we thought this app
was present and now it isn't" logic.

Bug 19602471

Change-Id: I141a93661946176c05d8cf52a123bdf75c8eef74
2015-03-26 15:55:30 -07:00
Jinsuk Kim
bd3deee37b CEC: Explicitly turn on screen for remote control passthrough
Ensures that the playback device turns on display output signal
upon receiving CEC command <User Control Pressed>.

Bug: 19518981
Change-Id: I4f898380c9ffc071da2357a51e61309ae5d233f5
(cherry picked from commit 9b8507c52ae845c8eed9fd9952bf66538934b8fd)
2015-03-26 02:01:11 +00:00
Amith Yamasani
b0f091fa9d am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
automerge: ce3153d

* commit 'ce3153df56e4ed984b949869dd0ec97793f2c428':
  Fix NPE if FPE service does not exist.
2015-03-25 22:31:56 +00:00
Amith Yamasani
ce3153df56 am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit '0afd1905b59446fc471680325bcbea802bb37c5c':
  Fix NPE if FPE service does not exist.
2015-03-25 22:19:40 +00:00
Paul Crowley
a23995c233 Fix NPE if FPE service does not exist.
Bug: 19846662
Change-Id: I44e014c66a524b282cce0cfc9b7513fc0f553576
2015-03-25 11:43:42 +00:00
Jeff Brown
d35f8862ac am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
automerge: c19279e

* commit 'c19279ef93628448fbfb142d85ff80a6ad230425':
  Disable more hotkeys while in setup.
2015-03-20 22:22:31 +00:00
Jeff Brown
c19279ef93 am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
* commit 'd62163055f983b95a954f1a6c2cbc8e0085a7ab5':
  Disable more hotkeys while in setup.
2015-03-20 22:12:48 +00:00
Jeff Brown
38d3feb76c Disable more hotkeys while in setup.
Disables fallback key processing for CALL, CAMERA, and HEADSETHOOK
buttons.

Bug: 19767816
Change-Id: I423103c367e05827c939cd8d8dbecb6012b0e9f0
2015-03-20 13:26:09 -07:00
Andres Morales
acc33085b9 am c8f952ce: Write correct checksum when formatting partition
automerge: 5e00534

* commit '5e00534caaddbe5034f07dedce66cd9c5d986c8d':
  Write correct checksum when formatting partition
2015-03-19 18:42:28 +00:00
Andres Morales
5e00534caa am c8f952ce: Write correct checksum when formatting partition
* commit 'c8f952ce9f9cadc0d38745e455c0a6388bc68a47':
  Write correct checksum when formatting partition
2015-03-19 18:27:35 +00: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
Paul Jensen
43564472ee Remove dead code, mostly DataStateTracker.
(cherry picked from AOSP commit 7fad4eb4b52bc6c7ddad47f70e0c310093fbde3b)

Change-Id: I18c44cd08dfb51e02a96d0b726e9af1db21e3058
2015-03-18 12:29:13 -04:00
Lorenzo Colitti
3698af5f64 DHCP: Don't write options longer than 255 bytes.
Change-Id: Iddc971c7ac97253af3063850cde3dee10c3829ff
2015-03-17 19:56:34 +09:00
Lorenzo Colitti
2ed489f410 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-17 19:46:14 +09:00
Lorenzo Colitti
a071edce46 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-17 19:46:13 +09:00
Lorenzo Colitti
04b8d3aab6 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-17 13:21:21 +09:00
Lorenzo Colitti
29cb944bef 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-16 22:35:19 +09:00
Lorenzo Colitti
15204d50b4 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-16 21:57:00 +09:00
Lorenzo Colitti
c8a0f49fee 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-16 20:08:47 +09:00
Lorenzo Colitti
c95a87f30d 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-16 20:08:46 +09:00
Vinit Deshpande
3cb5e4d72f am "get channel list from driver for SoftAP channel selection"
merged from partner/m-wireless-wifi-dev
18ae1d2 get channel list from driver for SoftAP channel selection
2015-03-09 19:01:35 -07:00
Vinit Deshpande
b4499afde5 am "set softAP on a specified band, including both 2.4 and 5 GHz band"
merged from partner/m-wireless-wifi-dev
a0be0fb set softAP on a specified band, including both 2.4 and 5 GHz band
2015-03-09 19:01:31 -07:00
Lorenzo Colitti
f4f93b227f Enable Ethernet if the device has FEATURE_USB_HOST.
Any device that supports USB OTG is capable of running Ethernet
via a USB OTG cable and Ethernet to USB adapter.

Currently, we only start the Ethernet system service if the
device has FEATURE_ETHERNET, but this requires that every device
explicitly declare FEATURE_ETHERNET, which causes bugs like
http://b/18515146 , where the L OTA broke Ethernet on nakasi.

Therefore, start the Ethernet service on all devices that have
FEATURE_USB_HOST.

Bug: 18515146
Change-Id: I3b4e85d1ad8e1aea9baa046a27f5b4dd68c42028
2015-03-05 14:52:04 +09:00
Shishir Agrawal
335b59f847 am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
automerge: 4322c8d

* commit '4322c8d54ef935a3224c8fcbf7ab55ac48f34f1b':
  Fix incorrect condition for sub id check.
2015-03-03 03:11:47 +00:00
Shishir Agrawal
4322c8d54e am bcced5b8: Merge "Fix incorrect condition for sub id check." into lmp-mr1-dev
* commit 'bcced5b834e49bf3a0b57a0009958ba061d31e76':
  Fix incorrect condition for sub id check.
2015-03-03 02:54:12 +00:00
Ihab Awad
c4959abf5f Changed package name of a Telecom service
Change-Id: Ib8d5b73a3cdb2aa353c586dccf423a8917a393d6
2015-03-02 20:41:07 +00:00
Lorenzo Colitti
35e36db1d7 Separate NAT from forwarding.
Bug: 19500693
Change-Id: I39878644e21d51def1c31d1857e815f473ef0938
2015-02-27 15:53:28 +09:00
Nilesh Poddar
f3d4a58519 Append forwarder name to ipfwd command
Pass the name of entity that is requesting to enable/disable
ip forwarding

Change-Id: Iaf04768a23c417eb7d40af776c6fc76efaa67bb7
2015-02-25 10:37:36 +09:00
Junda Liu
985f52cde5 Fix incorrect condition for sub id check.
Bug: b/19277299
Change-Id: Iea6806926f0e9d9404a3f2613d03b8a0607fea54
2015-02-23 16:06:51 -08:00
Craig Mautner
ca0653a424 Do not make ActivityContainer available to apps. DO NOT MERGE
A security leak was discovered whereby a malicious app could get the
IActivityContainer object from one app and use it to inject events
into another app. This fix removes the availability of the
IActivityContainer and replaces its one use with a method for
returning the information the IActivityContainer was used for.

Fixes bug 19394591.

Change-Id: Ib3cec25b25130cd8e098892c057742cfd575cfdd
2015-02-17 20:41:39 +00:00
John Spurlock
dfc0a778d4 am f45e5dbf: Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev
* commit 'f45e5dbf599a0043d7f6576f20eafb2c1c157204':
  NoMan: Initialize filter value reported to listeners.
2015-02-12 22:58:14 +00:00
John Spurlock
f45e5dbf59 Merge "NoMan: Initialize filter value reported to listeners." into lmp-mr1-dev 2015-02-12 22:52:13 +00:00
John Spurlock
f370177e94 NoMan: Initialize filter value reported to listeners.
In addition to relying on change callbacks.

Bug: 19288429
Change-Id: Id54473e5fbb4eac3778781a2052ba0103076f8d1
2015-02-12 13:29:37 -05:00
Lorenzo Colitti
be828a3ba6 am c7ccc393: Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev
* commit 'c7ccc393b470220710f566d447412d93f7f8d21b':
  Make reportInetCondition revalidate if the report differs from our state
2015-02-12 02:43:45 +00:00
Lorenzo Colitti
c7ccc393b4 Merge "Make reportInetCondition revalidate if the report differs from our state" into lmp-mr1-dev 2015-02-12 02:30:56 +00:00
Michael Wright
a79a38b2ac am 3292c0e2: Merge "Stop active media projections on user switch." into lmp-mr1-dev
* commit '3292c0e2640667e5ef78896653a41c85e7de06c5':
  Stop active media projections on user switch.
2015-02-11 20:09:35 +00:00
Michael Wright
3292c0e264 Merge "Stop active media projections on user switch." into lmp-mr1-dev 2015-02-11 18:23:55 +00:00
Jeff Davidson
ab3356d0dd am 50996a12: Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev
* commit '50996a12a8e859346d5eb3c4569c4e81c9b52a05':
  Do not enforce CONTROL_VPN for calls from lockdown VPN.
2015-02-11 08:32:01 +00:00
Jeff Davidson
50996a12a8 Merge "Do not enforce CONTROL_VPN for calls from lockdown VPN." into lmp-mr1-dev 2015-02-11 08:25:27 +00:00