Commit Graph

2760 Commits

Author SHA1 Message Date
Aaron Huang
ecbc722486 Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia5692aade490fbc8a037186fcdfc453e0dd8045b
Merged-In: Ibf2f370c97a602f186e37ea9ffbe177dd2ee0f1c
2020-03-10 06:45:16 +00:00
Automerger Merge Worker
465199b9a0 Merge "Move DnsSdTxtRecord to net common static library" am: 8d6a6e0d4b
Change-Id: I1101a06ab084e1ff61a785f78b1ae5ac50bfbcd8
2020-03-04 05:56:55 +00:00
Aaron Huang
1752fcf3c8 Move DnsSdTxtRecord to net common static library
DnsSdTxtRecord is moved to frameworks/libs/net for mainline
support. Also change the import path using this class.

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

Change-Id: I6118b313ce668707d598aa2eab9baee2f7622dbc
Merged-In: I6118b313ce668707d598aa2eab9baee2f7622dbc
2020-03-02 08:21:26 +00:00
Roshan Pius
b2e49ac48b DO NOT MERGE: RELAND: NetworkRequest: Embed requestor uid & packageName
Add the requestorUid & requestorPackageName fields to
NetworkCapabilities. This is populated by CS when
a new network request is received.
These 2 requestor fields are also optionally used for network
matching. All of the regular app initiated requests will have the
requestor uid and package name set by connectivity service. Network
agents can optionally set the requestorUid and requestorPackageName
to restrict the network created only to the app that requested the network.

This will help removing the necessity for the various specifiers to embed
the uid & package name info in the specifier for network matching.

Note: NetworkSpecifier.assertValidFromUid() is deprecated & removed in
favor of setting the uid/package name on the agent to restrict the
network to a certain app (useful for wifi peer to peer API & wifi aware).

Bug: 144102365
Test: Verified that wifi network request related CTS verifier tests
pass.
Test: Device boots up and connects to wifi networks
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529

Change-Id: I58775e82aa7725aac5aa27ca9d2b5ee8f0be4242
2020-02-19 23:12:32 +00:00
Aaron Huang
9537e110e3 Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I44e0a8361637c2d43be2e5d033d405b22e1a149c
Merged-In: I067cdc404e5a63947c19cb75069a39ae42faa3c8
Merged-In: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
2020-02-18 13:52:35 +00:00
Isabelle Taylor
288fdeb4cd Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" am: 5c4b6301d5
Change-Id: I5e0b4e50352428ca5886a808b5667daffb4f2e4c
2020-02-14 13:51:45 +00:00
Isabelle Taylor
5c4b6301d5 Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" 2020-02-14 13:42:37 +00:00
Isabelle Taylor
a996b06b6f Revert "Remove framework code that has moved to frameworks/libs/net"
Revert "Use createRandomUnicastAddress from MacAddressUtils"

Revert "Add net-utils-framework-net to telephony-common"

Revert submission 1191997-net-utils-framework-net

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_qt-qpr1-dev-plus-aosp&target=aosp_taimen-userdebug&lkgb=6208131&lkbb=6208273&fkbb=6208273, bug b/149551544
Reverted Changes:
Ib1c807d64:Use createRandomUnicastAddress from MacAddressUtil...
I9e0f297e0:Add net-utils-framework-net to telephony-common
Ieb8927f9a:Remove framework code that has moved to frameworks...

Change-Id: I2824f781babd9f7e0bb9df524dadf6b8397dcaa1
2020-02-14 13:09:16 +00:00
Aaron Huang
37413a4b82 Merge "Remove framework code that has moved to frameworks/libs/net" am: 79b6ad735b
Change-Id: I20b8398f1fe410819f18a0afcd8646c75c594fb8
2020-02-14 09:53:36 +00:00
Aaron Huang
79b6ad735b Merge "Remove framework code that has moved to frameworks/libs/net" 2020-02-14 09:42:49 +00:00
Roshan Pius
ef628d3a79 RELAND: NetworkRequest: Embed requestor uid & packageName
Add the requestorUid & requestorPackageName fields to
NetworkCapabilities. This is populated by CS when
a new network request is received.
These 2 requestor fields are also optionally used for network
matching. All of the regular app initiated requests will have the
requestor uid and package name set by connectivity service. Network
agents can optionally set the requestorUid and requestorPackageName
to restrict the network created only to the app that requested the network.

This will help removing the necessity for the various specifiers to embed
the uid & package name info in the specifier for network matching.

