Commit Graph

3242 Commits

Author SHA1 Message Date
lesl
95536ee341 wifi: fix incorrect java doc
Bug: 158734072
Test: make docs frameworks/base/wifi/
Change-Id: I4627175cc52c066db58c624efa7c56cc423bc21b
2020-06-11 19:24:21 +08:00
TreeHugger Robot
7b1e3c55f3 Merge "[Suggestion] block setting insecure enterprise config" into rvc-dev 2020-06-08 16:57:02 +00:00
Hai Shalom
0fcf6ff4a3 Merge "[Passpoint] Clean up exception messages in PpsMoParser" into rvc-dev 2020-06-06 01:33:58 +00:00
Nate Jiang
94268fd2ab [Suggestion] block setting insecure enterprise config
If App set insecure enterprise config to suggestion builder, an
exception will be raised.

Bug: 157822251
Test: atest android.net.wifi
Change-Id: I2e7a2421be2c1574801b853a1dddaff1d115a1b2
2020-06-05 17:36:49 -07:00
Hai Shalom
8cbfba234f [Passpoint] Clean up exception messages in PpsMoParser
Clean up exception messages in PpsMoParser.

Bug: 158325667
Test: Compiles. No changes to logic.
Change-Id: Icf93aa3a30b8c985047a542301de34294da37405
2020-06-05 14:20:31 -07:00
Ahmed ElArabawy
82e45e391b Wifi: Add definitions for 6GHz
This commit adds some definitions for 6GHz

Bug: 139354972
Test: atest android.net.wifi
Change-Id: I2e3378a65cbf96c4249cb3c123712b8b20798dbe
2020-06-01 09:15:05 -07:00
Nate Jiang
57f81d36dc WifiNetworkSuggestion setIsMetered change to tri-state
setIsMetered: true for metered; false for not metered; not set for
detect automatically
Bug: 157341534
Test: atest android.net.wifi

Change-Id: If4c028e184b44ae53db80b94fe6d9ae7d06b3cb6
2020-05-28 23:58:54 -07:00
TreeHugger Robot
558351e00a Merge "WifiManager: Add a note for NETWORK_SETTINGS_RESET behavior" into rvc-dev 2020-05-15 23:21:38 +00:00
Roshan Pius
151cbf160b WifiManager: Add a note for NETWORK_SETTINGS_RESET behavior
Bug: 156657612
Test: Compiles
Change-Id: I668c625d5a0b20bbc9e3e1a5c15c1ada6e1fa2bb
2020-05-15 12:43:13 -07:00
Ahmed ElArabawy
8863a835cb Wifi: Add constant and utility method for bands
This commit adds a constant WIFI_BAND_ALL to refer to bit mask
for all bands.
It also adds a method to check on if previous scan covers all
supported bands.

Bug: 156053158
Test: atest android.net.wifi
Change-Id: I426dd3940b7efd67eaf6e12f862a1e3f0ebc177a
2020-05-12 09:33:25 -07:00
Ahmed ElArabawy
f7ccda0564 Wifi: Add definitions for bands frequency boundries
Channel frequency ranges for the three bands (2.4G, 5G, and 6G) are used
in different places with separate definitions or via literal numbers.
Also, the values are not accurate and sometimes not consistent.

This commit defines those ranges in a single place for use of other
classes. It also adds some utility methods that use those definitions.

Bug: 153896822
Test: atest android.net.wifi
Change-Id: Ifd19e245fd808c06d48d7557e30be3e92a9e7ec5
2020-05-11 09:44:53 -07:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Roshan Pius
79e555c4b9 WifiNetworkSpecifier.Builder: Fix formatting in build() javadocs
Bug: 146999777
Test: Compiles
Change-Id: I96fff2db5a285eeb2a1be36aa47a239939a9ae98
2020-04-22 08:40:53 -07:00
Roshan Pius
9f183e0108 WifiManager: Add @hide constant for sap
Reason code used to send out a disconnect when SAP is being shutdown.

Bug: 154286607
Test: Compiles
Change-Id: I3cb9b97960c1c9002435f23ba72ed14005a2d814
2020-04-20 10:11:01 -07:00
Roshan Pius
71709e04c9 WifiConfiguration: Add a method to check if keymgmt needs preShareKey
Bug: 153435438
Test: atest android.net.wifi
Change-Id: If67d853000d99f32204bf0b8b95465909e8740e2
2020-04-11 04:38:59 +00:00
Nate Jiang
69e1136884 Change doc for suggestion API
Add more explanation in doc, when app receive error code calling
suggestion API.

Bug: 150215899
Test: atest android.net.wifi

