Commit Graph

7630 Commits

Author SHA1 Message Date
Chalard Jean
dd8adb9866 [NS A02] Move the contents of mNetworkForRequestId to NRIs
The member will be removed in a subsequent change

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I2379e47b1a97fb939b8558c01547d3d704f0f628
2019-11-19 22:41:09 +09:00
Chalard Jean
2c8b3e302f [NS A01] Add checks for the handler thread
This is a preliminary step to removing mNetworkForRequestId, whose
role could be better managed by storing the network inside the NRI.
This serves two purposes :
1. It is a sanity check. Those functions should never be called out
of the handler thread, and if they are it's a bug.
2. It will serve to prove the followup changes are correct.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: If29066839ad640121d33f231abdd4f37d0ad3fd5
2019-11-19 22:41:09 +09:00
Chalard Jean
48127ba387 Merge "Add tests for the legacy broadcast" 2019-11-19 13:32:17 +00:00
Chalard Jean
4aa9d9d859 Add tests for the legacy broadcast
Test: this
Change-Id: I0777bf443f65d894eaab9b800db40c1caf6520fe
2019-11-19 21:08:44 +09:00
paulhu
c62d3c22df Adjust PermissionMonitor#startMonitoring in ConnectivityService
Let PermissionMonitor#startMonitoring() running in the beginning
of the ConnectivityService#systemReady() before
MultipathPolicyTracker.start(). Since mApps in PermissionMonitor
needs to be populated first to ensure that listening network
request which is sent by MultipathPolicyTracker won't be added
NET_CAPABILITY_FOREGROUND capability.

Bug: 135897744
Test: atest FrameworksNetTests
Change-Id: Ibef8e7b0017a77384630d34c9edc6c40875f773e
2019-11-19 17:55:31 +08:00
Roshan Pius
a215878d38 Merge "StaticIpConfiguration: Couple of minor fixes"
am: 90a81fedc5

Change-Id: I29469c22d25fd812590f7adca23ef83337580b2b
2019-11-18 07:10:41 -08:00
Roshan Pius
90a81fedc5 Merge "StaticIpConfiguration: Couple of minor fixes" 2019-11-18 15:05:31 +00:00
Jayachandran Chinnakkannu
01586c399e Merge "Remove usage of Telephonymanager getDefault() and from() hidden APIs"
am: 73e22ad21d

Change-Id: I555617ff893acf4c53e6a73d6591b6aaebf3ce50
2019-11-17 22:30:01 -08:00
Jayachandran C
2092850198 Remove usage of Telephonymanager getDefault() and from() hidden APIs
This CL replaces with getSystemService(TelephonyManager.class)

Bug: 140768340
Test: atest frameworks/base/tests/net
Change-Id: I0f14cc5440fa85c81ab90f3199e9e91c1b00f5e1
2019-11-15 19:26:33 -08:00
Roshan Pius
32b898bb6d StaticIpConfiguration: Couple of minor fixes
a) Ensure the Builder.build() does not crash if setDnsServers() is not
invoked.
b) Add a checkNotNull on setDnsServers() since it is marked @NonNull.

Bug: 144487020
Test: Compiles
Change-Id: I2b9f990efa0583c0f067c25e23d8c944ffbdf6a5
(cherry-picked from d0348339c50eeae0fe137c62476f6a01542f4163)
2019-11-14 18:13:26 -08:00
Artur Satayev
f11566d236 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps."
am: a98026f7aa

Change-Id: Ia39fbc2200aa7262e4a05b0710b7a382bb01b276
2019-11-13 10:33:06 -08:00
Artur Satayev
96639a6e4e Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Remi NGUYEN VAN
29eb83b289 Merge "Add permissions to NetIntegrationTests manifest"
am: 732d7f96f3

Change-Id: Ieb22f6fa83bcc1e5c867a188f3a342980fce3203
2019-11-11 21:44:07 -08:00
Remi NGUYEN VAN
732d7f96f3 Merge "Add permissions to NetIntegrationTests manifest" 2019-11-12 05:31:19 +00:00
Artur Satayev
1f87149b02 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: d57628bf9f

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Treehugger Robot
d57628bf9f Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-11 14:27:47 +00:00
Artur Satayev
1c1501f3bf Merge "Add @UnsupportedAppUsage annotations for max-p."
am: f2016651b6

