From 20fc9a250e4d3f6eb30ca08481af77f4abd01843 Mon Sep 17 00:00:00 2001 From: Stanley Tng Date: Mon, 20 Aug 2018 13:04:15 -0700 Subject: Add note for FLAG_CANCEL_CURRENT when stopping scan Added a note in the Android API documentation for stopScan to make sure that the flag FLAG_CANCEL_CURRENT is not used when creating the PendingIntent parameter. Bug: 77658091 Test: Just compile since not logic is changed Change-Id: I55f33ae68679310ba4899708a2072a40fea0b3b4 --- core/java/android/bluetooth/le/BluetoothLeScanner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java index a189e271379a..a337a40094dd 100644 --- a/core/java/android/bluetooth/le/BluetoothLeScanner.java +++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java @@ -275,7 +275,9 @@ public final class BluetoothLeScanner { } /** - * Stops an ongoing Bluetooth LE scan started using a PendingIntent. + * Stops an ongoing Bluetooth LE scan started using a PendingIntent. When creating the + * PendingIntent parameter, please do not use the FLAG_CANCEL_CURRENT flag. Otherwise, the stop + * scan may have no effect. * * @param callbackIntent The PendingIntent that was used to start the scan. * @see #startScan(List, ScanSettings, PendingIntent) -- cgit v1.2.3-59-g8ed1b