• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/companion/
History log of /frameworks/base/core/java/android/companion/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
41ae7839db361e9418698424cafa03dc4b793b39 01-Mar-2018 Eugene Susla <eugenesusla@google.com> [Companion] Don't promise call back on javadoc

We only stop scanning on timeout but don't limit the time the
user has to select a device.
So timeout != failure. Cleaning that up from javadoc to avoid confusion

Fixes: 74080737
Test: proofread
Change-Id: I36b2d96f85c3c15c20742b954a0b34956f23d6f8
ompanionDeviceManager.java
ce8db9911494225fcd99711d7df85a130de5a6ce 14-Dec-2017 Jeff Sharkey <jsharkey@android.com> Add more IntDef prefixes for auto-documenting.

Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
eviceFilter.java
a7d4e1d2f6af9a6ccba339b7a56b9dee1031a075 18-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Companion] Synchronize state access in CallbackProxy"
67f9d5070a74a0bf34f0335899a96dedcac26c96 05-Aug-2017 Jeff Sharkey <jsharkey@android.com> Fix broken javadocs.

Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
ompanionDeviceManager.java
08727b02f6a3a9836b91b89923f9a2cb583abde6 12-Jul-2017 Eugene Susla <eugenesusla@google.com> [Companion] Synchronize state access in CallbackProxy

Fixes: 63383044
Test: Ensure companion pairing still works
Change-Id: I5493d37acbcc6f4128d2c2aaf87d0b69f491d0f6
ompanionDeviceManager.java
3a74c7ac8ebcdbca3f5dfcea3ac97e0d4cbab99c 07-Jul-2017 Eugene Susla <eugenesusla@google.com> [Companion] Prevent NPE in CallbackProxy

Fixes: 63383044
Test: Ensure all fields of CompanionDeviceManager.CallbackProxy are
null-checked in onSuccess and onFailure
Change-Id: If95a46686f74d184bccfcb2d8c8195add4747a07
ompanionDeviceManager.java
2eacbac8c30cdfbb3a99935bbfcddd26db3cb675 21-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Companion] Fix notification access dialog being in new task" into oc-dev
d149a0854438af0619c430c87613243874aca533 20-Jun-2017 Eugene Susla <eugenesusla@google.com> [Companion] Fix notification access dialog being in new task

Fixes: 62678460
Test: Tap recents while the dialog is shown and ensure it's not in a
separate task
Change-Id: I0572ddc84d76643ac8a373939273c221ff20676f
ompanionDeviceManager.java
ba003a97f8ebee5d99d196cc9a601bd173438dc3 19-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Companion] Fix NPE in associate" into oc-dev
0435e5e79f842978261331d7725d3e1a0f8c78f1 17-Jun-2017 Eugene Susla <eugenesusla@google.com> [Companion] Fix NPE in associate

The root cause of the exception was that the activity destroy listener was
reacting to any activity being destroyed instead of just the one used with
the CompanionDeviceManager

Fixes: 62549525
Test: Ensure the attached bug no longer reproduces
Change-Id: I2f977e9ac9176247f5be9d08d19b3875f2b4a703
ompanionDeviceManager.java
0c4a9266264d37e724f7372ef7ef932cf60c505c 10-Jun-2017 Eugene Susla <eugenesusla@google.com> Support associating with an already-paired device

This is required for migration scenario, where device(s) are already
paired(and thus no longer discoverable) but didn't go through companion
flow.
This also fixes a bug with filtering by mac address, which is also relevant to
the use-case of associating a specific device

Test: Pair with a device first, and call associate with a filter with its MAC
address and single device requested. Ensure the device is found.
Ensure only that device is ever returned when filtering by MAC address.
Bug: 62487084
Change-Id: Ic7cc6affc0648ad85b15620e8c3aba4b9fc91aa1
luetoothDeviceFilterUtils.java
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
ompanionDeviceManager.java
6fd0ce3616ce6b92bdb4443b189aa8ac9e106577 25-Apr-2017 Eugene Susla <eugenesusla@google.com> Avoid activity leak via Companion callback

Test: invoke associate() API and ensure it still works
Change-Id: I9aedb043b4b1f0d77f076d8753cd60ff7c98a7d6
ompanionDeviceManager.java
CompanionDeviceManager.aidl
20bd9fc81e32cafc86f3972b182b65ebdf5b1999 27-Apr-2017 Eugene Susla <eugenesusla@google.com> API fixes for Companion renaming

Test: Ensure renaming still works
Fixes: 37748634
Change-Id: I6a863200b1f12db857c308e3b935b0f27f20c85b
luetoothLeDeviceFilter.java
722463ff953168ae27bedf61a586f296813fc9fe 20-Apr-2017 Eugene Susla <eugenesusla@google.com> Follow acronym convention for Companion BLE filter

Test: Ensure no compilation error
Fixes: 37514177
Change-Id: I4c255cf6b3c62d762755a9822928561371ecd88d
luetoothLEDeviceFilter.java
luetoothLeDeviceFilter.java
b0f9740057b2ac60a3d7a13391a05a4cf132356b 24-Apr-2017 Eugene Susla <eugenesusla@google.com> Add javadoc about APIs requiring uses-feature

