Commit Graph

413 Commits

Author SHA1 Message Date
Erik Kline
cc6cd46d70 Merge "Always allow Ethernet to be an upstream" am: ecbe6fa147
am: 9cec380720

Change-Id: I97cc3c5ad7dcd4359c28e6aa817856a226a4f8cc
2017-06-21 07:20:54 +00:00
Erik Kline
9cec380720 Merge "Always allow Ethernet to be an upstream"
am: ecbe6fa147

Change-Id: Ic9fd4bfd6ba7ecc00552019f804b87bc203ea98a
2017-06-21 07:13:46 +00:00
Erik Kline
0e61baa0ac Always allow Ethernet to be an upstream
If there are any upstream types defined at all, make sure that
either TYPE_ETHERNET is included somewhere within the sorted list
or force it to be at the front.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36076442
Change-Id: Ie61d1358f73d518de23f6ca48ca2765ca14a1067
2017-06-21 14:03:03 +09:00
Erik Kline
b912c50b19 resolve merge conflicts of 9e6b6e2a58 to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2104ecf8102c8f9541ee2d3ce6589b0081db4fe3
2017-06-20 22:04:32 +09:00
Erik Kline
9e6b6e2a58 Merge "Create a TetherInterfaceStateMachine when told the interface name."
am: 51ee00785c

Change-Id: If79a096375e6b9665d5ba4aa0bcd9dbec6a8adab
2017-06-20 11:12:00 +00:00
Erik Kline
41531e267d Create a TetherInterfaceStateMachine when told the interface name.
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 62343300

Change-Id: I93f3bdcf20dc4f03cd621d7ab6066344642550e3
2017-06-20 17:28:55 +09:00
Erik Kline
5219f643dd Merge "Make interface IP serving code set LinkProperties" am: 1dae9a4709
am: 9461f78541

Change-Id: I753ab701f2109c0972816724e73119dc1dbc4dca
2017-06-19 13:26:13 +00:00
Erik Kline
9461f78541 Merge "Make interface IP serving code set LinkProperties"
am: 1dae9a4709

Change-Id: I84e4b3fb0be210f59eb663597a6c81c95d3e51d6
2017-06-19 13:15:02 +00:00
Erik Kline
dd4d582034 Make interface IP serving code set LinkProperties
Additionally, clean up awkward IPv6TetheringInterfaceServices
instantiation mechanics.  In future, this class will be absorbed
by TetherInterfaceStateMachine (prior to its renaming to IpServer).

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131

Change-Id: Ib620e3df182f9f8e2c019aae1cd8981eb0b29376
2017-06-19 15:51:50 +09:00
Erik Kline
2e290617c5 Merge "Fixes for tetheroffload crashes" am: 5ac7a03f9f
am: eeb0b31afa

Change-Id: I58c467be3482e01f84c9860e2b9d4b03713c1dbd
2017-06-16 14:10:44 +00:00
Erik Kline
eeb0b31afa Merge "Fixes for tetheroffload crashes"
am: 5ac7a03f9f

Change-Id: I08406513912c9fbd383625f10837085abb5c0516
2017-06-16 14:03:10 +00:00
Erik Kline
664d208a23 Fixes for tetheroffload crashes
Now that we can talk to the HALs (with some out of tree CLs and
"setenforce 0"), several crashes were encountered.

Fixes here include:
    - avoid hidl_handle move semantics
    - check HIDL method status return value (isOk())
    - convert Java short port numbers to ints
    - don't pass nulls to HIDL where Strings are required
      (limitations in parceling)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - "setenforce 0" and start tethering
Bug: 29337859
Bug: 32163131

Merged-In: I5fa930be0c9eda491cf17bd4de9b55ab33672d25
Merged-In: Id1037d22826f4d426bccfa17dce0962c54518d64
Change-Id: I91314440c3a04e5f2502579b5f06dac9f25cf0cd
(cherry picked from commit 1185459c41)
2017-06-16 21:11:39 +09:00
Erik Kline
d2bf55e300 Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine" am: 6f029bbc82
am: 35728f01cb