Note: NetworkSpecifier.assertValidFromUid() is deprecated & removed in
favor of setting the uid/package name on the agent to restrict the
network to a certain app (useful for wifi peer to peer API & wifi aware).

Bug: 144102365
Test: Verified that wifi network request related CTS verifier tests
pass.
Test: Device boots up and connects to wifi networks
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529

Change-Id: I58775e82aa7725aac5aa27ca9d2b5ee8f0be4242
2020-02-12 16:58:36 -08:00
Automerger Merge Worker
438129f4aa Merge "Revert "NetworkRequest: Embed requestor uid & packageName"" am: 617b4b00e3
Change-Id: I00dd341f699d2a22cc3d190b43314a49bee9062a
2020-02-12 23:55:00 +00:00
Roshan Pius
1a188ab4f5 Revert "NetworkRequest: Embed requestor uid & packageName"
This reverts commit 3e63df535a.

Reason for revert: b/149425896
Bug: b/149425896

Change-Id: I9fe31509c040cc421ccb00ea60f15e6f199e8bc6
2020-02-12 23:33:43 +00:00
Automerger Merge Worker
894c9db9f5 Merge "NetworkRequest: Embed requestor uid & packageName" am: 9dd718c5d9
Change-Id: Ic4f9247e18a9d1cc22b26500b47da1af2d9b011d
2020-02-12 18:51:59 +00:00
Roshan Pius
3e63df535a NetworkRequest: Embed requestor uid & packageName
Add the requestorUid & requestorPackageName fields to
NetworkCapabilities. This is populated by CS when
a new network request is received.
These 2 requestor fields are also optionally used for network
matching. All of the regular app initiated requests will have the
requestor uid and package name set by connectivity service. Network
agents can optionally set the requestorUid and requestorPackageName
to restrict the network created only to the app that requested the network.

This will help removing the necessity for the various specifiers to embed
the uid & package name info in the specifier for network matching.

Note: NetworkSpecifier.assertValidFromUid() is deprecated & removed in
favor of setting the uid/package name on the agent to restrict the
network to a certain app (useful for wifi peer to peer API & wifi aware).

Bug: 144102365
Test: Verified that wifi network request related CTS verifier tests
pass.
Test: Device boots up and connects to wifi networks
Change-Id: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529
2020-02-12 04:42:58 +00:00
Aaron Huang
80abddc763 Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
Merged-In: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
2020-02-03 08:16:43 +00:00
Automerger Merge Worker
07ba724d11 Merge "Export Wifi Parcelables AIDLs from framework.jar" am: 5ccfef6e6b
Change-Id: I575ddb5008d16ebcb32a8fc5196cd82f9eda1e11
2020-02-03 02:13:21 +00:00
Treehugger Robot
5ccfef6e6b Merge "Export Wifi Parcelables AIDLs from framework.jar" 2020-02-03 02:05:12 +00:00
Automerger Merge Worker
3dd5a8035a Wifi: Rename removeDoubleQuotes to sanitizeSsid am: 51939ea9be
Change-Id: I4dade9d23935623afeb3334ec5cbf84bdeaac632
2020-01-31 16:37:42 +00:00
Xiao Ma
859af50899 Export Wifi Parcelables AIDLs from framework.jar
Add Wifi public/@SystemApi Parcelable AIDLs to
framework.jar AIDL exports so that they can be
referenced outside the Wifi module.

Create a new folder "aidl-export" to separate
the AIDLs we want to export to allow external
callers to reference in their AIDL. Private AIDLs
remain in the "java" folder.

most of modifications cherry-pick from internal master
(ag/10139892), but slight change for Android.bp to be
able to compile in aosp build system. keeping the same
aidl path as master to find the correct path when importing
ScanResult from wifi.

Bug: 140299412
Bug: 137835398
Test: atest FrameworksWifiTests

Merged-In: I4e0dc1119bf2b49865c9b5cdf23c571528228902
Change-Id: Idaae4f365e4efaead023ee175391a9e9432a6e00
2020-01-31 13:01:30 +09:00
David Su
23d84d343b Merge changes Iaa6f0d65,I68a16b64
* changes:
  Networking: Rename removeDoubleQuotes to sanitizeSsid
  Wifi: Rename removeDoubleQuotes to sanitizeSsid
2020-01-30 22:42:16 +00:00
Xiao Ma
15e9305761 Merge "Make Information Elements (IE) of a scan result available as a public API."
am: 34a5bbda41

