Commit Graph

564 Commits

Author SHA1 Message Date
Vinit Deshpande
7e67bc3a2a am "Refactor NetworkUtils interaction with DHCP."
merged from goog/mirror-m-wireless-internal-release
25d2dba Refactor NetworkUtils interaction with DHCP.
2015-03-15 13:40:27 -07:00
Andreas Gampe
b96902e7bc resolved conflicts for merge of b6b9fe21 to master
Change-Id: If4f62aa1fd8bb774288a677e7008e86a7e3ea6d9
2015-03-13 00:04:10 -07:00
Wenchao Tong
ae7e9fb00a NetworkStatsService to adjust VPN stats before recording.
* Creates a new Parcelable class VpnInfo to hold required
  parameters for VPN stats adjustments.
* ConnectivityService to collect infomation and provide
  a list of VpnInfo, one for each user.
* NetworkStatsService passes the VpnInfo array to
  NetworkStatsRecorder.
* NetworkStatsRecorder calls NetworkStats.migrateTun()
  to do the math.
* Poll NetworkStats when the vpn application calls
  setUnderlyingNetworks().

Bug: 19536273
Change-Id: I7a4c7726b8243fead10416f7ec6eb5cf95f20183
2015-03-12 17:43:41 -07:00
Wenchao Tong
16ec7066c4 Merge "NetworkStats to support VPN accounting." 2015-03-12 22:10:56 +00:00
Paul Jensen
4c12c31336 Remove dead code, mostly DataStateTracker.
Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd
2015-03-11 10:03:58 -04:00
Wenchao Tong
d2515d61c3 NetworkStats to support VPN accounting.
Create a new method to migrate underlying network traffic
from VPN app to other apps.

Bug: 19536273
Change-Id: I3434cad361592e26b01225edf8012f7b16afc98f
2015-03-09 11:38:10 -07:00
Erik Kline
25d2dba89c 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
2015-03-02 12:35:35 +09:00
John Spurlock
ca9ba60d53 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Narayan Kamath
6478469ae5 Merge "Move apache specific portions of android.net.http to external/apache-http." 2015-02-13 09:51:44 +00:00
Jeremy Joslin
a0b0e76b46 am 861103ca: am 1267462c: am f456d4dc: am 0fb710e4: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '861103ca17c192f8d2f93050ed77a197e4d87570':
  Update Javadoc for EXTRA_NETWORK.
2015-02-12 19:40:48 +00:00
Jeremy Joslin
861103ca17 am 1267462c: am f456d4dc: am 0fb710e4: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '1267462c0bf8ef5a0cfaca535847fc962b2cf32e':
  Update Javadoc for EXTRA_NETWORK.
2015-02-12 18:56:35 +00:00
Narayan Kamath
439fe7bfb0 Move apache specific portions of android.net.http to external/apache-http.
We continue to compile external/apache-http into ext.jar. This contains
a few changes apart fom the classes moving around :

- Makefile changes to build docs and api-stubs for now. A future change
  will revert these changes and remove these classes from stubs and
  docs.
- Hardcode event IDs in legacyerrorstrings to avoid a dependency between
  the frameworks and apache. These strings are on their way out and will
  never change anyway.
- Remove imports due to {@link} tags and use {@code} instead.
- Remove an accidental(?) dependency on apache commons code that's a
  part of apache-http.

bug: 18027885

Change-Id: I51cd038d846ec7d02c283a4541b10a6a9cf62ecf
2015-02-12 11:15:49 +00:00
Jeremy Joslin
fe76e0e853 Update Javadoc for EXTRA_NETWORK.
Bug: 19352840
Change-Id: Ib668bee0fb2c6f5bcd01a7908ebd20b9ec8a40ef
2015-02-11 18:28:57 -08:00
Lorenzo Colitti
579c5cd0fc am 2a93f1de: am 12b26c12: am 21702263: Merge "Add a unit test for StaticIpConfiguration."
* commit '2a93f1de470cc6981bb4d55f1044ea1160817496':
  Add a unit test for StaticIpConfiguration.
