Commit Graph

4473 Commits

Author SHA1 Message Date
Jimmy Chen
8a9a9adaeb Merge "p2p: mirgrate p2p into tethering modes" 2019-10-18 05:42:31 +00:00
Aaron Huang
f857470625 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
Chalard Jean
90a84e26bd Merge "Improve documentation for NetworkCallbacks." 2019-10-10 05:56:59 +00:00
Chalard Jean
599ce75792 Improve documentation for NetworkCallbacks.
Bug: 139570489
Test: m doc-comment-check-docs
Change-Id: I9e13057b7e46908863156986429ff2ce93d4be78
2019-10-09 18:33:09 +09:00
Valentin Iftime
c86ebbaebc API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
Jimmy Chen
bcd86d0c9b p2p: mirgrate p2p into tethering modes
Bug: 137602441
Bug: 139783330
Test: atest FrameworksNetTests
Test: atest FrameworksWifiTests
Test: CtsVerifier - Wi-Fi Direct
Test: Enable hotspot when P2P GO is running
      * P2P GO is terminated
      * hotspot is running
Test: Enable P2P GO when hotspot is running
      * hotspot is intact
      * P2P GO could not be launched
Test: Verify P2P functions with legacy WifiP2pService

Change-Id: Icb2e2b106ae52b19af29b7a1ebc55d3cdf80db9c
2019-10-08 14:37:19 +08:00
Oscar Shu
54bb8a1625 Merge "Followup to CL 1103896" 2019-09-24 22:06:27 +00:00
xshu
b483607abe Followup to CL 1103896
Optimizes the logic that ensures the default randomized MAC is not
returned.

Bug: 137796328
Test: atest MacAddressTest
Change-Id: Ie95d7a020bfac8850b8a67e4d396de77db22e1db
2019-09-20 16:56:54 -07:00
Christian Wailes
d9bce3cfff Merge "Revert "Revert "Remove a misleading "flush" function.""" 2019-09-11 18:23:50 +00:00
Christian Wailes
647fee87dc Revert "Revert "Remove a misleading "flush" function.""
This reverts commit 47da177405.

Reason for revert: Fixed the test broken by the original commit

Bug: 139192244
Bug: 140336855

Test: m -> flash -> boot
Test: atest CtsJvmtiAttachingHostTestCases

Change-Id: I4c67ad8709652c4710ef24564e0240f74f817f8c
2019-09-04 23:37:32 +00:00
Ian Kasprzak
783313acbf Merge "Revert "Remove a misleading "flush" function.""
am: 9fcf8b7cae

Change-Id: Ic6fafd4ed9bf6dfc001120dced903b14cf907d1d
2019-09-02 08:47:30 -07:00
Ian Kasprzak
9fcf8b7cae Merge "Revert "Remove a misleading "flush" function."" 2019-09-02 15:28:20 +00:00
Ian Kasprzak
47da177405 Revert "Remove a misleading "flush" function."
This reverts commit 9d8b926859.

Reason for revert: Driodcop: aosp-master test-mapping showing multiple failures (b/140336855).

Change-Id: If44e273dd111802db8b44db1e5a67a4628c72e3c
2019-08-31 21:28:50 +00:00
Christian Wailes
932b360d45 Merge "Remove a misleading "flush" function."
am: d6f04e744d

Change-Id: I31a2c6a8b49493ea85816071874c3e08841f233f
2019-08-30 16:24:39 -07:00
Christian Wailes
d6f04e744d Merge "Remove a misleading "flush" function." 2019-08-30 22:59:41 +00:00
Aurimas Liutikas
9b361c2674 Merge "Add missing nullability annotations." 2019-08-30 18:30:39 +00:00
Aurimas Liutikas
85c0a5a2be Merge "Add missing nullability annotations." into stage-aosp-master 2019-08-30 15:19:45 +00:00
Remi NGUYEN VAN
5af10311a3 Merge "Run callbacks on ConnectivityService thread"
am: bef5d2165d

Change-Id: I7a8d035ec7453c5351eb2646c631c19964cb0f88
2019-08-30 03:36:26 -07:00
Aurimas Liutikas
1da3bde08d Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:16:24 +00:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Remi NGUYEN VAN
f9354793f9 Run callbacks on ConnectivityService thread
Run MultinetworkPolicyTracker and DataConnectionStats callbacks on the
ConnectivityService handler thread.

