Commit Graph

2135 Commits

Author SHA1 Message Date
Peter Visontay
0253dd0364 Merge "Log the CHANGE_WIFI_STATE App Op in WifiManager (client changes)." 2017-11-14 14:46:20 +00:00
TreeHugger Robot
b9b2162941 Merge "WifiInfo: Documentation for change of SSID formatting" 2017-11-08 16:47:52 +00:00
TreeHugger Robot
faaac291e0 Merge "WifiService: Enforce permission for enableVerboseLogging" 2017-11-07 21:58:00 +00:00
Roshan Pius
24ef144125 WifiInfo: Documentation for change of SSID formatting
The getSSID() method used to return a string with no quotes before
Android J, so add documentation mentioning when this was changed.

Bug: 12957620
Test: Compiles & verified that the docs are updated (make
doc-comment-check-docs).
Change-Id: I5d3713303c8f8c5c09d74ad1c5b8398107847b87
2017-11-07 20:40:25 +00:00
Michael Plass
ceec60bb36 Clarify doc of setWifiEnabled return value
Bug: 67747067
Test: make ds-docs
Test: codespell
Change-Id: Iaa7a9299992922900af05e26d74ff84a180b8739
2017-11-02 09:59:41 -07:00
Peter Visontay
dfe291b72b Log the CHANGE_WIFI_STATE App Op in WifiManager (client changes).
Test: Manually tested that the op is noted. Ran unit tests.
Bug: 63907873
Change-Id: I1afde628d98fa3a042e7ce818ac266d5902fc5a9
2017-11-02 14:34:27 +00:00
Etan Cohen
58019f524f [RTT2] Add RTT availability API
Add a broadcast + availability API allowing apps to keep track of when
Wi-Fi RTT is available.

Bug: 65014694
Test: unit tests and integration tests
Change-Id: I06f4f022c3fc6200be2308931b1fc886ae0ba37e
2017-10-26 09:34:25 -07:00
Dave Friedman
a34524e71b Merge "Docs: Adds brief instructions for how to do Wi-Fi scan. Bug: 67967771 Test: Ran make ds-docs." into oc-dev am: 44cd5b97ad am: 25c008d9b1 am: b8057e3178
am: 37de23b48f

Change-Id: I75e0caf9d0ffa543281e6efb14ac57099af99ff5
2017-10-25 07:22:10 +00:00
Dave Friedman
b8057e3178 Merge "Docs: Adds brief instructions for how to do Wi-Fi scan. Bug: 67967771 Test: Ran make ds-docs." into oc-dev am: 44cd5b97ad
am: 25c008d9b1

Change-Id: I740781c9ddd2207d15ea285748c9971139fe50ad
2017-10-25 06:59:38 +00:00
Dave Friedman
25c008d9b1 Merge "Docs: Adds brief instructions for how to do Wi-Fi scan. Bug: 67967771 Test: Ran make ds-docs." into oc-dev
am: 44cd5b97ad

Change-Id: I228d7395c9de8e164a0110c0d4fdf4530c7690ec
2017-10-25 06:48:22 +00:00
Rebecca Silberstein
dd50acfdb8 Merge changes from topic "delete_setWifiApEnabled"
* changes:
  WifiManager: delete the setWifiApEnabled method
  WifiManager: remove last remnants of setWifiApEnabled
2017-10-24 16:10:41 +00:00
Etan Cohen
20aa00fef7 Merge "[PASSPOINT] Add API to return all matching configurations" 2017-10-23 19:58:32 +00:00
Dave Friedman
39e9f9fc74 Docs: Adds brief instructions for how to do Wi-Fi scan.
Bug: 67967771
Test: Ran make ds-docs.

We don't actually document how to do a Wi-Fi scan anywhere on DAC;
at the moment, this seems like the place where it makes the most sense
to provide that guidance.

The forcing function for doing this is that a new doc explicitly
recommends that devs do Wi-Fi scans in certain cases, but doesn't
have a place to link to that tells them how to do so. That doc
plans to send readers here.

Change-Id: Ic35fb77d323e825e5bd5b4eec2716730f0d531e1
2017-10-20 11:50:38 -07:00
Rebecca Silberstein
51c53a9428 WifiManager: delete the setWifiApEnabled method
Delete the @removed setWifiApEnabled call along with any remaining
callers.

Bug: 66917593
Bug: 26753849
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Ieefc59e01d801d9f5a943830c66c86e9e624158c
2017-10-19 23:18:57 +00:00
Rebecca Silberstein
6c88a3ec94 WifiManager: remove last remnants of setWifiApEnabled
Now that the WifiManager.setWifiApEnabled call is deprecated and
removed, delete the underlying code.

Bug: 66917593
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: If68ddd3e2301b0ba9efc3914e2a0f0e17436ccf0
2017-10-19 23:17:15 +00:00
Etan Cohen
210da15b9f [RTT2] Error code reconfiguration
Error code changes:
- Error code for overall failure
- Error code for individual failures
- Throw exception when trying to access invalid results

