bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
Committed: https://crrev.com/988f37c5bc72dfbd524fcb7f9f47b6339a810b3a
Cr-Commit-Position: refs/heads/master@{#369559}
4 years, 11 months ago
(2016-01-13 00:56:53 UTC)
#1
Patchset #1 (id:1) has been deleted
scheib
Patchset #4 (id:80001) has been deleted
4 years, 11 months ago
(2016-01-13 00:57:05 UTC)
#2
Patchset #4 (id:80001) has been deleted
scheib
Patchset #1 (id:20001) has been deleted
4 years, 11 months ago
(2016-01-13 00:57:21 UTC)
#3
Patchset #1 (id:20001) has been deleted
scheib
Patchset #1 (id:40001) has been deleted
4 years, 11 months ago
(2016-01-13 00:57:33 UTC)
#4
Patchset #1 (id:40001) has been deleted
scheib
Patchset #1 (id:60001) has been deleted
4 years, 11 months ago
(2016-01-13 00:59:41 UTC)
#5
Patchset #1 (id:60001) has been deleted
scheib
Description was changed from ========== bluetooth: android: Enable characteristic change notification events. PATCH WORK IN ...
4 years, 11 months ago
(2016-01-13 01:00:42 UTC)
#6
Description was changed from
==========
bluetooth: android: Enable characteristic change notification events.
PATCH WORK IN PROGRESS --- FILL IN DESCRIPTION BEFORE REVIEW.
BUG=551634, 566533
==========
to
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling notifications, and route
changed values via onCharacteristicChanged.
BUG=551634, 566533
==========
scheib
Description was changed from ========== bluetooth: android: Enable characteristic change notification events. Set Notify or ...
4 years, 11 months ago
(2016-01-13 01:00:52 UTC)
#7
Description was changed from
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling notifications, and route
changed values via onCharacteristicChanged.
BUG=551634, 566533
==========
to
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
==========
4 years, 11 months ago
(2016-01-13 02:41:56 UTC)
#9
Jeffrey Yasskin
LGTM after the below fixes. https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right): https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc#newcode78 device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:78: &expected_config_descriptor_value, You mean to ...
4 years, 11 months ago
(2016-01-14 00:13:43 UTC)
#10
Thanks - double check bits because, apparently I need checking on. ;) https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc ...
4 years, 11 months ago
(2016-01-14 01:12:27 UTC)
#11
Thanks - double check bits because, apparently I need checking on. ;)
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right):
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:78:
&expected_config_descriptor_value,
On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> You mean to pull the bytes out of here, right? Instead, this truncates
> expected_config_descriptor_value to uint8_t, and then reads the non-existent
> uint16_t after it in memory, and casts that value to uint8_t. To avoid
depending
> on the endian-ness of Chrome's platform, you should use bitmasks and shifts to
> pull the bytes out of expected_config_descriptor_value.
Thanks - double check this version.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:713:
TEST_F(BluetoothGattCharacteristicTest, StartNotifySession_SynchronousError) {
On 2016/01/14 00:13:43, Jeffrey Yasskin wrote:
> Is "SynchronousError" the most descriptive name for this kind of failure? I
> believe it's failing in the call to setCharacteristicNotification(), so it
> should be "FailToSetCharacteristicNotification" or similar.
Done. Naming was intentionally abstracting platform details - but I've used your
example and commented directly what this translates to for Android. There isn't
an equivalent for Bluez or CoreBluetooth, (or I think Windows, but I'm still
unsure which API surface we'd use there) so this is likely to remain Android
only indefinitely.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:717:
SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> If you remove this line, does the test fail? I suspect you need to add the
> descriptor in order to get to the attempt to call
> setCharacteristicNotification().
It needed the descriptor. Code coverage here is brittle ;(, I'd reorganized for
better error messages. I don't think worth adding more testing instrumentation
for from every block - unsure of a better way.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:768: /* properties:
INDICATE */ 0x20,
On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> Please also check when both NOTIFY and INDICATE properties are set. It doesn't
> matter which is written, but exactly 1 should be. (Testing that exactly NOTIFY
> is written is fine.)
Done.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:810:
SimulateGattCharacteristicChanged(/* use remembered characteristic */ nullptr,
On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> Please comment that the test here is that nothing crashes.
Done.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc (right):
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc:232: //
TODO(http://crbug.com/545682): Call GattCharacteristicValueChanged.
On 2016/01/14 00:13:43, Jeffrey Yasskin wrote:
> https, please.
Done.
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/test/...
File
device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
(right):
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/test/...
device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java:461:
if (chromeCharacteristic == null && sRememberedCharacteristic == null)
On 2016/01/14 00:13:43, Jeffrey Yasskin wrote:
> Put braces around the 2-line block.
Done.
scheib
The CQ bit was checked by scheib@chromium.org
4 years, 11 months ago
(2016-01-14 16:53:39 UTC)
#12
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502833002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502833002/160001
4 years, 11 months ago
(2016-01-14 16:54:14 UTC)
#14
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/8204)
4 years, 11 months ago
(2016-01-14 17:09:06 UTC)
#16
lgtm https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right): https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc#newcode717 device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:717: SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce( On 2016/01/14 01:12:26, scheib wrote: > On ...
4 years, 11 months ago
(2016-01-14 18:43:32 UTC)
#17
lgtm
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right):
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:717:
SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
On 2016/01/14 01:12:26, scheib wrote:
> On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> > If you remove this line, does the test fail? I suspect you need to add the
> > descriptor in order to get to the attempt to call
> > setCharacteristicNotification().
>
> It needed the descriptor. Code coverage here is brittle ;(, I'd reorganized
for
> better error messages. I don't think worth adding more testing instrumentation
> for from every block - unsure of a better way.
One way to do it would be to have StartNotifyBoilerplate() take an integer
parameter saying which step to skip (or which failure to force), and then assert
that passing any of those integers causes a failure. Using
StartNotifyBoilerplace means that you also have a built-in test that you're
skipping a step in an otherwise-complete sequence. That said, we don't usually
test this way, so I don't insist on it.
https://codereview.chromium.org/1502833002/diff/160001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right):
https://codereview.chromium.org/1502833002/diff/160001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:80:
EXPECT_EQ(expected_byte0, last_write_value_[0]);
Looks good. With gmock included, you could also write:
EXPECT_THAT(last_write_value_, ElementsAre(expected_byte0, expected_byte1));
scheib
The CQ bit was checked by scheib@chromium.org
4 years, 11 months ago
(2016-01-14 19:20:57 UTC)
#18
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502833002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502833002/180001
4 years, 11 months ago
(2016-01-14 19:22:08 UTC)
#20
Try jobs failed on following builders: android_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/8273)
4 years, 11 months ago
(2016-01-14 19:44:06 UTC)
#22
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1502833002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1502833002/200001
4 years, 11 months ago
(2016-01-14 20:41:41 UTC)
#25
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right): https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc#newcode717 device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:717: SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce( On 2016/01/14 18:43:31, Jeffrey Yasskin wrote: > On ...
4 years, 11 months ago
(2016-01-14 21:02:14 UTC)
#26
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
File device/bluetooth/bluetooth_gatt_characteristic_unittest.cc (right):
https://codereview.chromium.org/1502833002/diff/140001/device/bluetooth/bluet...
device/bluetooth/bluetooth_gatt_characteristic_unittest.cc:717:
SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce(
On 2016/01/14 18:43:31, Jeffrey Yasskin wrote:
> On 2016/01/14 01:12:26, scheib wrote:
> > On 2016/01/14 00:13:42, Jeffrey Yasskin wrote:
> > > If you remove this line, does the test fail? I suspect you need to add the
> > > descriptor in order to get to the attempt to call
> > > setCharacteristicNotification().
> >
> > It needed the descriptor. Code coverage here is brittle ;(, I'd reorganized
> for
> > better error messages. I don't think worth adding more testing
instrumentation
> > for from every block - unsure of a better way.
>
> One way to do it would be to have StartNotifyBoilerplate() take an integer
> parameter saying which step to skip (or which failure to force), and then
assert
> that passing any of those integers causes a failure. Using
> StartNotifyBoilerplace means that you also have a built-in test that you're
> skipping a step in an otherwise-complete sequence. That said, we don't usually
> test this way, so I don't insist on it.
Nice idea - I'll refactor to use it in a follow up.
commit-bot: I haz the power
Description was changed from ========== bluetooth: android: Enable characteristic change notification events. Set Notify or ...
4 years, 11 months ago
(2016-01-14 21:51:55 UTC)
#27
Message was sent while issue was closed.
Description was changed from
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
==========
to
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
==========
commit-bot: I haz the power
Committed patchset #6 (id:200001)
4 years, 11 months ago
(2016-01-14 21:51:56 UTC)
#28
Message was sent while issue was closed.
Committed patchset #6 (id:200001)
commit-bot: I haz the power
Description was changed from ========== bluetooth: android: Enable characteristic change notification events. Set Notify or ...
4 years, 11 months ago
(2016-01-14 22:03:51 UTC)
#29
Message was sent while issue was closed.
Description was changed from
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
==========
to
==========
bluetooth: android: Enable characteristic change notification events.
Set Notify or Indicate on remote devices when enabling
notifications, and route changed values via
onCharacteristicChanged.
BUG=551634, 566533
Committed: https://crrev.com/988f37c5bc72dfbd524fcb7f9f47b6339a810b3a
Cr-Commit-Position: refs/heads/master@{#369559}
==========
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/988f37c5bc72dfbd524fcb7f9f47b6339a810b3a Cr-Commit-Position: refs/heads/master@{#369559}
4 years, 11 months ago
(2016-01-14 22:03:52 UTC)
#30
Issue 1502833002: bluetooth: android: Enable characteristic change notification events.
(Closed)
Created 5 years ago by scheib
Modified 4 years, 11 months ago
Reviewers: Jeffrey Yasskin
Base URL: https://chromium.googlesource.com/chromium/src.git@bta-check-null-
Comments: 17