Change-Id: Ia0680401d2c670eb795027ebc3256ec314f41c45
2020-01-28 16:21:45 -08:00
Xiao Ma
34a5bbda41 Merge "Make Information Elements (IE) of a scan result available as a public API." 2020-01-29 00:12:20 +00:00
Xiao Ma
ac16b8ae3e Make Information Elements (IE) of a scan result available as a public API.
Bug: 137835398
Test: atest FrameworksWifiTests
Test: attach to upstream hotspot device by selecting the sanned
      ssid from wifi settings, then check the OUI, vendor specific
      type fileds of IEs from the logcat.

Merged-In: If3b9906c75033f51bd35fcf054154125719ea958
Change-Id: If3b9906c75033f51bd35fcf054154125719ea958
2020-01-28 06:23:36 +00:00
David Su
51939ea9be Wifi: Rename removeDoubleQuotes to sanitizeSsid
Keep removeDoubleQuotes as it is marked
@UnsupportedAppUsage.

Bug: 145745815
Test: compiles
Change-Id: I68a16b64eba3d84265b5cf2c83b434dc4fc7fa3c
Merged-In: I68a16b64eba3d84265b5cf2c83b434dc4fc7fa3c
(dirty cherry-pick from internal branch)
2020-01-27 13:39:39 -08:00
James Mattis
ef9a466f45 Merge "DO NOT MERGE registerSoftApCallback Executor param"
am: db46c349d8

Change-Id: I5bedf30e2fb968e0192acd6419a13d1b9ccc4d40
2020-01-22 22:08:45 -08:00
James Mattis
0ffae5ab87 DO NOT MERGE registerSoftApCallback Executor param
Updating WifiManager.registerSoftApCallback to now have a @NonNull
Executor as a parameter vs @Nullable.

Bug: 147671244
Bug: 145592261

Test: atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
Also manually tested on Pixel 3.

Change-Id: I85e6194f067e451842c01733cca2ea12bd164036
2020-01-22 13:41:24 -08:00
Xin Li
e13851556b DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Artur Satayev
54af4fc42a Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
Merged-In: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
2020-01-09 13:52:18 +00:00
Automerger Merge Worker
15ee5f5d68 Merge "p2p: check the length of the network name bytes" into qt-qpr1-dev am: 2e513c5b1b
Change-Id: I22d15a5ab08c3e901f17ebe6eb0c045b708b51da
2019-12-12 02:45:39 +00:00
Jimmy Chen
215d43217d p2p: check the length of the network name bytes
Fixes: 144472136
Bug: 144472136
Test: atest FrameworksWifiApiTests
Change-Id: I80b8e0330499e6c655efb1712811891a8e8229cb
(cherry picked from commit a0900344f4)
2019-12-11 06:43:54 +00:00
Roshan Pius
4e616cf498 Merge "WifiManager: Add missing field to getConfiguredNetworks() doc" am: 846c0fe038
am: c30beb79e7

Change-Id: I318718984f1c3d90b5f39d1adc2986fcba9265b2
2019-12-04 10:03:04 -08:00
David Castro
5d8d3f6e7d Merge "Doc: Adds a link to the WifiRTT codelab" into qt-dev am: 20bf2110c3 am: 324d5cfb57
am: d8cdece755

Change-Id: I6fb32e2292aa44e7698a17187e3cc52459addcce
2019-12-02 14:49:27 -08:00
David Castro
d8cdece755 Merge "Doc: Adds a link to the WifiRTT codelab" into qt-dev am: 20bf2110c3
am: 324d5cfb57

Change-Id: If0f81f8023b487180d7a8e8b45efd7edff899d65
2019-12-02 14:43:23 -08:00
Automerger Merge Worker
324d5cfb57 Merge "Doc: Adds a link to the WifiRTT codelab" into qt-dev am: 20bf2110c3
Change-Id: Ibe2e2a2bee6acef662dd1235c6c887dae4571645
2019-12-02 22:30:26 +00:00
David Castro
2d61e036f3 Doc: Adds a link to the WifiRTT codelab
BUG:113332240
Change-Id: I404de18dd3c8880332b5a103079723fb1927d60d
Exempt-From-Owner-Approval: Docs-only change
2019-12-02 22:18:19 +00:00
Roshan Pius
94006409ae WifiManager: Add missing field to getConfiguredNetworks() doc
Bug: 122815212
Test: None
Change-Id: I907aa8219a3812b7c2dadbe9ce99ccf4c83c535b
2019-11-26 17:39:34 +00:00
Roshan Pius
126fb85c29 Merge "NetworkScoreManager: Add @SystemApi for wifi mainline module" am: 5b57190f08
am: 0564779e76

