Commit Graph

1500 Commits

Author SHA1 Message Date
Erik Kline
0f3c0704c5 am 180a30aa: am 95b5ca90: am 9261d9d6: Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev
* commit '180a30aa57e0790453944533dc442704f7596f65':
  Remove CONNECTIVITY_CHANGE_DELAY and friends.
2014-12-04 21:55:38 +00:00
Erik Kline
180a30aa57 am 95b5ca90: am 9261d9d6: 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
9261d9d645 Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev 2014-12-04 03:14:02 +00:00
Sreeram Ramachandran
16d75742fc am 3a8fbb80: am 95e4474c: am 932c3321: Merge "Fix docs per API review." into lmp-mr1-dev
* commit '3a8fbb8072f564c6da9b7655c1c90b26670d2f12':
  Fix docs per API review.
2014-12-03 21:51:05 +00:00
Lorenzo Colitti
41762ecac0 am 45cd4df6: am d99cd44f: am dc99c504: Merge "Make StatusBar display all default networks." into lmp-mr1-dev
* commit '45cd4df6a0915558efa6bf4ec9c61fadff70572f':
  Make StatusBar display all default networks.
2014-12-03 21:49:38 +00:00
Sreeram Ramachandran
3a8fbb8072 am 95e4474c: am 932c3321: Merge "Fix docs per API review." into lmp-mr1-dev
* commit '95e4474c7069bdd85178aab96182bc0088b43a70':
  Fix docs per API review.
2014-12-03 20:43:50 +00:00
Lorenzo Colitti
45cd4df6a0 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
Sreeram Ramachandran
9e956e9b9a Fix docs per API review.
Bug: 18573918
Change-Id: I639fe2ce40cdef57d904b9ad1ebb28db7d057144
2014-12-03 10:53:35 -08:00
Lorenzo Colitti
403aa2684e 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
80a4543ca2 am d8b011a3: am d125266b: am f27b52aa: Merge "Revert some verbose logging from ag/489226" into lmp-mr1-dev
* commit 'd8b011a3548910a26d5b7a451bafb07b5384e246':
  Revert some verbose logging from ag/489226
2014-12-02 07:42:45 +00:00
Erik Kline
d8b011a354 am d125266b: am f27b52aa: 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
Narayan Kamath
24009c1b87 am f1459604: am ed2c9c60: am 10a36fb7: Merge "Stop using ErrorStrings for apache."
* commit 'f1459604392dc0416500e149f1bafa11139dcfcc':
  Stop using ErrorStrings for apache.
2014-11-27 18:09:40 +00:00
Narayan Kamath
f145960439 am ed2c9c60: am 10a36fb7: Merge "Stop using ErrorStrings for apache."
* commit 'ed2c9c6029b18df9c25d6c98c909ac5f300d6ab1':
  Stop using ErrorStrings for apache.
2014-11-27 18:03:15 +00:00
Narayan Kamath
f1a9b1bc24 Stop using ErrorStrings for apache.
These strings only ever end up in logcat (at best), so there's no
point having them translated. Also, rename the ErrorStrings class
and move it android.webkit where the last remaining caller lives.

(congrats webview people, this is now your mess to maintain.)

Change-Id: I04dae37c34191b26a69282970318c1b782af1edf
2014-11-27 17:23:41 +00:00
Narayan Kamath
0f4a1abc39 am d534645b: am bedb1378: am 8036d2ec: Merge "Delete general sounding "CharArrayBuffers" class."
* commit 'd534645bab608bbee1ec6e9e72d10b88c53c023f':
  Delete general sounding "CharArrayBuffers" class.
2014-11-27 14:15:22 +00:00
Narayan Kamath
d534645bab am bedb1378: am 8036d2ec: Merge "Delete general sounding "CharArrayBuffers" class."
* commit 'bedb13782a6beb5f15621915a7b68439c6649ced':
  Delete general sounding "CharArrayBuffers" class.
2014-11-27 14:10:03 +00:00
Narayan Kamath
b8b6e1f8f1 am 5445d3de: am f0c22b0c: am 14e28134: Merge "Delete unused class from android.net.http."
* commit '5445d3de90fd28ba8e096a109a242615bb8222d3':
  Delete unused class from android.net.http.
2014-11-27 14:01:23 +00:00
Narayan Kamath
5445d3de90 am f0c22b0c: am 14e28134: Merge "Delete unused class from android.net.http."
* commit 'f0c22b0c72c8fbd5ce507419adda0670871a07bf':
  Delete unused class from android.net.http.
2014-11-27 13:55:02 +00:00
Narayan Kamath
0ea4e7b581 Delete general sounding "CharArrayBuffers" class.
Move the code to the only point of use. Preparatory work for
decoupling apache-http from the frameworks.

Change-Id: Ieee54bb725cbac19d0c7513867635df6fbcf2b49
2014-11-27 13:52:11 +00:00
Narayan Kamath
3ec2def9a3 Delete unused class from android.net.http.
Foundation for moving a lot of these classes out of the frameworks
and @removing these APIs.

Change-Id: I590cdd2867b923533de189ec956b4dd3f82efa46
2014-11-27 12:52:48 +00:00
Erik Kline
b567aa8938 Revert some verbose logging from ag/489226
Bug: 18171889
Change-Id: I582a17b2272746e04717ac8da1d6984ff187ddf6
2014-11-26 09:01:16 +09:00
Erik Kline
08866fcfa5 Merge "Map TYPE_VPN integer to "VPN" string." 2014-11-25 18:46:37 +00:00
Jeff Sharkey
c02f304c3a am 58b699c3: am 636baa0d: Merge "Introduce revision codes for split APKs." into lmp-mr1-dev
* commit '58b699c366dea7abc26f34c1e5f1cc6031c04e23':
  Introduce revision codes for split APKs.
