Commit fc431404 authored by steel's avatar steel Committed by Commit bot

Roll cros_system_api and use constants pulled in.

This CL rolls the DEPS to pull in the latest cros_system_api, which adds
the constant for the SetAdvertisingIntervals method. It also fixes a few
nits from the CL that added the setAdvertisingIntervals code,
https://codereview.chromium.org/2353133005/

R=ortuno@chromium.org
BUG=637231

Review-Url: https://codereview.chromium.org/2390063002
Cr-Commit-Position: refs/heads/master@{#422712}
parent cc8e3dbd
......@@ -379,7 +379,7 @@ deps_os = {
# For Linux and Chromium OS.
'src/third_party/cros_system_api':
Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '6d7653e36068a12f538512f80c4ce77ea2492b92',
Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '1b7b261e7757d49fd9035c12e17704e6fe956032',
# Note that this is different from Android's freetype repo.
'src/third_party/freetype2/src':
......
......@@ -444,6 +444,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
#if defined(OS_CHROMEOS) || defined(OS_LINUX)
// Sets the interval between two consecutive advertisements. Valid ranges
// for the interval are from 20ms to 10.24 seconds, with min <= max.
// Note: This is a best effort. The actual interval may vary non-trivially
// from the requested intervals. On some hardware, there is a minimum
// interval of 100ms. The minimum and maximum values are specified by the
// Core 4.2 Spec, Vol 2, Part E, Section 7.8.5.
virtual void SetAdvertisingInterval(
const base::TimeDelta& min,
const base::TimeDelta& max,
......
......@@ -114,11 +114,9 @@ class BluetoothAdvertisementManagerClientImpl
uint16_t max_interval_ms,
const base::Closure& callback,
const ErrorCallback& error_callback) override {
// TODO(rkc): Replace the string "SetAdvertisingInterval" with the correct
// constant in service_constants.h once cros_system_api DEPS are rolled.
dbus::MethodCall method_call(
bluetooth_advertising_manager::kBluetoothAdvertisingManagerInterface,
"SetAdvertisingIntervals");
bluetooth_advertising_manager::kSetAdvertisingIntervals);
dbus::MessageWriter writer(&method_call);
writer.AppendUint16(min_interval_ms);
......
......@@ -18,6 +18,8 @@ namespace bluez {
namespace {
constexpr char kAdvertisingManagerPath[] = "/fake/hci0";
// According to the Bluetooth spec, these are the min and max values possible
// for advertising interval. Core 4.2 Spec, Vol 2, Part E, Section 7.8.5.
constexpr uint16_t kMinIntervalMs = 20;
constexpr uint16_t kMaxIntervalMs = 10240;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment