Commit Graph

2162 Commits

Author SHA1 Message Date
Etan Cohen
997dbef4eb [AWARE] Check dynamic location permission
Add check for dynamic location permission.

Bug: 70499417
Test: unit tests, integration tests, CtsVerifier
Change-Id: I293f21082c5a3d77362fb3d1db727130d7e41ec5
2017-12-18 16:58:36 -08:00
TreeHugger Robot
289d960dde Merge "[AWARE] Check for RTT feature presence for Aware discovery with ranging" 2017-12-14 16:48:12 +00:00
Etan Cohen
84b0a3f54c [AWARE] Check for RTT feature presence for Aware discovery with ranging
When configuring Aware discovery with ranging validate that the RTT
feature is present on the device.

Bug: 63906015
Test: unit tests, integration tests
Change-Id: Ie12feaf84f17c075f0e60bdacfc14af3703124c3
2017-12-08 13:37:16 -08:00
Etan Cohen
46efb48100 [RTT2] Update RTT service name
Change to a sensible name which doesn't conflict with legacy RTT
service.

Bug: 65108607
Test: unit test, integration test
Change-Id: I54855635061c09e8d4bd2e97bac049f2893de123
2017-12-07 13:53:44 -08:00
Etan Cohen
48856ee393 [RTT2] Convert APIs to use MacAddress
MacAddress class is being added as a public API. Convert ad-hoc
byte[] represetations to new class.

Bug: 65108607
Test: unit tests and integration tests
Change-Id: I4bf3b7c47f37d4ef4dd5af0dcdeb7d57f2f94368
2017-12-07 06:49:20 -08:00
Oscar Shu
bb91f5fe94 Merge "Remove unwanted hidden APIs" 2017-12-05 18:09:42 +00:00
TreeHugger Robot
bf27f7dac3 Merge "[RTT2] Fix build failure with new MacAddress" 2017-12-04 20:51:27 +00:00
TreeHugger Robot
9bf9f13e81 Merge "Move WifiLinkLayerStats out of frameworks/base" 2017-12-04 18:28:21 +00:00
Etan Cohen
fe43d359ef [RTT2] Fix build failure with new MacAddress
Responder was using the new MacAddress before its finalization.
Fix reference to a (now removed) constructor.

Bug: 65014962
Test: unit tests & integration tests
Change-Id: I4d0fd32454c1362129e03deada2d6e6a253e2590
2017-12-04 10:22:58 -08:00
TreeHugger Robot
f511a7e481 Merge "[RTT2] Direct Aware Responder configuration" 2017-12-01 02:02:58 +00:00
Etan Cohen
2109f705f3 [RTT2] Direct Aware Responder configuration
Direct Aware Responder configuration set to the basic rates (discovery
channel 6, 20MHz bandwidth). It is expected that these will be ignored
and that (with a Ranging enabled Responder Publisher) enabled on the peer
a high accuracy RTT will be negotiated.

Bug: 67678464
Test: unit test & integration test (non-functional at this point)
Change-Id: I240cfef91a968cd1eb75a71b5ead96ae4eccb32d
2017-11-30 23:57:30 +00:00
Etan Cohen
0d49c0dda8 [AWARE] Make PeerHandle comparable/hashable
Add public equals()/hash() methods to PeerHandle. Allows the handle to
be used across multiple calls/sessions.

Bug: 68931709
Test: builds, unit test, integration test
Change-Id: Idc59269d4275181ed6d9a793213c681dc4e98134
2017-11-30 23:56:37 +00:00
Etan Cohen
dd08b04037 [RTT2] Add a generic Responder mode configuration
Add a generic Responder mode which is the common configuration for
any peer (which any peer configuration can be translated to).

Bug: 65014962
Test: unit tests and integration tests
Change-Id: If2f6abc217508792d319d7d5e54aa3f7385b0ec5
2017-11-30 20:21:04 +00:00
Sohani Rao
49de715bf3 Merge changes from topics "ProvisioningCallback", "PASSPOINT_APIs"
* changes:
  Introduce Status and Failure code for Provisioning
  Provide APIs for HS2.0 provisioning