Bug: 37629514
Test: Ensure no compilation error; proofread
Change-Id: Ia250c95da1edb20017bc13a4504ead092eb24fff
ompanionDeviceManager.java
a7717e3072acad6cd6256ce3fdbb2bb94ecb06ca 18-Apr-2017 Eugene Susla <eugenesusla@google.com> StopScan before each new Companion device scan

Fixes: 37356792
Test: Call associate many times rapidly with alternaring request value
Ensure no stale result is displayed
Change-Id: Icaa230d9ad468119e20b3de89f19c36531c2c60f
ssociationRequest.java
luetoothLEDeviceFilter.java
cf00adebec29d4cdbec5bc0f004b26a09327c236 10-Apr-2017 Eugene Susla <eugenesusla@google.com> API for notification listener for Companioon apps

Test: 1. Trigger the confitrmation dialog.
Ensure it looks exactly like the one from settings.
2. Call an API without associating the appa first
Ensure exception is thrown with a message mentioning the need to associate 1st
Change-Id: I94d4116e1988db869ed445ae3fd018c50590e3f4
ompanionDeviceManager.java
CompanionDeviceManager.aidl
75fb821029f789cf8f306dbd72805d1581214785 05-Apr-2017 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Add an opnion to use advertised name for renaming

Test: Use new API, make sure renaming works
Change-Id: I9251c5db24495b8594fadce2beab3347a1aec884
luetoothLEDeviceFilter.java
200c37f4136e0d49fd853122900d2209e424701c 29-Mar-2017 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Stop scan on device chooser activity backgrounded

This effectively treats chooser activity pause event as cancel.

Bug: 30932767
Test: Install two toy apps and call associate API from both.
Ensure foreground app always end up showing fresh data.

Change-Id: I7f5742e9878245550f678efd244bf84c427baef3
CompanionDeviceDiscoveryServiceCallback.aidl
3c9aa1767ca0ddc881f53c2ce7eb3135670efef3 29-Mar-2017 Eugene Susla <eugenesusla@google.com> [DO NOT MERGE] Fix a bug with filtering by raw bytes

(when such filter is not provided)
See change in BluetoothDeviceFilterUtils

Bug: 30932767
Test: Call API with a BLE filter with no raw bytes filter, matching some device.
Ensure that the device eventually shows up.

Change-Id: I4397fa33dd0c48771c8a754791a171f2d0bd64eb
luetoothDeviceFilterUtils.java
luetoothLEDeviceFilter.java
adce09b9a48b1d25c97fe7d3c731de1862f0487b 29-Mar-2017 Eugene Susla <eugenesusla@google.com> Add ICompanionDeviceManager.getAssociation overload with explicit userId

Bug: 30932767
Test: ensure getAssociations works as before
Change-Id: I58dc4dac5bf7aae83fe3611890116a928e290a43
(cherry picked from commit 544d714626db38714f826a31a5483c647510a743)
ompanionDeviceManager.java
CompanionDeviceManager.aidl
5e01870015c43998398f3679fe04afc9923c1464 27-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Unbind from service on app killed and dedup association requests"
a38fbf63fd2a29884637a59387643c801ed4f663 14-Mar-2017 Eugene Susla <eugenesusla@google.com> Unbind from service on app killed and dedup association requests

1. Listen to calling package binder death stopping the scanning on that.
2. Don't restart scanning when a request with the same values was made.

Bug: 30932767
Test: 1.:
- Using a test app start scanning and kill the app.
- In debug mode ensure that DeviceDiscoveryService#stopScan gets triggered
2.:
- Start scanning and rotate the device while device chooser is visible
- Ensure no visible loss of state is happening
Change-Id: If126a2c963da90172a956fbd88e6b3dcd7ac8b01
ssociationRequest.java
luetoothDeviceFilter.java
luetoothLEDeviceFilter.java
ompanionDeviceManager.java
ifiDeviceFilter.java
d7ff177924baf47575f485c4f2c91007616b99aa 24-Mar-2017 Eugene Susla <eugenesusla@google.com> Fix companion device feature presence check

There was a typo causing the feature to be falsely detected as not present.

Test: Ensure feature presence is now detected correctly
Bug: 30932767
Change-Id: I44d137e89546596058b272e8eeaccc0a1db21aef
ompanionDeviceManager.java
9f29617d589b8daccda1d3b37de97662b9147cb1 22-Mar-2017 Eugene Susla <eugenesusla@google.com> Merge "Add system feature for Companion Device Manager"
6a7006a9683ba5a79ca338050c7c50b346b04de0 13-Mar-2017 Eugene Susla <eugenesusla@google.com> Register PackageMonitor for CompanionDeviceManagerService

1. On package removed -> remove all its associations
2. On package updated -> if had associations, update special access permission
in accordance with (potentially changed) permission entries in manifest

