Commit Graph

3029 Commits

Author SHA1 Message Date
Nate Jiang
035705ccd9 Merge "Add error code for app adding invalid suggestions" 2020-01-21 22:34:11 +00:00
David Su
4cbe6852f5 SoftApConfig: Fix broken JavaDoc @links
JavaDoc @links refer to @hide @IntDef, instead
reference public constants.

Bug: 140299412
Test: m doc-comment-check-docs
Change-Id: If076d89167d67ce9dfebc69644947cd6ed37f11d
2020-01-21 13:47:10 -08:00
Nate(Qiang) Jiang
e4d7f7d8cc Add error code for app adding invalid suggestions
If one or more of the suggestions added is invalid, will reject all.

Bug: 147907699
Test: atest android.net.wifi
Change-Id: I2f6c83a811539c682861c4d6e622c52f583d9832
2020-01-21 12:42:19 -08:00
TreeHugger Robot
52bf7227ec Merge "WifiScanner: Deprecate gscan API's" 2020-01-21 17:10:47 +00:00
David Su
c1728f1613 Merge changes from topics "framework-jar-build-against-framework-wifi-stubs", "settings-suggestions-apis"
* changes:
  framework.jar - include framework-wifi-stubs instead of framework-wifi (Attempt 2)
  Expose WifiNetworkSuggestion.getWifi/PasspointConfiguration()
2020-01-21 17:05:24 +00:00
David Su
9e208ff677 Merge changes from topic "revert-10057725-IDGRNKQGYI"
* changes:
  Build framework-wifi against core_current & framework-system-stubs (Attempt 2)
  Fully qualify android.net.wifi.ScanResult
2020-01-21 17:04:30 +00:00
Roshan Pius
f93897581d WifiScanner: Deprecate gscan API's
Bug: 71855918
Test: Compiles
Change-Id: Ibf5c4b012af74914f997866fa24608a854dd9868
2020-01-21 07:16:02 -08:00
TreeHugger Robot
32367284d3 Merge "p2p: add new API to indicate Content Protection support status" 2020-01-21 08:54:13 +00:00
Jimmy Chen
e72c186980 p2p: add new API to indicate Content Protection support status
Bug: 147929113
Test: atest FrameworksWifiApiTests
Change-Id: I88b48b4a0a0bd5c80b920104bcb15dfd89ba1763
2020-01-21 07:48:54 +00:00
Ahmed ElArabawy
3243dd66e7 Merge "Wifi: Add device wiphy capability parameters" 2020-01-21 06:44:20 +00:00
Ahmed ElArabawy
a7079f81aa Wifi: Add device wiphy capability parameters
This commit adds the following parameters to DeviceWiphyCapabilities:
1. Support of 160MHz / 80+80MHz channel width
2. Max number of Tx/Rx spatial streams.

Bug: 144576344
Test: atest com.android.wifi.server
Change-Id: Iad4ce736968d23d5abb43c8948d34fe03dcbcb01
2020-01-21 05:10:14 +00:00
Xiao Ma
8e5ca5cd7e 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.

Change-Id: If3b9906c75033f51bd35fcf054154125719ea958
2020-01-20 16:17:27 +09:00
TreeHugger Robot
59fe0357bd Merge "softap: Add util function toWifiConfiguration in SoftApConfiguration." 2020-01-20 02:51:51 +00:00
Nate Jiang
f1cbec5f5d Merge "Add set untrusted API for networkSuggestion" 2020-01-20 00:15:28 +00:00
lesl
ac37493993 softap: Add util function toWifiConfiguration in SoftApConfiguration.
Bug: 142752869
Test: atest frameworks/base/wifi/tests
Change-Id: I61ef8bfe4fc5e273249944b302782a4c5f909924
2020-01-19 23:50:29 +08:00
Ahmed ElArabawy
9b3f076527 Wifi: Add a public API to query for supported wifi standards
This commit adds a public API to query for the supported wifi standards.

Bug: 143543900
Bug: 134688244
Bug: 144576344
Test: atest com.android.wifi.server
Change-Id: I57ac90c7d3473a71435bfb96b19d983ae433082a
2020-01-19 08:54:39 +00:00
Nate(Qiang) Jiang
8996b2d677 Add set untrusted API for networkSuggestion
Bug: 147766061
Test: atest android.net.wifi
Change-Id: I122643b07447d9514390fd0654bba77ed4dc4a0f
2020-01-19 00:51:50 -08:00
Nate Jiang
5b4390df24 Merge "Deprecate WifiManager passpoint API's" 2020-01-19 08:17:36 +00:00
Les Lee
c64b68c3e2 Merge changes from topic "lohs_sap_config"
* changes:
  wifi: Fix java doc error, use @code instead of @link
  softap: Update LOHS API usage
  SoftAp: Public SoftApConfiguration to replace WifiConfiguration
2020-01-19 05:53:56 +00:00
TreeHugger Robot
2c5ca138c7 Merge "set SharedWithUser and IsAutoJoinEnabled both to false is not allowed" 2020-01-19 05:18:56 +00:00
Nate(Qiang) Jiang
4572b7bf6f Deprecate WifiManager passpoint API's
We prefer app to use suggestion API to add passpoint network.

