Commit graph

4,287 commits

Message SHA1
Merge "Add tethering offload HAL call via JNI" am: 043ad49e0f am: f421d60824
am: c967d56ad7  -s ours

Change-Id: Ic1c1ab0a51459e390e8607217be8f0c6ef0c2bde

Erik Kline   authored and   android-build-merger   commited 2017-05-17 17:37:25 +00:00
06310ff3c6
Add test coverage for explicitlySelected networks.
Also, make all tests start with mobile data always on disabled.

This is because some tests only pass when mobile data always on
is disabled. This doesn't cause any problems when running all
the tests in the file, because these tests are always run after
one or more calls to tearDown, which disables mobile data always
on. However, it does cause issues when those tests are run alone.

Test: new test passes 50 times in a row
Test: ConnectivityServiceTest passes
Change-Id: I1eef5d7f5ec5464e0f9a1d7f1130d9ba6dea4557

Lorenzo Colitti   commited 2017-05-18 00:46:14 +09:00
0bd6e3b946
Move NetworkNotificationManagerTest to tests/net
Bug: 32561414
Test: no functional change
Change-Id: Iad17e3336a4a589da5cf88fd6359323e34b747e1

Hugo Benichi   commited 2017-05-17 22:24:05 +09:00
e9a6b0e100
Finish moving NetworkStats tests to tests/net
Follow-up of commit 4ff3a778ab.

Also add @SmallTest annotation to classes moved to tests/net.

Test: no functional change
Bug: 32561414
Change-Id: I0a0e8865d37ba7bae06ce352d3fc385989adc300

Hugo Benichi   commited 2017-05-17 22:24:05 +09:00
b9693f313b
Address ConnectivityManager API comments.
This patch is a cherry pick of the two following commits:
  - 139a48c83c which addresses several
    issues in the public api of ConnectivityManager.
  - 4c11db0fdd which fixes the documentation
    of several methods in ConnectivityManager public api.

Because the first commit change the public api that is referenced in
the documentation fixed by the second commit, it is not possible to one
without the other. In both cases trying to cherry pick only one of them
results in a build error.

The first commit was submitted successfully on an internal branch before
the checks done in the built got stricter.

Bug: 36370941
Test: marlin builds and boots
Change-Id: I86dcf056e6b165e527c3ee88dbabc2764ac09a08
Merged-In: I693ee5270bf186c88c7c5056293519f7237504ff

(cherry picked from commit 139a48c83c)

Hugo Benichi   commited 2017-05-17 21:48:05 +09:00
5ac64c51f5
Merge "Add tethering offload HAL call via JNI"
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-05-17 07:09:15 +00:00
043ad49e0f
Merge "Add tethering offload HAL call via JNI" into oc-dev-plus-aosp
am: 652d17e238  -s ours

Change-Id: I7478fbe6c11a8543f96311e936b10d479442c42f

Erik Kline   authored and   android-build-merger   commited 2017-05-17 05:14:06 +00:00
deecb37d61
Add tethering offload HAL call via JNI
Additionally, try to locate java Control interface.

Test: as follows
    - built
    - flashed
    - booted
    - OffloadController log messages observed, but only ever
      "not enabled" messages (needs a supporting implementation)
Bug: 29337859
Bug: 32163131
Bug: 34361337
Merged-In: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
Change-Id: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
(cherry picked from commit 8784c80e42)

Erik Kline   commited 2017-05-17 13:44:25 +09:00
df11e5b2b5
Add tethering offload HAL call via JNI
Additionally, try to locate java Control interface.

Test: as follows
    - built
    - flashed
    - booted
    - OffloadController log messages observed, but only ever
      "not enabled" messages (needs a supporting implementation)
Bug: 29337859
Bug: 32163131
Bug: 34361337
Merged-In: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
Change-Id: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
(cherry picked from commit 8784c80e42)

Erik Kline   commited 2017-05-17 13:41:30 +09:00
f0f891b39b
Add tethering offload HAL call via JNI
Additionally, try to locate java Control interface.

Test: as follows
    - built
    - flashed
    - booted
    - OffloadController log messages observed, but only ever
      "not enabled" messages (needs a supporting implementation)
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: I5251d05f2d2fd732a33a8955a6c346b3a2401e46

