From 5f6bf641078e339911f3c97984f5689d768833e8 Mon Sep 17 00:00:00 2001 From: Eugene Susla Date: Wed, 14 Aug 2019 10:17:57 -0700 Subject: [PATCH] Document condition when CDM looks at bonded devices As reported in attached bug, there's been some confusion around which specific kind of request does or does not include bonded devices when searching. This mentions the exact condition, and explains the use case when user might want to take advantage of it. Fixes: 139376317 Test: presubmit Change-Id: I98501a235a044a0e184dcbb2363c158cc0d0882c --- core/java/android/companion/AssociationRequest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/java/android/companion/AssociationRequest.java b/core/java/android/companion/AssociationRequest.java index e4114c66bac73..ac40150376da6 100644 --- a/core/java/android/companion/AssociationRequest.java +++ b/core/java/android/companion/AssociationRequest.java @@ -127,6 +127,12 @@ public final class AssociationRequest implements Parcelable { public Builder() {} /** + * Whether only a single device should match the provided filter. + * + * When scanning for a single device with a specifc {@link BluetoothDeviceFilter} mac + * address, bonded devices are also searched among. This allows to obtain the necessary app + * privileges even if the device is already paired. + * * @param singleDevice if true, scanning for a device will stop as soon as at least one * fitting device is found */