Bug: 142424092
Test: atest android.net.wifi
Change-Id: I030efc2eeecef16ce7d5650136f168a44fad864e
2020-01-17 17:58:44 -08:00
David Su
32f3943b8d Fully qualify android.net.wifi.ScanResult
Somehow the AIDL compiler is confusing
android.net.wifi.ScanResult with
android.bluetooth.le.ScanResult.
For some reason fully qualifying ScanResult
instead of having a single import at the top
fixes the problem.

Bug: 147918827
Test: m ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I93b9006cb1741ba0d723ffaa8b2a84ff96c7312e
2020-01-17 17:15:58 -08:00
Nate(Qiang) Jiang
8d4ef86d72 set SharedWithUser and IsAutoJoinEnabled both to false is not allowed
Fix the issue that passpoint suggestion can set both to false.

Bug: 139199957
Test: atest android.net.wifi

Change-Id: I44ef0116efeb04220b3f710664aecab614ae849c
2020-01-17 15:43:13 -08:00
David Su
2a96126e2e Expose WifiNetworkSuggestion.getWifi/PasspointConfiguration()
These @SystemApis are needed by Settings.

Also modified no-arg constructor for
WifiNetworkSuggestion to conform to the
@NonNull guarantees of getWifiConfiguration().

Bug: 138801922
Test: atest FrameworksWifiApiTests
Change-Id: I5ce60ba376e6976bdcb5a651c991c44579bfef3f
2020-01-17 15:12:09 -08:00
Kai Shi
85f8385f42 Merge "Wifi: add APIs to set/get max supported link speed" 2020-01-17 19:03:48 +00:00
David Su
b75d59b947 Merge changes I2d2aa89c,Ib507b449
* changes:
  Build framework-wifi against core_current & framework-system-stubs
  WifiNetworkSpecifier: get context reflectively
2020-01-17 18:50:13 +00:00
David Su
a4d9a65ff5 WifiNetworkSpecifier: get context reflectively
Temporarily use reflection to get the context
in order to allow framework-wifi to build
against @SystemApi stubs. Will remove reflective
call once refactor is complete to allow
WifiNetworkSpecifier to get the context using
formal APIs.

Bug: 144102365
Test: Ran CTS Verifier NetworkRequest tests, verified package name
in adb logs.
Change-Id: Ib507b449f81e9ce88cdb9190e9f8390eb25819b7
2020-01-17 18:48:42 +00:00
Ahmed ElArabawy
cd80e83a2b Wifi: Add a system api to query for device phy capabilities
This commit adds the API to query for the device phy capabilities.

Bug: 143543900
Bug: 134688244
Bug: 144576344
Test: atest com.android.wifi.server
Change-Id: I8bff0fb45faaa39a7cd4dd19fe4591ac2e7af3d5
2020-01-17 18:25:37 +00:00
lesl
f272d50206 wifi: Fix java doc error, use @code instead of @link
Root cause:
The @link is referencing the hidden method will build break

Bug: 142752869
Test: make docs frameworks/base/wifi/
Change-Id: I8101fcfc5fd022d3216b300ce054645bcd878a07
2020-01-18 01:59:26 +08:00
Mingguang Xu
71c3dbac87 Merge "Extension API: Create System APIs to allow OEM module to override WiFi scorer in AOSP" 2020-01-17 16:07:08 +00:00
lesl
115873a18b softap: Update LOHS API usage
Use SoftApConfiguration to replace WifiConfiguration
1. Deprecate public old getWifiConfiguration API.
2. Add new API getSoftApConfiguration in LocalOnlyHotspotReservation

The new security type SAE and SAE Transition mode support in Soft Ap,
Return null config when LOHS enable and security type is SAE or SAE Transition mode.

Bug: 138801922
Bug: 142752869
Test: atest frameworks/base/wifi/tests/
Test: atest android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSingleRequestByApps
Test: atest android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSuccess
Test: atest android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotWithConfig
Change-Id: I32fbceff03b3821dde4f05356abb7f1645b90127
2020-01-17 21:52:07 +08:00
lesl
64232b7571 SoftAp: Public SoftApConfiguration to replace WifiConfiguration
Bug: 142752869
Test: atest frameworks/base/wifi/tests/
Change-Id: I82be10b8083162b6cf179e12a2a93b1eb669547a
2020-01-17 21:51:35 +08:00
Mingguang Xu
ec6f8ce6fd Extension API: Create System APIs to allow OEM module to override WiFi
scorer in AOSP

Create WiFi scorer interface and score change callback interface in WifiManager; Define register and unregister methods for WiFi scorer.

Test: atest android.net.wifi
Bug: 135573686, 122133502, 136312816, 135572156