Erik Kline   commited 2017-05-17 11:31:45 +09:00
8784c80e42
Merge "ConnectivityManager: fix documentation"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2017-05-16 14:31:28 +00:00
91bf2b5197
Merge "Remove unused import in ConnectivityManager" am: db6fc1afe8 am: fe098f8207 am: e13c192d0f
am: 216aae5188

Change-Id: I455d9712ad7f60f7474077435ff977c95b3b48c3

Hugo Benichi   authored and   android-build-merger   commited 2017-05-16 13:34:37 +00:00
b112d0ecc6
Merge "Remove unused import in ConnectivityManager" am: db6fc1afe8 am: fe098f8207
am: e13c192d0f

Change-Id: Ib8368c5a8538914cba2723368c03618401ac159f

Hugo Benichi   authored and   android-build-merger   commited 2017-05-16 13:25:09 +00:00
216aae5188
Remove unused import in ConnectivityManager
This makes the pre-upload verification pass.

Test: no functional change.
Change-Id: I6beccea10ccfcb39d975cb8f6f34fc9d79f1e170

Hugo Benichi   commited 2017-05-16 11:39:08 +09:00
5d426da614
ConnectivityManager: fix documentation
Documentation pointing to the registerNetwork() overload including a
timeout argument was pointing to the version removed by commit
139a48c83c. This makes it impossible to
cherry pick 139a48c83c due to the linter
complaining about unresolvable links.

This patch fixes the documentation to point to the registerNetwork()
with argument types NetworkRequest, NetworkCallback, int, in that order.

Bug: 36370941
Test: no functional change
Change-Id: Ieaf58f81d89fdf63f480fd15e65ed52822fc4f51

Hugo Benichi   commited 2017-05-16 11:36:24 +09:00
4c11db0fdd
Merge "ConnectivityService: minor formatting change" am: 4c949ee07c am: 9374e0b598 am: 88a3389b2c
am: 2ca1de8257

Change-Id: I252d293f37d29a53e1b5d913f682c0c16b2a122c

Hugo Benichi   authored and   android-build-merger   commited 2017-05-15 06:24:57 +00:00
9b477410e2
Merge "ConnectivityService: minor formatting change" am: 4c949ee07c am: 9374e0b598
am: 88a3389b2c

Change-Id: I5ce0d4a057edc0512f45d8cbf760bab1d2824183

Hugo Benichi   authored and   android-build-merger   commited 2017-05-15 06:17:03 +00:00
2ca1de8257
ConnectivityService: minor formatting change
This patch adds a space character between "synchronized" and
"(mTheLockVariable)" so that all synchronized block have a consistent
syntax. Basic stats shows that "synchronized (" is x10 time more likely
than "synchronized(".

This facilitates finding all locked sections by grepping.

Test: no semantics changes
Bug: 37119619
Change-Id: Id860700efa85ffebafed11af3a2997bc115d9c03

Hugo Benichi   commited 2017-05-15 01:09:36 +00:00
e522099415
Merge "Merge changes Ie762ce75,I611fd791 am: 21a57f263f am: cc9f695ba0 am: 164854bde2" into oc-dev-plus-aosp
am: b09b85471c

Change-Id: I8b1b20d81efa2d86345b3b15600bed4cd40bb6e8

Hugo Benichi   authored and   android-build-merger   commited 2017-05-11 14:52:23 +00:00
13be37d0a6
Merge changes Ie762ce75,I611fd791 am: 21a57f263f am: cc9f695ba0
am: 164854bde2

Change-Id: I1495249f1ced84438dbd5dd0ad6678e2ee4062cb

Hugo Benichi   authored and   android-build-merger   commited 2017-05-11 14:28:23 +00:00
39294ce0cd
ConnectivityManager: unit test for argument validation
Bug: 36701874, 37107940
Test: new test passes
Change-Id: Ie762ce758b3d94052b7438a67fc55bef4690cbbb

Hugo Benichi   commited 2017-05-11 14:15:20 +09:00
7abd43f6fb
ConnectivityManager: uses service error codes and exceptions
This patch introduces between ConnectivityManager and
ConnectivityService a mechanism for propagating back to clients
informative errors in the form of error codes and associated custom
runtime exceptions.

Without error code, the service can only throw a limited number of
different exceptions over Binder. Furthermore the throw site stack
traces are always loss. Although for individual instances of a throw,
the error message can be inspected, aggregations of stack traces from
app crashes sanitize error messages and only leaves the stack traces.

