Commit Graph

2483 Commits

Author SHA1 Message Date
Jimmy Chen
d91c4ed282 p2p: add p2p random MAC feature flag in framework
P2P random MAC needs the driver to support changing MAC address.

Bug: 118904478
Test: manual test
      * Enter WiFI Direct Page
      * check the feature is enabled in logcat
        * WifiP2pService: Supported feature: P2P MAC randomization
      * check p2p0 MAC address is randomized.

Change-Id: I189a984b27886ca009b5f269c848fa38faedf0d9
2019-01-17 11:23:34 +08:00
Jimmy Chen
df3ad8c56a wifi: extend feature flag from int to long
WiFi features run out of all 32 bits of int.
Extend feature flag from int to long for more bits.

Bug: 122939035
Test: build
Test: atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: I7e2bcc03d24940e95e22f5fc34070cf4aebfadfd
2019-01-16 18:47:57 +08:00
Jimmy Chen
182bbb6dae Merge "p2p: support frequency for GroupJoin/GroupCreation with config" 2019-01-14 02:28:11 +00:00
TreeHugger Robot
485251a185 Merge "[WPA3] Rename allowedGroupMgmtCiphers to allowedGroupManagementCiphers" 2019-01-13 16:15:05 +00:00
Roshan Pius
7fb5c3b75c WifiManager: Mark NetworkSuggestionsStatusCode hidden
The intdef interfaces should be hidden according to API council
guidelines.

Bug: 122518129
Test: make api-stubs-docs-update-current-api
Change-Id: I46d38341fab7136ed053445eb92a065abc3a2a26
2019-01-11 15:41:05 +00:00
Hai Shalom
69139f4cb6 [WPA3] Rename allowedGroupMgmtCiphers to allowedGroupManagementCiphers
Following API Council review:
Rename allowedGroupMgmtCiphers to allowedGroupManagementCiphers in all instances
in order to be consistend with existing members.

Bug: 122616519
Test: atest com.android.server.wifi
Change-Id: I5e24a97308c2c6150ecedbd60ea90c50c20e3760
2019-01-10 12:45:49 -08:00
Ecco Park
9434c534e8 passpoint-r2: change return type of getAllMatchingWifiConfigs
It is to get the scanresults per home or roaming network type for
matching PasspointProfile.
With this, UI is able to connect to an AP based on the following priority.
1) Home network
2) Roaming network

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I88cacddc072d04e478536276dee411ecc63ced52
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-10 11:43:34 -08:00
lesl
3a53928c7d Add location permissions required for APIs
API:getConfiguredNetworks
API:getPrivilegedConfiguredNetworks

Bug: 111844314
Test: atest frameworks/base/wifi/tests/
Test: manual tests in Settings
Change-Id: I005969d735d4cb3fc452913d29a978c95fda5bbd
2019-01-08 20:23:14 +08:00
TreeHugger Robot
b91b3b15b0 Merge "passpoint-r2: change return type of getMatchingOsuProviders" 2019-01-08 02:05:20 +00:00
TreeHugger Robot
72efe39d7d Merge "passpoint-r2: add OSU flag for WifiInfo" 2019-01-07 21:21:58 +00:00
Ecco Park
d23fedb01f passpoint-r2: change return type of getMatchingOsuProviders
This change is required to show signal strength with OSU provider name
on UI

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: tested with R2 AP for connection
Signed-off-by: Ecco Park <eccopark@google.com>

Change-Id: I4abb69ffad3ccd855db935e738d1896b263da147
2019-01-07 17:19:41 +00:00
Ecco Park
05df45db02 passpoint-r2: change the return type of getAllMatchingWifiConfigs
This change is required to show the signal level associated with service
name on UI for installed passpoint profile as picking strongest one up
from matching scanResults.

In order to get a map that consists of WifiConfiguration and a list of
ScanResults, three steps are required.

1) Gets a map that consists of FQDN(Fully Qualified Domain Name) of
a matching Passpoint profile and a list of ScanResults.
2) Gets a list of WifiConfigurations for Passpoint profiles matched a
provided list of FQDN.
3) Creates a new map that consists of WifiConfiguration and a list of
ScanResult.

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: tested with R1 AP for installing profile and R2 AP for connection
Change-Id: I0d56dbdddae4e365b909b9c8f3eff3b0121dc5de
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-07 15:38:12 +00:00
Jimmy Chen
9d11970303 Merge "p2p: add frequency field in WifiP2pGroup" 2019-01-07 06:25:54 +00:00
Les Lee
3f215a1dea Merge "Add documentation about permissions required for hide API." 2019-01-07 03:37:44 +00:00
Jimmy Chen
1f031c62f4 p2p: add frequency field in WifiP2pGroup
The frequency will be used for fast group connection and Wifi p2p metrics.

Bug: 119998319
Test: manuall test
      * check this value in metrics dump

