Commit Graph

5384 Commits

Author SHA1 Message Date
Leif Hendrik Wilden
29238b30fd Merge "Allow wifi and ethenet connected at same time." am: 75e74f759d
am: 5b63ccb84f

Change-Id: I2b180336f74697ff5467c210eabccb4813ce317f
2018-10-02 11:06:14 -07:00
Leif Hendrik Wilden
5b63ccb84f Merge "Allow wifi and ethenet connected at same time."
am: 75e74f759d

Change-Id: I7c1d6fdcb7c7ed26e765f52373e20d19b6db7bfc
2018-10-02 10:57:11 -07:00
Treehugger Robot
75e74f759d Merge "Allow wifi and ethenet connected at same time." 2018-10-02 17:09:16 +00:00
Leif Hendrik Wilden
838c66128f Allow wifi and ethenet connected at same time.
This will improve the user experience on Android TV devices,
see bug for details.

In addition when connecting adb to the device by ethernet
for cts, wifi will not connect, causing lots of tests to fail.
For example:
[CTS7.1]android.net.wifi.cts.WifiInfoTest#testWifiInfoProperties
[CTS7.1]android.net.cts.ConnectivityManagerTest#testConnectivityChanged_
manifestRequestOnlyPreN_shouldReceiveIntent

Use command:settings to put global wifi_data_always_on 1 to enable it.

Bug: 26102779
Test: Manual, CTS.
Change-Id: I711d93061a6bc7164d98a858912f781e1b967406
2018-10-01 09:12:10 -07:00
Luke Huang
6aae0022ec Merge "ConnectivityService get INetd directly." am: ddc1add0ac am: 47820e87d4
am: 80f05e8cfc

Change-Id: Ic1957ff9d4506b6c40bf7e4adcfd556b178871ba
2018-10-01 03:40:10 -07:00
Lorenzo Colitti
5697f2c439 Merge "Merge "Remove spurious WTF in rematching networks." am: 4e6c1d8643 am: 421fcc6ec2" into pi-dev-plus-aosp
am: 8f6539069d

Change-Id: I9a2ba5d9104756cc34b01f5327e5bb72705691ac
2018-10-01 03:33:13 -07:00
Luke Huang
80f05e8cfc Merge "ConnectivityService get INetd directly." am: ddc1add0ac
am: 47820e87d4

Change-Id: Ia6c32320eea3117f7a79a6360b7819c64a88faa5
2018-10-01 02:29:32 -07:00
Lorenzo Colitti
b6113e8621 Merge "Remove spurious WTF in rematching networks." am: 4e6c1d8643
am: 421fcc6ec2

Change-Id: Ia1f7426a2f75ed6e6264a932255f77e707968165
2018-10-01 02:23:37 -07:00
Luke Huang
47820e87d4 Merge "ConnectivityService get INetd directly."
am: ddc1add0ac

Change-Id: I0efe022f74f3bcfe8b97853ef0d8c0d27a2d6b01
2018-10-01 01:23:23 -07:00
Lorenzo Colitti
421fcc6ec2 Merge "Remove spurious WTF in rematching networks."
am: 4e6c1d8643

Change-Id: If2dc54d1486fe51a1800c140fd83811492e4134b
2018-10-01 01:19:02 -07:00
Luke Huang
ddc1add0ac Merge "ConnectivityService get INetd directly." 2018-10-01 07:28:42 +00:00
Lorenzo Colitti
18880cc569 Merge "Make requestRouteToHost a no-op for system callers." am: 6b6feb8ff8 am: 2fc0c62d6a
am: 3b2cdecbca

Change-Id: I2999208487c2c15d7e158e690cf7a2ac4e7c3e6d
2018-09-30 23:47:25 -07:00
Treehugger Robot
4e6c1d8643 Merge "Remove spurious WTF in rematching networks." 2018-10-01 06:33:29 +00:00
Lorenzo Colitti
3b2cdecbca Merge "Make requestRouteToHost a no-op for system callers." am: 6b6feb8ff8
am: 2fc0c62d6a

Change-Id: Iefddec95271b56007794fa10f7f3a4122c68877e
2018-09-30 23:15:42 -07:00
Lorenzo Colitti
2fc0c62d6a Merge "Make requestRouteToHost a no-op for system callers."
am: 6b6feb8ff8

Change-Id: I37ba2ef7ee7d052ec47c2d314f165315a13b06ac
2018-09-30 23:00:08 -07:00
Treehugger Robot
6b6feb8ff8 Merge "Make requestRouteToHost a no-op for system callers." 2018-10-01 05:36:28 +00:00
Lorenzo Colitti
d47c367905 Remove spurious WTF in rematching networks.
By construction, this WTF should never happen, since it's in an
if (nri.request.isRequest()) and by definition requests can only
be satisfied by one network at a time.

I don't think we've ever seen this particular WTF in an APR
report, which suggests that it's not happening in practice.

