Commit graph

4,287 commits

Message SHA1
DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
am: 27b9dd89db  -s ours

Change-Id: I055554715c9ea2095926a01fa539c20bb6dd67f3

Tyler Freeman   authored and   android-build-merger   commited 2017-08-21 21:41:22 +00:00
9e41f13ae6
DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
am: e811770999  -s ours

Change-Id: Ida80fe80780bf4f811aa54e0163f5c936f4d16a6

Baligh Uddin   authored and   android-build-merger   commited 2017-08-21 21:40:53 +00:00
0a92e1584e
DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp
BUG:64864568

The Android Automerger   commited 2017-08-21 21:34:43 +00:00
732df7fec9
DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
BUG:64864568

The Android Automerger   commited 2017-08-21 21:28:42 +00:00
27b9dd89db
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev
am: 39b6912019  -s ours

Change-Id: If31043a227aa3cdb751f1e14c3bf8de811133b57

Hugo Benichi   authored and   android-build-merger   commited 2017-08-21 03:38:20 +00:00
d283e9c344
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev
Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-08-21 03:24:06 +00:00
39b6912019
DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
Bug: 64864568

This reverts commit fd35d7c0a284e31231e2f424cade864be695965b, reversing
changes made to 07a21754f45672b27e765d8c7677c9663c6dce91.

Baligh Uddin   commited 2017-08-19 15:49:05 -07:00
e811770999
Merge changes I325b13d5,I89719fe7 am: 06b75147b3 am: 09f500e6a4 am: ed2b08430a
am: 0e2bdae581  -s ours

Change-Id: Iddb0b4e22d942c9b399e57e17328b6911f473064

Lorenzo Colitti   authored and   android-build-merger   commited 2017-08-19 03:47:59 +00:00
8448e53e7b
Merge changes I325b13d5,I89719fe7 am: 06b75147b3 am: 09f500e6a4
am: ed2b08430a

Change-Id: Ib980879b0e50ffe1c8209339df22da4a50d5b74e

Lorenzo Colitti   authored and   android-build-merger   commited 2017-08-19 03:38:10 +00:00
0e2bdae581
Merge changes I325b13d5,I89719fe7 am: 06b75147b3
am: 09f500e6a4

Change-Id: Iac0d1a08c45816f32b0f8ab81a079883a9965e21

Lorenzo Colitti   authored and   android-build-merger   commited 2017-08-19 03:25:21 +00:00
ed2b08430a
Merge changes I325b13d5,I89719fe7
am: 06b75147b3

Change-Id: Iaced543ab17ea87c8f701975764d957bc1b17fc7

Lorenzo Colitti   authored and   android-build-merger   commited 2017-08-19 03:15:08 +00:00
09f500e6a4
Merge changes I325b13d5,I89719fe7
* changes:
  Add tether offload traffic to interface stats as well.
  Tell the system when tethering offload hits a limit.

Treehugger Robot   authored and   Gerrit Code Review   commited 2017-08-19 03:05:14 +00:00
06b75147b3
Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

(cherry picked from commit 49ab263c0b)

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I325b13d50e88841dfb0db4c35e7e27f163ee72fe
Merged-In: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee

Lorenzo Colitti   commited 2017-08-19 10:12:05 +09:00
3d7b64c52d
Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev
am: 2d10195128

Change-Id: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee

Lorenzo Colitti   authored and   android-build-merger   commited 2017-08-19 01:02:33 +00:00
a8743838c9
Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2017-08-19 00:54:59 +00:00
2d10195128
Add tether offload traffic to interface stats as well.
Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I7a4d04ab47694d754874136179f8edad71099638

Lorenzo Colitti   commited 2017-08-19 00:21:56 +09:00
49ab263c0b
Really allow NetworkAgent immutable updates to NetworkCapabilities
This patch completes commit bae105a5ccd11430bab14721d1325e2303a673da to
really allow updates of immutable capabilities to NetworkCapabilities of
NetworkAgents by using satisfiedByImmutableNetworkCapabilities instead
satisfiedByNetworkCapabilities.

Bug: 64125969
Test: runtest frameworks-net
Merged-In: I9beeb623792f0ee31abcd4ba9d0ba2451304fb2e
Merged-In: Ifbdd005576b3f0fbf278ecec81ce3e4308c6276d
Merged-In: Id352fdb6da21a2150d3e8d062d7eba11878f6919
Merged-In: If3742ea0e2151b9b710eda2fed280c31f7960393
Merged-In: Icd8e328e3c810a644bfb83798bd42fed8dc70425