2015-02-05 02:41:31 +00:00
Lorenzo Colitti
2a93f1de47 am 12b26c12: am 21702263: Merge "Add a unit test for StaticIpConfiguration."
* commit '12b26c12483633f7a75d1f1c9ead73eaf6056811':
  Add a unit test for StaticIpConfiguration.
2015-02-05 02:31:40 +00:00
Lorenzo Colitti
e5c450b671 Add a unit test for StaticIpConfiguration.
Change-Id: I68c735def8a242da0c8f95b7c5ea680ed902dab7
2015-02-04 17:28:35 +09:00
Lorenzo Colitti
548851645c Merge "Also include the domain when parceling StaticIpConfiguration." automerge: 998c8f7 automerge: 5b392ee
automerge: e142cde

* commit 'e142cde1b354022044aaade6bee226c0010ea953':
  Also include the domain when parceling StaticIpConfiguration.
2015-01-30 15:59:49 +00:00
Lorenzo Colitti
e142cde1b3 Merge "Also include the domain when parceling StaticIpConfiguration." automerge: 998c8f7
automerge: 5b392ee

* commit '5b392ee7584688d6929ca40760d0df2a12bd0b16':
  Also include the domain when parceling StaticIpConfiguration.
2015-01-30 15:56:00 +00:00
Lorenzo Colitti
67635d5982 Also include the domain when parceling StaticIpConfiguration.
StaticIpConfiguration objects are parceled at least as part of the
IpConfiguration objects that are passed to IEthernetManager when an
application sets static IP configuration on Ethernet.

Change-Id: I49991e2f591cc6cf01b503c18eb343b5929efe29
2015-01-29 12:20:55 +00:00
Paul Jensen
fe83f04c44 Fix DhcpResults.setDomain() and StaticIpConfiguration.toLinkProperties()
setDomain() and toLinkProperties() were not setting the domains.
The setDomain() bug affected Wifi and I believe the toLinkProperties()
bug affected Ethernet and Bluetooth reverse-tethering.

(cherry picked from commit f084aea4d7)

bug:18252947
Change-Id: I6235fcd6b875aee516efbb5f880db1a99380355b
2015-01-29 17:12:35 +09:00
Lorenzo Colitti
d5824b5d2b Support connecting to networks with misconfigured subnet masks.
In K and earlier, we would connect to a network where the gateway
was not covered by the subnet mask of the IP address. This is an
invalid configuration, but it used to work, and other OSes appear
to accept it too, so support it.

Bug: 19067207

(cherry picked from commit d2a878d730)

Change-Id: I80088f291466dbd5a47f360dcc1620acee5cf57e
2015-01-28 20:36:37 +09:00
Lorenzo Colitti
22d4a6f870 am 50f9d93a: am 220f987b: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
automerge: 2ee310c

* commit '2ee310c9c1d1ee443d087bdd0cd2c7c685da0e98':
  Support connecting to networks with misconfigured subnet masks.
2015-01-23 13:05:26 +00:00
Lorenzo Colitti
2ee310c9c1 am 50f9d93a: am 220f987b: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
* commit '50f9d93a1c6f3d9f28966dd61997b4b780f31fb2':
  Support connecting to networks with misconfigured subnet masks.
2015-01-23 13:01:42 +00:00
Lorenzo Colitti
d2a878d730 Support connecting to networks with misconfigured subnet masks.
In K and earlier, we would connect to a network where the gateway
was not covered by the subnet mask of the IP address. This is an
invalid configuration, but it used to work, and other OSes appear
to accept it too, so support it.

Bug: 19067207
Change-Id: I822e1d754b336691b675438eefa959a3d75fd07b
2015-01-23 21:10:34 +09:00
Neil Fuller
915c21e46d am c526df98: resolved conflicts for merge of 7382c02d to lmp-mr1-dev-plus-aosp
* commit 'c526df987d8c8e53e7de5480254c5f03eba06f49':
  Changes associated with an OkHttp upgrade