Change-Id: I5eb3c02331aabc033ecfebee2900477c61e1b6f6
2017-06-14 10:25:33 +00:00
Erik Kline
35728f01cb Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine"
am: 6f029bbc82

Change-Id: I098bd78d29cf4119208d24977dab8494d3bf5fdb
2017-06-14 10:19:35 +00:00
Erik Kline
94ae4c99c5 Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine
Ideally this would have been done immediately after IPv6 tethering code
was made part of an official named release. Getting this in now should
help with the relaying of LinkProperties that is required for offload.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - runtest frameworks-wifi passes
Bug: 29337859
Bug: 32163131

Change-Id: I015fa3cb05a15624f9e80b7aa5a871cefef431b7
2017-06-13 22:36:37 +09:00
Erik Kline
4bcce2b2ef Merge "make UpsreamNetworkMonitor the sole source of upstream network information" am: 30a1cf96bb
am: cfaeabb3e3

Change-Id: Idfebb9b79074f21aeccf773cac98aa7839bda9da
2017-06-13 08:36:14 +00:00
Erik Kline
cfaeabb3e3 Merge "make UpsreamNetworkMonitor the sole source of upstream network information"
am: 30a1cf96bb

Change-Id: I0f7234363f94694ecc4e97d87c7ffb6bb244895d
2017-06-13 08:29:06 +00:00
Erik Kline
5bbece747f make UpsreamNetworkMonitor the sole source of upstream network information
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: I66ce682cf9c31887264a095a4e4638d281d8ed39
2017-06-13 12:04:00 +09:00
Erik Kline
b9fc817f59 Merge "Convert IControlsTethering from interface into callback" am: 5b9d362b60
am: ad3fd82f8b

Change-Id: Ib1f41df1200378191c0722a280939ccbde539920
2017-06-09 09:23:37 +00:00
Erik Kline
ad3fd82f8b Merge "Convert IControlsTethering from interface into callback"
am: 5b9d362b60

Change-Id: I911548e994761778cf5434b2513d433eeaccd4f3
2017-06-09 09:16:01 +00:00
Erik Kline
998e766acc Delete legacy "wifi interface name guessing" behaviour
am: 9e22554068

Change-Id: I25e3814f979dbe65055498c85b34411cf6d3c996
2017-06-08 13:32:53 +00:00
Erik Kline
ab6439b0f8 Convert IControlsTethering from interface into callback
Additionally:
    - add updateLinkProperties() method to new callback
    - skeletally connect LinkProperties updates through
      to OffloadController

TODOs liberally sprinkled through out.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Change-Id: I631d17b26be153534551a1615931fc98b598b953
2017-06-08 22:28:57 +09:00
Erik Kline
ad652cbcf3 Merge "Move findPreferredUpstreamType into UNM" am: 32703994fe
am: 8bc87070f9

Change-Id: Ia215e55b69b856f5511e5d4f852e39fa6c11462e
2017-06-08 12:20:31 +00:00
Erik Kline
8bc87070f9 Merge "Move findPreferredUpstreamType into UNM"
am: 32703994fe

Change-Id: I20e90906e72bc8bba9f0f535d54ba430f96191ff
2017-06-08 12:11:59 +00:00
Erik Kline
9e22554068 Delete legacy "wifi interface name guessing" behaviour
Now that Wi-Fi always passes us the AP interface name (and mode)
we no longer need to guess which interface on which we're supposed
to be starting IP serving (either tethering or local-only hotspot).

Test: as follows
    - built
    - flashed
    - booted
    - TetheringTest passes
Bug: 32163131
Bug: 62343300

Change-Id: I6019410ee5adff4929690d35ba09294765fcd6a4
2017-06-08 18:51:33 +09:00
Erik Kline
a1d368af2f Move findPreferredUpstreamType into UNM
This changes the way in which available networks are found. Previously
Tethering asked ConnectivityService for NetworkInfo and checked for
whether or not it was in state CONNECTED.