(cherry picked from commit a60c6eab42cd904faaf26c23100939d397b80c39)

Change-Id: I737494117d7f1e0198f0ad4d3c41019c9295fe09

Hugo Benichi   commited 2017-08-18 12:44:26 +00:00
b319377255
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" am: cb3c24e36b am: 46a7508229 am: 886144c1ff
am: 77efec92fe

Change-Id: Icd8e328e3c810a644bfb83798bd42fed8dc70425

Hugo Benichi   authored and   android-build-merger   commited 2017-08-18 12:36:31 +00:00
0638f10802
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" am: cb3c24e36b am: 46a7508229
am: 886144c1ff

Change-Id: If3742ea0e2151b9b710eda2fed280c31f7960393

Hugo Benichi   authored and   android-build-merger   commited 2017-08-18 12:25:56 +00:00
77efec92fe
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" am: cb3c24e36b
am: 46a7508229

Change-Id: Id352fdb6da21a2150d3e8d062d7eba11878f6919

Hugo Benichi   authored and   android-build-merger   commited 2017-08-18 12:14:56 +00:00
886144c1ff
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities"
am: cb3c24e36b

Change-Id: Ifbdd005576b3f0fbf278ecec81ce3e4308c6276d

Hugo Benichi   authored and   android-build-merger   commited 2017-08-18 11:59:02 +00:00
46a7508229
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" into oc-mr1-dev
am: 3f04e31eee  -s ours

Change-Id: Ifd70f2e30efc2d16b32fb140622698a36d506adf

Hugo Benichi   authored and   android-build-merger   commited 2017-08-18 11:58:55 +00:00
3c4d2fc096
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" into oc-mr1-dev
Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-08-18 11:46:22 +00:00
3f04e31eee
Really allow NetworkAgent immutable updates to NetworkCapabilities
This patch completes commit 1ebf219ed9 to
really allow updates of immutable capabilities to NetworkCapabilities of
NetworkAgents by using satisfiedByImmutableNetworkCapabilities instead
satisfiedByNetworkCapabilities.

Bug: 64125969
Test: runtest frameworks-net
Change-Id: I9beeb623792f0ee31abcd4ba9d0ba2451304fb2e

Hugo Benichi   commited 2017-08-18 14:51:03 +09:00
7afbea0e6e
Merge "Add convenience methods to IpPrefix and LinkAddress" into oc-mr1-dev
am: de7117d3fe  -s ours

Change-Id: I5daa3f79df2a6f70e2f2867f255ddcf4770f00f0

Hugo Benichi   authored and   android-build-merger   commited 2017-08-17 22:38:34 +00:00
de56184f72
Merge "Add convenience methods to IpPrefix and LinkAddress" into oc-mr1-dev
Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-08-17 22:31:59 +00:00
de7117d3fe
Merge "Opt-out for always-on VPN: rename API." into oc-mr1-dev
am: 8b2513e439

Change-Id: Ie511c6f1034b75b4e797dbc0ca31c7c5c30f336e

Charles He   authored and   android-build-merger   commited 2017-08-17 08:01:53 +00:00
0aeecd42a9
Add convenience methods to IpPrefix and LinkAddress
Also moving relevant test files into tests/net as part of runtest
framworks-net.

Also removes testHashCode in LinkAddress() because this test relies on
the assumption that hashCode() is stable across releases or jdk
versions, which is absolutely not true.

This creates maintenance work for little benefit since hashCode is
already tested as part of the equality test.

For instance this test is now broken because hashing for InetAddress
changed.

Bug: 62988545
Bug: 62918393
Test: runtest frameworks-net, added coverage in tests
Merged-In: I695bc3f0e801bf13bc4fc0706565758f12b775b4
Merged-In: I6d3f3c50eaec44e3a0787e849ab28e89f6f4a72d
Merged-In: Iddfec82a08f845e728adadfa6ec58a60a078d6af
Merged-In: I8d6dd5efd226a8b1c4b05d1e1102362b58e094a1
Merged-In: Ied0cc53ac34c7c5f5539507b1979cbf9c215262e
Merged-In: I3b2b7dcb1a9a194fc08643b27bbb5a0e84e01412

(cherry picked from commit 1dfb6b67555d04973dfb9d1100dfc1c6a5200633)

Change-Id: I9a17094bfdc54b9dec671306618e132a4beb59fc

Hugo Benichi   commited 2017-08-17 11:03:24 +09:00
f2ccd7a219
Allow NetworkAgent "immutable updates" to NetworkCapabilities
This patch loosens the validation checks when a NetworkAgent updates it
NetworkCapabilities: instead of checking that capabilities labeled as
"immutable" stay identical across updates, it is now accepted to change
immutable capabilities in a way that the new NetworkCapabilities
satisfies the old NetworkCapabilities.

