Commit Graph

3540 Commits

Author SHA1 Message Date
David Su
f535f0a044 Merge "LINK_CONFIGURATION_CHANGED broadcast: stop including EXTRA_LINK_PROPERTIES" into rvc-qpr-dev 2020-09-29 17:29:41 +00:00
David Su
cfb033e324 LINK_CONFIGURATION_CHANGED broadcast: stop including EXTRA_LINK_PROPERTIES
This extra is unused, and potentially exposes sensitive information
that can be accessed without any permissions.

Bug: 162246414
Test: atest FrameworksWifiTests
Change-Id: I57c3db765283d8bbb410a0b790e27054c5ab561a
Merged-In: I57c3db765283d8bbb410a0b790e27054c5ab561a
2020-09-23 17:12:20 +00:00
Kai Shi
d556312950 Merge "Bug fix of 6GHz band channelization" into rvc-qpr-dev 2020-09-20 04:19:16 +00:00
Kai Shi
dc0c7a41ea Bug fix of 6GHz band channelization
Move up 6GHz band start and end frequencies by 10MHz per IEEE 802.11ax
draft 7.0 Annex E Table E-4.
Add the special case of 6G band channel 2.

Bug: 167426957
Test: atest android.net.wifi
Test: manual test with 6GHz capable STA and AP
Change-Id: I24c9c4d38c74681cd7318a9b052d9c2cd4ddf87f
Merged-In: I24c9c4d38c74681cd7318a9b052d9c2cd4ddf87f
2020-09-19 23:17:41 +00:00
David Su
be864d3500 Remove unit test changes in "wifi: Support SAE_TRANSITION when converting to WifiConfiguration"
This partially reverts commit 43a326cdb3.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Test: Treehugger
Change-Id: I8add72b6de6e470a09a745c32b3e2fea764fc692
Merged-In: I6afba22e4081ba58884ffd1b560b81b1e9960132
2020-09-10 03:24:52 +00:00
David Su
d9d3ada818 Remove unit test changes in "[Passpoint] Changes to Unique ID"
This partially reverts commit c527eed123.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Change-Id: Ia5e9ae3bcadace1a1c2ae53a56c67343db4bef71
Test: Treehugger
Merged-In: Ice11158078b5b86c721747b0d67ecfb09731a3c5
2020-09-10 03:21:24 +00:00
David Su
beb3609dbb Remove unit test changes added in "[Suggestion] Fix setWpa3EnterpriseConfig" in rvc-qpr-dev
This partially reverts commit 08744836fe.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Change-Id: I0cda9de836b6f00a06474515f17e67194c6246cd
Test: Treehugger
Merged-In: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
2020-09-10 02:48:47 +00:00
Hai Shalom
08744836fe [Suggestion] Fix setWpa3EnterpriseConfig
Add missing support for standard WPA3-Enterprise networks, which
are basically WPA2-Enterprise networks + PMF.
Add missing support in the Specifier as well, and add unit tests
to cover these use cases.
The logic detects 192-bit or standard mode by looking at the
certificates. If the certificates are Suite-B, then the 192-bit
mode is enabled. Otherwise, standard mode is enabled.

Bug: 166670837
Test: atest WifiNetworkSuggestionTest WifiNetworkSpecifierTest
Change-Id: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
Merged-In: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
(cherry picked from commit e1369b6275)
2020-09-03 00:35:42 +00:00
Les Lee
bae844a14d Merge "wifi: Support SAE_TRANSITION when converting to WifiConfiguration" into rvc-qpr-dev 2020-08-14 05:27:24 +00:00
lesl
43a326cdb3 wifi: Support SAE_TRANSITION when converting to WifiConfiguration
In android R, framework use SoftApConfiguratio to replace
WifiConfiguration. The mapping function between WifiConfiguration and
SoftApConfiguration was desinged to return Null when the type doesn't
support in WifiConfiguration. Likes security type WPA3_SAE_TRANSITION.
But it causes the app crash because unexpected Null config.
Solution:
Add the mapping, SAE_TRANSITION to WPA2, when converting to avoid break
the legacy apps since WPA2 config also works normally when LOHS enabled on
WPA3_SAE_TRANSITION mode.

Bug: 163687359
Test: atest FrameworksWifiTests
Test: atest frameworks/base/wifi/tests/
Test: atest -c android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSingleRequestByApps
Change-Id: I6afba22e4081ba58884ffd1b560b81b1e9960132
2020-08-13 23:28:45 +08:00
Hai Shalom
c527eed123 [Passpoint] Changes to Unique ID
Modify Unique ID calculation to use only FQDN for HomeSP hash
and modify the hash of the Credential to produce an identical
hash for user credential changes, except for username which will
result in a different hash, and generate a different hash for
SIM credential, Cert credential and realm changes.
The result would allow multiple profiles with SIM credential
or Cert credential for the same network and overwrite profiles
with updates to the user credentials with changes other than
the username.

