OSDN Git Service

Bluetooth: Add a second thread for the scheduler
authorMyles Watson <mylesgw@google.com>
Thu, 11 May 2017 23:39:59 +0000 (16:39 -0700)
committerMyles Watson <mylesgw@google.com>
Fri, 12 May 2017 00:28:06 +0000 (17:28 -0700)
Test: service call bluetooth_manager 6 # (Stop Bluetooth)
      /data/nativetest64/VtsHalBluetoothV1_0TargetTest/\
          VtsHalBluetoothV1_0TargetTest
Bug: 3817826534461621
Change-Id: Ia8f6683ca47c9deac43d1047846caee5688f1eca
(cherry picked from commit 74c601361c5f2d68561b545b7b7a52a3916ba8e9)

bluetooth/1.0/default/service.cpp

index fa5106f..a588c37 100644 (file)
 
 #include <hidl/LegacySupport.h>
 
+// Add an extra thread for calls to the scheduler service.
+static const size_t kMaxThreads = 2;
+
 // Generated HIDL files
 using android::hardware::bluetooth::V1_0::IBluetoothHci;
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main() {
-  return defaultPassthroughServiceImplementation<IBluetoothHci>();
+    return defaultPassthroughServiceImplementation<IBluetoothHci>(kMaxThreads);
 }