• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

修订版0dc155f78d23cdc7ffa38f6121ccd4c56d1e1056 (tree)
时间2019-06-28 05:53:01
作者Myles Watson <mylesgw@goog...>
Commiterandroid-build-merger

Log Message

DO NOT MERGE RootCanal: Always add default devices
am: 6160b51adc

Change-Id: I11a3328b78eb69c85ab98038aa2558c442d659cb

更改概述

差异

--- a/test/rootcanal/bluetooth_hci.cc
+++ b/test/rootcanal/bluetooth_hci.cc
@@ -120,6 +120,11 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) {
120120 // Add the controller as a device in the model.
121121 test_model_.Add(controller_);
122122
123+ // Send responses to logcat if the test channel is not configured.
124+ test_channel_.RegisterSendResponse([](const std::string& response) {
125+ ALOGI("No test channel yet: %s", response.c_str());
126+ });
127+
123128 if (BtTestConsoleEnabled()) {
124129 SetUpTestChannel(6111);
125130 SetUpHciServer(6211,
@@ -128,6 +133,16 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) {
128133 6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); });
129134 }
130135
136+ // Add some default devices for easier debugging
137+ test_channel_.AddDefaults();
138+
139+ // This should be configurable in the future.
140+ ALOGI("Adding Beacons so the scan list is not empty.");
141+ test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"});
142+ test_channel_.AddDeviceToPhy({"1", "0"});
143+ test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"});
144+ test_channel_.AddDeviceToPhy({"2", "0"});
145+
131146 unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) {
132147 if (death_recipient->getHasDied())
133148 ALOGI("Skipping unlink call, service died.");
@@ -261,16 +276,6 @@ void BluetoothHci::SetUpTestChannel(int port) {
261276 test_channel_.RegisterSendResponse(
262277 [](const std::string& response) { ALOGI("No test channel: %s", response.c_str()); });
263278
264- // Add some default devices for easier debugging
265- test_channel_.AddDefaults();
266-
267- // This should be configurable in the future.
268- ALOGI("Adding Beacons so the scan list is not empty.");
269- test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"});
270- test_channel_.AddDeviceToPhy({"1", "0"});
271- test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"});
272- test_channel_.AddDeviceToPhy({"2", "0"});
273-
274279 if (socket_fd == -1) {
275280 ALOGE("Test channel SetUp(%d) failed.", port);
276281 return;