Bug: 30932767
Test: 1. Remove app, and ensure xml entries for it got removed.
2. adb install new version of app without special permissions in manifest, and
ensure whitelist removal method got called
Change-Id: I87261c05ddcf40a18332d160b44ee2f8284df5e4
ssociationRequest.java
luetoothDeviceFilter.java
7c3eef2f3d085bc14f736240896523217a448408 10-Mar-2017 Eugene Susla <eugenesusla@google.com> Add system feature for Companion Device Manager

Bug: 30932767
Test: Add just the feature gating first, ensure Context#getSystemSetrvice now
returns null.
Add feature in the configuration files, ensure companion device feature works again.
Change-Id: I4ad2d52f7877eae0e951f43ddbb23881d5de8d8b
ompanionDeviceManager.java
36e866b8e0ec08e45b5e7fbc65aeeb3a9bb7b11e 24-Feb-2017 Eugene Susla <eugenesusla@google.com> Support multiple filters per association request

By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
- Letting the user select from a list of devices of more then one medium
type (e.g. Bluetooth and BLE)
- Allowing to provide multiple criteria for any field (e.g. filtering by
more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided

Change-Id: I0a978787551a1ee5750ec5544b241d3bbfed5a7c
ssociationRequest.java
luetoothDeviceFilter.java
luetoothDeviceFilterUtils.java
luetoothLEDeviceFilter.java
ompanionDeviceManager.java
eviceFilter.java
ifiDeviceFilter.java
d66c95fa907dc9eb3d7238fbbf3dc6dbd4b243a0 09-Mar-2017 Hector Tellez <htellez@google.com> Revert "Support multiple filters per association request"

This reverts commit e70e6aa62c6f3a9a79624a4f9d97df95edda0364.

Change-Id: I12857cbbea0a0c74521191ab5e3713db230626ab
ssociationRequest.java
luetoothDeviceFilter.java
luetoothDeviceFilterUtils.java
luetoothLEDeviceFilter.java
ompanionDeviceManager.java
eviceFilter.java
ifiDeviceFilter.java
e70e6aa62c6f3a9a79624a4f9d97df95edda0364 24-Feb-2017 Eugene Susla <eugenesusla@google.com> Support multiple filters per association request

By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
- Letting the user select from a list of devices of more then one medium
type (e.g. Bluetooth and BLE)
- Allowing to provide multiple criteria for any field (e.g. filtering by
more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided
Change-Id: I6621da388e2bf4ed97c5af2692629a321d0b63c7
ssociationRequest.java
luetoothDeviceFilter.java
luetoothDeviceFilterUtils.java
luetoothLEDeviceFilter.java
ompanionDeviceManager.java
eviceFilter.java
ifiDeviceFilter.java
47aafbe033202ccc2c0ea9af2b0f1596ebed4373 13-Feb-2017 Eugene Susla <eugenesusla@google.com> Record app<->device association to xml file

Bug: 30932767
Test: Ensure file not exists -> query associations -> ensure result is empty list
Associate device -> cat xml file -> ensure record appears as extected
Disassociate device -> cat xml file -> ensure record is no longer present
Change-Id: Ibe456a6d9292e05e2391f5138e43fdaa37f87e1b
ompanionDeviceManager.java
CompanionDeviceDiscoveryService.aidl
CompanionDeviceDiscoveryServiceCallback.aidl
CompanionDeviceManager.aidl
da0acdf938f1d6e7a978e143d5d80d8dd5af52ad 15-Feb-2017 Svet Ganov <svetoslavganov@google.com> Auto-grant background execution and data access

Companion apps can declare they want background access and
background execution exceptions via dedicated permissions
in their manifest. If such a permission is requested we
auto-grant the corresponding exception after the user has
chosen a device from the companion UI. These permissions
are appop ones allowing us to use the app ops for gauging
whether the user has made a change after we auto-granted
the permission since we would like to revoke these special
privileges when the app disassociates itself from the
companion device if the user did not make an excplicit
choice otherwise.

While at this auto-grant fixed location permission to the
companion device discovery service.

Test: manual

Change-Id: I46ee4291e5e5a8f7613f0dd75eb61d6b9341f306
ompanionDeviceManager.java
CompanionDeviceDiscoveryService.aidl
CompanionDeviceDiscoveryServiceCallback.aidl
CompanionDeviceManager.aidl
CompanionDeviceManagerService.aidl
CompanionDeviceManagerServiceCallback.aidl
FindDeviceCallback.aidl
OnAssociateCallback.aidl
6ed45d8cd33c297e608aba94fc1f61dace7a7cca 22-Jan-2017 Eugene Susla <eugenesusla@google.com> CompanionDeviceManager

This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
and go through the flow. Ensure filtering works, and device is returned to
the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
ssociationRequest.aidl
ssociationRequest.java
luetoothDeviceFilter.java
luetoothDeviceFilterUtils.java
luetoothLEDeviceFilter.aidl
luetoothLEDeviceFilter.java
ompanionDeviceManager.java
eviceFilter.java
CompanionDeviceManager.aidl
CompanionDeviceManagerService.aidl
CompanionDeviceManagerServiceCallback.aidl
OnAssociateCallback.aidl