Previously the callbacks would be using the SystemServer foreground
thread (Looper.myLooper()), or the broadcast thread for the
MultinetworkPolicyTracker BroadcastReceiver. This is error-prone, can
cause threading issues and makes it difficult to test the components.

Test: atest FrameworksNetTests
Change-Id: I189213dd363004abed294659165bf5430d153bba
2019-08-28 10:10:04 +09:00
Chris Wailes
9d8b926859 Remove a misleading "flush" function.
This patch removes LocalSocketImpl.flush().  In practice this function
was simply a wrapper around `Thread.sleep(10)`.  All direct calls to
this function have been removed.  The `flush()` function is still called
on several objects that wrap a SocketOutputStream.

This will make booting a device 20ms faster than it currently is.

Bug: 139192244
Test: Build -> flash -> boot -> launch app
Change-Id: I0a96f4bc72461670370f61e847349f32af5ac774
2019-08-27 14:51:21 -07:00
Oscar Shu
65a98b4002 Merge "avoid generating reserved local MACs"
am: e5d5b73109

Change-Id: Ia6d0eb0c5e8101d9c4b4bc63de79157f7d1c2284
2019-08-23 02:24:15 -07:00
Oscar Shu
e5d5b73109 Merge "avoid generating reserved local MACs" 2019-08-21 17:45:00 +00:00
xshu
683b756b25 avoid generating reserved local MACs
Avoid generating WifiInfo.DEFAULT_MAC_ADDRESS as a randomized MAC
address since it's being used for another purpose.

Bug: 137796328
Test: atest MacAddressTest
Change-Id: Ia7beef0d0af5d7b39845e662cd343d81aef97702
2019-08-16 10:20:22 -07:00
Chiachang Wang
2afb11fbc8 Merge "Get resource based on subId for multi-SIM"
am: 55752cf8d4

Change-Id: I020c2546fa4432d05cf27b20fdb1943508aac671
2019-08-14 04:30:57 -07:00
Chiachang Wang
5f8ac27d79 Get resource based on subId for multi-SIM
The resource loading is done based on the last SIM to come up
which is not a deterministic design. Thus, update the way to get
the resource based on the subId.

Test: atest FrameworksNetTests
Test: manually test with avoid bad wifi feature supported sim
Bug: 138956509
Change-Id: Ib5b085d97103889600773d269e03b939c29ca47d
2019-08-14 13:56:37 +08:00
Aurimas Liutikas
fbcbeec03c Merge "Fix broken Javadoc links in frameworks/base"
am: 4a532813df

Change-Id: I5a6152fa6baab86dde980af57b84167b154b44c7
2019-08-04 00:49:17 -07:00
Aurimas Liutikas
92ff83bddc Fix broken Javadoc links in frameworks/base
Test: running metalava with syntax check enabled.
Change-Id: I13ec355b591b0ae3cfb5009794b1ed844d27cba8
2019-08-02 15:40:29 -07:00
Fedor Kudasov
c064c84b5f Return NonNull and other imports
Change-Id: Ia38b13209b45d8228ac02f06663e4dc12be9de60
2019-07-09 14:19:04 +00:00
Fedor Kudasov
8125047183 Merge changes from topic "fix_master_build"
am: 2e5319117a

Change-Id: If49999e7ce6149e847a678b03ccf8b4549f8365b
2019-07-09 06:10:01 -07:00
Fedor Kudasov
559e91e0ef Revert "Cherry-pick the relevant parts of master change"
This reverts commit dd16d44fe8.

Reason for revert: multiple build breakages b/137069068

Change-Id: If48bfa2d2cab0877a053743b3ec53820d0c4ed6b
2019-07-09 09:29:17 +00:00
Fedor Kudasov
e5cb0a2216 Revert "Remove providesRoutesToMostDestinations."
This reverts commit d85b09a06f.

Reason for revert: multiple build breakages b/137069068

Change-Id: I60a4f71e13fe82f970b177a07c0b58439cbc64ff
2019-07-09 09:23:25 +00:00
Chalard Jean
cbaed4e7ba Merge changes Ia43f8811,I7de4f672
am: 3ef04b8e3c

Change-Id: Ifcacd81d343a29b17fdb79f4c8b54c89a293a2b8
2019-07-09 00:56:57 -07:00
Chalard Jean
d85b09a06f Remove providesRoutesToMostDestinations.
This function is not used any more.