Here we use the fact that ConnectivityService will not call UNM's
callbacks' onAvailable() methods until the networks in question have
become connected.

Test: as follows
    - built
    - flashed
    - booted
    - runtest framework-net passed
Bug: 32163131

Change-Id: I97abe225fdd3accb38bd9168f545445b761a90d8
2017-06-08 16:50:17 +09:00
Erik Kline
48c3c00ee1 Merge "Add additional mocking for Context innards" am: a65aa77c1c am: 35182218d3
am: f22995eed5

Change-Id: Ibde5e3e048236d32ea3c1ba2c2700bb6a75323e6
2017-06-07 09:51:52 +00:00
Erik Kline
35182218d3 Merge "Add additional mocking for Context innards"
am: a65aa77c1c

Change-Id: I7f780c05c46b00457b194bfb13df5814735f0809
2017-06-07 09:40:37 +00:00
Erik Kline
ec37275ec9 Add additional mocking for Context innards
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - cherry-picked to master and verified there as well
Bug: 32163131
Bug: 32561414

Change-Id: I0b5b1b12d55547d08c332c7d274f19f0023a7b07
2017-06-07 17:44:53 +09:00
Erik Kline
6ce08f623c Merge "Support setting upstream parameters." am: faf8d67749 am: 4e5024131b
am: e2018a407a

Change-Id: I8e0f7188ff29b2fd7c34fd2a340c8b4abaac2be7
2017-06-06 05:16:27 +00:00
Erik Kline
4e5024131b Merge "Support setting upstream parameters."
am: faf8d67749

Change-Id: I0be9ad265fa664f0ce6e1e098996b46c88317b97
2017-06-06 04:54:04 +00:00
Erik Kline
7990aef63b Support setting upstream parameters.
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: Id88cae4beed7d38aec3d29a0e2f59a5c7e6a9a4e
2017-06-06 12:02:13 +09:00
Erik Kline
1454ee750e Handle Wi-Fi passing explicit interface name and AP/IP mode
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 31466854
Bug: 32163131
Bug: 62018531
Bug: 62076211
Merged-In: I599813c4b4d866623344df56f62ed6a40b4025d6
Merged-In: I8f1d172a3514e4fb9230af9e09aeaf638f03091c
Change-Id: I3557a9c14f4e9f1de1869084566a179003d98ffe
(cherry picked from commit 2efb827f61)
2017-06-02 22:43:34 +09:00
Erik Kline
729c31c2e9 Merge "Handle Wi-Fi passing explicit interface name and AP/IP mode" am: 3478ff8c9e am: 1536453059
am: 00956c4f7c

Change-Id: I599813c4b4d866623344df56f62ed6a40b4025d6
2017-06-02 05:39:23 +00:00
Erik Kline
1536453059 Merge "Handle Wi-Fi passing explicit interface name and AP/IP mode"
am: 3478ff8c9e

Change-Id: I489f7e6b8ca4af584879a4c9e8f00570da6e400c
2017-06-02 05:26:49 +00:00
Erik Kline
2efb827f61 Handle Wi-Fi passing explicit interface name and AP/IP mode
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 31466854
Bug: 32163131
Bug: 62076211
Change-Id: I3557a9c14f4e9f1de1869084566a179003d98ffe
2017-06-02 12:21:15 +09:00
Erik Kline
9d2abb4b40 Merge "Add a tethering offload settings kill switch" am: 7cf3086f37 am: 503a6952b2
am: 03941982dc

Change-Id: I7e15919817c59579ff6e7b28e858f13c3090ee5c
2017-06-01 08:10:51 +00:00
Erik Kline
503a6952b2 Merge "Add a tethering offload settings kill switch"
am: 7cf3086f37

Change-Id: I13264b4ae23c8754b61ff46cafbb1b5f31bd14a3
2017-06-01 07:59:11 +00:00
Treehugger Robot
7cf3086f37 Merge "Add a tethering offload settings kill switch" 2017-06-01 07:50:35 +00:00
Hugo Benichi
871e6759ac Merge "Fix race condition in NsdManagerTest" am: f2383db747 am: 2dfb494827
am: ba82d646a6

