diff options
author | Dave Platt <dplatt@google.com> | 2014-03-28 13:33:04 -0700 |
---|---|---|
committer | Dave Platt <dplatt@google.com> | 2014-03-31 13:43:45 -0700 |
commit | e7369bd4dfa4fb3fdced5b52160a5d0209132292 (patch) | |
tree | 4f7eeb494cca784bf06c217efb6f0e9f386f8193 /telecomm | |
parent | c21929c710949a48790fa2701c47cedfabb7b9dc (diff) | |
download | frameworks_base-e7369bd4dfa4fb3fdced5b52160a5d0209132292.zip frameworks_base-e7369bd4dfa4fb3fdced5b52160a5d0209132292.tar.gz frameworks_base-e7369bd4dfa4fb3fdced5b52160a5d0209132292.tar.bz2 |
Document and enforce "one request per Listener" rule
The API and implementation of NsdManager imply that a separate
Listener is to be used for each active registration or discovery
request. This isn't formally documented or properly enforced, and
weird and unpredictable things happen if an application uses a
Listener for more than one request at a time.
Update documentation to make this an explicit requirement.
Enforce the restriction when a new request is submitted for
processing; if the Listener is already being used to track an active
request, throw an exception.
Document the fact that apps should unregister services and cancel
service discoveries when the app is stopped (in KitKat and prior
releases, they'll leak if this isn't done.)
Re-order "release the Listener" operation to occur before the Listener
callback, so that the Listener can be reused by the application once
the callback has been entered - this eliminates a race condition.
Document this.
Pass 2: typos, added documentation about API level, changed to using
an explicitly defined return value for "busy listener".
Bug: 13512512
Change-Id: Ic164110759204b27d8a14376777b593ebe1865fa
Diffstat (limited to 'telecomm')
0 files changed, 0 insertions, 0 deletions