Commit Graph

667 Commits

Author SHA1 Message Date
Android Build Merger (Role)
9a13a242bc Merge "Merge "Merge "Add convenience methods to IpPrefix and LinkAddress" am: 2ad60c88f1 am: ea2defe62b am: 4d7787a310 am: e9291de0c4" into oc-mr1-dev-plus-aosp am: 4351aecb2d" 2017-08-16 19:28:20 +00:00
Hugo Benichi
b5c5b9d36c Merge "Merge "Add convenience methods to IpPrefix and LinkAddress" am: 2ad60c88f1 am: ea2defe62b am: 4d7787a310 am: e9291de0c4" into oc-mr1-dev-plus-aosp
am: 4351aecb2d

Change-Id: I3b2b7dcb1a9a194fc08643b27bbb5a0e84e01412
2017-08-16 19:22:46 +00:00
Charles He
1af40a942b Merge "Unbreak VPN unit tests." 2017-08-16 19:05:49 +00:00
Hugo Benichi
202cc407c2 Merge "Add convenience methods to IpPrefix and LinkAddress" am: 2ad60c88f1 am: ea2defe62b am: 4d7787a310
am: e9291de0c4

Change-Id: Ied0cc53ac34c7c5f5539507b1979cbf9c215262e
2017-08-16 15:20:59 +00:00
Hugo Benichi
e9291de0c4 Merge "Add convenience methods to IpPrefix and LinkAddress" am: 2ad60c88f1 am: ea2defe62b
am: 4d7787a310

Change-Id: I8d6dd5efd226a8b1c4b05d1e1102362b58e094a1
2017-08-16 15:09:12 +00:00
Hugo Benichi
4d7787a310 Merge "Add convenience methods to IpPrefix and LinkAddress" am: 2ad60c88f1
am: ea2defe62b

Change-Id: Iddfec82a08f845e728adadfa6ec58a60a078d6af
2017-08-16 14:56:51 +00:00
Hugo Benichi
ea2defe62b Merge "Add convenience methods to IpPrefix and LinkAddress"
am: 2ad60c88f1

Change-Id: I6d3f3c50eaec44e3a0787e849ab28e89f6f4a72d
2017-08-16 14:49:27 +00:00
Treehugger Robot
2ad60c88f1 Merge "Add convenience methods to IpPrefix and LinkAddress" 2017-08-16 14:38:29 +00:00
Hugo Benichi
1dfb6b6755 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
2017-08-16 21:42:21 +09:00
Charles He
3da6a1fc82 Unbreak VPN unit tests.
VpnTest was broken earlier due to a change to always-on VPN
notifications. This CL adds the corresponding mocks to the unit test to
fix it.

Bug: 36650087
Test: runtest frameworks-net
Change-Id: Icff57c7e927c135d75a7d70ff347a579c5d45134
2017-08-16 13:14:13 +01:00
Ahmed ElArabawy
caffbe1277 Add APF black list for ether-type
Add a configurable black for protocols which packets are to be dropped
by APF. This enales an OEM to configure the APF to filter out un-needed
packets from reaching the host

Bug: 62415182
Test: runtest frameworks-net

Change-Id: I86335a0f854d5e83a2b2767978cd69b2cc25c2f8
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2017-08-15 14:55:50 -07:00
Lorenzo Colitti
8c0d16cfa6 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf am: 0cf31d4d6d am: 20fa45e3a9
am: d14c177136

Change-Id: I100ba259bcebf0ed0b9192ed32a038457d2a2283
2017-08-15 02:52:22 +00:00
Lorenzo Colitti
d14c177136 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf am: 0cf31d4d6d
am: 20fa45e3a9

Change-Id: I5d700c9818a89ba3eaab8a34bb799ae7145dbd28
2017-08-15 02:34:30 +00:00
Lorenzo Colitti
20fa45e3a9 Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05 am: 51c3d6a8bf
am: 0cf31d4d6d

