Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
resolved conflicts for merge of b6b9fe21 to master
Change-Id: If4f62aa1fd8bb774288a677e7008e86a7e3ea6d9

Andreas Gampe   commited 2015-03-13 00:04:10 -07:00
8679a46283
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

Wenchao Tong   commited 2015-03-12 17:43:41 -07:00
e164e0063b
Remove dead code, mostly DataStateTracker.
Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd

Paul Jensen   commited 2015-03-11 10:03:58 -04:00
9edb1fc511
Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17

John Spurlock   commited 2015-02-28 14:47:49 -05:00
c3c163f3f4
Merge "Move apache specific portions of android.net.http to external/apache-http."
Narayan Kamath   authored and   Android (Google) Code Review   commited 2015-02-13 09:51:44 +00:00
3473245e45
am 0992f962: am 1267462c: am f456d4dc: am d4d604e2: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '0992f96246':
  Update Javadoc for EXTRA_NETWORK.

Jeremy Joslin   authored and   Android Git Automerger   commited 2015-02-12 19:40:48 +00:00
3aee237f28
am 1267462c: am f456d4dc: am d4d604e2: Merge "Update Javadoc for EXTRA_NETWORK." into lmp-mr1-dev
* commit '1267462c0bf8ef5a0cfaca535847fc962b2cf32e':
  Update Javadoc for EXTRA_NETWORK.

Jeremy Joslin   authored and   Android Git Automerger   commited 2015-02-12 18:56:35 +00:00
0992f96246
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

Narayan Kamath   commited 2015-02-12 11:15:49 +00:00
9a87ca5691
Update Javadoc for EXTRA_NETWORK.
Bug: 19352840
Change-Id: Ib668bee0fb2c6f5bcd01a7908ebd20b9ec8a40ef

Jeremy Joslin   commited 2015-02-11 18:28:57 -08:00
c53026391a
Merge "Also include the domain when parceling StaticIpConfiguration." automerge: c40bd27 automerge: 5b392ee
automerge: 792622f

* commit '792622f754':
  Also include the domain when parceling StaticIpConfiguration.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-30 15:59:49 +00:00
d2147882c6
Merge "Also include the domain when parceling StaticIpConfiguration." automerge: c40bd27
automerge: 5b392ee

* commit '5b392ee7584688d6929ca40760d0df2a12bd0b16':
  Also include the domain when parceling StaticIpConfiguration.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-30 15:56:00 +00:00
792622f754
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

Lorenzo Colitti   commited 2015-01-29 12:20:55 +00:00
68a1a34ec0
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 c53113b37f33c7ed19660c8ec5bfd578e8bb5409)

bug:18252947
Change-Id: I6235fcd6b875aee516efbb5f880db1a99380355b

Paul Jensen   authored and   Lorenzo Colitti   commited 2015-01-29 17:12:35 +09:00
99366a8aa4
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 2dfb79a54adeb4bcf1f62332a9db467fce302ced)

Change-Id: I80088f291466dbd5a47f360dcc1620acee5cf57e

Lorenzo Colitti   commited 2015-01-28 20:36:37 +09:00
c915d4c83d
am 50f9d93a: am 68c9c5aa: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
automerge: 7325a9d

* commit '7325a9da74':
  Support connecting to networks with misconfigured subnet masks.

Lorenzo Colitti   authored and   android-build-merger   commited 2015-01-23 13:05:26 +00:00
6c1da05211
am 50f9d93a: am 68c9c5aa: Merge "Support connecting to networks with misconfigured subnet masks." into lmp-mr1-dev
* commit '50f9d93a1c6f3d9f28966dd61997b4b780f31fb2':
  Support connecting to networks with misconfigured subnet masks.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-01-23 13:01:42 +00:00
7325a9da74
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

Lorenzo Colitti   commited 2015-01-23 21:10:34 +09:00
64f1689c81
am 1c60d120: resolved conflicts for merge of 7382c02d to lmp-mr1-dev-plus-aosp
* commit '1c60d1208f':
  Changes associated with an OkHttp upgrade

Neil Fuller   authored and   Android Git Automerger   commited 2015-01-20 13:29:31 +00:00
7141623597
resolved conflicts for merge of 7382c02d to lmp-mr1-dev-plus-aosp
Change-Id: Idfa2750230aa56e7ae34fcc33d62558df942abd0

Neil Fuller   commited 2015-01-20 13:21:58 +00:00
1c60d1208f
Changes associated with an OkHttp upgrade
Change-Id: I2a4db602aa7ffdef886e0f1a955715a2551a87a5

Neil Fuller   commited 2015-01-20 11:59:24 +00:00
c30362d9cf
am 81af1e4f: am 6c93739f: am 49f74a38: Clear process DNS NetID binding when expiring or releaseing legacy requests.
* commit '81af1e4f39':
  Clear process DNS NetID binding when expiring or releaseing legacy requests.

Paul Jensen   authored and   Android Git Automerger   commited 2015-01-06 20:09:18 +00:00
a18ea556e9
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

Paul Jensen   commited 2015-01-06 09:43:04 -05:00
49f74a382b
am 7a0d9799: Merge "Fix several HTTP proxy issues with multinetworking." into lmp-mr1-dev automerge: d9d48cc
automerge: d6524c4

* commit 'd6524c4eb5':
  Fix several HTTP proxy issues with multinetworking.

Paul Jensen   authored and   android-build-merger   commited 2014-12-11 10:25:47 +00:00
62911488e9
Merge "Fix several HTTP proxy issues with multinetworking." into lmp-mr1-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2014-12-11 04:51:16 +00:00
7a0d9799c8
am e1bf37a8: am 63aba09c: Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev automerge: 56d2e8f
* commit 'e1bf37a85e':
  Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions.

