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
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
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
Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: Iabc5bea2c3ca581061d34300c139c0bc7ee38bc8
Signed-off-by: Ecco Park <eccopark@google.com>
Also, modified existing WPA2 API's to be symmetric with the new WPA3
API's.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I2f521e3893a8e5592757bd8aa7706f9145496de0
Sticky broadcasts is planned to be eliminated. Because some
information is only in these broadcasts, provide API to retrieve
them on demand.
Bug: 64695709
Test: manual test
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: I88167991a1af6b49d3f976bff1a88f59f6d6adfb
new createGroup API accepts the configuration built by
WifiP2pConfig#Builder to create a group.
Bug: 64695709
Test: manual test
* create a group with pre-defined configuration.
* join it as new Group Client.
* join it as legacy Wi-Fi STAs.
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: Ib6598016ee0e96d8a53638189890ff228bb0f177
Creating/Joining a group with credentials needs additional
fields in WifiP2pConfig. Using builder to construct corresponding
WifiP2pConfig object
Bug: 64695709
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Change-Id: Ib01a7a1313fab3a7e3e9a0c6c9a10e419deed9d4
* changes:
WifiManager: Add abort callback for network request
WifiNetworkAgentSpecifier: Allow satisfiedBy call for 2 instances
WifiConfiguration: Add a field to mark network as trusted
WifiManager: Send list of matching scan results for network request
WifiManager: Implement network suggestion API
wifi(API): Send directed broadcast post connection for suggestions
Add a callback to inform the UI that the active request has been
aborted.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I85bc1aee37af66b57471a7abf67dec55b13f97b0
The specifier created for wifi network agent will end up being compared
with itself whenever there is a capability update sent for example.
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: act.py -c wifi_manager.config -tb dut-name -tc WifiManagerTest
Change-Id: Id8c28fd96ac298df2c17f94476abf9cdbc5d23c9
The |ephemeral| field (added for WFA) is currently used for 2 purposes:
a) Network is not persisted & network config
is automatically removed at the end of the connection.
b) Network is marked untrusted (in NetworkInfo capabilities) after connection.
For the new network request API, we want (a), but not (b) (Network should
be marked trusted because user explicitly allowed it).
Add a new flag to explicitly mark the network as trusted or not. Hence
(a) & (b) are now indicated by different flags.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: If4da84ca4fc03fd6a835b71a3e18e966c3b11f05
Change the arguments for the onMatch() callback to return a list of
|ScanResult| instead of |WifiConfiguration|. This allows the settings UI
team to reuse the existing infrastructure used for presenting list of networks in
the wifi picker UI.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ic7e0665bbef35a52df77be4d3c0574b01e0c8193
Based on feedback received, moving away from using a PendingIntent for
post connection action (PendingIntent's are impossible to persist &
maybe too heavy for our use-case). We'll now send out a simple directed
broadcast to the app that added the network suggestion.
Also, added annotation indicating the permission requirement for using
the new API.
Bug: 115504887
Test: make api-stubs-docs-update-current-api -j128
Change-Id: Ide169b139ca16d43bd250de4d0447807d85a60ed
This API is required to support control of OSU Service Providers with
scan results on Setting UI.
Internally, previous API is merged into new API to take a list of
ScanResult Objects instead of a single ScanResult.
Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ib2f2e406c8c295c83924e7884657b4088dd23bb3
Signed-off-by: Ecco Park <eccopark@google.com>
This API is required to support control of Passpoint configurations with
scan results on Setting UI.
Internally, previous API is merged into new API to take a list of
ScanResult Objects instead of a single ScanResult.
Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Signed-off-by: Ecco Park <eccopark@google.com>
Change-Id: I1b9e1499081a8b005f10c249163185d0dc817b46
Bug: 118598975
Test: local ACTS test (topic: p2p_acts), included
1. Wpsinfo with PBC connection test,
ping test from gc to go, reconnect test
2. Wpsinfo with display connection test,
ping test from gc to go, reconnect test
Security Permission test:
Local Test Application test and confirm access deny
if application without NetowrkStack Permission
All of test cases are passed
Test Command: -tc WifiP2pManagerTest -ti 10 in shielding box
Change-Id: I963b54351f83747edf1d1d8a1db94af87728f37f
Bug: 118506846
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: I40d2363f2d88733ed02d145cf04332d781f10a8d
Signed-off-by: Ecco Park <eccopark@google.com>
In addition to the change to persist hiddenSSID, this CL takes care of
backup and restore use case for hiddenSSID as one of soft ap config.
cherry-picked from aog/773385
Bug: 117052143
Test: Unit tests
Change-Id: I4af897f466c5d8fea66aec93e39faf3f13bd23fb
This patch creates a base abstract class that implements
IWifiManager.aidl with stub methods that throw runtime exceptions.
Actual implementations of IWifiManager can extend this class instead of
directly extending the autogenerated IWifiManager.Stub.
This allows adding new methods or modifying existing methods in
IWifiManager without requiring a synchronized change on all concrete
implementations.
Bug: 112338174
Test: Compiled, flashed marlin, booted. WiFi works.
Change-Id: I316c999d6c076f4e6ea1354bd558512915d551ed
provide system API for Settings
Bug: 109866998
Test: Manual tests
* manual trigger network reset in below conditions:
* trigger network reset with P2P on
* trigger network reset with WiFi on, P2P off
* trigger network reset with WiFi off
* trigger network reset with WiFi off then do reboot
* check groups shown in WiFi Direct page
* use wpa_cli -i p2p0 list_network
Test: CtsVerifier - WiFi Direct category
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Test: Permission check
* call factoryReset as Guest
* call factoryReset from 3rd-party application
Change-Id: Id487ebf4564b78b613b550c0f0266effb0ae793e
This API is useful for the apps to decide when they can issue a scan
request. Since WifiManager.startScan() is deprecated, this should be
too. There is no functionality change for now, just a warning
that this will go away along with startScan().
Bug: 74448981
Test: `make api-stubs-docs-update-current-api`
Change-Id: I5310dc53dae244d7a99319bbde111254e9097a14
Add new types for WPA3: SAE and Suite-B-192, and Enhanced open: OWE.
Added a new API to get the device key management capabilities, because
not all devices using latest HAL have WPA3/OWE support. Updated
current.txt and system-current.txt accordingly.
Bug: 112195778
Test: atest com.android.server.wifi
Change-Id: Idceb28dd8663349013243f69b8f20c0c8606581c
* changes:
WifiManager: Network request match callback registration
wifi(API): NetworkSpecifier for Wifi NetworkAgent
wifi(API): Mark old API's deprecated
wifi(API): New API surface for network suggestion
wifi(API): New API surface for connection via NetworkRequest
Add and Implement the new network request match callback register/unregister
@hide methods to be used by settings UI.
Note: This uses the same pattern used for other callbacks to settings
like traffic state change, softap.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ia4964759c6b10790dda0fc61a41c4d95dab904c9
Create an @hide NetworkSpecifier to use by the Wifi NetworkAgent. This
will be used by connectivity service to match the incoming
NetworkRequest (with WifiNetworkSpecifier) with the NetworkAgent we
created to serve that request.
The WifiNetworkAgentSpecifier will hold the current connected wifi
network configuration which will be used to pattern match the
WifiNetworkSpecifier from NetworkRequest's.
Also, added a @hide helper method in MacAddress to help with matching
bssid pattern.
Bug: 113878056
Test: Unit tests
Change-Id: I9a643f0b914d48ff64104c798ec2869db40cb24b
List of API's that are obsoleted by the new connection API proposed for
Q. These API's will continue to work with some restrictions for apps
targeting older SDK.
Also, removes the ability for 3p apps to toggle wifi state regardless of
target SDK. This will be limited to 1p apps like settings/setup wizard.
Bug: 115504728
Test: Compiles
Change-Id: Ifec5ab721b37bc334ff7448b7829df4be2dcab37