Change-Id: I759ed9a79b6ebfa2ae6143167c0dd7d0ad84c67f
2017-08-15 02:25:36 +00:00
Lorenzo Colitti
0cf31d4d6d Merge changes I82d3bee0,I9c9413d7 am: deb4eb5d05
am: 51c3d6a8bf

Change-Id: Ie7e8806faecdad96b4033404709fb3aebc4bdd0f
2017-08-15 02:16:18 +00:00
Lorenzo Colitti
51c3d6a8bf Merge changes I82d3bee0,I9c9413d7
am: deb4eb5d05

Change-Id: Iaa6aecf3ec3a91dc04f4533c0ea5b649bdfeb83d
2017-08-15 02:07:36 +00:00
Lorenzo Colitti
deb4eb5d05 Merge changes I82d3bee0,I9c9413d7
* changes:
  Pass data usage limits to tethering offload code.
  Don't time out when fetching tether offload stats.
2017-08-15 01:57:28 +00:00
Lorenzo Colitti
50b60fc34d Pass data usage limits to tethering offload code.
Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes
Change-Id: I82d3bee030bafa8fe85855885b5fc3893e699181
2017-08-15 00:09:23 +09:00
Treehugger Robot
c06dbc114f Merge "DO NOT MERGE Fix some broken tests in frameworks-net with native dependencies" 2017-08-08 08:30:03 +00:00
Hugo Benichi
3100ac7351 Merge "Connectivity OWNERS: let owners modify Android.mk" am: 05be68698b am: a22fbf4534 am: db554dfdfa am: 86e04cb370
am: a9527ecb86

Change-Id: I5337d332d52912983b48707a7b419366c3301741
2017-08-08 07:59:12 +00:00
Hugo Benichi
a9527ecb86 Merge "Connectivity OWNERS: let owners modify Android.mk" am: 05be68698b am: a22fbf4534 am: db554dfdfa
am: 86e04cb370

Change-Id: I6366148e3da573aa95e5b8e3016eab55e56efe23
2017-08-08 07:53:41 +00:00
Hugo Benichi
86e04cb370 Merge "Connectivity OWNERS: let owners modify Android.mk" am: 05be68698b am: a22fbf4534
am: db554dfdfa

Change-Id: I68339b6b5efab5ac8fe72bbbd7c96da59bc24b2e
2017-08-08 07:46:56 +00:00
Hugo Benichi
db554dfdfa Merge "Connectivity OWNERS: let owners modify Android.mk" am: 05be68698b
am: a22fbf4534

Change-Id: I64895a50baca163588ce863f7fb93fad31d7f55b
2017-08-08 07:40:02 +00:00
Hugo Benichi
a22fbf4534 Merge "Connectivity OWNERS: let owners modify Android.mk"
am: 05be68698b

Change-Id: Iff94ca7089c074cc44f8e09cbce01f741c0b5c67
2017-08-08 07:34:39 +00:00
Hugo Benichi
05be68698b Merge "Connectivity OWNERS: let owners modify Android.mk" 2017-08-08 07:20:07 +00:00
Hugo Benichi
4478840931 DO NOT MERGE Fix some broken tests in frameworks-net with native dependencies
Rational for do not merge: the list of native libraries needed in
Android.mk is not consistent at the moment for aosp master and for
internal branches. Furthermore it is not consistent within internal
branches either. This patch only attempts to fix the tests of the
branches where it matters for development. Otherwise the cost of merge
conflicts makes it undesirable.

Test: All tests in runtest frameworks-net pass.
Merged-In: Ie0b8baa38ca39e92fbd698ebcead86dac0a67708

(cherry pick from commit 99e8ab6e46)

Change-Id: Ic732b3dafc3497235e455b8748ac4f99cf02b221
2017-08-08 16:06:54 +09:00
Hugo Benichi
afd2346bcc Connectivity OWNERS: let owners modify Android.mk
Since per-file overwrites the directory default, just allowing
build.master@android.com for Android.mk with a per-file rule prevents
the owners of the directory to modify Android.mk files without bypassing
OWNERS check in gerrit.