Erik Kline   authored and   Android Git Automerger   commited 2014-12-10 21:58:42 +00:00
334d819b68
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

Paul Jensen   commited 2014-12-10 15:22:12 -05:00
c0618a69f1
Merge "Re-remove CONNECTIVITY_CHANGE_DELAY and supporting functions." into lmp-mr1-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2014-12-10 07:29:47 +00:00
63aba09c17
am 4d9749fd: am 2f5cb843: am 6490d869: Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
* commit '4d9749fd5d':
  Add subId as parameter for get/setDataEnabled.

Wink Saville   authored and   Android Git Automerger   commited 2014-12-09 23:47:19 +00:00
e135d0f2a2
am 3c18de21: am 5b41696c: am a8fb5803: Merge "Offer to "merge" subscribers for data usage." into lmp-mr1-dev
* commit '3c18de21c7':
  Offer to "merge" subscribers for data usage.

Jeff Sharkey   authored and   Android Git Automerger   commited 2014-12-09 22:23:19 +00:00
e273f27053
Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
Wink Saville   authored and   Android (Google) Code Review   commited 2014-12-09 17:52:27 +00:00
6490d8694a
am d7d4a9c8: am d89f0d3d: am b81ce34a: Merge "Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"" into lmp-mr1-dev
* commit 'd7d4a9c811':
  Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"

Pavel Zhamaitsiak   authored and   Android Git Automerger   commited 2014-12-09 00:18:39 +00:00
9dc0babd8d
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

Jeff Sharkey   commited 2014-12-08 08:42:59 -08:00
fffa983fe4
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

Erik Kline   commited 2014-12-08 16:25:20 +09:00
b883659514
Add subId as parameter for get/setDataEnabled.
Bug: 18279333
Change-Id: I2496a2fd92b154e5e6981cbf6b5b5939cda59122

Wink Saville   commited 2014-12-05 11:10:30 -08:00
689f70442c
Revert "Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev"
This is the revert of ag/572619.

This reverts commit b5ae87a8d0, reversing
changes made to 32b61ab28f54e5b00f472b2166f9b1100375e4ff.

Bug: 18609055
Bug: 17769720
Change-Id: I122eba200f2071d4e5777ec34c1d04fb567345a8

Erik Kline   authored and   Pavel Zhamaitsiak   commited 2014-12-05 18:02:56 +00:00
c1529548aa
am e9d534d5: am 95b5ca90: am b5ae87a8: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit 'e9d534d537':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.

Erik Kline   authored and   Android Git Automerger   commited 2014-12-04 21:55:38 +00:00
aabb20ee04
Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2014-12-04 03:14:02 +00:00
b5ae87a8d0
am 307422bd: am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit '307422bdef':
  Make StatusBar display all default networks.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2014-12-03 21:49:38 +00:00
8aae8b885a
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

Lorenzo Colitti   authored and   Jeff Davidson   commited 2014-12-02 10:27:05 -08:00
79bd2e2841
am ee1d722e: am d125266b: am 4bcd4a79: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'ee1d722e1c':
  Revert some verbose logging from ag/489226

Erik Kline   authored and   Android Git Automerger   commited 2014-12-02 07:42:45 +00:00
2ca89c1005
Revert some verbose logging from ag/489226
Bug: 18171889
Change-Id: I582a17b2272746e04717ac8da1d6984ff187ddf6

Erik Kline   commited 2014-11-26 09:01:16 +09:00
bd49990557
Merge "Map TYPE_VPN integer to "VPN" string."
Erik Kline   authored and   Android (Google) Code Review   commited 2014-11-25 18:46:37 +00:00
ec6a80208e
Map TYPE_VPN integer to "VPN" string.
Bug: 18439110
Change-Id: I0fa0c9e6a9293ab724e2b5e7d0f586f05cd100c7

Erik Kline   commited 2014-11-25 13:16:58 +09:00
137fadcd4c
Merge "Delete unused/non-working code." into lmp-mr1-dev
Sreeram Ramachandran   authored and   Android (Google) Code Review   commited 2014-11-24 17:24:26 +00:00
04f46a029e
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

Sreeram Ramachandran   commited 2014-11-21 09:26:18 -08:00
d2b4fe2b2d
Delete unused/non-working code.
Change-Id: I2cba9ffdb4ed547cb922d0ac08abf81e49ffa66b

Sreeram Ramachandran   commited 2014-11-21 08:08:19 -08:00
541254ae51
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

Sreeram Ramachandran   commited 2014-11-21 08:07:13 -08:00
7c9871648e
Rename EXTRA_NETWORK ConnectivityManager constants.
Per b/18414703:

    s/\<EXTRA_NETWORK_REQUEST_NETWORK\>/EXTRA_NETWORK/g
    s/\<EXTRA_NETWORK_REQUEST_NETWORK_REQUEST\>/EXTRA_NETWORK_REQUEST/g

Additionally, associated string values updated to:

    android.net.extra.NETWORK
    android.net.extra.NETWORK_REQUEST

Bug: 18414703
Change-Id: I7aeed2161829742affc666e835a97ce2c28356fe

Erik Kline   commited 2014-11-20 13:16:31 +09:00
8a82621cdb
Implemented requestNetwork with a PendingIntent.
ConnectivityManager.requestNetwork(NetworkRequest, PendingIntent)
was unhidden and implemented.

Added ConnectivityManager.removePendingIntentRequest(PendingIntent) as
the companion method.

Bug: 17356414
Change-Id: I656a1e149cc1292c443ebfe9e61ee3eb5a80f143

Jeremy Joslin   commited 2014-11-06 11:43:27 -08:00
60d379b618
Merge "Fix Legacy typing of net-specific requests." into lmp-mr1-dev
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2014-11-05 23:36:01 +00:00
08881e11cf