Hugo Benichi
36af98c6ba
Merge "Merge changes Ie762ce75,I611fd791 am: 21a57f263f am: cc9f695ba0 am: 164854bde2" into oc-dev-plus-aosp
...
am: b09b85471c
Change-Id: I8b1b20d81efa2d86345b3b15600bed4cd40bb6e8
2017-05-11 14:52:23 +00:00
Hugo Benichi
3ec835303c
Merge changes Ie762ce75,I611fd791 am: 21a57f263f am: cc9f695ba0
...
am: 164854bde2
Change-Id: I1495249f1ced84438dbd5dd0ad6678e2ee4062cb
2017-05-11 14:28:23 +00:00
Hugo Benichi
cc9f695ba0
Merge changes Ie762ce75,I611fd791
...
am: 21a57f263f
Change-Id: Ibb291720f6c257a8ead2c039f584f4b3ecc69be5
2017-05-11 12:43:42 +00:00
Hugo Benichi
6e039a13cc
ConnectivityManager: unit test for argument validation
...
Bug: 36701874, 37107940
Test: new test passes
Change-Id: Ie762ce758b3d94052b7438a67fc55bef4690cbbb
2017-05-11 14:15:20 +09:00
Hugo Benichi
cb88323dd2
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
2017-05-11 14:15:15 +09:00
Hugo Benichi
87ae16f017
Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: ba666e0621 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
...
am: f8dbdba5a2
Change-Id: Ie09f2b4e04749e61923781f4b13e796054108fad
2017-05-10 02:06:06 +00:00
Hugo Benichi
32a2d02a65
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: ba666e0621 am: 76dc14ec88
...
am: 1697d48faf
Change-Id: I7dbfe3c96678e2325eb533f31523ad10d861ad02
2017-05-10 00:40:28 +00:00
Hugo Benichi
76dc14ec88
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks"
...
am: ba666e0621
Change-Id: I6c25c2f5f95ac2ffefe263b34e95009b9823c254
2017-05-10 00:23:06 +00:00
Hugo Benichi
ba666e0621
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks"
2017-05-10 00:07:29 +00:00
Hugo Benichi
e1bb3a14d1
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
2017-05-09 22:46:14 +09:00
Erik Kline
f40574c24f
Merge "Refactor and improve logging." am: c3d41d5093 am: 8af8235bca am: 9f76683c59
...
am: d1ea33a039
Change-Id: I744b048224e0b8bf6fe4da763833b755441c0911
2017-05-09 10:59:36 +00:00
Erik Kline
d1ea33a039
Merge "Refactor and improve logging." am: c3d41d5093 am: 8af8235bca
...
am: 9f76683c59
Change-Id: Ieb9a8e3f85f41d18056a7827997f12986ff13ca1
2017-05-09 10:53:36 +00:00
Erik Kline
8af8235bca
Merge "Refactor and improve logging."
...
am: c3d41d5093
Change-Id: I8ef193a9ee0f5bf04ae18620c1a68228ed7ed929
2017-05-09 10:40:29 +00:00
Treehugger Robot
c3d41d5093
Merge "Refactor and improve logging."
2017-05-09 10:33:51 +00:00
Erik Kline
1fdc2e23b5
Refactor and improve logging.
...
Test: as follows
- build
- flashed
- booted
- "runtest frameworks-net" passed
- "dumpsys connectivity" shows new log output
Bug: 32163131
Bug: 36504926
Change-Id: I14d6da18660223f7cace156cb6594ee18928a7b0
2017-05-09 17:29:47 +09:00
Hugo Benichi
515a54c4b8
Merge changes I4872f8ba,I92039f29,Iaad13e13 am: 767ac317e2 am: 717238a614
...
am: 44e9b81c54
Change-Id: I9c38d1254f82b50f4d1e953e72bf15a46562d3b8
2017-05-09 06:30:48 +00:00
Hugo Benichi
717238a614
Merge changes I4872f8ba,I92039f29,Iaad13e13
...
am: 767ac317e2
Change-Id: Ibf618a27b2e5cfb3e8a69528dfecd275b33f0336
2017-05-09 06:14:47 +00:00
Hugo Benichi
ab5bdbf84e
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
2017-05-09 10:49:33 +09:00
Hugo Benichi
807c525de2
Merge "NsdManager: add test coverage for discoverServices()" am: 3e21b1745c am: 60182dbe4e
...
am: 27b0eebb4d
Change-Id: I46acfd104ac3457126c3ccef5041788e4146321c
2017-05-02 09:04:59 +00:00
Hugo Benichi
60182dbe4e
Merge "NsdManager: add test coverage for discoverServices()"
...
am: 3e21b1745c
Change-Id: I0fd1d8e6ea3264a96b144c6701200f7b0be5f9c4
2017-05-02 08:54:46 +00:00
Treehugger Robot
3e21b1745c
Merge "NsdManager: add test coverage for discoverServices()"
2017-05-02 08:44:29 +00:00
Hugo Benichi
783019d2ff
Merge "NsdManager: unit test coverage for servive registration" am: b0e408450c am: bc57faa1ac
...
am: 9a3e69d9b6
Change-Id: Ideabb1c929ddd4307e66831cddb20e2feac2c6d9
2017-05-02 06:49:52 +00:00
Hugo Benichi
bc57faa1ac
Merge "NsdManager: unit test coverage for servive registration"
...
am: b0e408450c
Change-Id: I0b47ad5a1ccee4a2efb169d717b512a46ad4ecc2
2017-05-02 06:35:11 +00:00
Treehugger Robot
b0e408450c
Merge "NsdManager: unit test coverage for servive registration"
2017-05-02 06:27:10 +00:00
Hugo Benichi
93f4591684
NsdManager: add test coverage for discoverServices()
...
Test: added new tests
Bug: 37013369, 33298084
Change-Id: If6c1113ee1bd4690db90abd5a61c3e229c827aec
2017-05-02 15:26:33 +09:00
Lorenzo Colitti
6b7553bc21
Merge "Add a method to start the captive portal login app." into oc-dev
...
am: 5555b1e3d1
Change-Id: Ic7c14bd3dfd07f97c04901f043ed1cd3b1eee6e4
2017-05-02 04:44:31 +00:00
Hugo Benichi
8c5eeb0afc
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
2017-05-02 13:31:24 +09:00
Lorenzo Colitti
4734cdbbc3
Add a method to start the captive portal login app.
...
Bug: 36203355
Bug: 36656914
Test: ConnectivityServiceTest (including new test) passes
Change-Id: I82a9a9a8da47870ba3f1bbef5941b37e970c844f
2017-05-01 16:01:15 +09:00
Erik Kline
45cb5e37b0
Merge "Notify WifiManager of interface state changes" am: 8e97274186 am: 241a7f15f2
...
am: 2439781719
Change-Id: I5b3f640f4dd5cfac7555ddf1f6ae752899caddb0
2017-04-28 08:16:11 +00:00
Erik Kline
241a7f15f2
Merge "Notify WifiManager of interface state changes"
...
am: 8e97274186
Change-Id: I6e9594805f9f55da53cf29e322829b1d2ff2f058
2017-04-28 08:04:31 +00:00
Erik Kline
080f9734d6
Notify WifiManager of interface state changes
...
Test: as follows
- built
- flashed
- booted
- "runtest frameworks-net" passes
(except for an unrelated IpConnectivityMetricsTest error)
Bug: 31466854
Bug: 32163131
Change-Id: I702ea79eb2c02604761e4e1ebcd5f9e445178efb
2017-04-28 16:19:54 +09:00
Erik Kline
216af6d3fe
Notify WifiManager of interface state changes
...
Test: as follows
- built
- flashed
- booted
- "runtest frameworks-net" passes
(except for an unrelated IpConnectivityMetricsTest error)
Bug: 31466854
Bug: 32163131
Change-Id: I702ea79eb2c02604761e4e1ebcd5f9e445178efb
2017-04-28 13:46:41 +09:00
Erik Kline
413190bed6
Switch to WifiManager.{start,stop}SoftAp()
...
Test: as follows
- built
- flashed
- booted
- "runtest frameworks-net" passes
Bug: 31466854
Change-Id: I730d029128a14b936c111ae159b9708d935f4656
(cherry picked from commit ceb54c63dc )
2017-04-27 22:32:37 +09:00
Hugo Benichi
12ced26813
Merge "NsdManager: unit tests for argument validation" am: 3cff7deecb am: d97e358f7a
...
am: 48947de481
Change-Id: I8a51ff51071adc60fe9f4d99ec629edabbed353d
2017-04-27 13:09:02 +00:00
Hugo Benichi
d640465c5d
Merge "NsdService: disentangle NativeDaemonConnector from ctor" am: fa97f11b20 am: 47748b754c
...
am: 5d0bd13538
Change-Id: Ic8ddf92c7c64d4214a75bea6d6e5083f4612a76a
2017-04-27 13:06:59 +00:00
Hugo Benichi
d97e358f7a
Merge "NsdManager: unit tests for argument validation"
...
am: 3cff7deecb
Change-Id: I24d3bda00236fe8c49df0ea7f53109625b3b4f9d
2017-04-27 12:44:35 +00:00
Hugo Benichi
47748b754c
Merge "NsdService: disentangle NativeDaemonConnector from ctor"
...
am: fa97f11b20
Change-Id: I4e5dc9df1f4de256b34c0140ea5ae7ec1bb6fce6
2017-04-27 12:39:00 +00:00
Hugo Benichi
52d9e733ae
NsdManager: unit tests for argument validation
...
Test: new tests pass.
Bug: 37013369, 33298084
Change-Id: Ia514d2bbd967d46fed54e379f319b572ade22c62
2017-04-27 16:35:48 +09:00
Hugo Benichi
1fac3191c7
NsdService: disentangle NativeDaemonConnector from ctor
...
This patch disentangles the creation of NativeDaemonConnector from the
creation of NsdService by introducing a wrapper type DaemonConnection.
This allows to mock this dependency in unit tests.
Test: enhanced previously introduced new tests.
Bug: 37013369, 33298084
Change-Id: I894b7cddfc509f86d0134d214c88c063b81b5e0a
2017-04-27 16:35:30 +09:00
Hugo Benichi
e2377c88e3
Merge "NsdService: bootstrap unit tests" am: 7ca060aa95 am: dd53c962b2
...
am: d29ce6ae8c
Change-Id: Iaf0679790e934baaaf48bcb04098aa18deca4d60
2017-04-27 05:49:47 +00:00
Hugo Benichi
dd53c962b2
Merge "NsdService: bootstrap unit tests"
...
am: 7ca060aa95
Change-Id: I3ce2d85afb5e085c8c49731f3d18a96d17542271
2017-04-27 05:34:05 +00:00
Hugo Benichi
7ca060aa95
Merge "NsdService: bootstrap unit tests"
2017-04-27 05:22:54 +00:00
Etan Cohen
79d9e99632
Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" am: 2fd19ffa06 am: 3c6305cc55
...
am: 887fd90742
Change-Id: I8480ac43d89dc85b541e6255c3cdc597393896cf
2017-04-25 13:40:42 +00:00
Etan Cohen
3c6305cc55
Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier"
...
am: 2fd19ffa06
Change-Id: I8e4a38b113d6e8f81bc382715dda5c279771e454
2017-04-25 13:27:22 +00:00
Etan Cohen
2fd19ffa06
Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier"
2017-04-25 13:21:36 +00:00
Hugo Benichi
cbb13672bc
NsdService: bootstrap unit tests
...
Test: new tests part of $ runtest frameworks-net
Bug: 37013369, 33298084
Change-Id: Ief45f838268380b4b2a128390fbf34d55a3b922b
2017-04-25 10:42:58 +09:00
Hugo Benichi
7a0191b355
Merge "Move byte logics from ApfFilter into BitsUtil" am: 21b9b3a8ff am: 12c1074c8b
...
am: a80bb82b4e
Change-Id: I5f13b006b57cc8a3ab0560626077d003ce4fe8c8
2017-04-24 19:07:37 +00:00
Hugo Benichi
12c1074c8b
Merge "Move byte logics from ApfFilter into BitsUtil"
...
am: 21b9b3a8ff
Change-Id: I9234b9dcb527de8a67bebab8cebc35e5b96aa986
2017-04-24 18:45:23 +00:00
Hugo Benichi
495a17b332
Move byte logics from ApfFilter into BitsUtil
...
This patch extracts into BitUtils byte manipulation helper methods
and unsigned type manipulation helper methods from ApfFilter into
an independent and reusable structure.
Test: $ runtest frameworks-net
Change-Id: I0f33af10457a63dbde5983f14353a79b8cd877d9
2017-04-22 10:07:03 +09:00
Hugo Benichi
658f2e5cd7
Merge "NsdManager: add unit tests" am: dc54ad7fc3 am: 40ab8401b2
...
am: d2181235b9
Change-Id: I7a5202be0e6a6274f3bd11737f30fee0ef947235
2017-04-22 00:57:48 +00:00