Commit graph

13,045 commits

Message SHA1
Allow overlays to configure ConnectivityService's network sampling to not wake the device.
This can increase clockwork device battery life.
Bug:15455204

Change-Id: Ifc551e6a522627dc8e5cfdfb8f56d4e3cbeea936

Aaron Whyte   commited 2014-07-10 14:05:35 -07:00
81c9245195
Add networkSpecifier string to NetworkCapabilties.
Allows transport specific network selectivity where multi-sim or sta+sta
is supported.

bug:1575597
Change-Id: I9c60fe7710e988c17d63236788b492a3ddd264a1

Robert Greenwalt   commited 2014-07-10 20:58:20 +00:00
8e368dccad
Convert Vpn from NetworkStateTracker to NetworkAgent.
This eliminates the need for the ConnectivityService.VpnCallback class.
This requires shifting VPNs to the new "network" netd API.
VpnService.protect() is modified to no longer go through ConnectivityService.
NetworkCapabilities is extended to add a transport type for VPNs and a
capability requiring a non-VPN (so the default NetworkRequest isn't satisfied
by a VPN).

bug:15409918
Change-Id: Ic4498f1961582208add6f375ad16ce376ee9eb95

Paul Jensen   commited 2014-07-10 20:39:33 +00:00
a8a49e0e86
Merge "Refactor wifi p2p's startDhcpServer function"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-10 18:27:37 +00:00
9ebd8801c8
Refactor wifi p2p's startDhcpServer function
Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering to update dhcp ranges.  This will allow
p2p apps to run well concurently with other tethering apps.

Manual import of AOSP change 81546 by jianzheng.zhou@freescale.com

Change-Id: Iebc62f95bdcedde80e2c1d3e9580d3f625c3b50b

Robert Greenwalt   commited 2014-07-10 18:56:12 +00:00
a75c465b03
Add AlarmClock API to AlarmManager
Adds a new kind of alarm that represents an alarm clock and
a way to query the next scheduled alarm clock.

Deprecates Settings.System.NEXT_ALARM_FORMATTED.

Bug: 14589952
Change-Id: I297eeeff36d07adcda010afac183d0f5ee37dc99

Adrian Roos   commited 2014-07-10 17:07:36 +00:00
c4a8f21352
Merge "Enable network validations and add app to handle captive portal login."
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-07-10 00:32:18 +00:00
6df66f0b3d
Enable network validations and add app to handle captive portal login.
Network validation prevents networks claiming to provide internet connectivity
from becoming the default network in cases where internet connectivity is not
found to actually exist.
If a captive portal is encountered the appropriate broadcasts and notifications
are surfaced to allow apps to handle signing in.  If no app handles signing in,
my system app will handle it.

Bug:15409233
Bug:15409354

Change-Id: Ie240d7eac4bdbab8cc7578782bd72d8b26de7951

Paul Jensen   commited 2014-07-10 13:14:01 -04:00
77cbca5c27
Merge "Add Network inspection API."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-09 21:39:59 +00:00
175b842bc6
Add Network inspection API.
Adds getNetworksNetworkInfo.
Adds getAllNetworks.

Cleans up some synchronization issues.

Change-Id: I82c7a4b554e3c6c1adfe6027cc54b028ed6dbac9

Robert Greenwalt   commited 2014-07-10 10:48:23 -07:00
701a5c3233
merge in master-release history after reset to 26062eeec5526b1724b84dd390837c2854f2494a
The Android Automerger   commited 2014-07-09 05:50:33 -07:00
412d26a4a3
Add Trust to NetworkCapabilities.
Indicates the user has indicated implicit trust of a network.  This
generally means it's a sim-selected carrier, a plugged in ethernet,
a paired BT device or a wifi they've asked to connect to.  Untrusted
networks are probably limited to unknown wifi AP.

Change-Id: I89490bdaa3c2d63d33f876c72d8b088dc155fa3d

Robert Greenwalt   commited 2014-07-08 23:55:18 +00:00
87a4270a79
CW on Master: Disable CaptivePortalTracker, EthernetService
BUG: 15143878