Change-Id: I5e153d3b022b2d27ddabf5f0fb43f499aeec924a
2019-01-07 09:50:18 +08:00
Etan Cohen
4fd1f35592 Merge "[AWARE] Make PeerHandle parcelable" 2019-01-04 18:29:46 +00:00
Ecco Park
e366488567 passpoint-r2: add OSU flag for WifiInfo
This flag is required for UI to handle it differently for OSU AP.

Bug: 122321935
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: testing on UI by clicking OSU provider name.
Change-Id: I6d31f093a9d7fb0b768cd105f270ac54beec9b2d
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-03 20:12:35 -08:00
Hai Shalom
a088295e7f Merge "[DPP] Add DPP key management capability API" 2019-01-03 17:05:44 +00:00
Hai Shalom
4dab74f563 Merge "[DPP] Added new DPP Initiator APIs and callbacks" 2019-01-03 17:05:28 +00:00
Jimmy Chen
580116eeb3 p2p: support frequency for GroupJoin/GroupCreation with config
The frequency support is done in framework and supplicant.
Revise document to indicate the frequency can be used for fast group
connection API.

Bug: 64695709
Test: CtsVerifier - WiFi Direct
Test: manual test
      * specify frequency for Group Owner.
      * The group is run at specified frequency.
      * specify frequency for Group Client.
      * only specified frequency is scanned.
Test: Unit test - atest frameworks/opt/net/wifi/tests/wifitests
Test: build - make docs

Change-Id: Iedfdbf268af0d125611a81886881cdaebf017058
2019-01-02 16:05:08 +08:00
lesl
4357f40048 Add documentation about permissions required for hide API.
Bug: 77228252
Test: Unit tests - atest frameworks/base/wifi/tests/
Change-Id: I1fe7a926246d26f3eefc177f052d66cd9094f79c
2019-01-02 15:27:56 +08:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Hai Shalom
1931846f2f [DPP] Add DPP key management capability API
Add DPP key management capability API.

Bug: 112197021
Test: atest SupplicantStaIfaceHalTest
Change-Id: If19536a3c105a99477588ed4b19cf92d98914dfd
2018-12-27 15:40:05 -08:00
Hai Shalom
e1afc8d787 [DPP] Added new DPP Initiator APIs and callbacks
Added new DPP Initiator APIs and callbacks:
startDppAsConfiguratorInitiator
startDppAsEnrolleeInitiator
stopDppSession
The Initiator APIs are asynchronous and provide events and status codes
through callbacks.

Bug: 112197021
Test: atest DppManagerTest
Change-Id: Ib2226a5e6d94b1d6247f958513c858cf38686ce8
2018-12-27 10:33:10 -08:00
TreeHugger Robot
b5222faca5 Merge "Revert "Deprecate WpsInfo"" 2018-12-25 08:10:38 +00:00
Les Lee
c6736732f1 Merge "p2p: Add Location Permission check for P2p API" 2018-12-25 02:33:17 +00:00
Les Lee
f0984392e7 Revert "Deprecate WpsInfo"
This reverts commit 7bccf2f997.

