Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Issue 1618273002: Call BluetoothGatt#close() after disconnecting (Closed)

Created:
4 years, 11 months ago by tommyt
Modified:
4 years, 10 months ago
Reviewers:
scheib, ortuno
CC:
chromium-reviews, perja, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Call BluetoothGatt#close() after disconnecting This fixes the problem where connections are never properly removed, causing the BluetoothAdapter to eventually not be able to connect at all. BUG=576819 Committed: https://crrev.com/97116835b2cd97b9565020bd09f6c78469694ba3 Cr-Commit-Position: refs/heads/master@{#372986}

Patch Set 1 #

Patch Set 2 : Fix unit tests on Android #

Total comments: 2

Patch Set 3 : Rebased onto current master #

Total comments: 6

Patch Set 4 : Call close on destruction and reconnect #

Total comments: 6

Patch Set 5 : Add unit tests for connection close #

Total comments: 2

Patch Set 6 : Call parent class' TearDown #

Messages

Total messages: 20 (5 generated)
tommyt
I've made an attempt at fixing this problem. First I tried simply replacing the disconnect() ...
4 years, 11 months ago (2016-01-22 12:32:34 UTC) #3
scheib
Sorry for review delay -- please ping if no response in 24 hours, this fell ...
4 years, 11 months ago (2016-01-27 00:30:43 UTC) #4
tommyt
https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java File device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java (right): https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java#newcode61 device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java:61: private void onBluetoothDeviceAndroidDestruction() { On 2016/01/27 00:30:43, scheib wrote: ...
4 years, 10 months ago (2016-01-28 12:48:22 UTC) #5
ortuno
https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java File device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java (right): https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java#newcode124 device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java:124: mBluetoothGatt = On 2016/01/28 at 12:48:22, tommyt wrote: > ...
4 years, 10 months ago (2016-01-28 16:19:16 UTC) #6
scheib
https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java File device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java (right): https://codereview.chromium.org/1618273002/diff/40001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java#newcode61 device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java:61: private void onBluetoothDeviceAndroidDestruction() { On 2016/01/28 12:48:22, tommyt wrote: ...
4 years, 10 months ago (2016-01-29 04:50:39 UTC) #7
tommyt
A new patchset is up. This time, the code should ensure that no matter what ...
4 years, 10 months ago (2016-01-29 15:02:12 UTC) #8
ortuno
https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (left): https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc#oldcode188 device/bluetooth/bluetooth_device_unittest.cc:188: EXPECT_EQ(1, gatt_disconnection_attempts_); On 2016/01/29 at 15:02:12, tommyt wrote: > ...
4 years, 10 months ago (2016-01-29 16:23:53 UTC) #9
scheib
https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (left): https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc#oldcode188 device/bluetooth/bluetooth_device_unittest.cc:188: EXPECT_EQ(1, gatt_disconnection_attempts_); On 2016/01/29 16:23:53, ortuno wrote: > On ...
4 years, 10 months ago (2016-01-29 21:50:58 UTC) #10
tommyt
https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc File device/bluetooth/bluetooth_device_unittest.cc (left): https://codereview.chromium.org/1618273002/diff/60001/device/bluetooth/bluetooth_device_unittest.cc#oldcode188 device/bluetooth/bluetooth_device_unittest.cc:188: EXPECT_EQ(1, gatt_disconnection_attempts_); On 2016/01/29 21:50:58, scheib wrote: > On ...
4 years, 10 months ago (2016-02-01 14:37:13 UTC) #11
scheib
https://codereview.chromium.org/1618273002/diff/80001/device/bluetooth/test/bluetooth_test_android.cc File device/bluetooth/test/bluetooth_test_android.cc (right): https://codereview.chromium.org/1618273002/diff/80001/device/bluetooth/test/bluetooth_test_android.cc#newcode45 device/bluetooth/test/bluetooth_test_android.cc:45: } Also call BluetoothTest::TearDown()
4 years, 10 months ago (2016-02-01 18:18:49 UTC) #12
tommyt
https://codereview.chromium.org/1618273002/diff/80001/device/bluetooth/test/bluetooth_test_android.cc File device/bluetooth/test/bluetooth_test_android.cc (right): https://codereview.chromium.org/1618273002/diff/80001/device/bluetooth/test/bluetooth_test_android.cc#newcode45 device/bluetooth/test/bluetooth_test_android.cc:45: } On 2016/02/01 18:18:48, scheib wrote: > Also call ...
4 years, 10 months ago (2016-02-02 09:48:30 UTC) #13
scheib
LGTM
4 years, 10 months ago (2016-02-02 17:57:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1618273002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1618273002/100001
4 years, 10 months ago (2016-02-02 17:58:50 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-02 18:10:23 UTC) #18
commit-bot: I haz the power
4 years, 10 months ago (2016-02-02 18:11:36 UTC) #20
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/97116835b2cd97b9565020bd09f6c78469694ba3
Cr-Commit-Position: refs/heads/master@{#372986}

Powered by Google App Engine
This is Rietveld 408576698