Commit Graph

26 Commits

Author SHA1 Message Date
Ecco Park
fedd61650e Pass the package of caller to getPasspointConfigurations into WifiService
The package information of caller is needed to check the SDK version in
WifiService layer.

Bug: 124301934
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I07020da22f044bdd32d376787fc14690bf926513
Signed-off-by: Ecco Park <eccopark@google.com>
2019-04-11 17:04:23 +00:00
Mingguang Xu
e77cabc488 Wifi usability: Comments from API review council are addressed
Addressed all comments from API review council:
1. Rename WifiUsabilityStatsListener to OnWifiUsabilityStatsListener.
2. Change the modifier of member variables in WifiUsabilityStatsEntry.java to private and use getters.
3. Document the unit of predicitonHoirzonSec and its expected range.
4. Add @ProbeStaus in probeStatusSinceLastUpdate.
5. Rename probeElapsedTimeMsSinceLastUpdate to
ProbeElapsedTimeSinceLastUpdateMs.
6. Marked @NonNull for Argument 3 in onWifiUsabilityStats.

Bug: 126391553
Bug: 126699865
Bug: 113262380

Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I20d9ad05dc0bb537b09006ca44a447401b3e1001
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-03-08 17:24:27 -08:00
Mingguang Xu
68e948f3c2 Wifi usability: Add @SystemApi to receive Wifi usability score
Add system API to allow framework to receive Wifi usability score from system APK.
Also add a new permission to protect this API from being used by unauthorized applications. This permission is the same as the one added for sending Wifi usability stats.

Bug: 113262380.

Test: frameworks/base/wifi/tests/runtests.sh

Signed-off-by: Mingguang Xu <mingguangxu@google.com>

Change-Id: Ib695dbb4c6c1f4518a464877f1d0f60dde4904eb
2019-01-24 00:41:16 -08:00
Mingguang Xu
8683314997 Wifi usability: Add @SystemApi to send Wifi usability stats
Add system API to allow framework to send Wifi usability stats to
system APK.
Also add a new permission to protect this API from being
used by unauthorized applications.
In addition, add a few more entries in Wifi.proto.

Bug: 113262380
Test: Unit tests for Wifi: frameworks/base/wifi/tests/runtests.sh

Change-Id: I5432419d6da3db96ecc6ff8e1c3197121ca7afbc
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-01-23 10:54:45 -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
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
Hugo Benichi
779d10c7dd wifi: Update AbstractWifiService to be concrete.
This patch removes the abstract qualifier from AbstractWifiService and
change its name to BaseWifiService for consistency.

This checks at compile time that all base methods defined in
IWifiManager.aidl are stubbed in AbstractWifiService. Previously since
AbstractWifiService was an abstract class, any new method added to
IWifiManager.aidl would not force an update to AbstractWifiService.

Bug: 112338174
Test: Checked that removing a stub from BaseWifiService causes an
error at compilation.

Change-Id: I3f71aae51adfe5775bec25e1133876b975cf0515
2019-01-10 09:14:36 +09:00
Les Lee
3e06fd002b Merge "Add location permissions required for APIs" 2019-01-09 09:53:43 +00:00
Hugo Benichi
5e59d6e31d WiFi: Remove deprecated stubs in AbstractWifiService
Bug: 122431221
Test: Compiled.
Change-Id: Icc7d4b0625ea9f7163a162b164ea582b465a81d1
2019-01-08 22:24:38 +09:00
Hugo Benichi
cfbfd9bdce Merge "Add setDeviceMobilityState() to AbstractWifiService." 2019-01-08 13:11:08 +00: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
000e8e6444 Merge "WiFi: Add missing stubs to AbstractWifiService." 2019-01-08 03:40:18 +00:00
Arthur Hsu
46cd2b117a Add setDeviceMobilityState() to AbstractWifiService.
This fixes build breakage caused by IWifiManager.idl change.

TBR=hugobenichi
Bug: None
Test: m -j for master-arc-dev branch, cheets-* targets

Merged-in: Id26478c6825a575b12de71f8262365e1f9777302
Change-Id: Id26478c6825a575b12de71f8262365e1f9777302
(cherry picked from commit f34828276befe5ad0dc262be62d338b7c2c8698b)
2019-01-08 08:42:08 +09:00
Hugo Benichi
50ce3901a9 WiFi: Add missing stubs to AbstractWifiService.
This adds stubs to match new methods of IWifiManager.aidl recently added
by Change-Id Ib2226a5e6d94b1d6247f958513c858cf38686ce8.

Bug: 112338174.
Test: Compiled.
Change-Id: Idc72f806391e7c109131d8d2c390ec54f022e403
2019-01-08 08:42:06 +09: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
Ecco Park
f2e2a8f108 Merge "passpoint-r2: define getMatchingPasspointConfigsForOsuProviders API" 2018-12-17 21:06:50 +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
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
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
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
Roshan Pius
eb9f8195db Merge changes from topics "abort_network_request", "untrused_network", "on_match_scan_results", "network_suggestions_impl"
* 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
2018-11-17 03:52:04 +00:00
Roshan Pius
98b14ec2cb WifiManager: Implement network suggestion API
Bug: 115504887
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Iddbd4884f2af7ef4a8c2b32daa8268540ba8dce6
2018-11-16 12:13:39 -08:00
Ecco Park
8561aa3281 passpoint-r2: define getMatchingOsuProviders(List<ScanResult>) API
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>
2018-11-16 15:23:48 +00:00
Ecco Park
f035a04f59 passpoint-r2: define getAllMatchingWifiConfigs(List<ScanResult>) API
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
2018-11-16 03:19:21 -08:00
Hugo Benichi
fe354b7825 WiFi: Define a base abstract class for IWifiManager
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
2018-11-07 23:28:31 +09:00