Bug: 65108607
Test: unit tests and integration tests
Change-Id: I97372fe078cc4b80ae01d5ffaab78f8e8ee84b7f
2017-10-19 15:20:30 -07:00
Etan Cohen
3efe3cdd34 [RTT2] Ranging results CM -> MM
Change the units (and name) of the ranging result from CM to MM.

Bug: 65108607
Test: unit tests & integration tests
Change-Id: Id4d3d25e508d6a743c0fe13c9829c0a2ba4196c3
2017-10-19 15:20:25 -07:00
Etan Cohen
b73707c3f4 [RTT2] Rename API Ap -> AccessPoint, timestamp
API council feedback:
- Ap -> AccessPoint
- Timestamp -> add us unit

Bug: 65108607
Test: unit tests & integration test suite
Change-Id: I733ab9e07e7ced2fa15144eea2c395fe267ce974
2017-10-19 14:48:34 -07:00
Etan Cohen
5a100a07b1 [RTT2] Add support for RTT to Wi-Fi Aware peers
Add API to specify RTT requests to Wi-FI Aware peers specified either
using their MAC address (out-of-band discovery) or their PeerHandle
(in-band discovery).

Bug: 65015034
Test: unit tests + integration tests
Change-Id: I1cb8e90cab7c1acc621576703c9d0c6f4f5ac8d4
2017-10-19 14:48:29 -07:00
Roshan Pius
e8ca2b73ba WifiService: Enforce permission for enableVerboseLogging
Using enforce instead of silently ignoring calls with insufficient
permissions to let apps know that the operation failed.

Bug: 67008628
Test: Toggle verbose logging successfully from Settings.
Change-Id: I322e870212a7dbbd2e864635b1d0ccb3df613555
2017-10-18 11:14:17 -07:00
Etan Cohen
4771a7397d [PASSPOINT] Add API to return all matching configurations
Add API which returns all Wi-Fi configurations corresponding to
Passpoint configurations installed on the device AND usable on
the specified AP (ScanResult).

Bug: 67891871
Test: unit tests
Change-Id: Ie9e6abea23f4376f78c75d09b3a2e25e58a416b0
2017-10-17 08:42:41 -07:00
TreeHugger Robot
3e9c1278c8 Merge "[Aware] Add support utility for PeerHandle to MAC translation" 2017-10-10 01:17:34 +00:00
TreeHugger Robot
071691f756 Merge "WifiScanner: cleanup unused commands" 2017-10-09 18:26:40 +00:00
Etan Cohen
3d33d7495f [Aware] Add support utility for PeerHandle to MAC translation
Add a support API to be used between system services only: added
in support of RTT service which is provided with a PeerHandle but
needs the corresponding MAC address.

Bug: 65015034
Test: unit tests on service, integration tests with RTT
Change-Id: I6848acda9bfef306b8feaae6987ff18f7bc2e6ec
2017-10-09 10:51:13 -07:00
Jeremy Joslin
58055ea41e Merge "Add isOpenNetwork() to WifiConfiguration." into oc-mr1-dev am: 3ea0acac69
am: 94197c1903

Change-Id: Iae7ffd343694da79fb7c7ab3e0c5434d6e730d5c
2017-10-05 02:02:54 +00:00
TreeHugger Robot
2ffdadb8fe Merge "[RTT2] Remove Aware RTT code" 2017-10-05 01:11:35 +00:00
Jeremy Joslin
1f6029bd6f Add isOpenNetwork() to WifiConfiguration.
Bug: 65639900
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I6ebd09b348473f9aa0394de289fd77f279e878a8
2017-10-04 10:01:59 -07:00
Etan Cohen
5b8273e465 Merge "[RTT2] Add API for testing whether feature exists on platform" 2017-10-03 20:14:31 +00:00
TreeHugger Robot
48ffde7ed0 Merge "[RTT2] New (v2) Wi-Fi RTT framework" 2017-10-03 15:48:31 +00:00
Etan Cohen
f319fccd79 [RTT2] Remove Aware RTT code
Original WIP Aware RTT API routed RTT through the Aware manager. This
will be replaced by direct usage of the WifiRttManager API. First step
is to remove the old code.

Bug: 65015034
Test: unit tests pass
Change-Id: I850d285d3f2a3dec6425d933614d18020745b9d4
2017-10-03 07:01:06 -07:00
Etan Cohen
692e68e7a2 [RTT2] Add API for testing whether feature exists on platform
Add PackageManager API which allows apps to test whether the platform
officially supports the Wi-Fi RTT API.

Only start the RTT service if the device supports it.

Bug: 65014628
Test: integration tests pass
Change-Id: Ie88bd29ccd592e9a29ff24e8cc346afc360f03b0
2017-10-03 07:01:05 -07:00
Etan Cohen
17ba47254c [RTT2] New (v2) Wi-Fi RTT framework
Replace existing Wi-Fi RTT manager framework. Creating new framework
in parallel since there's code using the new framework - will be
switched over once new version ready.

New version is AIDL-based.

