|
|
Chromium Code Reviews|
Created:
4 years, 3 months ago by puthik_chromium Modified:
4 years, 3 months ago CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, yusukes+watch_chromium.org, Sameer Nanda Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionarc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367, b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
Committed: https://crrev.com/fd2bc7fb594c0d299649b3416055014e3c402107
Cr-Commit-Position: refs/heads/master@{#416066}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Implement timer to turn discovery off #
Total comments: 8
Patch Set 3 : Use OneShotTimer #
Messages
Total messages: 31 (17 generated)
puthik@chromium.org changed reviewers: + mcchou@chromium.org
https://codereview.chromium.org/2297903002/diff/1/components/arc/bluetooth/ar... File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2297903002/diff/1/components/arc/bluetooth/ar... components/arc/bluetooth/arc_bluetooth_bridge.cc:639: // TODO(puthik) Implement other case. nit: Move this comment to the unsupported case. https://codereview.chromium.org/2297903002/diff/1/components/arc/bluetooth/ar... components/arc/bluetooth/arc_bluetooth_bridge.cc:644: if (discovery_timeout > 0) { nit: put a new line above.
lgtm with nits
Description was changed from ========== arc: bluetooth: Implement set adapter property This CL handles request from android side to modify various type of adapter properties. This include - Make Bluetooh adapter discoverable for specify amout of time - WIP: Implement other thing. BUG=b:31180714 TEST=CTS Verifier app can make device discoverable. ========== to ========== arc: bluetooth: Implement set discoverable state This CL handles request from Android to set discoverable timeout. As Android API for this is set the discoverable timeout but the Chrome API is set state on or off. ArcBluetoothBridge need to maintain a new timer class to turn the discoverable state off when the timer runs out. BUG=b:31180714 TEST=CTS Verifier app can make device discoverable. ==========
puthik@chromium.org changed reviewers: + lhchavez@chromium.org, rkc@chromium.org
+rkc for Bluetooth +lhchavez for owner This CLs need to Merge to M53 for CTS Verifier. Other function in setAdapterProperty will be implement in other CL.
The CQ bit was checked by puthik@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
cc: snanda
if you want to be able to merge to M53, this needs a crbug in addition to the b/ bug. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:204: discoverable_off_timer_(true, false), it looks like you can use base::OneShotTimer instead to avoid these constants. You don't need it to store the callback anyways. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:637: if (!success) { nit: DCHECK(CalledOnValidThread()); if (!HasBluetoothInstance() return; https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:662: bool current = bluetooth_adapter_->IsDiscoverable(); nit: currently_discoverable. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:673: // Just send message to Chrome is new timeout is lower. nit: "Android if"? this also needs to be gated upon HasBluetoothInstance() since it's not guaranteed that it's called from a method that has checked that.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=b:31180714
TEST=CTS Verifier app can make device discoverable.
==========
to
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367,b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
==========
The CQ bit was checked by puthik@chromium.org to run a CQ dry run
https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:204: discoverable_off_timer_(true, false), On 2016/09/01 19:28:15, Luis Héctor Chávez wrote: > it looks like you can use base::OneShotTimer instead to avoid these constants. > You don't need it to store the callback anyways. Done. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:637: if (!success) { On 2016/09/01 19:28:15, Luis Héctor Chávez wrote: > nit: > > DCHECK(CalledOnValidThread()); > if (!HasBluetoothInstance() > return; Done. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:662: bool current = bluetooth_adapter_->IsDiscoverable(); On 2016/09/01 19:28:15, Luis Héctor Chávez wrote: > nit: currently_discoverable. Done. https://codereview.chromium.org/2297903002/diff/20001/components/arc/bluetoot... components/arc/bluetooth/arc_bluetooth_bridge.cc:673: // Just send message to Chrome is new timeout is lower. On 2016/09/01 19:28:15, Luis Héctor Chávez wrote: > nit: "Android if"? this also needs to be gated upon HasBluetoothInstance() since > it's not guaranteed that it's called from a method that has checked that. Done.
puthik@chromium.org changed reviewers: + steel@chromium.org - rkc@chromium.org
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
bt lgtm
bt lgtm
The CQ bit was checked by puthik@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mcchou@chromium.org Link to the patchset: https://codereview.chromium.org/2297903002/#ps40001 (title: "Use OneShotTimer")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367,b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
==========
to
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367,b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367,b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
==========
to
==========
arc: bluetooth: Implement set discoverable state
This CL handles request from Android to set discoverable timeout.
As Android API for this is set the discoverable timeout but the
Chrome API is set state on or off. ArcBluetoothBridge need to
maintain a new timer class to turn the discoverable state off
when the timer runs out.
BUG=643367,b:31180714
TEST=CTS Verifier app can make device discoverable for 30 seconds.
Verified via bluetoothctl tool
Committed: https://crrev.com/fd2bc7fb594c0d299649b3416055014e3c402107
Cr-Commit-Position: refs/heads/master@{#416066}
==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/fd2bc7fb594c0d299649b3416055014e3c402107 Cr-Commit-Position: refs/heads/master@{#416066} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