Change-Id: I2f249063c274b54a58a24cda23f1d5a60fa14540
2019-11-08 09:38:12 -08:00
Treehugger Robot
f2016651b6 Merge "Add @UnsupportedAppUsage annotations for max-p." 2019-11-08 17:26:36 +00:00
Artur Satayev
56cb6bb2a9 Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Artur Satayev
8124713528 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-11-08 16:17:13 +00:00
Lucas Lin
10c6d68c49 Merge "[NS01] Create NetworkScore"
am: bd692519f4

Change-Id: I63a76689ef468b55ad1d43db19655e8d822d0122
2019-11-07 16:53:15 -08:00
Lucas Lin
bd692519f4 Merge "[NS01] Create NetworkScore" 2019-11-08 00:47:22 +00:00
lucaslin
17e9c67315 [NS01] Create NetworkScore
It's the first patch for refounding network selection. The new
network selection will try to compare the networks by more
factors, and will try to choose the best network after doing
the evaluation of trade-off.
Create the object that will serve to represent network quality
for more comprehensive ranking.

Bug: 143676287
Test: 1. Build pass.
      2. atest FrameworksNetTests

Change-Id: I4b6071d14365aa84d06be9802516fedf527e70f7
2019-11-07 16:47:56 +08:00
TreeHugger Robot
fd24099616 Merge "DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master" into stage-aosp-master 2019-10-31 18:38:40 +00:00
Xin Li
25d140454e DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Remi NGUYEN VAN
c598529450 Add permissions to NetIntegrationTests manifest
As the TestNetworkStack target is updated not to use the complete
NetworkStackManifest to avoid including priv-app permissions and actual
service names, the missing permissions must be added to the
FrameworksNetIntegrationTests manifest.

Add the permissions and attributes that are necessary for the test, and
used to be merged from the TestNetworkStack library manifest.

Test: atest FrameworksNetIntegrationTests
Change-Id: I8b434e67f3a6c9141da71c6dfab1be77aa0f8411
2019-10-30 18:30:03 +09:00
Jeongik Cha
122535bedc Change AIDL module name
Naming rule for aidl module is changed to make using unstable AIDL module more explicit
So, to use unstable version AIDL module, use "-unstable" suffix version
And also, module name without any suffix means latest frozen version.

But wrt modules for C++ and NDK, module name with latest frozen version
is not available for now.

In b/139280289, more background is explained

Test: m
Bug: 139280289
Change-Id: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9
Merged-In: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9
2019-10-29 16:01:18 +09:00
Mark Chien
68e38feeda Merge "[Tether02] Migrate TetheringConfiguration into module"
am: adef7395e8

Change-Id: I8fa812a78f61976741bc06ccf4000f625b75ecbe
2019-10-24 06:38:24 -07:00
Mark Chien
adef7395e8 Merge "[Tether02] Migrate TetheringConfiguration into module" 2019-10-24 13:10:24 +00:00
markchien
e5593f3381 [Tether02] Migrate TetheringConfiguration into module
TetheringConfiguration is a utility class to encapsulate the various
configuration elements.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I9434ab213bc5e0fca59f14a6c8cea554abefc3a4
2019-10-24 14:00:05 +08:00
Lucas Lin
6a78c78996 Merge "Better notification to user when DNS-over-TLS is broken"
am: f42f3830ec

Change-Id: I8be963e35ed5e5ba914c6d3504a52ccb789aaf29
2019-10-23 02:51:56 -07:00
Lucas Lin
f42f3830ec Merge "Better notification to user when DNS-over-TLS is broken" 2019-10-23 09:20:09 +00:00
lucaslin
e117e2e8d7 Better notification to user when DNS-over-TLS is broken
Provide a specifc notification to let users know that device
has no internet is because it really doesn't have internet access
or it's caused by private DNS resolution failed.

Bug: 113242081
Test: atest FrameworksNetTests
Change-Id: I710c88a4742f5fd56c39fc797d7fa3ad36dba553
2019-10-22 18:27:33 +08:00
Martin Stjernholm
36a45001fe Merge "Remove unnecessary dependencies on ART internal libraries."
am: 6bc5580fe0