2015-01-20 13:29:31 +00:00
Neil Fuller
c526df987d resolved conflicts for merge of 7382c02d to lmp-mr1-dev-plus-aosp
Change-Id: Idfa2750230aa56e7ae34fcc33d62558df942abd0
2015-01-20 13:21:58 +00:00
Neil Fuller
61baa3a7ff Changes associated with an OkHttp upgrade
Change-Id: I2a4db602aa7ffdef886e0f1a955715a2551a87a5
2015-01-20 11:59:24 +00:00
Paul Jensen
e257fc69fd am 69855a7b: am 6c93739f: am 034dea3a: Clear process DNS NetID binding when expiring or releaseing legacy requests.
* commit '69855a7b698e80829fe60711b2a9b8c6e52b8e9e':
  Clear process DNS NetID binding when expiring or releaseing legacy requests.
2015-01-06 20:09:18 +00:00
Paul Jensen
69855a7b69 am 6c93739f: am 034dea3a: Clear process DNS NetID binding when expiring or releaseing legacy requests.
* commit '6c93739f2f25c8afb77997165fa86be537df67a9':
  Clear process DNS NetID binding when expiring or releaseing legacy requests.
2015-01-06 14:57:44 +00:00
Paul Jensen
034dea3a1b Clear process DNS NetID binding when expiring or releaseing legacy requests.
When requests made by ConnectivityManager.startUsingNetworkFeature() are
expired or are canceled via ConnectivityManager.stopUsingNetworkFeature(),
we must remember to clear the binding of DNS requests from the calling
process to the Network satisfying the request.

bug:18778725
Change-Id: I800c808ac6486000241b5d263aa79a1192a9fe9e
2015-01-06 09:43:04 -05:00
Narayan Kamath
39b19ce1f6 am d3d95172: am 38c2dae5: Merge "Remove hardcoded include paths."
automerge: 6ebb2c7

* commit '6ebb2c743a8a03d26664996b93a4792ca44580b8':
  Remove hardcoded include paths.
2014-12-31 10:21:39 +00:00
Narayan Kamath
6ebb2c743a am d3d95172: am 38c2dae5: Merge "Remove hardcoded include paths."
* commit 'd3d95172c3645a1d7a12e540638207ae4fb69cae':
  Remove hardcoded include paths.
2014-12-31 10:19:00 +00:00
Narayan Kamath
c247c36ea0 Remove hardcoded include paths.
ICU, zlib & openssl export them using LOCAL_EXPORT_C_INCLUDE_DIRS.
The dependency on libc/dns/include was bogus and can be removed
trivially.

bug: 18581021
Change-Id: I4b8047ff0df1050ab48b61c0c886888b3f2f0c18
2014-12-31 10:06:51 +00:00
Paul Jensen
025b336325 am 269d28ea: Merge "Fix several HTTP proxy issues with multinetworking." into lmp-mr1-dev automerge: d9d48cc
automerge: 51d8af7

* commit '51d8af74a542a78682d37e4cd1e3541d45a858f0':
  Fix several HTTP proxy issues with multinetworking.
2014-12-11 10:25:47 +00:00
Paul Jensen
51d8af74a5 am 269d28ea: Merge "Fix several HTTP proxy issues with multinetworking." into lmp-mr1-dev
automerge: d9d48cc

* commit 'd9d48cc9c7ab0d1590918e199917968eafc48288':
  Fix several HTTP proxy issues with multinetworking.
2014-12-11 05:49:18 +00:00
Paul Jensen
269d28ea09 Merge "Fix several HTTP proxy issues with multinetworking." into lmp-mr1-dev 2014-12-11 04:51:16 +00:00
Erik Kline
a841f3a6b4 am cb34622b: am b6992b4e: Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev automerge: 56d2e8f
* commit 'cb34622bc7547fc9ee612eea4ffe780da4383ab6':
  Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.
2014-12-10 21:58:42 +00:00
Paul Jensen
1213135858 Fix several HTTP proxy issues with multinetworking.
1. Send PROXY_CHANGE_ACTION broadcast when any network's proxy changes,
   not just the default network.
2. When a process is bound to a particular Network, update the proxy
   system properties to those for the bound Network, and keep them
   updated when PROXY_CHANGE_ACTION broadcasts are received.
