Commit Graph

2784 Commits

Author SHA1 Message Date
Nate(Qiang) Jiang
f5d301c277 Create different KeyId for saved and suggestion network
Bug: 150500247
Test: atest android.net.wifi

Merged-In: Ia416b2e986c86fe0a29641f6a20236802d72a233
Change-Id: Ia416b2e986c86fe0a29641f6a20236802d72a233
(cherry picked from commit 96a9e48520)
2020-03-18 03:21:29 +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
TreeHugger Robot
4bdeefacba Merge "p2p: update documents about EXTRA_WIFI_P2P_GROUP in connection changed event" into qt-dev 2019-07-18 18:11:23 +00:00
Jimmy Chen
036b140b39 p2p: update documents about EXTRA_WIFI_P2P_GROUP in connection changed event
This value may be a null, receiver should check before using variable.

Bug: 137618950
Test: make docs
Change-Id: If466dac092fc345482d0456f08a915d1e7ba0010
2019-07-18 14:27:21 +00:00
Nate Jiang
16601cdd99 [AWARE] recommend use Builder create instance in doc
Changes doc for using Builder to create WifiAwareNetworkSpecifier
instead of deprecated Api.

Test: It's a doc change.
Bug: 136034317
Change-Id: I6f41ceae6d696fc5df336ad831c2c89ab3746c50
2019-06-25 17:57:37 -07:00
Hai Shalom
2195d1fc66 [OWE] Support OWE in transition mode
Support OWE in transition mode for devices with OWE support
and devices without OWE support. Scan results will return a
new type of network for OWE in transition networks on devices
that support OWE, and Open for devices that don't support OWE.
Handle the case where Open network is manually added to a device
that supports OWE.

Bug: 132139642
Test: Device with OWE: Connect to Open, OWE-Transition, OWE networks
Test: Device without OWE: Connect to Open, OWE-Transition
Test: Manually create Open network, connect to OWE-Transition
Change-Id: I29e69eaae2672562420ee7c6393bf2cc4d7f1b91
2019-05-13 15:37:43 -07:00
TreeHugger Robot
78f6faf13d Merge "[InformationElementUtil] Add FT/SAE AKM" into qt-dev 2019-05-12 05:43:32 +00:00
Hai Shalom
b6b102f014 [InformationElementUtil] Add FT/SAE AKM
Add FT/SAE AKM to InformationElementUtil class and parse it correctly so
that the phone would be able to associate with APs advertising it.
Added additional unit tests that were missing.

Bug: 132378498
Test: atest InformationElementUtilTest
Change-Id: I470e4e071de36dfe8f79475477c6077ed8bef3cb
2019-05-10 13:44:56 -07:00
Bram Bonné
5853bd038f Documentation update for MAC access restrictions.
With change ag/7340724, the device's P2P MAC adress will only be
available to callers holding the LOCAL_MAC_ADDRESS permission, and will
be anonymized otherwise. This CL updates the documentation in
WifiP2pManager to reflect that.

Bug: 132055766
Test: atest tests/src/android/net/wifi/

Change-Id: I9c2b5ce2cb2c2d2d6766fd34f3451ad4f22a5698
2019-05-07 10:16:20 +00:00
Oscar Shu
0731915380 Merge "Dump randomized MAC in bugreport" into qt-dev 2019-05-03 17:00:40 +00:00
xshu
51ef178ca6 Dump randomized MAC in bugreport
Needed for debug purposes.

Bug: 131850574
Test: unit tests
Test: verified with dumpsys wifi: "mRandomizedMacAddress: 42:03:7d:d0:0e:6c"

Change-Id: Icc3eed999849c58079c298452574f68b96ba7706
2019-05-02 16:24:05 -07:00
Otto Seiskari
f442263a08 Fix tests/runtests.sh
The location of FrameworksWifiTests.apk installed by the script
with adb seems to have changed. The path of the APK contains the
TARGET_ARCH environment variable, which is now fetched
with a similar method as in system/netd/tests/runtests.sh.

Noticed the issue with "lunch aosp_x86_64-eng". Before this fix,
the test script produced an error:

    adb: failed to stat [...]/FrameworksWifiApiTests.apk:
    No such file or directory

Bug: 128603658
Test: ./frameworks/base/wifi/tests/runtests.sh