Test: FrameworksNetTests
Change-Id: Ia43f8811cb9d575e16735b0f4b76d91e7cd42ebc
2019-07-08 20:36:33 +09:00
Chalard Jean
dd16d44fe8 Cherry-pick the relevant parts of master change
I566437e4fe10e1346858149120c50b3c20ca073f to avoid a conflict

Test: atest FrameworksNetTests
Change-Id: I7de4f67234bf97d58bddffa22272c7670398f56d
2019-07-08 20:25:45 +09:00
Lorenzo Colitti
736194dfbf Merge "Unit tests for new explicitlySelected behaviour." am: d1379a4a80
am: 10c1a704c0

Change-Id: Id77a5d6a58e7ab4fdaa0b7c15b824270863b83fd
2019-06-29 02:01:55 -07:00
Lorenzo Colitti
b5ad613839 Unit tests for new explicitlySelected behaviour.
ag/7905088 added the ability to pass in acceptUnvalidated without
passing in explicitlySelected. Add unit tests for that code.

While I'm at it, convert a couple of "== 1"s to toBool(), and
update the comments in NetworkAgent.

Bug: 130766237
Test: atest FrameworksNetTests
Change-Id: I6b550bd621e3596975f83464c7b4b8a14269120b
2019-06-28 23:57:22 +09:00
Lorenzo Colitti
e6e57b2c8f Merge "Remove all static members from NetworkStatsFactory." am: 63f94f411b
am: 5409264cee

Change-Id: Iada14a1fea74197014e75a1112c7a5b35d6b1a1d
2019-06-27 19:40:01 -07:00
Neil Fuller
8a334f433b Merge "Track change of type from short -> int" am: d854e6e0b4
am: 9881c6f3d7

Change-Id: Iab8db7985b5cdd52b22aa2b72e3273c2d8f2f892
2019-06-27 02:43:34 -07:00
Lorenzo Colitti
4aa8760a68 Remove all static members from NetworkStatsFactory.
NetworkStatsFactory is owned by NetworkStatsService, and any
accesses to NSF data should go through NSS.

Test: atest FrameworksNetTests
Change-Id: Idbd0dbbaeb11313f63474e7ec0e01f974349fc89
2019-06-27 17:39:05 +09:00
Neil Fuller
d854e6e0b4 Merge "Track change of type from short -> int" 2019-06-27 08:26:31 +00:00
Neil Fuller
9ec43cc7fe Merge "Switch to a single PacketSocketAddress constructor" am: 2d24f7a39e
am: a357696c2f

Change-Id: I7db11188d9dd42e25b0aebd79acc92a9ba2f56a0
2019-06-20 14:06:50 -07:00
Chalard Jean
f1eab99357 Merge "Factorize custom asserts." am: 6c176efa3d
am: 99fbb40990

Change-Id: I65ea7497abb8b77ebd10ba622075ef3b6c49b2a8
2019-06-20 14:01:31 -07:00
Neil Fuller
f8d8fc1247 Track change of type from short -> int
Remove (now) unnecessary cast: PacketSocketAddress
uses ints.

Bug: 124232146
Bug: 135660232
Test: build only
Change-Id: Ifa99e0d2e970f1b8f605afe8a394c4f575bc6eca
2019-06-20 17:09:40 +01:00
Neil Fuller
2d24f7a39e Merge "Switch to a single PacketSocketAddress constructor" 2019-06-20 14:09:15 +00:00
Neil Fuller
6ae89f2f9c Switch to a single PacketSocketAddress constructor
Switch to a single PacketSocketAddress constructor to
avoid multiple unnecessary overloads in the
Core Platform API.

Bug: 133196453
Bug: 124232146
Test: build only
Change-Id: I30533ac3aa99c2cd09e8c624fedf6000b0f52c11
2019-06-20 09:24:43 +01:00
Chalard Jean
9c0ff1b005 Factorize custom asserts.
Also a few utilities that were in the way, and some opportunistic
cleanups.

Test: FrameworksNetTest NetworkStackTest
Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
2019-06-20 16:24:25 +09:00
Junyu Lai
aed835f086 Merge "Move the test of minimum supported keepalive slots to CTS" am: 579a99e558
am: 6ff00fee75

Change-Id: Ib9b06d3458782a648a2f5b8fd5a9ca1d34bd11f9
2019-06-19 07:29:11 -07:00
Junyu Lai
680abbb591 Merge "Correct value of supported keepalive count for cellular" am: 68a4599a37
am: 056eeae27c

Change-Id: If833b813ba00eeff913160598f1ea9c74e6e35d8
2019-06-19 07:28:53 -07:00