Commit Graph

540 Commits

Author SHA1 Message Date
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
Erik Kline
2e3fd9c6a2 Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
This is the revert of ag/572619.

This reverts commit 31c992a477, reversing
changes made to 32b61ab28f54e5b00f472b2166f9b1100375e4ff.

Bug: 18609055
Bug: 17769720
Change-Id: I122eba200f2071d4e5777ec34c1d04fb567345a8
2014-12-05 18:02:56 +00:00
Erik Kline
25bacb41a6 am 4a3360aa: am 95b5ca90: am 31c992a4: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit '4a3360aa65c387236bca1f2262f19a14c15fc0d4':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.
2014-12-04 21:55:38 +00:00
Erik Kline
4a3360aa65 am 95b5ca90: am 31c992a4: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit '95b5ca9019720c4c012ca13791d32aa6d0bb5ba8':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.
2014-12-04 21:45:33 +00:00
Erik Kline
31c992a477 Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev 2014-12-04 03:14:02 +00:00
Lorenzo Colitti
66b7f4269e am 12fdb64d: am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit '12fdb64da9863d7377231525fada00b75784ba3a':
  Make StatusBar display all default networks.
2014-12-03 21:49:38 +00:00
Lorenzo Colitti
12fdb64da9 am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit 'd99cd44f317a0e1b188a0033ebe4948f13c32491':
  Make StatusBar display all default networks.
2014-12-03 20:41:10 +00:00
Lorenzo Colitti
8db934afbf Make StatusBar display all default networks.
The basic principle is: if an app's traffic could possibly go
over a network without the app using the multinetwork APIs (hence
"by default"), then the status bar should show that network's
connectivity.

In the normal case, app traffic only goes over the system's default
network connection, so that's the only network returned.

With a VPN in force, some app traffic may go into the VPN, and thus over
whatever underlying networks the VPN specifies, while other app traffic
may go over the system default network (e.g.: a split-tunnel VPN, or an
app disallowed by the VPN), so the set of networks returned includes the
VPN's underlying networks and the system default.

Specifically:

1. Add a NETWORK_CAPABILITY_VALIDATED bit to NetworkCapabilities.
2. Add a hidden API to retrieve the NetworkCapabilities of
   all default networks for a given macro-user.
3. Modify the status bar code that used getActiveNetworkInfo to
   determine which network was active, and make it consider all
   validated networks instead.
4. Because the set of active networks depends on which VPN app
   the user is running, make the status bar re-evaluate the
   networking situation when the active user changes.

Bug: 17460017
Change-Id: Ie4965f35fb5936b088e6060ee06e362c22297ab2
2014-12-02 10:27:05 -08:00
Erik Kline
5aaacecb3c am 0d4d3213: am d125266b: am 858e96b3: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit '0d4d3213ab682db7ca9eb57e2124656606a75049':
  Revert some verbose logging from ag/489226
2014-12-02 07:42:45 +00:00
Erik Kline
0d4d3213ab am d125266b: am 858e96b3: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'd125266b3c0cabcb42e6331a312c66071fedd752':
  Revert some verbose logging from ag/489226
2014-12-02 07:35:59 +00:00
Erik Kline
2106740914 Revert some verbose logging from ag/489226
Bug: 18171889
Change-Id: I582a17b2272746e04717ac8da1d6984ff187ddf6
2014-11-26 09:01:16 +09:00
Erik Kline
637e14a64f Merge "Map TYPE_VPN integer to "VPN" string." 2014-11-25 18:46:37 +00:00
Sreeram Ramachandran
8ee414c445 am 608ea322: am eac470a9: Merge "Delete unused/non-working code." into lmp-mr1-dev
* commit '608ea322868385aaa46c20887795e72bf7068479':
  Delete unused/non-working code.
2014-11-25 15:10:20 +00:00
Sreeram Ramachandran
dedb930376 am 4096a310: am 83f7111b: Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev
* commit '4096a3107b070339ba06102a32a368f28a31f9a4':
  Allow VPNs to specify their underlying networks.
2014-11-25 15:10:14 +00:00
Sreeram Ramachandran
8c06e6939a am 1d16570b: am 9a4a64cb: Merge "Eliminate race conditions in UID-based network filtering." into lmp-mr1-dev
* commit '1d16570b374ffaea89a3e3d403146008d12e60b9':
  Eliminate race conditions in UID-based network filtering.
2014-11-25 15:10:08 +00:00
Erik Kline
b1ff700053 Map TYPE_VPN integer to "VPN" string.
Bug: 18439110
Change-Id: I0fa0c9e6a9293ab724e2b5e7d0f586f05cd100c7
2014-11-25 13:16:58 +09:00
Sreeram Ramachandran
eac470a946 Merge "Delete unused/non-working code." into lmp-mr1-dev 2014-11-24 17:24:26 +00:00
Sreeram Ramachandran
83f7111bdd Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev 2014-11-24 17:24:04 +00:00
Sreeram Ramachandran
9a4a64cb80 Merge "Eliminate race conditions in UID-based network filtering." into lmp-mr1-dev 2014-11-24 17:21:18 +00:00
Jeff Sharkey
e6646ce80d am 54c11274: am c0491a2e: Merge "Lightweight checkin output for network stats." into lmp-mr1-dev
* commit '54c11274b5e7ce9f774f7c846d7165563279b96a':
  Lightweight checkin output for network stats.
2014-11-21 22:09:28 +00:00
Jeff Sharkey
80330fb05d Lightweight checkin output for network stats.
Define and print a compact version of network statistics when dump
is requested with the "--checkin" flag.  Defaults to last 24 hours,
but included data can be tweaked with various flags.

Groups together detailed network identities into larger umbrella
terms like "mobile" and "wifi."

Bug: 18415963
Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6
2014-11-21 10:11:10 -08:00
Sreeram Ramachandran
af655d9e52 Allow VPNs to specify their underlying networks.
These are used when responding to getActiveNetworkInfo() (and cousins)
when an app is subject to the VPN.

Bug: 17460017
Change-Id: Ief7a840c760777a41d3358aa6b8e4cdd99c29f24
2014-11-21 09:26:18 -08:00
Sreeram Ramachandran
5876d9ec20 Delete unused/non-working code.
Change-Id: I2cba9ffdb4ed547cb922d0ac08abf81e49ffa66b
2014-11-21 08:08:19 -08:00
Sreeram Ramachandran
44e21e44e3 Eliminate race conditions in UID-based network filtering.
The previous code retrieved information from the legacy tracker multiple
times for each user query, leading to race conditions where the info
could've changed between the calls.

Refactors the handling of legacy data types in ConnectivityService and
unifies call paths so that APIs that deal with legacy data types
(NetworkInfo and int/networkType) and newer types (such as Network) go
through common code paths, using NetworkState to hold all the necessary
data pieces. This enables follow-on bug fixes to getActiveNetworkInfo().

The changes are limited to public "query" APIs (those that retrieve some
network information or the other). More details about the specific
changes and their rationale can be found in the code review thread.

Bug: 17460017
Change-Id: I656ee7eddf2b8cace5627036452bb5748043406c
2014-11-21 08:07:13 -08:00
Erik Kline
ad329e1659 am 4e9ea5e9: Merge "Rename EXTRA_NETWORK ConnectivityManager constants." into lmp-mr1-dev
automerge: dedd42a

* commit 'dedd42a2bdfafd6195d793949766d1c53f80ae51':
  Rename EXTRA_NETWORK ConnectivityManager constants.
2014-11-21 02:57:09 +00:00