This makes debugging dificult for some service calls such as
requestNetwork that can have a variety of failure modes.

In this patch only one failure mode is codified. More can be added later
at a light cost by: 1) defining an error code, 2) defining an
associated exception, 3) mapping the code to the exception. This patch
can serves as a template for doing so.

Test: $ runtest frameworks-net,
      #testNetworkRequestMaximum() detects the new exception type.
Bug:  36556809, 36701874
Change-Id: I611fd7915575c9e418f7149fcdc8a879d2a3716d

Hugo Benichi   commited 2017-05-11 14:15:15 +09:00
a590ab8373
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" into oc-dev am: f37b271894 -s ours
am: 4450146022  -s ours

Change-Id: Ia2b1ca862959fb685e6595f41dbfb130cdad6009

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 08:49:28 +00:00
58053ea138
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" into oc-dev
am: f37b271894  -s ours

Change-Id: I28f139b2bc5a42eed4caf01bea7a1a9426a91625

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 08:38:56 +00:00
4450146022
Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
am: a1b1749c82

Change-Id: I97d5fcc43d6f11c05b74b29ebf3182a3ea7198c5

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 02:12:15 +00:00
385211b75a
Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
am: f8dbdba5a2

Change-Id: Ie09f2b4e04749e61923781f4b13e796054108fad

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 02:06:06 +00:00
89ea107828
Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2017-05-10 00:47:39 +00:00
a1b1749c82
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88
am: 1697d48faf

Change-Id: I8b0cf31ef356aae9992f893ca35001d048999519

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 00:44:51 +00:00
97bf308ff6
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88
am: 1697d48faf

Change-Id: I7dbfe3c96678e2325eb533f31523ad10d861ad02

Hugo Benichi   authored and   android-build-merger   commited 2017-05-10 00:40:28 +00:00
d66a25ab97
NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I4867fe181938d94b5594b3d88896a3c4e01d895c
Merged-In: I2675643b220acbc6110179fa937d4c313b6f5e32

(cherry picked from commit e1bb3a14d1ee1aba2f92e5bccf659774699eaffe)

Hugo Benichi   commited 2017-05-10 09:19:12 +09:00
c34549c34c
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-05-10 00:07:29 +00:00
60c8870d97
NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I2675643b220acbc6110179fa937d4c313b6f5e32

Hugo Benichi   commited 2017-05-09 22:46:14 +09:00
a884d4fc21
Merge "Merge "Move some NetworkStats tests to tests/net." into oc-dev am: 74fe2cbc3a -s ours am: c1cb5c3a8c -s ours"
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2017-05-09 06:49:26 +00:00
b94bc1fd6b
Merge "Move some NetworkStats tests to tests/net." into oc-dev am: 74fe2cbc3a -s ours
am: c1cb5c3a8c  -s ours

Change-Id: I40b5bb1e640358e6889f92dacdd2a977bc9758fb

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-09 06:46:48 +00:00
29b9aa2eb8
Merge "Move some NetworkStats tests to tests/net." into oc-dev
am: 74fe2cbc3a  -s ours

Change-Id: I4c58d302385c733108614c681632d3a8bc2dbdcf

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-09 06:40:41 +00:00
c1cb5c3a8c
Merge changes I4872f8ba,I92039f29,Iaad13e13 am: 767ac317e2 am: 717238a614 am: 44e9b81c54
am: ce04f07399

Change-Id: Ia0f85518fd0e75e768fa037c5d0bcf062b3c1f93

Hugo Benichi   authored and   android-build-merger   commited 2017-05-09 06:39:13 +00:00
9a5cc37c6f
Merge changes I4872f8ba,I92039f29,Iaad13e13 am: 767ac317e2 am: 717238a614
am: 44e9b81c54

Change-Id: I9c38d1254f82b50f4d1e953e72bf15a46562d3b8

Hugo Benichi   authored and   android-build-merger   commited 2017-05-09 06:30:48 +00:00
ce04f07399
NsdService: test coverage for client requests.
Adding coverage for:
  - NsdManager client disconnection
  - in-flight request GC

Test: new test passes
Bug: 37013369, 33298084
Change-Id: I92039f297cf99352bbf4196797933d89c0b819ff

Hugo Benichi   commited 2017-05-09 10:49:33 +09:00
0a118cefb8
Move some NetworkStats tests to tests/net.
This groups them together with the rest of the networking unit
tests. It also speeds up compile/test cycles ("runtest -x" of one
file goes from 1m15s to 30s).

