History log of /frameworks/base/core/java/android/net/NetworkUtils.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cee9b51c4beec4494d78bab784ba7e7e20c30e31 06-May-2015 Paul Jensen <pauljensen@google.com> Query HTTP proxy for network via a new API to avoid permissions exceptions

Add @hidden ConnectivityManager.getProxyForNetwork() API.

Bug:20470604
Change-Id: I6a9bc4afc8273bc43b14cdeccfedbbf3ff66be40
/frameworks/base/core/java/android/net/NetworkUtils.java
72db88e46fba5f2581eb21c042dc79887cda1c10 10-Mar-2015 Paul Jensen <pauljensen@google.com> Deprecate static ConnectivityManager.get/setProcessDefaultNetwork() functions.

These functions risk hitting an unchecked Exception due to ConnectivityManager
not being instantiated yet. Also, change Network.openConnection() to throw a
checked Exception rather than an unchecked Exception when ConnectivityManager
is not yet instantiated.

bug:19416463
Change-Id: Ie1e2b3238aec0343d267c76b64927073f2f05f85
/frameworks/base/core/java/android/net/NetworkUtils.java
4ff9f0fd9fdddb760d10fc6677b57655a9fbdb0d 17-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Add a protectFromVpn method that takes a FileDescriptor

Bug: 19704592
Change-Id: I9aeb29c2f6cf55fa010bc606c99b21a797ac5a19
/frameworks/base/core/java/android/net/NetworkUtils.java
566e0cb692ef8be5ba01c874ebd9d2576be99fe4 06-Mar-2015 Lorenzo Colitti <lorenzo@google.com> DHCP: Add a native method for making a DHCP socket.

Bug: 19704592
Change-Id: Iadd60d39c93aaabd2917e76791101a7d313b34be
/frameworks/base/core/java/android/net/NetworkUtils.java
475085b9870c49085f4b5238d84d6e5d5750f31c 09-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Add two utility methods for IPv4 netmasks.

1. Add a validating method to convert a netmask to a prefix length.
2. Add a function to get the implicit netmask of an IPv4 address.
3. Add a unit test.

Bug: 19704592
Change-Id: Icb9f58d3903ea01df9e3720383c9bd5db6dd8f26
/frameworks/base/core/java/android/net/NetworkUtils.java
3c3ce17c5a484de0ec02ba6bc890036657ec6eb4 19-Feb-2015 Erik Kline <ek@google.com> Refactor NetworkUtils interaction with DHCP.

Separate out starting DHCP (DISCOVER) and RENEW operations from fetching
the results. Add NetworkUtils.getDhcpResults(), to enable quick checks
of any available DhcpResults without extraneous interaction with the
DHCP daemon.

Bug: 19422416
Change-Id: I58808e529dda8429737e749f5caef56d923c0809
/frameworks/base/core/java/android/net/NetworkUtils.java
9f1274b7e43d14c7e3a42148ebfda3905fec8b06 21-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Rework the per-network URL API.

This addresses API council comments.

Bug: 17112978
Change-Id: I698b243b2b685d1f25414cee72450be3ae0c2bf0
/frameworks/base/core/java/android/net/NetworkUtils.java
0a82e80073e193725a9d4c84a93db8a04b2456b9 30-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Stop using LinkProperties for static configuration.

LinkProperties can represent way more complicated configurations
than what we can actually apply to interfaces. This makes it
error-prone to use it to represent static configuration, both
when trying to apply configuration coming from LinkProperties
and when trying to save configuration from current
LinkProperties.

Instead, move static configuration (IPv4 only, since we don't
support static IPv6 configuration) into a separate
StaticIpConfiguration class.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
/frameworks/base/core/java/android/net/NetworkUtils.java
03666c705ddabe0e7c5869ab69c2ca8b964164e9 20-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Cleanup: Delete dead code.

Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
/frameworks/base/core/java/android/net/NetworkUtils.java
06b6cdaed5c68816faac9d2354c6caf61e65e19d 12-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Remove unnecessary code and APIs.

This stuff has been replaced by setNetworkForUser() in NetdClient.