Change-Id: Id4a33ca89fa21a9a4ef791c5c1c5760e0e2badaf
Signed-off-by: Otto Seiskari <otto.seiskari@indooratlas.com>
2019-04-26 17:00:05 +00:00
Roshan Pius
72e1cea036 WifiSsid: Catch String out of bound exception
Bug: 130843215
Test: None
Change-Id: I6046bf0fe9e9c402e565e5fa63f0e0aec711725c
2019-04-19 09:17:59 -07:00
TreeHugger Robot
1ead26718c Merge "[WifiEnterpriseConfig] Update javadoc for setDomainSuffixMatch" into qt-dev 2019-04-17 01:34:45 +00:00
Hai Shalom
ee5959b1b8 [WifiEnterpriseConfig] Update javadoc for setDomainSuffixMatch
wpa_supplicant accepts a semicolon delimited list of domain suffixes.
Update the javadoc to reflect this.

Bug: 130664269
Test: No code changes
Change-Id: I93dbabeddb8854112b413dbb27d094d9d187a73c
2019-04-16 15:04:01 -07:00
TreeHugger Robot
82ec520d1a Merge changes I7368f9b4,I7a6bec4f,I3eb9f7bc,I53d05702,I5cb6c9e0, ... into qt-dev
* changes:
  p2p: unit tests for WifiP2pWfdInfo
  p2p: unit tests for WifiP2pInfo
  p2p: unit tests for WifiP2pProvDiscEvent
  p2p: unit tests for WifiP2pDeviceList
  p2p: unit tests for WifiP2pConfig
  p2p: unit tests for P2P UPNP service discovery
  p2p: unit tests for P2P DNS SD service discovery
  p2p: unit tests for WifiP2pGroup
  p2p: unit tests for WifiP2pGroupList
2019-04-12 03:19:59 +00:00
Ecco Park
fedd61650e Pass the package of caller to getPasspointConfigurations into WifiService
The package information of caller is needed to check the SDK version in
WifiService layer.

Bug: 124301934
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I07020da22f044bdd32d376787fc14690bf926513
Signed-off-by: Ecco Park <eccopark@google.com>
2019-04-11 17:04:23 +00:00
Jimmy Chen
834487249d p2p: unit tests for WifiP2pWfdInfo
Bug: 130138124
Test: atest FrameworksWifiApiTest
Change-Id: I7368f9b4f3e67985f404f701e92dfe82286935be
Merged-In: I7368f9b4f3e67985f404f701e92dfe82286935be
2019-04-11 11:12:33 +08:00
Jimmy Chen
1c4257ddb2 p2p: unit tests for WifiP2pInfo
Bug: 130138124
Test: atest FrameworksWifiApiTest
Change-Id: I7a6bec4faf81ec6e9164b8737588a51503caaaf7
Merged-In: I7a6bec4faf81ec6e9164b8737588a51503caaaf7
2019-04-11 11:12:27 +08:00
Jimmy Chen
b20dfbbf23 p2p: unit tests for WifiP2pProvDiscEvent
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I3eb9f7bcd19e1ec074174cdb2a6822fb983976ba
Merged-In: I3eb9f7bcd19e1ec074174cdb2a6822fb983976ba
2019-04-11 11:12:20 +08:00
Jimmy Chen
25eb12cd7f p2p: unit tests for WifiP2pDeviceList
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I53d05702a50509117720a10f50df93e496ff9d65
Merged-In: I53d05702a50509117720a10f50df93e496ff9d65
2019-04-11 11:12:11 +08:00
Jimmy Chen
be65fa391d p2p: unit tests for WifiP2pConfig
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I5cb6c9e0c0125d87672401e0dbd227b646a3a9d4
Merged-In: I5cb6c9e0c0125d87672401e0dbd227b646a3a9d4
2019-04-11 11:11:56 +08:00
Jimmy Chen
3fbdff2dec p2p: unit tests for P2P UPNP service discovery
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: Id3218378e6548ca013484f5f693db1863bf419e1
Merged-In: Id3218378e6548ca013484f5f693db1863bf419e1
2019-04-11 11:11:50 +08:00
Jimmy Chen
50902313c2 p2p: unit tests for P2P DNS SD service discovery
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I454441ab024f1a72f2e5a92e08894993be749d3d
Merged-In: I454441ab024f1a72f2e5a92e08894993be749d3d
2019-04-11 11:11:44 +08:00
Jimmy Chen
97e310111f p2p: unit tests for WifiP2pGroup
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I40818ac3ab02facecb0976cf4cd5ab0ca18d84d5
Merged-In: I40818ac3ab02facecb0976cf4cd5ab0ca18d84d5
2019-04-11 11:11:39 +08:00
Jimmy Chen
d5d85c28a7 p2p: unit tests for WifiP2pGroupList
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I51f6fb88983ce8d0f45139241954ca1de1553fcf
Merged-In: I51f6fb88983ce8d0f45139241954ca1de1553fcf
2019-04-11 11:11:24 +08:00
Etan Cohen
903c9bd539 [AWARE] Enable discovery/operation on 5G
Speed up discovery, increase robustness.