Test: atest FrameworksNetTests CtsNetTestCasesLegacyApi22 CtsNetTestCasesLegacyPermission22 android.net.cts.ConnectivityManagerTest
Change-Id: Icf4c7d2bb1da3c7db695cf0bcebc5806190a1677
2018-10-01 13:28:21 +09:00
Luke Huang
ebc3ff8c54 Merge "Rename object mNetd to mNetworkManagementService" am: b28fee1994 am: cb9a018048
am: 0687ae437f

Change-Id: I34fbea64c15ccd96772d2aab7d23762c6d7f74ac
2018-09-30 20:37:45 -07:00
Luke Huang
0687ae437f Merge "Rename object mNetd to mNetworkManagementService" am: b28fee1994
am: cb9a018048

Change-Id: I1fcfcfb8828bf9b6206ddadede25d5e27b3c2908
2018-09-30 20:28:15 -07:00
Chiachang Wang
3e87dde154 Merge "Fix idle timer rule leakage" am: c8019ecef2 am: 9bf2ab814b
am: 1fa4538303

Change-Id: If0a281e2d8457eebaa2e572f70ef881f6e8fdb94
2018-09-30 20:20:17 -07:00
Luke Huang
cb9a018048 Merge "Rename object mNetd to mNetworkManagementService"
am: b28fee1994

Change-Id: I658ba32a2396c393f3126b713d94ba809338d5e4
2018-09-30 20:16:41 -07:00
Luke Huang
46289a2489 ConnectivityService get INetd directly.
This is the first step for ConnectivityService
call into INetd directly.
Import INetd and get it by using NetdService.

Test: runtest frameworks-net passes
Test: manual testing of wakeupAdd/DelInterface works
Change-Id: I643dba5206c66958134152d062f3f3a19a34cf2c
2018-10-01 11:10:54 +08:00
Chiachang Wang
1fa4538303 Merge "Fix idle timer rule leakage" am: c8019ecef2
am: 9bf2ab814b

Change-Id: I51ab9c7e58853ab93b09f1ca9e0c461134157c7d
2018-09-30 20:10:04 -07:00
Lorenzo Colitti
2386291f56 Make requestRouteToHost a no-op for system callers.
Everything in the system should now be using proper multinetwork
APIs instead of this insecure and error-prone API.

Make this method do nothing when called by the system. For now,
keep the code around for backwards compatibility for apps
targeting Android releases before M.

Bug: 25824776
Bug: 25876485
Test: FrameworksNetTests pass
Test: CtsNetTestCasesLegacyApi22 pass
Test: CtsNetTestCasesLegacyPermission22 pass
Test: android.net.cts.ConnectivityManagerTest passes
Change-Id: I9b3557faccccc95c7b954db6a13b853b4c7edea0
2018-10-01 12:05:42 +09:00
Luke Huang
b28fee1994 Merge "Rename object mNetd to mNetworkManagementService" 2018-10-01 03:01:33 +00:00
Chiachang Wang
9bf2ab814b Merge "Fix idle timer rule leakage"
am: c8019ecef2

Change-Id: I5ac912d121d094b36d46ccca385d5cf319fcb945
2018-09-30 19:57:18 -07:00
Chiachang Wang
c8019ecef2 Merge "Fix idle timer rule leakage" 2018-10-01 02:20:23 +00:00
TreeHugger Robot
f79d25bd41 Merge "Call clearSettingsProvider before and after test" 2018-09-28 18:29:14 +00:00
Remi NGUYEN VAN
991678c453 Merge "Call clearSettingsProvider before and after test" am: 3868fc30ee am: a1a00cbbd1
am: 7233437b07

Change-Id: I42487bdadc12fad135ac65dce0dfd6f77a9b9365
2018-09-28 07:53:08 -07:00
Chiachang Wang
087fd275f9 Fix idle timer rule leakage
Idle timer rule is not cleared as expected if there is a
default network replacement.

Bug:37080406
Test: 1.run frameworks-net
      2.check iptables rule with default network replacement

Change-Id: I6bd29d79e4ca3e8de4b867c4fcb5f81d02ba6de4
2018-09-28 22:42:48 +08:00
Remi NGUYEN VAN
7233437b07 Merge "Call clearSettingsProvider before and after test" am: 3868fc30ee
am: a1a00cbbd1

Change-Id: I21123baaa211d19af181c970b7ad85051c7d08b7
2018-09-28 07:40:45 -07:00
Remi NGUYEN VAN
a1a00cbbd1 Merge "Call clearSettingsProvider before and after test"
am: 3868fc30ee

Change-Id: I38cae25353df48851280490d4593e70b49f0e6c0
2018-09-28 07:28:31 -07:00
Remi NGUYEN VAN
3300b0bda8 Call clearSettingsProvider before and after test
FakeSettingsProvider requires this method to be called before and after
use. Without this, the settings value or content provider may be cached
statically, so the test will be affected by code accessing settings
before it is run.