Change-Id: If525ee259b74314191d1913f7c2a3e828e05c38f
/frameworks/base/core/java/android/net/NetworkUtils.java
bcc76d345cdad2eff0f64d1dca9f92f94c8b9f07 11-Jul-2014 Paul Jensen <pauljensen@google.com> Define NETID_UNSET in ConnectivityManager.

This allows some cleanup and removal of dead code.

bug:15489928
Change-Id: Iaf0507bc2e8ec6dcc253f01f61c5b221d46581f9
/frameworks/base/core/java/android/net/NetworkUtils.java
6bc2c2c34f2b23eae79ad733c97a691734055c4f 07-May-2014 Paul Jensen <pauljensen@google.com> 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
/frameworks/base/core/java/android/net/NetworkUtils.java
32a58f00d388584f5f47c0d5d4c74ce7c8457d78 20-Jun-2014 Paul Jensen <pauljensen@google.com> Use return values from JNI functions binding sockets and processes to networks.

bug:15757549
Change-Id: If23b14febc923b9a0348f0cf9029fd4bf6e8d725
/frameworks/base/core/java/android/net/NetworkUtils.java
8c6c2c3c929acad783b9a56b8d9efa597d0ae609 12-Jun-2014 Lorenzo Colitti <lorenzo@google.com> 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
/frameworks/base/core/java/android/net/NetworkUtils.java
6d3ff9ea3a542a18ca5da055418a7b9eff130d93 29-May-2014 Paul Jensen <pauljensen@google.com> Apply API review to android.net.Network:

- socketFactory() renamed to getSocketFactory()
- Make sure bindProcess() documentation points developers to getSocketFactory() as the preferred approach
- Move bindProcess() and unbindProcess() to ConnectivityManager.setProcessBoundNetwork() -- passing null clears it.
- Move getProcessBoundNetwork() to ConnectivityManager.getProcessBoundNetwork().

Bug:15142362
Bug:13885501

Change-Id: Ia55c59d52e1ec8bf10dd0d9d037bd04c0998bc71
/frameworks/base/core/java/android/net/NetworkUtils.java
3876495129cce3ed8ac6f247189b075dc9baec8f 20-May-2014 Paul Jensen <pauljensen@google.com> Implement bind-to-network functionality of android.net.Network.

This is implemented by calling through to netd_client.
Included are functions to bind-to-network-for-process strictly for DNS to
facilitate startUsingNetworkFeature() reimplementation.

Change-Id: Ib22c7d02ea81d251bdfeeb0f64a47ce32eefcb1b
/frameworks/base/core/java/android/net/NetworkUtils.java
12324b46049f9bcba9aa3d5fe7ae540d49a03076 11-Jul-2013 Chad Brubaker <cbrubaker@google.com> Add NetworkUtil function for marking sockets

Add NetworkUtil function for setting the SO_MARK field of sockets

Change-Id: I94389b64296d87ee928293f24a26f8dd08c3bf37
/frameworks/base/core/java/android/net/NetworkUtils.java
fea17de7aaa5729d3111102b2734b158403d2780 11-Jun-2013 Jeff Sharkey <jsharkey@android.com> Explicit locale when formatting machine strings.

Bug: 9390451
Change-Id: I3581c53407554a1dffd541fb42b06d68f20a7be0
/frameworks/base/core/java/android/net/NetworkUtils.java
4717c261b2c670d5c0925e3527a864aa52db6ac0 31-Oct-2012 Robert Greenwalt <rgreenwalt@google.com> Remove DhcpInfoInternal

First step in accepting a set of patches.
bug:6799630

Change-Id: I6c894c60aeb3022960c2aaa45451bb1dde2b493b
/frameworks/base/core/java/android/net/NetworkUtils.java
0faacf0658af00929481fa158f0c88289ba5145f 08-Dec-2011 Robert Greenwalt <rgreenwalt@google.com> Fix NPE in trimV4AddrZeros.

Change-Id: Id6ab91dabce4a2adba02f2601bc1157e87b782c3
/frameworks/base/core/java/android/net/NetworkUtils.java
3957b5fc49335f13b15080b8e7146580026c0479 07-Dec-2011 Robert Greenwalt <rgreenwalt@google.com> Fix the build.