Bug: 129151127
Test: atest android.net.wifi
Test: atest atest com.android.server.wifi
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: I83cf0720d07e5623b7861bf4cd73344bcff90ba5
2019-04-09 13:22:05 -07:00
Etan Cohen
6d98837eb6 Merge "[AWARE] Add unit test - fix hashing bug" into qt-dev 2019-04-08 18:21:58 +00:00
TreeHugger Robot
15777f204d Merge changes Ic4eb56fc,I7ba66213,I4b4dba44 into qt-dev
* changes:
  WifiScannerTest: More unit tests
  WifiScannerTest: Add unit tests
  WifiManagerTest: Add unit tests
2019-04-08 17:08:54 +00:00
Etan Cohen
09231fb6e2 [AWARE] Add unit test - fix hashing bug
Adding unit tests to verify hashing code uncovered a bug (hashing
arrays) - fixed.

Bug: 130051430
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: I4c654dd656b4bd1bce8077c73c66f458d103bc86
2019-04-06 22:28:35 -07:00
Roshan Pius
e602db5fb9 WifiScannerTest: More unit tests
Bug: 130035791
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ic4eb56fc3ba6bffd3df529432d17af0ba35b6333
2019-04-05 15:16:56 -07:00
Roshan Pius
35b304d2ff WifiScannerTest: Add unit tests
Bug: 130035791
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I7ba66213363cfd43a3c7d42e000165368dadeb8d
2019-04-05 15:16:56 -07:00
Roshan Pius
aca5281331 WifiManagerTest: Add unit tests
Bug: 130035791
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I4b4dba445e5f9fc2abfed584bc8bea5e4d0d8d8f
2019-04-05 15:12:10 -07:00
Roshan Pius
31fbd556f6 WifiManager: Restore network pin behavior on enableNetwork
This code is mostly a NO-OP for most apps & OEM's. The pinner only takes
effect if the app's target SDK < Android L. But, there might
be some OEM's who may want to enable this for all apps.

Bug: 129906426
Test: Compiles
Change-Id: Iccf67ba0d4ea8d9c5d3561a128908611636b420e
2019-04-04 14:45:21 +00:00
Andrew Solovay
ce10ef80fc docs: Javadoc cleanup
There were a number of Javadoc style problems in the
WifiNetworkSuggestion.Builder.build() docs, which caused some formatting
problems.