Bug: b/116668105
Test: atest FrameworksNetTests
Change-Id: I1480f3f3bbb17791752582a70327bb5c7c348d7c
(cherry picked from commit b7c67f8e24)
2018-09-28 08:24:12 -06:00
Luke Huang
5638081758 Rename object mNetd to mNetworkManagementService
No functionality change

Test: runtest frameworks-net passes
Change-Id: Ic3977eed9a86deb76ef0e4e12ffa17597bdecc30
2018-09-28 13:47:13 +08:00
Remi NGUYEN VAN
b7c67f8e24 Call clearSettingsProvider before and after test
FakeSettingsProvider requires this method to be called before and after
use. Without this, the settings value or content provider may be cached
statically, so the test will be affected by code accessing settings
before it is run.

Bug: b/116668105
Test: atest FrameworksNetTests
Change-Id: I1480f3f3bbb17791752582a70327bb5c7c348d7c
2018-09-28 14:46:34 +09:00
Jeffrey Vander Stoep
9d2725c515 Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891 am: 937c009070
am: c5dd800f8c

Change-Id: I8b8f6e74abc47f94231f3b9a1ab0db1ad0903a10
2018-09-21 15:36:28 -07:00
Jeffrey Vander Stoep
c5dd800f8c Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891
am: 937c009070

Change-Id: I4ec4b9a8954deec001841566e0722caa1a3fa248
2018-09-21 14:48:32 -07:00
Jeffrey Vander Stoep
937c009070 Merge "Add ConnectivityManager.getConnectionOwnerUid()"
am: f8529dc891

Change-Id: Ib575a2a03c332d0143ed15652cc9c08c9cff694f
2018-09-21 14:26:19 -07:00
Jeff Vander Stoep
39a51e0191 Add ConnectivityManager.getConnectionOwnerUid()
Allow VPN apps to lookup the UID owner of a network connection.

Requires specifying the:
 - IP address and port for both the source and destination of a TCP
   connection.
 - IP address and port for either source and destination or just
   source for a UDP connection.
Only TCP and UDP protocols are supported. Only connections for UIDs
that apply to the calling VPN app will be resolved. This is intended
to replace direct app access to /proc/net/{tcp,tcp6,udp,udp6}.

The implementation uses netlink inet_diag sockets[1] to perform
the lookup on TCP sockets as well as UDP sockets when supported
(kernel has CONFIG_INET_UDP_DIAG=y).

[1] http://man7.org/linux/man-pages/man7/sock_diag.7.html

Bug: 9496886
Bug: 109758967
Test: atest HostsideVpnTests
Test: atest InetDiagSocketTest on Taimen with CONFIG_INET_UDP_DIAG
    and on Sailfish without CONFIG_INET_UDP_DIAG.
Change-Id: I2bbc7072dd091e2e653dadf6dc05024c04180f34
2018-09-21 06:16:09 +00:00
Mathew Inwood
2622bdf569 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
Shaotang Li
539a053d47 Merge changes into stage-aosp-master am: 0ae414753a
am: fcc936b90d

Change-Id: I2f147946ac2ea928137a23b96dacc7c44d6bf40a
2018-09-13 01:16:00 -07:00
Shaotang Li
314adf84da Merge changes into stage-aosp-master am: 56090a7d99
am: aa799aaadf

Change-Id: Ib1cab07ba9e0d0c52680f7e2f81b117fd0e231d1
2018-09-13 01:10:22 -07:00
Shaotang Li
fcc936b90d Merge changes into stage-aosp-master
am: 0ae414753a

Change-Id: I46d9e80464652ac98c7b745686aaa490d57a8ab0
2018-09-13 00:56:38 -07:00
Shaotang Li
aa799aaadf Merge changes into stage-aosp-master
am: 56090a7d99

Change-Id: I6fa8268060713303c3d999fec0fd91aa78849872
2018-09-13 00:52:20 -07:00
Android Build Merger (Role)
0ae414753a Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Android Build Merger (Role)
56090a7d99 Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Benedict Wong
9c41563bf8 Merge "Use UID as requestID" am: a2f1eb6cf3 am: 4742afd3a3
am: 2f62a66f45

Change-Id: I36f1f6ab5e43abfadcba972bc89bbb4caa902074
2018-09-12 16:23:43 -07:00
Benedict Wong
2f62a66f45 Merge "Use UID as requestID" am: a2f1eb6cf3
am: 4742afd3a3

Change-Id: I0d9fb770482e72f3b017702ffb7ec144a64462e0
2018-09-12 15:22:39 -07:00
Benedict Wong
4742afd3a3 Merge "Use UID as requestID"
am: a2f1eb6cf3

Change-Id: Icef3693f5911c8f69076e0990392e28c693cbc22
2018-09-12 14:35:27 -07:00
Benedict Wong
a2f1eb6cf3 Merge "Use UID as requestID" 2018-09-12 18:51:33 +00:00