OSDN Git Service

RootCanal: Set the timer period to 1 second
authorMyles Watson <mylesgw@google.com>
Mon, 1 Jul 2019 22:22:26 +0000 (15:22 -0700)
committerMyles Watson <mylesgw@google.com>
Wed, 3 Jul 2019 15:53:01 +0000 (15:53 +0000)
Reduce the CPU overhead of simulating the Bluetooth chip.

Bug: 136503363
Test: enable Bluetooth with RootCanal
Change-Id: I3a783a4d8a46d4eef43ddbace23c672ef9f6d7f9
Merged-In: I609f917061e5d83e011edfeb61de281ff45b13e4

test/rootcanal/bluetooth_hci.cc

index 384da73..e40a0c1 100644 (file)
@@ -142,6 +142,7 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) {
   test_channel_.AddDeviceToPhy({"1", "0"});
   test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"});
   test_channel_.AddDeviceToPhy({"2", "0"});
+  test_channel_.SetTimerPeriod({"1000"});
 
   unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) {
     if (death_recipient->getHasDied())