Change-Id: I71d1d9958182966d2eff0d34fa05ac57f2cabc48
/frameworks/base/core/java/android/net/NetworkUtils.java
d4420ab2fbb85280d2f507072fe0bd820ac26a3f 07-Dec-2011 Robert Greenwalt <rgreenwalt@google.com> Trim leading zeros from ipv4 addrs.

Underlying libraries will interpret leading zeros as octal values and
fail.

bug:5262995
Change-Id: Iff949225bb6b941f7274ee81754e1f41ed719a6c
/frameworks/base/core/java/android/net/NetworkUtils.java
a10b7fd2239668a87be690a57ef7b3bc39b6bfd3 26-Jul-2011 Robert Greenwalt <rgreenwalt@google.com> resolved conflicts for merge of a7f68230 to master

Change-Id: I9e8faaa94f9b251a9c003dc6b9a3e2a97c4564a9
8171e6f690cca1bad354e7e352823d79d420daf3 08-Jul-2011 Wink Saville <wink@google.com> Use resetConnections with resetMask.

Bug: 4981919
Change-Id: I5dec2da0756d5083bc81494fd583672704537694
/frameworks/base/core/java/android/net/NetworkUtils.java
cf99765b6255d73aa4fbc61d5bd78ec65fbd0370 22-Jun-2011 Irfan Sheriff <isheriff@google.com> resolved conflicts for merge of 914ed90f to honeycomb-LTE

Change-Id: I616b7ba5c27d0cc4247f5cce4303effe14658e1e
c74eacde3028551864d8a9f8822803a835785c3a 22-Jun-2011 Irfan Sheriff <isheriff@google.com> resolved conflicts for merge of 267a6181 to honeycomb-LTE

Change-Id: I95d459c937f788ed15f178e85692e1c393bdaa04
914ed90f2c02092474d2db36626734ca1b2cf315 21-Jun-2011 Irfan Sheriff <isheriff@google.com> Revert "DO NOT MERGE Revert "DO NOT MERGE Add DhcpStateMachine""

This reverts commit 58d1bb497e0d83e28a02fbcdc1f33f29a992db7e.
/frameworks/base/core/java/android/net/NetworkUtils.java
58d1bb497e0d83e28a02fbcdc1f33f29a992db7e 21-Jun-2011 Irfan Sheriff <isheriff@google.com> DO NOT MERGE Revert "DO NOT MERGE Add DhcpStateMachine"

This reverts commit fe3b33d4ead06c546202753e38188db5e2eaa7fa.

Change-Id: I3a9ae1f0d17e7a154d27d4f3f3eb1efa21a34f64
/frameworks/base/core/java/android/net/NetworkUtils.java
59b1a4ede7032c1b4d897e13dd4ede09b5e14743 11-May-2011 Robert Greenwalt <rgreenwalt@google.com> Switch to use netd to add/remove routes.

Also adds support for v6 routes and for removing single routes.

Change-Id: I1c4f08c7938371090944d8d6f603e1e0d6d70c01
/frameworks/base/core/java/android/net/NetworkUtils.java
fe3b33d4ead06c546202753e38188db5e2eaa7fa 07-May-2011 Irfan Sheriff <isheriff@google.com> DO NOT MERGE Add DhcpStateMachine

Add DhcpStateMachine for interation with dhcpcd

- Supports wakeup and renewal on dhcp
- Supports multiple controllers to use the state machine
simultaneously
- Optionally, a controller can request a notification prior
to DHCP request/renewal being sent

Change-Id: I5324814b19ff19863aa6fa89f1e3f0a202930c98
/frameworks/base/core/java/android/net/NetworkUtils.java
f43396caaaae8f336bcf6fe9128a89dc7a7b0a5c 07-May-2011 Robert Greenwalt <rgreenwalt@google.com> Fix the adding of host routes.

We used to just add

Change-Id: I991e4cc976cc2932887dd3242fd50e013d521b0a
/frameworks/base/core/java/android/net/NetworkUtils.java
31be7cf4c7aef140f2a576975a7fd31e062f6964 28-Apr-2011 Irfan Sheriff <isheriff@google.com> Add DhcpStateMachine for interation with dhcpcd

- Supports wakeup and renewal on dhcp
- Supports multiple controllers to use the state machine
simultaneously
- Optionally, a controller can request a notification prior
to DHCP request/renewal being sent