Change-Id: I04580ad32eefb2ce4c8df8f1037b8457238c30eb
2019-11-25 06:05:07 -08:00
Roshan Pius
9518866c53 NetworkScoreManager: Add @SystemApi for wifi mainline module
Add formal API's for API's that the wifi mainline module uses:
a) NetworkScoreManager.requestNetworkScores - Request new network scores.
b) NetworkScoreManager.registerNetworkScoreCallback - @SystemApi wrapper
over the existing registerNetworkScoreCache.
c) NetworkKey.createFromScanResult - Create NetworkKey from ScanResult.

Also,
a) Converted the existing WifiNetworkScoreCache callback implementation to
support both the new @SystemApi (used by wifi) and the old @hide API
(used by settings).
b) Stopped invoking dump on all the callbacks from NetworkScoreService.
The dump of each callback should be invoked at their client site (i.e
wifi service should dump state of the callback it registers with the
service).
c) Added a helper method |dumpWithLatestScanResults| to help dump the
state of the WifiNetworkScoreCache from wifi service.

Bug: 144487252
Test: a) Device boots up and connects to wifi network.
b) Manually verified that network scores are being requested & updated
with the new interface.

Change-Id: Id5a66189150e7a088127519373a832f63bdd12ac
Merged-In: Id5a66189150e7a088127519373a832f63bdd12ac
(cherry-picked from c278f80c28)
2019-11-24 07:04:30 +00:00
Hai Shalom
f8a5719cfc Merge "Revert submission" into qt-qpr1-dev
am: 65c9665125

Change-Id: Id444c3a9c767de5144ee2ded8f4c1cabca304670
2019-11-21 19:57:39 -08:00
Hai Shalom
65c9665125 Merge "Revert submission" into qt-qpr1-dev 2019-11-22 03:46:01 +00:00
Hai Shalom
a4284cb292 Revert submission
Reason for revert: Incomplete fix that causes additional issues which were not anticipated earlier.

Change-Id: I383273509797ed95a7f9ece780ec52abb1341292
Merged-In: Iff36d5a10e6c8ee8978a5842af8f19efc10c0a91
2019-11-21 23:08:43 +00:00
David Su
02076c7a01 Merge "NetworkKey: migrate from ScanResult.wifiSsid to SSID" am: 1124e240c0
am: c4df6668bb

Change-Id: I6e50821d3fdd5e6ff5fc4cd238ccd186dd1ff94c
2019-11-21 11:58:10 -08:00
David Su
1124e240c0 Merge "NetworkKey: migrate from ScanResult.wifiSsid to SSID" 2019-11-21 18:44:46 +00:00
David Su
e51ae1566b NetworkKey: migrate from ScanResult.wifiSsid to SSID
wifiSsid is an @hide field, migrate to getter method.

Bug: 144311098
Test: atest NetworkKeyTest
Change-Id: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
Merged-In: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
2019-11-20 10:41:59 -08:00
James Mattis
ed6fe63662 Merge "Swap param order in registerSoftApCallback" am: 1dcfd69218
am: fa968e9691

Change-Id: I0efdc1f3fd35fe059747b6ba2c6b0dc1731b3388
2019-11-20 10:40:05 -08:00
James Mattis
4a3e2c1e93 Swap param order in registerSoftApCallback
Moving executor to be the first argument in registerSoftApCallback.

Bug: 144379300
Test: atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
Manually on pixel 3

Change-Id: I7074278d16beac422ce7b29d4471b2794fa97825
Merged-In: I7074278d16beac422ce7b29d4471b2794fa97825
2019-11-18 13:48:29 -08:00
Hai Shalom
19d6971364 Merge "[WPA3] Fix WPA3-Personal transition mode" into qt-qpr1-dev
am: 78ee3320ff

Change-Id: I52bdc08f8d6efd0f4ab6f618b2edae3f40ddc271
2019-11-18 13:46:51 -08:00
Hai Shalom
78ee3320ff Merge "[WPA3] Fix WPA3-Personal transition mode" into qt-qpr1-dev 2019-11-18 21:29:39 +00:00
Hai Shalom
8000abd65b [WPA3] Fix WPA3-Personal transition mode
Fix WPA3-Personal in transition mode issues. Current
solution will create an upgraded WPA3 connection if
there is a WPA2 saved network and AP is in transition
mode.

Bug: 143843364
Test: Manual tests
Test: atest com.android.server.wifi
Change-Id: Idadbd1d155ddd617e61063e64e186abec478f5ff
Merged-In: I53b278e846828198fb1953b075d86e16fac6d795
2019-11-16 01:43:30 +00:00