History log of /frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e43df4defbe26a2511d2d57dfda0460d8a22482b 23-Feb-2018 Etan Cohen <etancohen@google.com> [AWARE] Add target API check to the Responder to ANYONE config

Responder to ANYONE was deprecated for API >= P. But the manager
code did not check for target API - i.e. even older apps would have
been rejected. Added the target API check to the manager code.

Bug: 72175022
Test: unit test + integration tests
Change-Id: I52e0c877e0af0756816b5b13e42f432504461e20
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
9b78f8254d31b03aaeb83d92be830dd2ba36787e 20-Jan-2018 Etan Cohen <etancohen@google.com> [AWARE] Remove ability to accept connections from ANYONE

Wi-Fi Aware data-path (NDP) setup requires an Initiator and a Responder.
Both Initiator and a Responder are set up with the MAC address of the
peer to which to connect to as well as a security configuration (Open,
PMK, Passphrase).

The original API (27) allowed a Responder to be configured to accept
a connection from anyone (e.g. using a null MAC address). This creates
ambiguous semantics when an NDP already exists. The second Responder
request could refer to the previously setup NDP or to a new one to be
created. We cannot tell the difference up-front.

Remove the "Accept request from ANYONE" API for newer APIs.

Bug: 72175022
Test: unit tests and integration tests
Change-Id: I194cc15402c33c2f1c62834d64646f2489274c35
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
b7abd810ba407ac72dbb1b539925450b4ed2ad23 04-Jan-2018 Etan Cohen <etancohen@google.com> [AWARE][RTT] Check for null callback registration

Check on the manager side for null callback registration and throw
and exception.