2017-11-28 20:14:11 +00:00
xshu
8d4e20f260 Remove unwanted hidden APIs
Bug: 69424325
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: If5e0c695655bd75f5aea16a339696fcebd9c5601
2017-11-28 11:45:30 -08:00
Jeff Sharkey
c204c223a7 Deeper sanity checking of emitted types.
When emitting a method or field, verify that we're able to reference
all mentioned types.  This ensures that we don't accidentally
reference undefined classes/interfaces.

Test: manual inspection of API files
Bug: 69791141
Change-Id: I84e0c87fe83daa118661f61dbdf17b58ea5282d4
2017-11-27 17:07:40 -07:00
Sohani Rao
06751720ac Introduce Status and Failure code for Provisioning
Passpoint Provisioning status and failure codes to be used by callback
API to provide information to the caller about the provisioning flow

Bug: 67914151
Test: Unit test
Change-Id: If1bf28ac8e2e0b7d8141d1b9cb12e3a6e46cb126
2017-11-27 15:42:24 -08:00
Sohani Rao
2b1c42f9bb Provide APIs for HS2.0 provisioning
Created a new hidden API to be called for starting subscription
provisioning with a certain provider. Create a callback interface and a
callback object to be used by the caller to get provisioning status
updates.

Bug: 67645546
Test: Unit tests
Change-Id: I9592222cfe79c5859c455c5a658956120558059f
2017-11-27 15:11:44 -08:00
Peter Visontay
86b92f3ef9 Merge "Revert "Log the CHANGE_WIFI_STATE App Op in WifiManager (client changes)."" 2017-11-21 17:10:18 +00:00
Peter Visontay
ca835c14cf Revert "Log the CHANGE_WIFI_STATE App Op in WifiManager (client changes)."
This reverts commit dfe291b72b.

Change-Id: I82e25fb7e46a679d82d89fd5f56e4f334b593f69
Bug: 69498268
2017-11-21 12:02:16 +00:00
Michael Plass
6c6302632f Move WifiLinkLayerStats out of frameworks/base
Since the packet rate fields of WifiInfo now have sane units (pps),
remove the getters.

Bug: 68204362
Test: Unit tests
Change-Id: Ib699cef91a8e10aaca05994ba1617ac5556d110f
2017-11-20 11:41:06 -08:00
Etan Cohen
88aa12b88a [AWARE] Add ranging API to discovery configuration
Add mechanism to enable ranging as a condition for discovery:
- Publisher: enable ranging
- Subscriber: specify min and/or max range (which implicitly
  enables ranging)

Add range (distance) information to the discovery message.

Bug: 33821639
Test: unit tests and basic (non functioning integration tests)
Change-Id: Ic50fb72a4a94e56c608ea47ec669f2b59354456f
2017-11-17 14:28:33 -08:00
Etan Cohen
3674b32218 Merge "[RTT2] Disable VDBG" 2017-11-17 19:53:01 +00:00
Etan Cohen
9752663e3b [RTT2] Disable VDBG
Useful for dev, should now be off by default.

Bug: 65108607
Test: builds, unit tests, integration tests
Change-Id: I3090d804073e1ecaf7fcbddcac9f36b577add6bc
2017-11-14 16:13:58 -08:00
Ningyuan Wang
557875dcc0 Remove persist option for WifiManager.setCountryCode()
Bug: 29353903
Test: compile, unit tests
Change-Id: I67e495035c3c47d884f16c190eeb4f708cbb5b2e
2017-11-14 13:01:37 -08:00
Etan Cohen
65a97d22ab Merge "[RTT2] Add WorkSource APIs to request/cancel ranging ops" 2017-11-14 17:00:14 +00:00
Etan Cohen
4250e786ad [RTT2] Add WorkSource APIs to request/cancel ranging ops
Add System API to manage ranging operations. Use WorkSource to specify
the actual source of the operation. Add cancel API (using WorkSource)
to allow cleaning-up (proxying binder death).

Bug: 65015291
Test: unit tests and integration tests
Change-Id: I98f762df8b1d262d1f386963e7e2ff3569b001d5
2017-11-14 07:18:25 -08:00
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