Commit Graph

2467 Commits

Author SHA1 Message Date
Etan Cohen
4fd1f35592 Merge "[AWARE] Make PeerHandle parcelable" 2019-01-04 18:29:46 +00: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
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
Roshan Pius
b0618c7f09 WifiNetworkSuggestion: Allow apps to provide granular suggestions
Allow apps to provide suggestions at the BSSID level for more fine
grained control.

Also,
a) Added some more documentation for
WifiNetworkConfigBuilder#buildNetworkSuggestion.
b) Added a missing match-none bssid pattern to validate.

Bug: 115504887
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ie551ea6753edba9bb0d05181390ab430f5510a63
2018-12-03 15:52:20 +00:00
Adrian Roos
68877da9bb Revert getMatchingOsuProviders(List<ScanResult>) API referencing hidden type
This partially reverts commit 8561aa3281 because
the added API references the OsuProvider type which is not part of the API.

Bug: 119556446
Test: make droid
Change-Id: Id13857bcb52e715148b06d27cf4096d08f751d37
Exempt-From-Owner-Approval: API only change
2018-12-03 16:48:21 +01:00
Roshan Pius
4762f45bb4 Merge "WifiManager: Set a max limit on num of suggestions" 2018-12-03 14:51:22 +00:00
Ahmed ElArabawy
0008fa8d5c Support of Low Latency mode for WifiLocks
This commit is part of adding the support for low latency mode
wakelocks. It adds the new WifiLock for low latency
This commit also deprecates the FULL, and SCAN_ONLY wifilocks.

Bug: 34905427
Test: No Test- This commit is just the api definition

Change-Id: Id47294867d8000517601dd48a2fcf5a345779ddb
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2018-12-03 04:39:14 +00:00
Soonil Nagarkar
1e59a5f3e9 Add ignoreLocationSettings to WifiScanner
Give WifiScanner an API to ignore location settings while wifi scanning
for certain requests.

Bug: 119140584
Test: manually
Change-Id: I9bc4cf38c3ea720193dcc87f2c8494afd89a36ec
2018-11-30 13:18:59 -08:00
Jimmy Chen
608ce7a795 p2p: hide factoryReset API
The API is non-public API if it is used by settings only.
Remove unnecessary System API notation.

Bug: 120072277
Test: Manual test
      * Run Network Reset Option in Settings
      * Check saved groups are cleared.

Change-Id: Id5147b8147a2ee68447b7757f314dbd3f84296e6
2018-11-30 20:14:43 +08:00
Jimmy Chen
9ec9c3d399 p2p: fix javadoc tag for class reference
Bug: 64695709
Test: build
Change-Id: I5db49e2bd30d06dfe3bff050b94e318fd3dee974
2018-11-30 17:53:31 +08:00
Jimmy Chen
0d7a9a2789 Merge "p2p: WiFi Direct API for Group Creation" 2018-11-30 06:19:21 +00:00
Jimmy Chen
ab4a8d2eb7 Merge "p2p: add WifiP2pConfig builder for new API" 2018-11-29 22:37:39 +00:00
Roshan Pius
d1a4a56bd4 WifiManager: Set a max limit on num of suggestions
Also, changed the return of add/removeNetworkSuggestions to clearly
indicate the error encountered.

Bug: 119210573
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I06eff1aad584ed9939ba905a1008a7565909d148
2018-11-29 13:50:10 -08:00
Roshan Pius
f8d769ef29 Merge changes from topics "system_api_setup_wizard", "deprecate_apis"
* changes:
  WifiManager: Mark all settings/setupwizard custom APIs @SystemApi
  WifiManager: Deprecate API implementation
2018-11-29 20:41:20 +00:00
TreeHugger Robot
c489b375cc Merge "WifiScanner: Add location permission & app-ops checks" 2018-11-29 20:39:33 +00:00
Roshan Pius
29c2a95ae3 WifiManager: Mark all settings/setupwizard custom APIs @SystemApi
Mark all the custom connect (& other APIs) added to serve settings &
setupwizard as @SystemApi.

Also, enforce tighter permissions on these APIs. These were explicitly
added to serve settings & we should not allow any other apps to use
them.

Bug: 116127346
Test: Compiles

Change-Id: Ic0000f21ccbeda4ade59a3b04d78f49b1b20cd02
2018-11-29 10:18:51 -08:00
Roshan Pius
0221476002 WifiManager: Deprecate API implementation
Changes:
a) Pass the calling package name in the AIDL call to allow target-SDK
checks & error logging on the service side (similar to other binder calls).
b) Pass the return value from service for AIDL calls: disconnect,
reconnect, reassociate.
c) Return false for a previously deprecated saveWifiConfiguration API.

Bug: 115504728
Test: Compiles
Change-Id: I9bc9c8fc5857a430242e5afbecca7fc2c39f1ca1
2018-11-29 10:18:51 -08:00
Jimmy Chen
7dbcb4ea9c p2p: fix javadoc tag for interface reference
Bug: 64695709
Test: build
Change-Id: I74a48a9deb42f0a38133e6da0339981ab1824795
2018-11-29 18:43:09 +08:00
Jimmy Chen
f20ea0fa14 Merge "p2p: WiFi Direct API for requesting p2p info" 2018-11-29 04:57:32 +00:00
Roshan Pius
d5f319235b Merge "WifiNetworkConfigBuilder: Add support for SAE, OWE & SuiteB" 2018-11-27 00:13:42 +00:00
Roshan Pius
7e757ea3b0 WifiScanner: Add location permission & app-ops checks
Pass in the requested package name in every request for
non-privileged requests. We need the exact package name because
some system app shares its uid with a bunch of modules.
Retrieving the package name using the uid (via getNameForUid())
will not work for app-ops checks.

Bug: 117612744
Bug: 113542524
Test: Able to see scan results in wifi picker.
Test: Verified maps working with wifi scans.

Change-Id: Ib9c252e351fbb6cca0b44b2d6ec993d2a2ad655e
2018-11-26 09:32:38 -08:00