This patch fixes this issue for Connectivity OWNERS files by explicitly
listing Connectivity members for a few Android.mk files.

Test: build
Change-Id: I9c2a2519c3e7dd27e66334b090e074968b408cbc
2017-08-08 10:46:57 +09:00
Hugo Benichi
b2cdd9ee30 Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e am: 8dfb91df6c am: 722c71ed8b
am: edea5c8266

Change-Id: Ie5df14e0ea1c12e0cfabe87978ac6c9b744353b2
2017-08-05 01:40:48 +00:00
Hugo Benichi
edea5c8266 Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e am: 8dfb91df6c
am: 722c71ed8b

Change-Id: I12636c6699ff60487a28570208e819ea0b66fa2e
2017-08-05 01:28:01 +00:00
Hugo Benichi
722c71ed8b Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240 am: f6346af47e
am: 8dfb91df6c

Change-Id: I533ef8fe369cec19d283ff2950314fce6e28cffd
2017-08-05 01:14:30 +00:00
Hugo Benichi
8dfb91df6c Merge "NetworkCapabilities: fix describeImmutableDifferences" am: 7575ec2240
am: f6346af47e

Change-Id: Ieccad46fcffcaf748f5644b04617e9a82527000e
2017-08-05 01:01:04 +00:00
Hugo Benichi
f6346af47e Merge "NetworkCapabilities: fix describeImmutableDifferences"
am: 7575ec2240

Change-Id: If38efacdeec8476880835657938e435f9b598525
2017-08-05 00:54:43 +00:00
Hugo Benichi
99e8ab6e46 Fix some broken tests in frameworks-net with native dependencies
Exempt-From-Owner-Approval: Android.mk uses per-file permission to let
the build team modify it without dependeing on us. However because this
rule overrides the directory default owners, Android core networking is
not owner anymore. This exemption is necessary to let Android core
networking team fix their build file.

Test: All tests in runtest frameworks-net pass.
Change-Id: Ie0b8baa38ca39e92fbd698ebcead86dac0a67708
2017-08-04 07:19:05 +00:00
Hugo Benichi
2ecb9408f4 NetworkCapabilities: fix describeImmutableDifferences
This patch fixes the mask used in describeImmutableDifferences which did
not correctly turn NET_CAPABILITY_NOT_METERED into bit flag.

Bug: 63326103
Test: added unit tests, runtest frameworks-net
Change-Id: Ib6b390b1daef5912859302692af7dcd6cfd3e39a
2017-08-04 15:17:40 +09:00
Alexandru-Andrei Rotaru
5469504e6b Notify the user and turn off tethering when the service is disallowed.
Added UserRestrinctionListener for turning the service off one the
DISALLOW_CONFIG_TETHERING is on into Tethering.  Added notification
about
tethering being turned off. Also added Unit Tests to test the
functionality
of the UserRestrictionListener added.

Bug: 27936525
Test: Turn the tehering service on (either wifi, usb or bluetooth).
Automatically the system should send a notification about the service
being active.Close settings from recents. From TestDPC User Restrictions
switch on DISALLOW_CONFIG_TETHERING. The tethering should be turned off
and a notification should appear informing that the service is inactive.

Merged-In: Ib7ea8885cedc2a842ebd4487c8b366a6666996bc
Change-Id: Ib7ea8885cedc2a842ebd4487c8b366a6666996bc
(cherry picked from commit fa6d5c5ca0)
2017-08-03 13:51:36 +00:00
Treehugger Robot
5027dd1026 Merge "Notify the user and turn off tethering when the service is disallowed." 2017-08-03 10:29:55 +00:00
TreeHugger Robot
be09d8d39b Merge "Notify the user and turn off tethering when the service is disallowed." 2017-08-02 09:13:31 +00:00
Hugo Benichi
2b3e495224 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156 am: ef7d6d93c3 am: 5cbf7e2dc8
am: 1609fe7fe3