This allows a NetworkAgent to update itself in order to match more
requests, but will still catch NetworkAgents that sends degradation
updates causing potentially requests to not match anymore.

Bug: 64125969
Test: runtest frameworks-net
Merged-In: I2a1b3f9c0be6415e40edc989d0c1b03b5631f7b1
Merged-In: I0ab76de59e87c46a6961229399ff7200bce49838
Merged-In: Ied592bf6112574399a1e808da337004e1c35f244
Merged-In: I01e287b4df82a53a522566d33b3166f7801badca
Merged-In: I7ee60daa9c4266e9b9179032815dd7267e06377f
Merged-In: I31ef741eb83d64c476e5930d5762514b5d4cb16f

(cherry picked from commit bae105a5ccd11430bab14721d1325e2303a673da)

Change-Id: I9d630d63336f4db69f3eb52faa8483f1b1e35d16

Hugo Benichi   commited 2017-08-17 10:48:41 +09:00
9712eb35b9
Merge "Add convenience methods to IpPrefix and LinkAddress" am: aabc00fad6 am: 3ca020fe8b am: caafb4d9f5
am: 7a2f77b3a0

Change-Id: Ied0cc53ac34c7c5f5539507b1979cbf9c215262e

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 15:20:59 +00:00
4842843b23
Merge "Add convenience methods to IpPrefix and LinkAddress" am: aabc00fad6 am: 3ca020fe8b
am: caafb4d9f5

Change-Id: I8d6dd5efd226a8b1c4b05d1e1102362b58e094a1

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 15:09:12 +00:00
7a2f77b3a0
Merge "Add convenience methods to IpPrefix and LinkAddress" am: aabc00fad6
am: 3ca020fe8b

Change-Id: Iddfec82a08f845e728adadfa6ec58a60a078d6af

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 14:56:51 +00:00
caafb4d9f5
Merge "Add convenience methods to IpPrefix and LinkAddress"
am: aabc00fad6

Change-Id: I6d3f3c50eaec44e3a0787e849ab28e89f6f4a72d

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 14:49:27 +00:00
3ca020fe8b
Merge "Add convenience methods to IpPrefix and LinkAddress"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-08-16 14:38:29 +00:00
aabc00fad6
Add convenience methods to IpPrefix and LinkAddress
Also moving relevant test files into tests/net as part of runtest
framworks-net.

Also removes testHashCode in LinkAddress() because this test relies on
the assumption that hashCode() is stable across releases or jdk
versions, which is absolutely not true.

This creates maintenance work for little benefit since hashCode is
already tested as part of the equality test.

For instance this test is now broken because hashing for InetAddress
changed.

Bug: 62988545
Bug: 62918393
Test: runtest frameworks-net, added coverage in tests
Change-Id: I695bc3f0e801bf13bc4fc0706565758f12b775b4

Hugo Benichi   commited 2017-08-16 21:42:21 +09:00
8253be9fb7
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" am: b35719a057 am: eea3a77efc am: 34ea4f9088
am: b77d06e971

Change-Id: I7ee60daa9c4266e9b9179032815dd7267e06377f

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 12:23:25 +00:00
6ec484230b
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" am: b35719a057 am: eea3a77efc
am: 34ea4f9088

Change-Id: I01e287b4df82a53a522566d33b3166f7801badca

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 12:14:09 +00:00
b77d06e971
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities" am: b35719a057
am: eea3a77efc

Change-Id: Ied592bf6112574399a1e808da337004e1c35f244

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 12:04:38 +00:00
34ea4f9088
Merge "Allow NetworkAgent "immutable updates" to NetworkCapabilities"
am: b35719a057

Change-Id: I0ab76de59e87c46a6961229399ff7200bce49838

Hugo Benichi   authored and   android-build-merger   commited 2017-08-16 11:50:55 +00:00
eea3a77efc
Allow NetworkAgent "immutable updates" to NetworkCapabilities
This patch loosens the validation checks when a NetworkAgent updates it
NetworkCapabilities: instead of checking that capabilities labeled as
"immutable" stay identical across updates, it is now accepted to change
immutable capabilities in a way that the new NetworkCapabilities
satisfies the old NetworkCapabilities.

This allows a NetworkAgent to update itself in order to match more
requests, but will still catch NetworkAgents that sends degradation
updates causing potentially requests to not match anymore.