Change-Id: I8055546be8f12f807c35b9f50b239940a671482e
2020-04-09 18:18:01 -07:00
Roshan Pius
573e3fe6be WifiNetworkSpecifier: Ensure we don't match a regular wifi network
In Android 10, ClientModeImpl would always attach a
WifiNetworkAgentSpecifier for all wifi network agents created
(regardless of whether it was created in response to a specific request
or not). In Android 11, we changed that behavior to ensure that we
attach the WifiNetworkAgentSpecifier only for agents created in response
to a specific request. However, that is exposing a bug in
WifiNetworkSpecifier matching. WifiNetworkSpecifier attached requests
should not satisfy a generic wifi network agent. Fix the
canSatisfiedBy() matching to ensure that it only matches
WifiNetworkAgentSpecifier (or itself which cannot happen during network
matching)

Bug: 149500993
Test: Add a saved network manually while running the failing ACTS test:
act.py -c wifi_manager_cross.config -tb dut-name -tc WifiNetworkRequestTest:
test_match_failure_with_invalid_ssid_pattern
Test: atest android.net.wifi

Change-Id: I38d154bd0a5685fcc38de891256a8e1d4b8cfbb5
2020-04-07 06:45:46 +00:00
Roshan Pius
8a31e59ece Merge "WifiManager: Update doc for new metered change behavior" into rvc-dev 2020-04-04 00:31:04 +00:00
Roshan Pius
12e167b30e WifiManager: Update doc for new metered change behavior
Also, explictitly mark OVERRIDE_NOT_METERED in WifiConfiguration
when suggestion is not metered.

Bug: 153127005
Test: Compiles
Change-Id: I917de747406167fc38faa05e15d98a9b867a6ce8
2020-04-03 13:27:50 -07:00
Hai Shalom
faac9ca5a9 Merge "[DPP] Fix typo in javadoc for SUCCESS_CONFIGURATION_APPLIED" into rvc-dev 2020-04-03 20:21:34 +00:00
Hai Shalom
c5962ff651 [DPP] Fix typo in javadoc for SUCCESS_CONFIGURATION_APPLIED
Bug: 153015500
Test: No code changes
Change-Id: I3275680ccd6161b703ad60dbe82e558fc17e37e5
2020-04-01 15:55:20 -07:00
Chalard Jean
2da4f9f9ae Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
2020-03-27 23:46:30 +09:00
Les Lee
d6f3212620 Merge "wifi: Support setBssid for tethered mode hotspot" into rvc-dev 2020-03-26 00:23:14 +00:00
Nate Jiang
0ccefbe94b Merge "Keep most recently connection network flag" into rvc-dev 2020-03-25 18:10:13 +00:00
lesl
b1c47a7641 wifi: Support setBssid for tethered mode hotspot
PS: Remove BSSID convert to WifiConfiguration since BSSID field doesn't
use in WifiConfiguration usage on SoftAp.

Bug: 152180102
Test: atest frameworks/base/wifi/test/
Change-Id: Id781ff6af222fe1d557560feaa44b5d2761c3a81
2020-03-24 21:26:31 +08:00
Roshan Pius
849a6f78a5 WifiMigration: Add a settings key to indicate migration is complete
Bug: 151888061
Test: Manual verification (ensured that this method returns null after
first reboot)

Change-Id: Ie8ad397c7b68e35cfa7b696ef22d84f376cf3fe7
2020-03-23 18:48:28 -07:00
TreeHugger Robot
162db72a8a Merge "WifiMigration: Add sample config store XML files" into rvc-dev 2020-03-20 23:02:58 +00:00
Michael Wright
b99ba10bec Merge "Make ScanResult final." into rvc-dev 2020-03-20 19:02:10 +00:00
Roshan Pius
da0704b275 WifiMigration: Add sample config store XML files
Also, added a readme to list the different sample files.

Bug: 152048434
Test: Compiles
Change-Id: If15ec11fd36b327ac4942f97a49ff04abc1cbd0f
2020-03-20 11:57:48 -07:00
David Su
70cd6d61e3 Merge "Remove WifiManager.getTxPacketCount" into rvc-dev 2020-03-19 23:59:14 +00:00
David Su
15c3b29222 Remove WifiManager.getTxPacketCount
This is no longer called by CTS, and has no other
clients.

This also removes the dependency on
WifiNl80211Manager.getTxPacketCounters(), so it
will no longer need test coverage.

Bug: 150978929
Test: atest FrameworksWifiApiTests
Change-Id: Ia64a6b2f5009c021ed7dd66c24e854996995778a
2020-03-19 12:51:02 -07:00
Nate Jiang
ca5ea6ca40 Merge "Set metered bit for passpoint networkSuggesiton" into rvc-dev 2020-03-19 17:16:09 +00:00
Roshan Pius
aa6527cf41 WifiMigration: Add helper to perform softap.conf to XML conversion
For softap configuration, we need to perform 2 levels of conversion:
a) AOSP softap.conf format to AOSP WifiConfigStoreSoftap.xml format
b) OEM specific customization to AOSP WifiConfigStoreSoftAp.xml format.

Moving a) from within the wifi stack to WifiMigration to allow OEM's to
adapt their customizations to the legacy conf files for b).