3. Make Network.openConnection() use the proxy for the Network.

bug:17905627
bug:17420465
bug:18144582

(cherry-pick of https://android-review.googlesource.com/#/c/115170)

Change-Id: Ia2819985e6108a8c121e74c683a5646becfd0a97
2014-12-10 15:22:12 -05:00
Erik Kline
cb34622bc7 am b6992b4e: Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev
automerge: 56d2e8f

* commit '56d2e8fb7b2ab6e32efea59604eb0cd72745df1b':
  Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.
2014-12-10 19:06:50 +00:00
Erik Kline
b6992b4ea8 Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev 2014-12-10 07:29:47 +00:00
Wink Saville
62b358f9fd am 421a8451: am 2f5cb843: am e6ec511d: Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
* commit '421a8451e85ce781c0800a70f29cd74a8a98452c':
  Add subId as parameter for get/setDataEnabled.
2014-12-09 23:47:19 +00:00
Jeff Sharkey
7da4003ef1 am 843d49ab: am 5b41696c: am a8fb5803: Merge "Offer to "merge" subscribers for data usage." into lmp-mr1-dev
* commit '843d49abeaa843e87bf18e75e240ced4915dc893':
  Offer to "merge" subscribers for data usage.
2014-12-09 22:23:19 +00:00
Wink Saville
421a8451e8 am 2f5cb843: am e6ec511d: Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
* commit '2f5cb843553a596d314596c2bb776541db864d63':
  Add subId as parameter for get/setDataEnabled.
2014-12-09 18:06:03 +00:00
Wink Saville
e6ec511d92 Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev 2014-12-09 17:52:27 +00:00
Pavel Zhamaitsiak
903066df79 am 26bf8bec: am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit '26bf8bec3154e04768940244371554cd9393a99a':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
2014-12-09 00:18:39 +00:00
Jeff Sharkey
843d49abea am 5b41696c: am a8fb5803: Merge "Offer to "merge" subscribers for data usage." into lmp-mr1-dev
* commit '5b41696c56c124124d48168227a83b63bd55aea7':
  Offer to "merge" subscribers for data usage.
2014-12-08 19:44:27 +00:00
Pavel Zhamaitsiak
26bf8bec31 am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit 'd89f0d3d54dec1662b1cfed6c8e574ffcc8032d9':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
2014-12-08 19:16:43 +00:00
Jeff Sharkey
fe0b08d122 Offer to "merge" subscribers for data usage.
There are some cases where multiple subscriber identities (IMSI)
should be treated as "merged together" from a data usage
perspective.  This is done by extending the template used for
matching purposes to support multiple subscribers.

Then, when we query historical usage or set network policies, we
normalize the matching template to merge to any other identities
that should be included.  When normalizing, the "lowest" identity
is always used for equality and storage purposes, which allows
identities to come and go over time.

This change also fixes data usage recording for multi-SIM devices
by passing along the concrete subscriber identity for each network
interface.  Also correctly create default policies for multi-SIM
devices.  This change also drops setPolicyDataEnable() until it can
be wired up to the right underlying NetworkAgent.  (This means we
still bring up the network, and then rely on iptables rules to block
traffic when over the limit, instead of proactively disabling the
connection.)

Bug: 18012787
Change-Id: If6acf32009fdfea2b836f5aff8e2f3e5e0248b4a
2014-12-08 08:42:59 -08:00
Erik Kline
e2d501253b Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.
Since optimistic addresses are useable upon kernel notification
there is no need for this extra connectivity delay.

---

This functionality was originally submitted in ag/572619.  Owing
to issues with bind()ing to optimistic addresses (see b/18609055)
this was reverted in ag/598673.

This reverts the revert.  :-)

Bug: 17769720
Change-Id: Ibee490b2af72050693b6bd748193f51e312ca527
2014-12-08 16:25:20 +09:00
Wink Saville
02eb35caee Add subId as parameter for get/setDataEnabled.
Bug: 18279333
Change-Id: I2496a2fd92b154e5e6981cbf6b5b5939cda59122
2014-12-05 11:10:30 -08:00