Should be done in addition to service side checks since, in well
behaved apps (which don't bypass the manager), the callback registered
with the service is a proxy wrapper for the user-provided callback.

Bug: 71575804
Test: unit test & integration tests
Change-Id: Ice6585fccb13d842d9518b1f60bff911fb66c48f
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
997dbef4eb17b7ac1b04517e35c3da2dbe78e781 19-Dec-2017 Etan Cohen <etancohen@google.com> [AWARE] Check dynamic location permission

Add check for dynamic location permission.

Bug: 70499417
Test: unit tests, integration tests, CtsVerifier
Change-Id: I293f21082c5a3d77362fb3d1db727130d7e41ec5
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
88aa12b88a8aab9b748573796255faf3dd640290 08-Nov-2017 Etan Cohen <etancohen@google.com> [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
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
f319fccd79e10836f785c19251fb1ca0bfffc7dd 20-Sep-2017 Etan Cohen <etancohen@google.com> [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
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
7a2e4a848602ddb861f9f35cb93edbdca32a7db1 06-Jun-2017 Jeff Sharkey <jsharkey@google.com> Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
d86b8fea43ebb6e5c31691b44d8ceb0d8d3c9072 03-Jun-2017 Jeff Sharkey <jsharkey@android.com> Annotate @SystemApi with required permissions.

Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
79d9e99632923994aa026db15f5f29af1af24db4 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" am: 2fd19ffa06 am: 3c6305cc55
am: 887fd90742

Change-Id: I8480ac43d89dc85b541e6255c3cdc597393896cf
a1d90d9e9fbe62561d3a77b2733b5fce3b92d17a 21-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Add AutoCloseable interface/implementation

Make resource holding classes AutoCloseable. These are objects
which (already) require the client to call a destroy() method.

Note: the destroy() method was renamed to close() - no sense in
identical/duplicate methods.

Bug: 37514387
Test: unit tests and integration (sl4a) tests passing.
Merged-In: Ia14065ab9dcd92481412532bfdb198f2e8d9f83c
Change-Id: Ia14065ab9dcd92481412532bfdb198f2e8d9f83c
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
859748f08c42ddff5693c48d17bed633cbfe9cce 04-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Add UID checking to WifiAwareNetworkSpecifier

Wifi Aware networks are per app - i.e. a requestor gets
a dedicated network. Change verifies that the only the
original requestor matches the created network (using UID).

Bug: 36053921
Test: Integration (sl4a) tests
Change-Id: I4ff3994731dd7ccb88e2bea333d1e6905b136f02
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
68507288184a94ff3607b7f5c87af54c7343e0ff 30-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Implement custom Wi-Fi Aware network specifier

Convert Wi-Fi Aware connectivity requests to use a custom
network specifier (as opposed to a string). Aside from
simplifying code, allows for more control of information
printed out, and of additional information to be packaged
and used in network decisions (uid - TBD).

(cherry-pick of commit a5028455a4b7592091f12c80d4b4d42c9c866d66)

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests passing.
Merged-In: I776fb348b15ec4830f890a8ac5c41f24594e12a7
Change-Id: I776fb348b15ec4830f890a8ac5c41f24594e12a7
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
a5028455a4b7592091f12c80d4b4d42c9c866d66 30-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Implement custom Wi-Fi Aware network specifier

Convert Wi-Fi Aware connectivity requests to use a custom
network specifier (as opposed to a string). Aside from
simplifying code, allows for more control of information
printed out, and of additional information to be packaged
and used in network decisions (uid - TBD).

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests passing.
Change-Id: I776fb348b15ec4830f890a8ac5c41f24594e12a7
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
3a764c19d1fc7bbe72231c212dfbae1ef40f83f6 08-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Update network API: make open/encrypted explicit

Replace the older (implicitly) open network with 3 network
creation APIs:
- Open
- Passphrase-based
- PMK (SystemApi only)

Bug: 26564544
Bug: 35702875
Test: unit tests and integration (sl4a) tests
Change-Id: I29a1d668d245853755cd2dfaaa6c65fbb43989f7
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
62a2f9f6ab3e00e2fc1885a01dd3b5a153fc3ae7 21-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Add data-path security configuration (Passphrase)

Add API to optionally provide a passphrase to
configure security on a data-path.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: Ie011345348a3918a412957e38610cabe147c35fa
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
954111a2522677ce2954910553762fd0379e6d4d 21-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Add data-path security configuration (PMK)

Add API to optionally provide a pairwise master key (PMK)
to configure security on a data-path.

Clarify the default API to mean open (unencrypted) data-path.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I43fe704547f2921b3207f215e42d253837aa04e9
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
416d6fba178a5d4745eeba910c2201725fd35d5e 16-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Remove enableUsage/disableUsage API

The APIs (never public) were provided for indirect access to enable
or disable Aware usage. No longer necessary.

Bug: 35435032
Test: unit tests and integration (sl4a) tests
Change-Id: Ia5c2b8aed8dd908f49b5e4f42a77feed3cda946c
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
275f323e865b020cdd76483c8c0a4c859f2085cf 30-Jan-2017 Etan Cohen <etancohen@google.com> [AWARE] Minor hardening of manager.

Callbacks are possible even if no listener was defined.
Perform a check and print error (as opposed to crashing).

Bug: 32315992
Test: unit-tests + integration tests passing
Change-Id: Ia5eb81448ace6b88abcd448e4f378da6530ac630
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
6a4b323f08cea4eb538883127ff07302c3b10c46 10-Jan-2017 Etan Cohen <etancohen@google.com> [AWARE] Unhide Wi-Fi Aware API (baseline)

Baseline Wi-Fi Aware API providing discovery and connectivity (data-path).

Bug: 30983968
Test: unit tests + integration (sl4a) tests passing.
Change-Id: Idd7c6a625f168717b083d5f13e291ce916571933
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
b84ad8062dc7e7e0cbc87e6a6769741b66dd4568 24-Dec-2016 Etan Cohen <etancohen@google.com> [AWARE] Remove reason from discovery session terminate callback

Only valid reason is per request (destroy or timeout/count).

Bug: 32670068
Test: unit tests & integration tests (sl4a) passing
Change-Id: I85d417442e26a16d7f09d6d2d4cbb8ae7a9eba7e
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
3de35a5e5573828838bfa6359a1ac1bf22b19303 20-Dec-2016 Etan Cohen <etancohen@google.com> [AWARE] Simplify Wi-Fi Aware API namespace

Simplify Wi-fi Aware API namespace. Rely on project and remove WifiAware
prefix from most classes.

(pure rename operation: no functional changes)

Bug: 31470256
Test: unit-tests + integration (sl4a) tests.
Change-Id: I38b8137c1730c8f40c482c6770caafcaeafd5c46
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
1857b982c320311e10e109064c204e7894aa0730 23-Nov-2016 Etan Cohen <etancohen@google.com> AWARE: Abstract structure of match filters

Replace byte[] representation with a List<byte[]> representation
which abstracts the LV (TLV without a type field) structure of
the match filters.

Tlv utilities: remove tag indicating that will be made public API.
That is no longer expected (will be an internal utility) since the
match filter structure is now parsed when exposed to API.

Lv utilities: removed. Was a simple wrapper around Tlv utilities -
no longer needed since will not be exposed as API.

(cherry-pick of commit c9870d0d431471bf1362e46fc4f2f1bc6722896a)

Bug: 32840891
Test: unit-tests and integration (sl4a) tests passing
Change-Id: I6d792c4d7584ce002f6c11692e83e7654ef3e764
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
1ddf6a6d3ab69e1c915e1e86892b3cedbc7b161d 16-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Data-path creation roles hard-coded for discovery sessions

Data-path roles (initiator & responder) are hard-coded for discovery
session participants by the spec: subscriber <-> initiator and
publisher <-> responder. Remove API parameter which allowed caller
to specify role.

(cherry-pick of commit 9c7483fec41db681a2d6de93a9061fb8764ecba5)

Bug: 32883026
Test: unit-tests and integration (sl4a) tests passing.
Change-Id: I889eacda9416d9ecd04caa0c72413f984611d40c
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
6831f93725f9efd9c13a278acac62a5d7dcf4a4d 16-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Update API per review

- Move Handler to last position
- Peer ID changed from 'Object' -> opaque class
- Rename onMessageSent -> onMessageSendSucceeded

(cherry pick of commit 1fef08507aeb49bb2e4e7be4804a378ba2cf7770)

Bug: 31470256
Test: unit tests & integration (sl4a) tests pass
Change-Id: I5530d310e982ea16a63a5af1f704625fd24e436c
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
29b3e79ae259da2e4890f47059dad6e648caafce 07-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Fix visibility of Aware Characteristics API

Hide the get characteristics API - since the underlying characteristics
class is (still hidden). Will be opened in a separate phase from the parent
class.

Bug: 31912101
Test: update-api succeeded when opening the parent class
Change-Id: Ibe2f282027cd4b1c03bfb2b1e151551c34314541
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java
0849ded00879dc05175c079011aa038c5ba0770a 26-Oct-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware

~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
Change-Id: I4206d2fd722dc7dec9df4aee5c818101d7f9dccc
/frameworks/base/wifi/java/android/net/wifi/aware/WifiAwareManager.java