Change-Id: I6c534a28c1fcd475982ae70e7f3af69f3a219e24

Joe LaPenna   authored and   Robert Greenwalt   commited 2014-07-08 22:52:02 +00:00
06ec2bb20d
merge in master-release history after reset to 31025926105a93fe1af05b14c09a6b9388ceb7ab
The Android Automerger   commited 2014-07-08 05:50:17 -07:00
3cc8e054eb
Remove dead code.
Also adds a TYPE_VPN so the VPN can be strongly typed.

Change-Id: Ibf39450c480f16ce5ab4c25b47965691b844fb92

Robert Greenwalt   commited 2014-07-07 17:09:01 -07:00
b2a03d1782
When adding a NetworkRequest, cancel linger for satisfying Network.
This fixes a problem where a requested network can later suddenly disappear if
it was lingering when the request arrived and later the linger timeout expired.

bug:15927234
Change-Id: Ib3fae45820ce4421e3bc5b623937a16d5f1efa0f

Paul Jensen   authored and   The Android Automerger   commited 2014-07-07 14:24:48 -07:00
1c6b96ee59
merge in master-release history after reset to dd5986f9027a3582d0087cc619cee000d66b2640
The Android Automerger   commited 2014-07-03 05:50:52 -07:00
affca1cb49
Merge "Remove unused api."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-07-02 18:55:10 +00:00
cbd6c345bc
When adding a NetworkRequest, cancel linger for satisfying Network.
This fixes a problem where a requested network can later suddenly disappear if
it was lingering when the request arrived and later the linger timeout expired.

bug:15927234
Change-Id: Ib3fae45820ce4421e3bc5b623937a16d5f1efa0f

Paul Jensen   commited 2014-07-07 15:50:24 +00:00
4bd6871cf4
Fix build
Change-Id: I7d0787e4a1f778008c979c4174ef445a950c4250

Glenn Kasten   commited 2014-07-07 07:12:29 -07:00
037ec9f47b
Remove unused api.
bug:15595155
Change-Id: Ifd79365bd45f20f531782244f471a4cfc32a4135

Robert Greenwalt   commited 2014-07-02 13:50:33 -07:00
205fd8e8d0
Merge "Add captive portal sign-in actions."
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-07-02 20:06:33 +00:00
5e6d3cd18e
Add captive portal sign-in actions.
Change-Id: I70a6c2efc4f3fa48d5b65e8d630682fe74abfe2c

Paul Jensen   commited 2014-07-02 16:47:48 +00:00
37c6b961f0
Apply the tethering user restriction to connectivity service.
Bug: 15852213
Change-Id: Ib2df696189981ed1b31955257047fac3ee403965

Julia Reynolds   commited 2014-07-02 16:46:54 +00:00
5cec5389c3
Simplify the network transition wakelock.
Make it all internal to ConnectivityService - we know when a network
is lost, so grab a wakelock then.
Moves the call out of WifiStateMachine which was grabbing at bad times
like every dhcp renewal or corp-network roam.  These would always
go the full 1 minute and chew up battery.

bug:15595155
Change-Id: I80157a818cc149072cc7706d78c1e79c6e679ab3

Robert Greenwalt   commited 2014-07-02 09:26:43 -07:00
61837ebcb6
Make sure callback handler is in place before callbacks handled.
When making Network requests in ConnectivityManager, make sure we install the
callback prior to a response from ConnectivityService arriving causing us to
search for the callback and inadvertently not find it.

bug:15928097
Change-Id: Ie5feb9cc8f5effc19870f54dba07218b2e11d82a

Paul Jensen   commited 2014-07-02 13:50:53 +00:00
f980a0f56f
MS: Adding Support for Emergency APN in Telephony Framework
(base/telephony)

Replacement for https://partner-android-review.googlesource.com/#/c/171175/

Change-Id: I16fc37f5c00ed79f2370bc46554fc7a24c52c4cb
Conflicts:
	core/java/android/net/ConnectivityManager.java