Change-Id: Ieed9e3e7755e0c5f89dc41ef66f47d4dbf4c66a9
2017-07-27 15:08:19 +00:00
Hugo Benichi
1609fe7fe3 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156 am: ef7d6d93c3
am: 5cbf7e2dc8

Change-Id: I73cc879e910d503946facdba498b300337f349fd
2017-07-27 14:58:32 +00:00
Hugo Benichi
5cbf7e2dc8 Merge "NetworkNotificationManager: correctly handle existing notifications" am: 3451fb6156
am: ef7d6d93c3

Change-Id: I74631b0bfd14daf18a1641ed7f2ec323d636ebbf
2017-07-27 14:50:14 +00:00
Hugo Benichi
ef7d6d93c3 Merge "NetworkNotificationManager: correctly handle existing notifications"
am: 3451fb6156

Change-Id: I4432f66067ea1ab02e1d2dfe42530bcdafa52df6
2017-07-27 14:43:48 +00:00
Hugo Benichi
5fcd050e0e NetworkNotificationManager: correctly handle existing notifications
This patch corrects a regression added by commit fb2609d3ee that did
not take into account the case of multiple notifications shown for a
single network id. Given how network notifications are triggered, it can
happen that NO_INTERNET and SIGN_IN notifications are both triggered for
the same network when captive portal detection is slow.

Contrary to the situation before commit fb2609d3ee, a notification
priority order is introduced so that SIGN_IN always overrides
NO_INTERNET, and NO_INTERNET is ignored if SIGN_IN is already present.

Bug: 63676954
Bug: 62503737
Test: runtest frameworks-net, added new unit tests
Change-Id: Ib8658601e8d4dc6c41b335ab7dd8caa0cccd9531
2017-07-27 21:20:20 +09:00
Hugo Benichi
2b691d874f Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa am: 39a707813b am: 5bc28905b6
am: 9b88e173c7

Change-Id: I060c17bf421771dd09305696344cb77a4382b46e
2017-07-25 14:51:40 +00:00
Hugo Benichi
9b88e173c7 Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa am: 39a707813b
am: 5bc28905b6

Change-Id: I9ca394ccac1683d5d91b426582cfb3cddb5f5e96
2017-07-25 14:45:35 +00:00
Hugo Benichi
5bc28905b6 Merge "Bootstrap IpReachabilityMonitor unit tests" am: a9889c94aa
am: 39a707813b

Change-Id: Ie56377ae158d32a3592fd700e93fc827754ecaa3
2017-07-25 14:39:40 +00:00
Hugo Benichi
39a707813b Merge "Bootstrap IpReachabilityMonitor unit tests"
am: a9889c94aa

Change-Id: Ic3b145159a4c0430cc248a19b8527af40fa67696
2017-07-25 14:33:45 +00:00
Hugo Benichi
06b1f2b173 Bootstrap IpReachabilityMonitor unit tests
Bug: 62918393
Test: runtest frameworks-net

Change-Id: I236029f460dc3631ef9f5d8312dc1c6faf9807df
2017-07-25 14:59:48 +09:00
Hugo Benichi
eff89fc84e Merge "IpManagerTest: fix flaky test for real" am: e0a743d035 am: 3d423c9c39 am: 8b8a0ef586
am: 34ad34d199

Change-Id: Icf07be6dcb2bb87307b87af4ffed7d77413c49c7
2017-07-21 08:33:46 +00:00
Hugo Benichi
34ad34d199 Merge "IpManagerTest: fix flaky test for real" am: e0a743d035 am: 3d423c9c39
am: 8b8a0ef586

Change-Id: I63414de17f71be8f8e24296ba820f5e855f2975f
2017-07-21 08:26:49 +00:00
Hugo Benichi
8b8a0ef586 Merge "IpManagerTest: fix flaky test for real" am: e0a743d035
am: 3d423c9c39

Change-Id: If8173e2b320e252ac9dcb95d1967472d505f1121
2017-07-21 08:21:48 +00:00