Change-Id: I7efa4f92838428f69a6a7a9fa767fefa47246f69
2017-05-31 13:25:53 +00:00
Hugo Benichi
2dfb494827 Merge "Fix race condition in NsdManagerTest"
am: f2383db747

Change-Id: Ifd731767608e738a271bd5793a462675c2a93123
2017-05-31 13:08:37 +00:00
Erik Kline
92c4db04e5 Add a tethering offload settings kill switch
Check for tether_offload_disabled (defaulting to false if not present)
before starting the OffloadController.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Bug: 34361337
Change-Id: Ifcc0eb1a41f09ad9e717c9252d2d55e69789669b
2017-05-31 20:33:05 +09:00
Hugo Benichi
22143956cf Fix race condition in NsdManagerTest
NsdManagerTest relies on the lastMessage variable to assert the
connection of a client to the service. The asserts in test are done on a
different thread, although the variable was not qualified volatile,
which creates the chance to read a stale value. This patch fixes this
race by marking the variable volatile.

Bug: 32561414
Bug: 62044295
Test: NsdManagerTest works
Change-Id: I0bc2cd8059c6ff8b78a2dda0ba8d6bc7e13ef951
2017-05-31 15:35:54 +09:00
Hugo Benichi
913d39aafe Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark" am: 76efbb30f5 am: 5f046cb614
am: 7bbdfcd8eb

Change-Id: I96c39ca1899768d039a108426fb04655aaf8d55f
2017-05-31 04:10:03 +00:00
Hugo Benichi
5f046cb614 Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark"
am: 76efbb30f5

Change-Id: I2c7e714af44c31a101fd58be6ebcc540fffd65a1
2017-05-31 03:52:05 +00:00
Hugo Benichi
02f8f9c830 ConnectivityServiceTest: more tweaks to testRequestBenchmark
Recent continuous testing runs indicates that commit 849b81b7 did not
completely fixed the issue with testRequestBenchmark.

This patch changes the name of the test to not include "test" and
removes @SmallTest annotation, which should do the job of @Ignore while
ConnectivityServiceTest still extends AndroidTestCase.

In addition timeouts are adjusted to take into account recent failures
observed.

This is the last pending action before turning on FrameworksNetTests on
presubmits.

Bug: 32561414
Test: no functional change
Change-Id: I56ef334e19e99e5a3483418330e5f0ccd6eb31bb
2017-05-31 10:23:42 +09:00
Erik Kline
3f5f551042 Merge "Minor improvement in logging in TetheringConfiguration" am: 39ce589f0b am: 8211c36db9
am: 1315903420

Change-Id: I77b4db07f2a43a576146537ae2ab72d2d0ebdde6
2017-05-28 11:31:32 +00:00
Erik Kline
8211c36db9 Merge "Minor improvement in logging in TetheringConfiguration"
am: 39ce589f0b

Change-Id: I1d61308cf21f3c4ebcc37f78bdd102f96a676462
2017-05-28 11:16:32 +00:00
Erik Kline
6bd7453206 Minor improvement in logging in TetheringConfiguration
Test: as follows
    - built
    - booted
    - flashed
    - runtest frameworks-net passes
    - dumpsys connectivity shows expected output
Bug: 32163131
Bug: 36504926
Bug: 36988090
Bug: 38152109
Bug: 38186915
Bug: 38218697
Change-Id: I4a2129d780dfec7bca693486a100ea3c78465430
2017-05-28 18:05:23 +09:00
Erik Kline
aa75fc4ec9 Merge "Support registration of offload control callbacks." am: 7ee96625c2 am: 66cc06c2c7
am: 96c6d201f4

Change-Id: Ie3c4b0929ccf311b4f02fffe0908571cbbb7d772
2017-05-26 10:29:13 +00:00