Change-Id: I41e9126d946bd347096fe8dce4887e9a2c67fe95
2019-10-19 05:38:36 -07:00
Treehugger Robot
6bc5580fe0 Merge "Remove unnecessary dependencies on ART internal libraries." 2019-10-19 12:20:47 +00:00
Jimmy Chen
fbb3f48d47 Merge "p2p: mirgrate p2p into tethering modes"
am: baf9025bbf

Change-Id: Ib8f43d77a5f57965fa217e6e92eb9773e7914b54
2019-10-17 23:06:04 -07:00
Jimmy Chen
baf9025bbf Merge "p2p: mirgrate p2p into tethering modes" 2019-10-18 05:42:31 +00:00
Aaron Huang
1d06e0b1fb Merge "Expose MacAddress methods to public API"
am: db4e0d3bcf

Change-Id: I98c2104fe5307e916bd2026eb943bfe4a9913d07
2019-10-17 20:55:36 -07:00
Aaron Huang
db4e0d3bcf Merge "Expose MacAddress methods to public API" 2019-10-18 03:45:40 +00:00
Martin Stjernholm
6d932e39fd Remove unnecessary dependencies on ART internal libraries.
Bug: 133140750
Test: atest FrameworksNetTests
Change-Id: Id6817a2ae09eb6ecfc4c5c8dc08ade44a16d710b
2019-10-17 23:29:57 +01:00
Lucas Lin
210db2b411 Merge "Remove the network capabilities which are added twice"
am: 931234b451

Change-Id: I884dd7720ef9ccf257dc49de11a24918c00fa0ca
2019-10-15 21:23:48 -07:00
Aaron Huang
10b90974ac Expose MacAddress methods to public API
To support mainline modules, adding the methods which
are used by wifi.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Test: atest android.net.cts
      atest android.net.wifi.cts
      atest FrameworksNetTests
      atest NetworkStackTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I49856863c15b6b3b59aa867a77b0f137003149ef
2019-10-15 17:33:05 +08:00
lucaslin
08459a6a7d Remove the network capabilities which are added twice
Remove the network capabilities which are added twice in
createDefaultNetworkCapabilitiesForUid() and
createDefaultInternetRequestForTransport(). In the constructor
of NetworkCapabilities, it will add the DEFAULT_CAPABILITIES
which includes the NOT_RESTRICTED.

Bug: 142370233
Test: 1. Build pass.
      2. atest FrameworksNetTests
Change-Id: I7159909aec8faa7f25cef94195bdaea0fea55840
2019-10-15 17:13:45 +08:00
paulhu
5288706a9e Merge "Remove @FlakyTest on testTcpBufferReset"
am: 3ae017a7d2

Change-Id: I3078d75cdc1ec6a1ddbd10de60cb6d355fe5f317
2019-10-11 04:26:47 -07:00
Treehugger Robot
3ae017a7d2 Merge "Remove @FlakyTest on testTcpBufferReset" 2019-10-11 11:06:14 +00:00
Chalard Jean
3747ac3067 Merge "Improve documentation for NetworkCallbacks."
am: c1ea43fa1c

Change-Id: I7384a0224bdf3fe86aee3733d4b7a6e5e12b5a4e
2019-10-09 23:14:30 -07:00
Chalard Jean
c1ea43fa1c Merge "Improve documentation for NetworkCallbacks." 2019-10-10 05:56:59 +00:00
Chalard Jean
01378b64ac Improve documentation for NetworkCallbacks.
Bug: 139570489
Test: m doc-comment-check-docs
Change-Id: I9e13057b7e46908863156986429ff2ce93d4be78
2019-10-09 18:33:09 +09:00
Iavor-Valentin Iftime
3429df9c8d Merge "API to detect which network interfaces support wake-on-lan"
am: c6a375706e

Change-Id: I6239ae68559290e31f8c9384e0f973cfea30a1c7
2019-10-08 08:23:23 -07:00
Iavor-Valentin Iftime
c6a375706e Merge "API to detect which network interfaces support wake-on-lan" 2019-10-08 15:08:18 +00:00