Bug: 65014552
Test: unit tests and integration tests
Change-Id: Id468c9b2a3c94eb30959f5ac5e4b1688fb8fc633
2017-10-03 07:01:01 -07:00
Ningyuan Wang
6e35335b79 WifiScanner: cleanup unused commands
Bug: 66490514
Test: compile, unit tests
Change-Id: Id79d3f3d34cd55ab584f898f3b08290669bc41b3
2017-09-25 16:56:07 -07:00
Roshan Pius
dd896a24e4 WifiManager: Change documentation of #getConfiguredNetworks
This can never return null now. Change the documentation and add the
annotation.

Bug: 65853363
Test: Compiles
Change-Id: I28fb4c2de3036cf6f97aa473e95cfb89ce2569a2
2017-09-19 10:20:24 -07:00
TreeHugger Robot
c9ae7df52a Merge "Use a LruCache in WifiNetworkScoreCache." into oc-mr1-dev 2017-08-25 20:29:32 +00:00
TreeHugger Robot
185a91c7ef Merge "[AWARE] Add a group network specifier allowing matches to multiple requests" into oc-mr1-dev 2017-08-22 02:18:44 +00:00
Stephen Chen
607c4accb5 Use a LruCache in WifiNetworkScoreCache.
Bug: 19948759
Test: runtest --path
frameworks/base/wifi/tests/src/android/net/wifi/WifiNetworkScoreCacheTest.java

Change-Id: I60bab6c2540df9819180d81d4e8e885066d92f51
2017-08-21 14:59:23 -07:00
Wei Wang
955e909aa0 Add LOCATION_HARDWARE permission to Rtt API.
Test: Manual
Bug: 62264080
Bug: 62344058

Change-Id: I00744a046c0fdcccd2f10924a70d816372e49fa4
2017-08-17 14:46:20 -07:00
Etan Cohen
523a425083 [AWARE] Add a group network specifier allowing matches to multiple requests
Add a group Aware network specifier which can match any of the
requests it contains. It is intended to represent a single connection
which may match multiple network requests.

Bug: 64125969
Test: unit tests
Test: acts/sl4a + new DataPathTest:test_multiple_identical_networks
Change-Id: I5971dc21c0a6d95fbd287ba0df0c7fba4ba580da
2017-08-17 10:49:40 -07:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Rebecca Silberstein
283dc3b9a3 Merge "WifiManager: update docs on setWifiEnabled" into oc-dr1-dev
am: 54233f96d7

Change-Id: I47400de6e07c228e48c1467060a2179af9e4b4d9
2017-08-09 22:33:00 +00:00
Rebecca Silberstein
1cd6db44f2 WifiManager: update docs on setWifiEnabled
Update documentation to the setWifiEnabled call reflect what a return of
false would be for.  Note: False will be returned if the caller
requested to enable/disable wifi while in softap mode or airplane mode
is active.

Bug: 64374508
Test: checked generated docs
Change-Id: I1b1de84afee3844d326e7780a935a30d7f64d220
2017-08-04 16:09:22 -07:00
TreeHugger Robot
54c6667b37 Merge "getConnectionInfo should take calling package name as argument" into oc-mr1-dev 2017-08-04 09:49:44 +00:00
Ningyuan Wang
ab4ad4e1c7 Merge changes from topic 'do_not_roam_on_traffic' into oc-dr1-dev
am: 54e6518fc8

Change-Id: Ic02b8506afbd900d1fec0946148cd8f1a76ee5ce
2017-08-02 23:10:14 +00:00
TreeHugger Robot
54e6518fc8 Merge changes from topic 'do_not_roam_on_traffic' into oc-dr1-dev
* changes:
  Add traffic thresholds to prevent wifi network changes
  WifiInfo: Add getters for success tx/rx rate
2017-08-02 22:09:15 +00:00
Tony Mak
c55e27a5cd getConnectionInfo should take calling package name as argument
Bug: 64245163

Test: QR provisioning is now possible.

Change-Id: I9ee89b78224aaafd39a44234b704e4ed8cde56f4
2017-08-02 16:12:22 +00:00
TreeHugger Robot
46b2968ff9 Merge "Document WifiManager.getConnectionInfo permission" into oc-mr1-dev 2017-08-01 02:02:47 +00:00
TreeHugger Robot
3a38b51ae8 Merge "wifi: ScanResult: add carrier network indicator" into oc-mr1-dev 2017-07-28 16:12:14 +00:00
Michael Plass
e42dd31b3f Document WifiManager.getConnectionInfo permission
BSSID/SSID can be used to deduce location, so require the same
location permissions for access to these WifiInfo fields
requested using WifiManager.getConnectionInfo() as for
WifiManager.getScanResults().

Bug: 36770596
Test: make offline-sdk-docs
Change-Id: I1dd6d1871f13d669a9504c23ba3b11d769c142f9
2017-07-27 16:12:02 -07:00
Etan Cohen
002a2442c1 [RTT] Add a binder to the AIDL to enable cleanup
Pass a binder from the manager to the service to enable cleanup
on app death (using binder death listener).

Bug: 37443149
Test: verified using ResponderToolActivity test apk.
Change-Id: Ifb7797db812d4cb0b219e7cbd779bad323f2a4b4
2017-07-26 16:23:07 -07:00