Bug: 161008339
Test: atest com.android.server.wifi
Test: atest PasspointConfigurationTest CredentialTest
Test: Install an OSU profile, then install R1 profile for the
same network (HomeSP has a different friendly name), verify
the OSU profile has been overwritten

Change-Id: Ice11158078b5b86c721747b0d67ecfb09731a3c5
Merged-In: Ice11158078b5b86c721747b0d67ecfb09731a3c5
2020-08-12 21:28:08 +00:00
Nate Jiang
f570f1bdcc DO NOT MERGE Revert "[NetworkSuggestion] Fix getEnterpriseConfig"
This reverts commit a03bcee783.

Reason for revert: failing test because prebuild module
Bug: 162724237

Change-Id: I530123295c3366a6955076e9d9e031282c70c486
2020-08-03 16:57:21 +00:00
Nate Jiang
a03bcee783 [NetworkSuggestion] Fix getEnterpriseConfig
Return null when getEnterpriseConfig() on a non enterprise WifiConfig.

Bug: 162031037
Test: atest android.net.wifi
Merged-In: I874b2f99fef693b34bad4b075eed595a0d89f392
Change-Id: I874b2f99fef693b34bad4b075eed595a0d89f392
(cherry picked from commit 1312174396)
2020-07-29 22:24:40 +00:00
Les Lee
f9836b0186 Merge "wifi: Update API java to match new design" into rvc-dev 2020-06-24 11:31:24 +00:00
Jimmy Chen
edddaef9a8 Merge "wifi: add constant for OCSP field" into rvc-dev 2020-06-24 07:52:09 +00:00
Jimmy Chen
103e59b78b wifi: add constant for OCSP field
Bug: 143381682
Test: N/A
Change-Id: I3eb92e63e5eb240848ca637dd6819ab838effdac
2020-06-23 18:56:35 +08:00
lesl
92c8f596f2 wifi: Update API java to match new design
Update the java doc to match new behavior as below:

ClientControlByUserEnabled (true)
-> disconnect new/unknown MAC + Callback;
New clients will need to attempt again and
will be allowed/disallowed based on user action
in the previous callback.

ClientControlByUserEnabled (false=default)
-> allow new/unknown MAC + Callback;
New clients will not disconnect unless the user
chooses to disallow the client by adding to the blocklist.

Bug: 159582750
Test: atest FrameworksWifiTests
Test: make docs frameworks/base/wifi/
Change-Id: I64a85db0a28342003f902c50f81531b2218a6252
2020-06-23 08:59:32 +00:00
David Su
151f172b26 Merge "CONFIGURED_NETWORKS_CHANGED_ACTION: update docs since we stop sending WifiConfiguration" into rvc-dev 2020-06-23 03:06:37 +00:00
Nate Jiang
0a327227ce Merge "Use installed keystore alias to check if enterprise config is insure" into rvc-dev 2020-06-20 00:01:11 +00:00
Nate Jiang
9b39089eba Use installed keystore alias to check if enterprise config is insure
Bug: 158582707
Test: atest WifiEnterpriseConfigTest
Change-Id: Ic5818db5eac19b9480e1b30a8e596b176fdbee4b
2020-06-19 22:48:31 +00:00
TreeHugger Robot
4058b3b950 Merge "[WifiEnterpriseConfig] Update javadoc for setCaCert/Path" into rvc-dev 2020-06-19 20:17:59 +00:00
Hai Shalom
21f67c5fb0 [WifiEnterpriseConfig] Update javadoc for setCaCert/Path
Update javadoc for WifiEnterpriseConfig#setCaCert, setCaCerts and
setCaPath to document that if not set, then the server certificate
validation is skipped and the connection is not secure.

Bug: 159458442
Test: No code changes
Change-Id: Icb26b340f743faf129544a0d889dcb7bc1a76551
2020-06-19 11:30:44 -07:00
David Su
4bd54c477c CONFIGURED_NETWORKS_CHANGED_ACTION: update docs since we stop sending WifiConfiguration
WifiConfiguration contains sensitive location
information, so this extra is no longer included
in the CONFIGURED_NETWORKS_CHANGED_ACTION
broadcast. Update docs to reflect this change.

Bug: 158874479
Test: compiles
Change-Id: I72ba9f75a89519ef136cc2766a8551b606b218c7
2020-06-18 18:38:24 -07:00
Remi NGUYEN VAN
6555756e90 Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev 2020-06-19 00:49:29 +00:00
Roshan Pius
afef7f5b53 WifiManager: Fix javadoc in addNetworkSuggestions
The line break in the {@link} seems to be causing the formatting issue.