Change-Id: I3a9d7e6a02ff26be3a86ddca6964683ad3c28f93
/frameworks/base/core/java/android/net/NetworkUtils.java
f5bbb5720454742e0e2f6ae489fa164845261cbf 16-Feb-2011 Elliott Hughes <enh@google.com> Use InetAddress.parseNumericAddress.

Bug: 3300307
Change-Id: I4ebfe533056e67931db1117e934596ba7b5c8b75
/frameworks/base/core/java/android/net/NetworkUtils.java
68e18d23298c62b61844eb296d247df55d45f463 27-Jan-2011 Robert Greenwalt <rgreenwalt@google.com> Fix the build

Check for null before trying to make InetAddresses.

Change-Id: I3228eea32eb455437dd76be2de56a913884f3f6e
/frameworks/base/core/java/android/net/NetworkUtils.java
0216e618198393bfd7ac0625fa6ad251d5ea682f 15-Jan-2011 Robert Greenwalt <rgreenwalt@google.com> Make the interface with DHCP IPv6 capable.

It doesn't work (yet) for IPv6, but we can remove v4-centric notions from the framework.

bug:2542681
Change-Id: I21c058f5c88d07706c9265bf0ea902fc90357e56
/frameworks/base/core/java/android/net/NetworkUtils.java
27d3c5907cc6f4366a7af3f0941d8d29d9b2440b 20-Jan-2011 Robert Greenwalt <rgreenwalt@google.com> Switch from NetworkUtils to netd for iface config.

Moving more stuff to netd and getting rid of unused NetworkUtils.

Change-Id: Ibb5a11dca58d07291fe33e6d33027553f6158ea7
/frameworks/base/core/java/android/net/NetworkUtils.java
07481ccd1dcc2912797ec64f0bfa5641b39adcea 07-Jan-2011 Jesse Wilson <jessewilson@google.com> Deprecate a method that formats only IPv4 addresses.

Anyone calling this method is probably storing IP addresses
in an int, which doesn't make sense anymore.

Change-Id: Iba535b66f6cff47ce07b5ecc6427e3b2fd846998
/frameworks/base/core/java/android/net/NetworkUtils.java
1693182c02b18eb6128eef79a1ec8c3764171544 04-Nov-2010 Elliott Hughes <enh@google.com> Remove NetworkUtils.isIpAddress.

Bug: 3073384
Change-Id: I5bd46d1995186c2384c68d0afff3b869f46624c5
/frameworks/base/core/java/android/net/NetworkUtils.java
96ca91761e6857c1ca2e4fafe5b35e4b5fefe5a1 06-Oct-2010 Irfan Sheriff <isheriff@google.com> Use LinkProperties for IP and proxy configuration

Change-Id: I4ae817fb00141e9a742216b7fd02dca1ed228270
/frameworks/base/core/java/android/net/NetworkUtils.java
585ac0fc8dde3fe35ec4c71c8f215f2c84139b8b 27-Aug-2010 Robert Greenwalt <robdroid@android.com> resolved conflicts for merge of 4ea54f44 to master

Change-Id: Ia77bb59a6e1950648c8ebf7db307e204f93a9f56
/frameworks/base/core/java/android/net/NetworkUtils.java
47f69fe2999e46004f2f2463b70d38de9ff7079a 16-Jun-2010 Robert Greenwalt <robdroid@android.com> Pass network properties to ConnectivityService.

Used as a bag to hold ipaddr, gateway, dns, proxy info.
addr's are InetAddresses for v4/v6 use. Cleaning up some old v4-only code

bug:2655015
Change-Id: I7ac886fe5c519e8bab42f49cd82a5189d9c9ab59
/frameworks/base/core/java/android/net/NetworkUtils.java
0900f3657664d9046e6723825fd32b244eef2b6c 10-Jul-2009 Mike Lockwood <lockwood@android.com> wifi: Keep the WLAN network interface up whenever wifi is enabled.

We now only bring it down briefly and bring it back up again when
we want to reset the interface.

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/java/android/net/NetworkUtils.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/NetworkUtils.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/NetworkUtils.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/net/NetworkUtils.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/net/NetworkUtils.java