Bug: 64125969
Test: runtest frameworks-net
Change-Id: I2a1b3f9c0be6415e40edc989d0c1b03b5631f7b1

Hugo Benichi   commited 2017-08-16 18:30:30 +09:00
1ebf219ed9
Opt-out for always-on VPN: rename API.
Rename the opt-out flag in AndroidManifest to
SERVICE_META_DATA_SUPPORTS_ALWAYS_ON
as directed by the API Council.

Bug: 64331776
Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Change-Id: I24326fad7a89083a2409134640bda81ee0359d08

Charles He   commited 2017-08-15 15:52:39 +01:00
d681363fd1
Network: Use HttpURLConnectionFactory rather than OkHttp APIs
This is a refactoring with no behavior change.

The new class provides an abstraction layer to hide knowledge
about OkHttp-specific APIs. Logic from android.net.Network that
knew about OkHttp is moving into that abstraction layer.

This CL refactors android.net.Network to make use of this
abstraction layer instead of the tight coupling onto OkHttp
APIs. The class no longer imports any classes from okhttp
packages.

The values of mDns and mConnectionPool, which never change after
the initial call to maybeInitHttpClient(), are now set directly on
the AndroidHttpClient instance when it is constructed in that method.

Applications can overwrite getSocketFactory() and might depend on
that method being called (and the result used) every time a
connection is opened; therefore, for maximum app compatibility this
call was kept inside openConnection().

This CL is a prerequisite for introducing an additional frameworks
dependency on a richer API than HttpURLConnection.

Test: Build and install apk for FrameworksCoreTests, then run:
      adb shell am instrument -e class android.net.NetworkTest -w com.android.frameworks.coretests
Bug: 64021405

Change-Id: I2c73d260508ee20c6a40fd6e95e2d058d3ea2330

Tobias Thierer   commited 2017-08-08 13:08:36 +01:00
5efcea8a39
Merge "Fix flaky IpPrefixTest." am: 39a0b6b58e -s ours am: 9e59475003 -s ours am: 38e86ba9f4 -s ours
am: deb9ca18aa  -s ours

Change-Id: I0d7ce75411072adb90c449d71c48b163c06ee290

Hugo Benichi   authored and   android-build-merger   commited 2017-08-08 07:47:07 +00:00
d988c1500b
Merge "Fix flaky IpPrefixTest." am: 39a0b6b58e -s ours am: 9e59475003 -s ours
am: 38e86ba9f4  -s ours

Change-Id: I64b9214694132f874d5546b4ade1917524db50d7

Hugo Benichi   authored and   android-build-merger   commited 2017-08-08 07:40:11 +00:00
deb9ca18aa
Merge "Fix flaky IpPrefixTest." am: 39a0b6b58e -s ours
am: 9e59475003  -s ours

Change-Id: I216b50a8d0f51f2f731b17598b205a7b0ad65324

Hugo Benichi   authored and   android-build-merger   commited 2017-08-08 07:34:42 +00:00
38e86ba9f4
Merge "Fix flaky IpPrefixTest."
am: 39a0b6b58e  -s ours

Change-Id: Iabc8a365a6c18c19754da7ddfcc0385eb5b0f768

Hugo Benichi   authored and   android-build-merger   commited 2017-08-08 07:28:32 +00:00
9e59475003
Merge "Fix flaky IpPrefixTest."
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-08-08 07:16:48 +00:00
39a0b6b58e
Fix flaky IpPrefixTest.
Test: IpPrefixTest passes
Bug: 32561414
Merged-In: Ib4bffe9d33a6d4f5c2bd97798073de0f66d77645

(cherry pick from commit f5ec69155d)

Change-Id: Ibaf11aae9b13af868bebff820c9e7615b63c8eb2

Hugo Benichi   commited 2017-08-08 14:54:08 +09:00
f9c61862cc
Merge "Merge "NetworkCapabilities: fix describeImmutableDifferences" into oc-dr1-dev am: 1b3877a965 -s ours" into oc-dr1-dev-plus-aosp
am: 8047f7acad  -s ours

Change-Id: I5d3fe083ccbec5baa7f53beca4cb938312877a9e

Hugo Benichi   authored and   android-build-merger   commited 2017-08-07 06:07:13 +00:00
10d78759e3
Merge "NetworkCapabilities: fix describeImmutableDifferences" into oc-dr1-dev am: 1b3877a965
am: 6ecf87a88a  -s ours

Change-Id: I082ad1d8426245e26a1301c9b82d7e62cd3e4b33

Hugo Benichi   authored and   android-build-merger   commited 2017-08-07 05:57:27 +00:00
08b48ba699