Ram   authored and   Etan Cohen   commited 2014-07-01 02:00:51 +00:00
201d45f090
merge in master-release history after reset to cc3af234e4b1a4253a24813d5e40027746c485c1
The Android Automerger   commited 2014-06-28 05:50:25 -07:00
ac89674255
Enforce ConnectivityManager.releaseNetworkRequest callers own the NetworkRequest
Enforce that callers of ConnectivityManager.releaseNetworkRequest() are the
creators of the NetworkRequest being released by matching UIDs.

Change-Id: I439468c054bacc035e2db2c4967b24d183e78e9c

Paul Jensen   commited 2014-06-26 18:07:12 +00:00
abaa0ed9ed
Use return values from JNI functions binding sockets and processes to networks.
bug:15757549
Change-Id: If23b14febc923b9a0348f0cf9029fd4bf6e8d725

Paul Jensen   commited 2014-06-26 16:33:58 +00:00
e25e76c300
Convert BluetoothTetheringDataTracker into a NetworkFactory.
bug:15407087

Change-Id: I0437ca52dedf73e8ec69ac82e46353f6fafc4a42

Paul Jensen   commited 2014-06-26 09:13:51 -04:00
824fc15bab
merge in master-release history after reset to d76f6559680a0542419be17be2698c115c1234a9
The Android Automerger   commited 2014-06-26 05:50:13 -07:00
07ab95f0ac
Modify DNS server update methods.
1. Make addDnsServer not add duplicate servers and return a
   boolean value incating whether it changed anything. This is
   consistent with what we do for LinkAddresses and routes.
2. Add a setDnsServers method that sets all the DNS servers to
   the specified collection. This is consistent with what we do
   for LinkAddress.

Bug: 9180552
Change-Id: I5baed09253261b66ea42ae2ea82398118e3ab0ac

Lorenzo Colitti   commited 2014-06-26 17:04:38 +09:00
21970be5de
Teach LinkProperties whether it's provisioned or not.
In IPv4, a link is provisioned when DHCP succeeds. In IPv6, a
there is no such signal, because addresses and DNS servers can
be notified by the kernel at different times.

Add an isProvisioned method that returns true if we believe that
enough information has configured to use a network. For IPv6,
this requires an IP address, default route, and DNS server. For
IPv4, this requires only an IPv4 address, because we support
static configuration that doesn't have a default route or DNS
server.

To do this we use the existing hasIPv4Address method, rename the
all-but unused hasIPv6Address method to hasGlobalIPv6Address
(which is what we want anyway) and add new hasIPv[46]DefaultRoute
and hasIPv[46]DnsServer methods.

Bug: 9180552
Change-Id: Ib2f5ff8af920f7b6f1edf0e2afaaa0edce9bc72d

Lorenzo Colitti   commited 2014-06-26 03:23:31 +09:00
bf1b00039f
Minor changes to RouteInfo.
1. Realize that mDestination can never be null and update the
   code accordingly.
2. Simplify isDefaultRoute.
3. Provide two new hidden utility methods, isIPv4Default() and
   isIPv6Default(), that can be used by LinkProperties to
   to determine if the system has connectivity.
4. Update tests.

Bug: 9180552
Change-Id: I85028d50556c888261d250925962bdedfe08e0c6

Lorenzo Colitti   commited 2014-06-25 18:22:12 +00:00
1b72e05bad
Unbreak LinkPropertiesTest.
This was broken by the changes that made addRoute add routes
only if they did not already exist.

Change-Id: I1d227df9223fbecf106efde05b709f320824ee9d

Lorenzo Colitti   commited 2014-06-25 18:19:47 +00:00
fa6b26323b
merge in master-release history after reset to 360d800143ce26e910491b1ac5caa2d349b39867
The Android Automerger   commited 2014-06-24 05:50:19 -07:00
cb0457bf65
Clean up and add some Network logging.
Dumps the netid for the Network and adds that to the NetworkAgentInfo.