Change-Id: Ib51d877a463d1f69b31b9743917ea1b3590a30f7
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2020-01-17 07:22:50 +00:00
Kai Shi
5cb2b67aba Wifi: add APIs to set/get max supported link speed
Add the following APIs:
getMaxSupportedTxLinkSpeed()
setMaxSupportedTxLinkSpeed()
getMaxSupportedRxLinkSpeed()
setMaxSupportedRxLinkSpeed()

Bug: 147390882
Test: atest android.net.wifi
Test: manual test with various APs
Change-Id: I7f3268b2842783f99c0a43d8b4996d0a7dd46c6e
2020-01-16 16:46:43 -08:00
Oscar Shu
07c7e32924 Merge "Allow set MAC randomization setting for passpoint" 2020-01-16 23:52:27 +00:00
Nate Jiang
a54eaa6ae3 Merge "Enable/disable auto-join for Suggestions" 2020-01-16 22:46:56 +00:00
TreeHugger Robot
281887bf97 Merge "Remove some unneeded WifiConfiguration time stamps" 2020-01-16 21:29:54 +00:00
xshu
380322e7ff Allow set MAC randomization setting for passpoint
Add API to enable/disable MAC randomization per passpoint profile.

Bug: 145209638
Test: atest android.net.wifi
Change-Id: I1683ed4eb3c64c6643eb04919dc77aa8f0db0ec6
2020-01-16 11:00:59 -08:00
Roshan Pius
feb86eae2e Merge changes from topics "user_remove_extra_user", "wifi_net_utils"
* changes:
  UserManagerService: Add UserHandle extra to user added/removed broadcast
  wifi-service: Jar-Jar net util library
  WifiManager: Add API to query STA + AP concurrency
2020-01-16 13:05:13 +00:00
Aaron Huang
9e0c5262ca Merge "Move DnsSdTxtRecord to net common static library" 2020-01-16 03:15:55 +00:00
TreeHugger Robot
cebccf30cb Merge "Change Doc for getConnectionInfo" 2020-01-16 01:52:04 +00:00
Roshan Pius
1763329d16 WifiManager: Add API to query STA + AP concurrency
Use the existing feature flag |WIFI_FEATURE_AP_STA| to expose a
@SystemApi.

PS: This flag is currently unused. Will need to find a mechanism by
which we can fill in this flag appropriately from HalDeviceManager.

Bug: 141452146
Test: Compiles
Change-Id: Idf3bab96686a8994cd3eea6bec8346db96161a03
2020-01-15 15:50:39 -08:00
David Su
15858efcc0 Merge changes from topic "framework-jar-build-against-framework-wifi-stubs"
* changes:
  framework.jar - include framework-wifi-stubs instead of framework-wifi
  Expose WifiConfiguration.SuiteBCipher
2020-01-15 23:22:19 +00:00
Michael Plass
a0d404b1b8 Remove some unneeded WifiConfiguration time stamps
Removed mConnectChoiceTimestamp, creationTime, updateTime.

Bug: 146460486
Test: atest FrameworksWifiApiTests
Change-Id: Ic638a40b9d962bbeb7e193d61f3f510c96bc2680
2020-01-15 14:32:13 -08:00
David Su
d084a449cc Expose WifiConfiguration.SuiteBCipher
WifiConfiguration.SuiteBCipher is linked in
documentation of public API
WifiConfiguration.allowedSuiteBCiphers.
Thus expose SuiteBCipher as a public API.

Bug: 147711708
Test: compiles
Change-Id: Ib913f92d61dce29da4660a3f2f08c8c17d939b71
2020-01-15 11:43:18 -08:00
Nate(Qiang) Jiang
31de34693e Change Doc for getConnectionInfo
When app doesn't have location permission or location mode disabled,
FQDN and friendly name will not ba able to access.

Bug: 147699220
Test: build
Change-Id: If4000ba550ee58a17cbf77e4e28a9e6a592b6264
2020-01-15 10:07:18 -08:00
TreeHugger Robot
a682ec6e7d Merge "Remove framework code that has moved to frameworks/libs/net" 2020-01-15 02:47:52 +00:00
David Su
025eab036f Merge changes from topics "frameworkswifiapitests-jacoco", "settingsunittests-wifi-systemapi", "sl4a-access-wifi-hidden-apis"
* changes:
  Remove FrameworksWifiApiTests jacoco exclude_filter
  FrameworksWifiApiTests: build against framework-wifi (Attempt 2)
  Convert FrameworksWifiApiTests mk to bp (Attempt 2)
  Give SL4A access to @hide Wifi APIs
  Expose WifiInfo & NetworkSelectionStatus Builders for SettingsUnitTests
  Expose WifiEnterpriseConfig.getClientPrivateKey() for WifiConfigurationProviderTest
  Expose ScanResult constructor for SettingsLibRoboTests
  SettingsLibTests: grant access to Wifi @hide APIs
  TetheringTests: Stop using @hide Wifi P2P APIs
2020-01-14 18:06:27 +00:00
Aaron Huang
3587754f22 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
2020-01-14 17:50:11 +08:00
Aaron Huang
94df39acd8 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
      atest ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef
2020-01-14 18:10:39 +09:00