Bug: 159123619
Test: Compiles
Change-Id: I2ab1bb4da19fe74c850d66532380f1a1da9e7e03
2020-06-16 09:20:58 -07:00
Remi NGUYEN VAN
eee629f4c7 Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Also refine comments in DhcpResults following feedback in previous
change.

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-06-12 17:04:06 +09:00
David Su
e640bbf919 Merge "framework-wifi & OsuLogin: set min & target SDK version to 30" into rvc-dev 2020-06-11 19:20:20 +00:00
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
David Su
27953f11fb framework-wifi & OsuLogin: set min & target SDK version to 30
Bug: 158681189
Test: device boots up and connects to wifi
Test: connect to OSU network
Change-Id: I751bd3b7a89a7b3dab6a68e1b030651fbb801481
2020-06-10 12:39:07 -07: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
7ccfc086e4 Merge "Wifi: Add definitions for 6GHz" into rvc-dev 2020-06-03 21:09:46 +00:00
TreeHugger Robot
4dbc321683 Merge "Wifi: Remove unused permitted_package" into rvc-dev 2020-06-03 00:37:53 +00:00
Paul Duffin
abebc6a897 Switch to standard naming scheme
Removes use of the special framework-modules naming scheme.

Bug: 155164730
Test: m java
Exempt-From-Owner-Approval: Build cleanup.
Change-Id: I3b78fcbcacc3df787e171d6eedeef1e51b087615
Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
(cherry picked from 8b864fb45c)
2020-06-02 06:53:53 +00:00
David Su
97b1d2ec5a Wifi: Remove unused permitted_package
android.x.net.wifi is no longer used as the
package name for jarjar'ed classes. Instead we
have settled on com.android.wifi.x going forward.

Bug: 157781374
Test: boots up and connects to wifi
Change-Id: I4be1f50df9181e27769e1861b14969069a82aa60
2020-06-01 14:11:09 -07:00
Michael Plass
83e9ba45a4 Merge "wifi: jarjar ipmemorystore interfaces" into rvc-dev 2020-06-01 17:27:26 +00: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
Paul Duffin
dde22307b1 Clean up the visibility rules for framework modules
Switching from java_library to java_sdk_library switched the meaning
of the module name from referring to the implementation library to
referring to the stubs. This change updates the visibility rules to
reflect that new meaning.

Visibility rules that were previously set for the java_library have
been moved to the impl_library_visibility property and the special
//visibility:override value has been prepended to prevent it from
inheriting the values from the visibility property.

Visibility rules set for the stubs (via stubs_library_visibility)
property have been moved to the visibility property.

Bug: 155164730
Test: m nothing
Exempt-From-Owner-Approval: Build cleanup
Change-Id: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
2020-05-31 13:45:51 +01:00
Michael Plass
2d8a44b869 wifi: jarjar ipmemorystore interfaces
Bug: 146460486
Test: Boots and successfully adds and removes wifi networks
Test: dexdump service-wifi.jar comes out clean with the following command
dexdump out/target/product/vsoc_x86/apex/com.android.wifi/javalib/service-wifi.jar |
  grep 'Class descriptor' |
  grep -v -e "com/android/server/wifi" -e "com/android/wifi/x/"

Change-Id: I2ebab938061f9da76219e5588007886915288644
2020-05-30 18:38:02 +00:00
Paul Duffin
913a400783 Merge "Switch framework-wifi to use java_sdk_library" into rvc-dev 2020-05-30 14:32:08 +00:00
Nate Jiang
34de847886 Merge "WifiNetworkSuggestion setIsMetered change to tri-state" into rvc-dev 2020-05-29 17:16:05 +00:00
Paul Duffin
5207958bfe Switch framework-wifi to use java_sdk_library
Had to build from srcs rather than statically linking to
framework-wifi-pre-jarjar as java_sdk_library requires srcs because
otherwise it cannot generate the stubs source or the API.

The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
    naming_scheme: "frameworks-modules"

That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.

Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.

However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.

In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.

Test: m droid checkapi
Bug: 155164730
Change-Id: I5e1172761f260cf6a0b4f17e5247af92c520407f
2020-05-29 17:06:35 +01: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
Paul Duffin
407ce9dc95 framework-wifi: Add missing permitted package
A bug in Soong prevented the permitted package check from being
performed. Fixing the bug revealed that there was a missing package
on framework-wifi which this bug adds.

Test: m framework-wifi
Bug: 157633658
Change-Id: Ie0469de76a1bba6e9ad616a38b34e99236c7c1aa
2020-05-28 14:59:25 +01: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