One specific problem worth noting: A {{ causes trouble at publish time,
because it looks like the start of a Django directive. But escaping the
{ -- e.g. &#123 -- doesn't work, because the Javadoc compiler helpfully
escapes the *ampersand*, so the HTML output is "&amp;#123", which
renders on the page as "&#123" instead of "{". So putting a space
between the two braces seems like the simplest solution.

No code changes here, just Javadoc comment fixes.

Tested by building the docs and staging to:

http://go/dac-stage/reference/android/net/wifi/WifiNetworkSuggestion.Builder#build

Screenshots (in case the stage gets overwritten):
https://screenshot.googleplex.com/o4p7efFGCbJ.png (1)
https://screenshot.googleplex.com/nkhEqU54LNb.png (2)

Bug: 128536865
Test: make ds-docs (then build & stage)
Change-Id: Ie04bc4dc517443a6899aba989beeb38b9299826e
2019-04-03 15:54:27 +00:00
TreeHugger Robot
7d90b419bf Merge "WifiManager: setWifiEnabled bypass for older apps" 2019-04-02 19:19:10 +00:00
Roshan Pius
8a277663ab WifiManager: setWifiEnabled bypass for older apps
For apps targeting older SDK (<Q), preserve the old behavior for
setWifiEnabled.

Bug: 129549163
Test: Compiles
Change-Id: I4a2e89cfa1c1ac612a679ecab6a2d526a987f7c0
2019-04-01 11:16:08 -07:00
Oscar Shu
80dde957d2 Merge "new WifiConfiguration @hide API to get SSID + SecurityType" 2019-03-30 00:00:59 +00:00
TreeHugger Robot
071fe7e1f6 Merge "[WPA3/DPP] Add unit tests for WPA3, OWE and DPP feature support APIs" 2019-03-29 20:57:15 +00:00
xshu
0fa11fe4fc new WifiConfiguration @hide API to get SSID + SecurityType
Refactor for server side usage.
There is no funcational change.

Bug: 128911090
Test: unit tests
Change-Id: I84983d095ec70ba41325736f95235f09ece2c494
2019-03-29 12:39:13 -07:00
Hai Shalom
69d504b541 [WPA3/DPP] Add unit tests for WPA3, OWE and DPP feature support APIs
Add unit tests to verify feature support public APIs:
isEnhancedOpenSupported
isWpa3SaeSupported
isWpa3SuiteBSupported
isEasyConnectSupported

Test: atest WifiManagerTest
Bug: 129543813
Change-Id: I3a3b0a7a40d36a377c59e16450fe68b43f012177
2019-03-29 09:48:16 -07:00
Roshan Pius
f348c9a783 Merge "WifiNetworkSuggestion: Change the polarity of priority" 2019-03-26 18:34:56 +00:00
Roshan Pius
01f9b47101 Merge "Revert "WifiConfiguration: Add a new temp blacklist reason for disconnect"" 2019-03-25 13:56:27 +00:00
Hai Shalom
f8865bd2d8 Merge "[WPA3] Initialize Suite-B ciphers correctly based on the CA cert type" 2019-03-24 16:46:58 +00:00
TreeHugger Robot
4c2ec4c89c Merge "RTT LCI API *MINOR UPDATE2* (Client Side) - removing two LCI methods Based on discussion with IEEE 802.11 WG these are not necessary for RTT." 2019-03-22 23:23:21 +00:00
Roshan Pius
33798c7793 Revert "WifiConfiguration: Add a new temp blacklist reason for disconnect"
This reverts commit 506a9b9517.

Bug: 126503889
Reason for revert: UI changes was punted to R. No rationale in making this API changing behavior now.

Change-Id: Ia8ccacc383cdb6db7520657a46d77bc1154f8569
2019-03-22 22:33:39 +00:00
Roy Want
50f6c6f36b RTT LCI API *MINOR UPDATE2* (Client Side) - removing two LCI methods
Based on discussion with IEEE 802.11 WG these are not necessary for RTT.

Bug: 111439464
Test: All unit tests pass; end-to-end tests pass.
Change-Id: I78adc0257cf65cfad9698f3d43342d5404d790e5
2019-03-22 16:40:33 +00:00
Kai Shi
555ae2e92e Wifi Usability: address comments from API review council
Rename getIsSameRegisteredCell() to isSameRegisteredCell().

Bug: 128919394
Test: wifi unit test with frameworks/base/wifi/tests/runtests.sh
Change-Id: I3549d9abbaba87971ea3c0a9edf4351289731912
2019-03-22 15:19:54 +00:00
Hai Shalom
90147e3222 [WPA3] Initialize Suite-B ciphers correctly based on the CA cert type
Initialize Suite-B ciphers correctly based on the CA cert type. Read the
cert type from key store, parse it and get the signature algorithm.
Enforce SHA384, and initialize AllowedSuiteBCiphers based on the
certificate type: RSA or ECSDA.

Bug: 128861164
Test: Verify Suite-B initialized correctly with RSA and ECDSA certs.
Test: Associate to SUITE_B_192 AP.
Test: atest WifiNetworkSuggestionTest
Change-Id: Ia9b8460caa586f695ed7aab3507ddeb4ecb8c3f3
2019-03-21 13:41:32 -07:00
Etan Cohen
d7c6a26a87 Merge "[AWARE] Update Aware NetworkSpecifier API per API council feedback" 2019-03-21 15:54:02 +00:00