Change-Id: Id9fbcc55ca55bf1a020f747f0c44902efb1b5f87

Robert Greenwalt   commited 2014-06-23 17:40:12 -07:00
9c7ce729d2
am a77d0ef4: (-s ours) am 0b572896: (-s ours) Merge "DO NOT MERGE refactor wifi p2p\'s startDhcpServer function"
* commit 'a77d0ef49e8c4b53e1cd794c0739584914bd6eda':
  DO NOT MERGE refactor wifi p2p's startDhcpServer function

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-06-23 22:10:37 +00:00
5aee704d53
Merge "Add logging to track down weird ConnectivityManager issue."
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-06-23 21:44:43 +00:00
0008d3d566
am 5aee704d: (-s ours) am a77d0ef4: (-s ours) am 0b572896: (-s ours) Merge "DO NOT MERGE refactor wifi p2p\'s startDhcpServer function"
* commit '5aee704d53':
  DO NOT MERGE refactor wifi p2p's startDhcpServer function

Robert Greenwalt   authored and   Android Git Automerger   commited 2014-06-23 22:40:33 +00:00
0a7d16f41d
Add logging to track down weird ConnectivityManager issue.
bug:15771399
Change-Id: I0a7150286f94262414005298e6f038f278347a7c

Robert Greenwalt   commited 2014-06-23 15:33:40 -07:00
ca3c5cfa87
DO NOT MERGE refactor wifi p2p's startDhcpServer function
Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering() to update dhcp ranges. This will allow p2p app
to run well concurrently with other tethering app(e.g. usb tethering).

Change-Id: I5e8ffeb5d2d396f48b897cd9396f133e25ecca57
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>

Jianzheng Zhou   authored and   Robert Greenwalt   commited 2014-06-23 21:02:45 +00:00
cb5b2c0716
merge in master-release history after reset to 86d30fc2b1c0be1b03f36929d29059c3c3fa6d5f
The Android Automerger   commited 2014-06-22 08:19:40 -07:00
0383bdaf5d
merge in master-release history after reset to 2ea611ae776abd84e444551ecb0dd4f76e27c591
The Android Automerger   commited 2014-06-18 10:23:07 -07:00
7c4fd71749
merge in master-release history after reset to 2ea611ae776abd84e444551ecb0dd4f76e27c591
The Android Automerger   commited 2014-06-18 10:15:32 -07:00
16efc55205
merge in master-release history after reset to 93080f3adfbb85d198c9782ed3a62a5588d45ff6
The Android Automerger   commited 2014-06-18 06:34:17 -07:00
eac9260107
merge in master-release history after reset to 73ad3c14b9df1acb99856f63fee904fdbf70a3b6
The Android Automerger   commited 2014-06-17 05:50:17 -07:00
3f0ea2f841
Modify LinkProperties add/remove route functions.
This will allow us to dynamically track routes being added and
removed, similar to what we do for IP addresses.

1. Support removing routes. Since this is a new function, we
   don't need to jump through hoops to support callers passing
   in routes that have no interface, we just fail to match them.
2. Make the addRoute method return a boolean value indicating
   whether anything changed. This is consistent with what we do
   for addresses and is used to decide whether to update the
   rest of the system when an update comes in.

Bug: 9180552
Change-Id: I50648b5f81ec55c88501a7640e119cda2bb540f2

Lorenzo Colitti   commited 2014-06-17 11:18:53 +09:00
dc8139c856
IpPrefix improvements.
1. Allow IpPrefixes to be created from strings. In order to do
   this, factor out the code from LinkAddress which already does
   this to a small utility class in NetworkUtils.
2. Truncate prefixes on creation, fixing a TODO.
3. Add a toString method.
4. Write a unit test.

While I'm at it, make RouteInfoTest pass again, and convert it
to use IpPrefix instead of LinkAddress.

Change-Id: I5f68f8af8f4aedb25afaee00e05369f01e82a70b

Lorenzo Colitti   commited 2014-06-17 11:18:53 +09:00
2e9b12312c