Reason for revert:
It is necessary for P2p connection.
Application need to update WpsInfo in WifiP2pConfig when trigger p2p connection
API:
public void connect(Channel c, WifiP2pConfig config, ActionListener listener) {

Bug: 80105789
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I0c881627eaee7a7313db6b9805dd6cdb03547df0
2018-12-24 02:24:21 +00:00
Etan Cohen
a36b5c5815 [AWARE] Make PeerHandle parcelable
PeerHandle is an opaque object used to represent a peer for
communication and data-path setup.

Applications which use multiple components may want to communicate the
PeerHandle across components using Binder - requiring a Parcelable
implementation.

Bug: 119594815
Test: All Wi-Fi Manager unit tests + added unit test for this CL
Change-Id: Iae1c8c223677d232c54e7f6c2bdf811764ab6c82
2018-12-22 19:00:25 -08:00
Ecco Park
0990ba4b38 passpoint-r2: add OSU flag for WifiConfiguration
It is to indicate the OSU network for suppressing sign-in notification
as captive-portal when user triggers OSU procedure.

Bug: 120149912
Test:  ./frameworks/base/wifi/tests/runtests.sh
Test: test with R2 AP for verifying that sign-in pop up doesn't happen.
Change-Id: Ib00e418471fbbc7c511af8773ff305d2a27363e6
Signed-off-by: Ecco Park <eccopark@google.com>
2018-12-20 19:43:54 +00:00
David Su
840f86b732 Merge "Scan Optimization: expose API to update device mobility state" 2018-12-18 01:31:56 +00:00
Ecco Park
f2e2a8f108 Merge "passpoint-r2: define getMatchingPasspointConfigsForOsuProviders API" 2018-12-17 21:06:50 +00:00
Etan Cohen
ef02883bec Merge "[AWARE] Add builder pattern for Wi-Fi Aware NetworkSpecifier" 2018-12-15 05:19:45 +00:00
Etan Cohen
c7a2502865 Merge "[AWARE] Add Wi-Fi Aware-specific Network Capabilities" 2018-12-14 23:55:53 +00:00
Ecco Park
cbc40c9125 passpoint-r2: define getMatchingPasspointConfigsForOsuProviders API
Given a list of OSU providers, this only returns OSU providers
that already have Passpoint R2 configurations in the device.

This API is required to remove OSU provider entries that already have
the passpoint r2 profile in the device on Settings UI

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: tested with R1 AP for installing profile and R2 AP for connection
Change-Id: I111e380b3031ff268721c80501257c638f64e01a
Signed-off-by: Ecco Park <eccopark@google.com>
2018-12-14 15:35:19 -08:00
David Su
796b2dbaf0 Scan Optimization: expose API to update device mobility state
Exposed API in WifiManager to allow device mobility state to
be updated, so that Wifi scan interval can be increased when the
device is stationary in order to save power. Also added a new
permission to protect this API from being used by unauthorized
applications.

Bug: 120097108
Test: Call new API method using test app
Change-Id: Iee59dba711c23add5d4b2affafeac2c009407c7f
2018-12-14 09:49:09 -08:00
Oscar Shu
37a22b6cb3 Merge "MAC randomization: getFactoryMacAddresses API" 2018-12-12 18:42:22 +00:00
Etan Cohen
8690e5d97c [AWARE] Add builder pattern for Wi-Fi Aware NetworkSpecifier
The NetworkSpecifier is required when requesting a Wi-Fi Aware
data-path link. Previously the NetworkSpecifier was created using
3 separate methods - such a mechanism is not scalable as we need
to add more parameters (i.e. more methods).

Add Builder pattern for creating the Aware NetworkSpecifier and
deprecate the original methods.

This CL does not add any new parameter - it should be functionally
the same as the original codebase.

Bug: 117605977
Test: atest android.net.wifi.aware
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: Ifd4a1791a5fa0c351912733012e543bd90939c7f
2018-12-12 06:06:22 +00:00
Etan Cohen
557b77fb11 [AWARE] Add Wi-Fi Aware-specific Network Capabilities
Add Wi-Fi Aware-specific Network Capabilities which are
used to send IPv6 as part of Wi-Fi Aware data-path setup.

Bug: 117605977
Test: (unit tests) atest android.net.wifi.aware
Test: (ACTS) ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: If806f82b8b3d729c3e5c5ded4883deb7e49d14f5
2018-12-12 06:05:57 +00:00
xshu
9806aa507b MAC randomization: getFactoryMacAddresses API
API to get the factory MAC addresses. Not for use by third party apps.

Bug: 111634904
Test: unit tests

Change-Id: I9258889b963886b79191b9ea1e7aa70ffb4eb6ad
2018-12-11 20:52:57 -08:00
Adrian Roos
66f859135b API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
lesl
eb620fab43 p2p: Add Location Permission check for P2p API
1. Update channel package name and binder when channel init
2. Add location permission request for p2p API

Bug: 118384508
Test: local ACTS test to verify p2p function
-tc WifiP2pLocalServiceTest
-tc WifiP2pManagerTest
Test: local test APK to test permission

Change-Id: I44ab103a3f7404827b882e7963bbb8abe2556dfc
2018-12-11 14:48:24 +08:00
TreeHugger Robot
f33e2a1312 Merge "WifiScanner: Pass the band scanned in ScanData" 2018-12-06 03:22:56 +00:00
Roshan Pius
680b48e0b9 Merge "WifiManager: Add a error code for suggestion API's" 2018-12-06 03:13:17 +00:00
TreeHugger Robot
9f1505b460 Merge "p2p: hide factoryReset API" 2018-12-05 18:50:49 +00:00
Ahmed ElArabawy
72add40acd Add capability flag for low-latency support
This commit adds a flag for low latency support. This flag will be
checked when supported features are queried thorugh the HAL.

Bug: 34905427
Test: Unit test
Test: ./tests/wifitests/runtests.sh
Change-Id: I5cc5405ca0004c8ccea9f0b49c483936b5124d31
2018-12-04 21:39:18 +00:00
Roshan Pius
7b9114f938 WifiManager: Add a error code for suggestion API's
When the user disallows CHANGE_WIFI_STATE app-ops, the suggestion API
surface will return the new error code.

Bug: 120072329
Test: Compiles
Change-Id: I59a62a64541120cad738e821ec6d70e320f79174
2018-12-04 07:19:23 -08:00
Ahmed ElArabawy
390de008b0 Merge "Support of Low Latency mode for WifiLocks" 2018-12-03 22:26:35 +00:00
TreeHugger Robot
cee08bd900 Merge "Revert getMatchingOsuProviders(List<ScanResult>) API referencing hidden type" 2018-12-03 19:29:32 +00:00
Roshan Pius
7b2cd90375 Merge "WifiNetworkSuggestion: Allow apps to provide granular suggestions" 2018-12-03 19:12:48 +00:00
Soonil Nagarkar
5494113f67 Merge "Add ignoreLocationSettings to WifiScanner" 2018-12-03 16:26:39 +00:00