Bug: 149418926
Test: atest android.net.wifi
Test: Device boots up and able to turn on hotspot.
Test: Manual tests:
a) Flash Q build
b) Add hotspot config
c) Upgrade to RVC build with this CL.
d) Ensure all data has migrated over.
e) Modified hotspot config and reboot.
f) Ensured old data has not migrated over.

Change-Id: I6d900bd621873a0df81aaa17cf46ed153b073289
2020-03-18 15:38:49 -07:00
Nate Jiang
65c2b809f7 Set metered bit for passpoint networkSuggesiton
Bug: 151672224
Test: atest android.net.wifi
Change-Id: Icc850c37e84c9123ae96abaf377bbf68bd00dae6
2020-03-18 15:29:01 -07:00
Michael Wright
0e0734c773 Make ScanResult final.
While normally this would be a breaking API change, since we never
actually exposed a constructor for this class it's safe to mark it as
final.

Bug: 149912516
Test: Builds
Change-Id: I5555a17d98ebe8c61064ef64e508f707aff4eeb7
2020-03-18 20:07:05 +00:00
Roshan Pius
5cdc892562 WifiMigration: Add new API's for migrating config store data
The new API's should be modified by the OEM's to convert their existing
config store file to AOSP format. wifi mainline module will
delete/rename the file after migrating data out of it. Subsequent
invocations of these API's should return null.

Bug: 149418926
Test: Compiles
Change-Id: I9ef0986fd38ea5ba9555c7c4652b90cf2ac2fb91
2020-03-17 19:37:21 -07:00
Nate Jiang
c6b1646265 Keep most recently connection network flag
Bug: 150799593
Test: atest com.net.android.wifi
Change-Id: I83fe6913b32459a90bf4ebb08b6f24cd01c4d01b
2020-03-16 17:29:11 -07:00
Roshan Pius
75fb6e3c57 Merge "WifiMigration: Remove loadFromConfigStore & removeConfigStore" into rvc-dev 2020-03-17 00:26:28 +00:00
Roshan Pius
ee09b28217 WifiMigration: Remove loadFromConfigStore & removeConfigStore
In preparation of moving away from this API surface to a different
mechanism.

Bug: 149418926
Test: Device boots up and connects to wifi networks.
Change-Id: Iaa27ea7b69694d41d900fc39116ad2a43d8f8bfa
2020-03-16 14:16:43 -07:00
Steven Liu
97f25c93fd Remove legacy "Carrier Wi-Fi" configuration constants.
They are deprecated and replaced by direct calls to the Suggestion API.

Bug: 144431927
Test: atest android.net.wifi
Change-Id: I89665bc3e891b3a0fb58be10ccb1642ec121e29b
2020-03-16 13:01:27 -07:00
Nate Jiang
81eabccd8c Merge "Remove untrusted network flag from suggestion" into rvc-dev 2020-03-16 16:58:06 +00:00
George Chang
88582cf484 Revert "Wifi: Fix API documentation for isWifiStandardSupported"
This reverts commit e5f6a8d7bb.

Bug: 151586035
Reason for revert: build break

Change-Id: I4ee7366b88e10910c1bc4b1f192f66000d8e40e3
2020-03-16 08:15:11 +00:00
Ahmed ElArabawy
e5f6a8d7bb Wifi: Fix API documentation for isWifiStandardSupported
This commit fixes a typo in the api documentation for the
WifiManager#isWifiStandardSupported()

Bug: 151577071
Test: None
Change-Id: Icfd3c8d0a46314ad48091d2e71f62a75d9df8cfb
2020-03-16 05:56:54 +00:00
Nate Jiang
69540df324 Merge "Set untrusted bit when create WIfiConfig" into rvc-dev 2020-03-16 00:57:14 +00:00
Hai Shalom
c063140b6f Merge "[Passpoint] Fix credential unique ID calculation" into rvc-dev 2020-03-14 14:37:50 +00:00
Hai Shalom
f88368556d [Passpoint] Fix credential unique ID calculation
Fix credential unique ID to allow multiple instances of same
credential type.

Bug: 151478195
Test: atest CredentialTest PasspointConfigurationTest
Change-Id: Ie99fe0430aa31ee7d461150eca5c9ce718f75aaf
2020-03-13 18:18:43 -07:00
Nate Jiang
110bc2ea99 Remove untrusted network flag from suggestion
Bug: 151150610
Test: atest android.net.wifi
Change-Id: Ieab8f45f2b75208e4d9bf9a8eb73a0fa71922589
2020-03-13 17:08:51 -07:00
Nate Jiang
b27625fbbc Set untrusted bit when create WIfiConfig
Bug: 151150610
Test: atest android.net.wifi
Change-Id: I24a9ff42913406a03f8978138a19047da2359a66
2020-03-13 14:57:16 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Les Lee
84b4877d85 Merge "wifi: API Review: API changes to SoftApConfiguration.Builder" into rvc-dev 2020-03-12 03:49:32 +00:00