Bug: 33681750
Test: runtest frameworks-net passes on internal tree
Merged-In: I53cb0c51355fe4b4b30e451fa09fbbf58da39efd
Change-Id: I5ae5dbf74c94feb0fe3759681e5e6d6fba62fa32

(cherry picked from commit c86013be936f36c61fa0cdfad95141f6de3c6ef7)

Lorenzo Colitti   authored and   Hugo Benichi   commited 2017-05-08 08:38:08 +00:00
f7ffa460e4
Merge "NsdManager: add test coverage for discoverServices()" am: 3e21b1745c am: 60182dbe4e am: 27b0eebb4d
am: f828e46f2d

Change-Id: I2bbd97293d2887824b857d7e20fdc14d574bc097

Hugo Benichi   authored and   android-build-merger   commited 2017-05-02 09:09:55 +00:00
959fb59018
Merge "NsdManager: add test coverage for discoverServices()" am: 3e21b1745c am: 60182dbe4e
am: 27b0eebb4d

Change-Id: I46acfd104ac3457126c3ccef5041788e4146321c

Hugo Benichi   authored and   android-build-merger   commited 2017-05-02 09:04:59 +00:00
f828e46f2d
Merge "NsdManager: unit test coverage for servive registration" am: b0e408450c am: bc57faa1ac am: 9a3e69d9b6
am: 31b86a0a68

Change-Id: I88461d537e43fb086366dcc681b5ef2c2bdcdc2f

Hugo Benichi   authored and   android-build-merger   commited 2017-05-02 06:56:15 +00:00
1f19af6a15
Merge "NsdManager: unit test coverage for servive registration" am: b0e408450c am: bc57faa1ac
am: 9a3e69d9b6

Change-Id: Ideabb1c929ddd4307e66831cddb20e2feac2c6d9

Hugo Benichi   authored and   android-build-merger   commited 2017-05-02 06:49:52 +00:00
31b86a0a68
NsdManager: add test coverage for discoverServices()
Test: added new tests
Bug: 37013369, 33298084
Change-Id: If6c1113ee1bd4690db90abd5a61c3e229c827aec

Hugo Benichi   commited 2017-05-02 15:26:33 +09:00
3382f9fe27
Merge "Add a method to start the captive portal login app." into oc-dev am: 5555b1e3d1
am: d388cbb9e4

Change-Id: I65e9632d28e63ba3278a5f396554b7be302e20d1

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-02 04:51:08 +00:00
27f6393faf
Merge "Add a method to start the captive portal login app." into oc-dev
am: 5555b1e3d1

Change-Id: Ic7c14bd3dfd07f97c04901f043ed1cd3b1eee6e4

Lorenzo Colitti   authored and   android-build-merger   commited 2017-05-02 04:44:31 +00:00
d388cbb9e4
NsdManager: unit test coverage for servive registration
This patch adds test coverage for NsdManager#registerService() and
NsdManager#unregisterService(). This test shows a potential defect in
the api: if unregisterService() fails, the associated listener is always
unregistered from NsdManager. If the service initially registered is
still registered, this potentially make it impossible to unregister.

Test: added new unit test
Bug: 37013369, 33298084
Change-Id: Ia089b6d2f2a349907a8b29d9a3acd7f59e177887

Hugo Benichi   commited 2017-05-02 13:31:24 +09:00
f04537fd28
Add a method to start the captive portal login app.
Bug: 36203355
Bug: 36656914
Test: ConnectivityServiceTest (including new test) passes
Change-Id: I82a9a9a8da47870ba3f1bbef5941b37e970c844f

Lorenzo Colitti   commited 2017-05-01 16:01:15 +09:00
500dbae1b5
Merge "Address ConnectivityManager API comments." into oc-dev am: 2121eeec48
am: a75dc7e122

Change-Id: I8f7ec6d4a2ee8c74e015fdff0ef83fe4218b4efd

Lorenzo Colitti   authored and   android-build-merger   commited 2017-04-28 04:11:54 +00:00
57ec8b82b6
Merge "Address ConnectivityManager API comments." into oc-dev
am: 2121eeec48

Change-Id: I7024b4fe23ab12760fb452a59929df886912b104

Lorenzo Colitti   authored and   android-build-merger   commited 2017-04-28 04:04:21 +00:00
a75dc7e122