2014-11-25 17:39:16 +00:00
Ignacio Solla
ea1d90f5da [WebView] Allow the WebView to be compiled against the system SDK.
BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
2014-11-25 17:03:49 +00:00
Sreeram Ramachandran
1cb0044ece am 608ea322: am 6d0e8711: 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
19f47022e0 am 4096a310: am 45e27327: 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
ca7b070728 am 1d16570b: am aaea7e81: 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
37fbfa140a Map TYPE_VPN integer to "VPN" string.
Bug: 18439110
Change-Id: I0fa0c9e6a9293ab724e2b5e7d0f586f05cd100c7
2014-11-25 13:16:58 +09:00
Jeff Sharkey
88d2a3c0e1 Introduce revision codes for split APKs.
Apps delivered as multiple split APKs must have identical package
names, version code, and signatures.  However, developers may want
to iterate quickly on a subset of splits without having to increment
the version code, which would require delivery of the entire app.

This change introduces "revision codes" which can vary between
split APKs belonging to the same app.  An install is valid as long
as the normal version code is identical across all splits.  Splits
can be added/removed to an app over time, but if a split is present
across an upgrade the revision code must not decrease.

Since system apps could have been updated with splits, only revert
to the built-in APKs if the version code is strictly greater than the
data version.  Also fix bug to enable inheriting from system apps
when adding splits.

Bug: 18481866
Change-Id: I34d8e14c141a8eb95c33ffe24b4e52d6af5c8260
2014-11-24 12:13:11 -08:00
Sreeram Ramachandran
6d0e8711d0 Merge "Delete unused/non-working code." into lmp-mr1-dev 2014-11-24 17:24:26 +00:00
Sreeram Ramachandran
45e2732717 Merge "Allow VPNs to specify their underlying networks." into lmp-mr1-dev 2014-11-24 17:24:04 +00:00
Sreeram Ramachandran
aaea7e8114 Merge "Eliminate race conditions in UID-based network filtering." into lmp-mr1-dev 2014-11-24 17:21:18 +00:00
Jeff Sharkey
79ef5ef7a5 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
55a442e582 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
c2c0beab79 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
75f018e6a7 Delete unused/non-working code.
Change-Id: I2cba9ffdb4ed547cb922d0ac08abf81e49ffa66b
2014-11-21 08:08:19 -08:00
Sreeram Ramachandran
21b5ee3f0e 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
30246e3d37 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
Jaewan Kim
b5ba786ccb am 18ab5c21: Merge "Add an API to check availability of Ethernet interface." into lmp-mr1-dev
automerge: 52dcc7f

* commit '52dcc7fb0a17a77c41eddd1517821134946120b1':
  Add an API to check availability of Ethernet interface.
2014-11-21 02:52:28 +00:00
Erik Kline
4e9ea5e9ae Merge "Rename EXTRA_NETWORK ConnectivityManager constants." into lmp-mr1-dev 2014-11-21 00:04:23 +00:00
Jaewan Kim
18ab5c216c Merge "Add an API to check availability of Ethernet interface." into lmp-mr1-dev 2014-11-20 23:07:43 +00:00
Erik Kline
90e9307e8f 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
2014-11-20 13:16:31 +09:00
Jaewan Kim
d109a7cf69 Add an API to check availability of Ethernet interface.
Bug: 18045481
Change-Id: I95358241b431cfe4435ce70c23c9a639b9dc4d58
2014-11-20 11:12:17 +09:00
Jeff Davidson
704b7521b1 am 0e784874: am 9a1da68b: Expose a SystemApi method to prepare a VPN without consent.
* commit '0e7848748256f4b5709a4c94882e20d96a86ae8e':
  Expose a SystemApi method to prepare a VPN without consent.
2014-11-18 02:05:29 +00:00
Jeff Davidson
9a1da68bf7 Expose a SystemApi method to prepare a VPN without consent.
This is NOT designed to be called normally. Most apps (even
system-privileged ones) should request user consent before launching a
VPN. However, it is needed to support flows where consent can be
obtained through other means external to the VPN flow itself.

The API requires a system-privileged permission, CONTROL_VPN.

Bug: 18327583
Change-Id: I1bcdcf0fb5707faeb861ec4535e7ccffea369ae7
2014-11-17 21:03:10 +00:00
Ignacio Solla
b993a4c70b am f3bd15cf: am bf79cbab: Merge "[WebView] Allow the WebView to be compiled against the system SDK." into lmp-mr1-dev
* commit 'f3bd15cf80ecc748fbd232fec31fdf18d06e48a1':
  [WebView] Allow the WebView to be compiled against the system SDK.
2014-11-13 15:20:29 +00:00
Ignacio Solla
451e338c51 [WebView] Allow the WebView to be compiled against the system SDK.
BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
2014-11-12 22:49:56 +00:00
Jeff Davidson
6eab8d67c3 am d9475786: am ea09c7da: Merge "Let scorers fine-tune scoring heuristics." into lmp-mr1-dev
* commit 'd9475786081fd89769901685bb9ba42f00da976d':
  Let scorers fine-tune scoring heuristics.
2014-11-07 18:43:23 +00:00
Jeff Davidson
ea09c7da01 Merge "Let scorers fine-tune scoring heuristics." into lmp-mr1-dev 2014-11-07 17:38:38 +00:00
Jeremy Joslin
93f515f990 am 91fff05b: Merge "Implemented requestNetwork with a PendingIntent." into lmp-mr1-dev automerge: 1a2b99e
* commit '91fff05ba93b6c78e1744159f97bc0448e22115c':
  Implemented requestNetwork with a PendingIntent.
2014-11-07 00:06:54 +00:00