OSDN Git Service

Fix GATT client leakage when scan is throttled (1/2)
authorJakub Pawlowski <jpawlowski@google.com>
Mon, 28 Aug 2017 11:12:49 +0000 (04:12 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 28 Aug 2017 18:09:03 +0000 (18:09 +0000)
commitee02e1ce774777e85b10be6d1ad5c6083fa08c18
treed39dbdc29fe25f1f1e7a4ddb22c0109dbcd85ebf
parentc0d8300b32b706e1d4caced06a4004d427a9bdd3
Fix GATT client leakage when scan is throttled (1/2)

Currently, scan throttling happens after client is registered, but
before the scan is started. This might lead to scan client being leaked.
This patch fixed that by moving check before client registration.

Bug: 64887233
Test: manual
Change-Id: I22ae624a0c51110cb69679f796926e3b2b36d0ac
core/java/android/bluetooth/le/BluetoothLeScanner.java
core/java/android/bluetooth/le/ScanCallback.java