OSDN Git Service

service: Return SUCCESS from Acquire|ReleaseWakeLock
authorArman Uguray <armansito@google.com>
Mon, 24 Aug 2015 17:08:19 +0000 (10:08 -0700)
committerArman Uguray <armansito@google.com>
Mon, 24 Aug 2015 17:50:22 +0000 (17:50 +0000)
Added code back to lie and return BT_STATUS_SUCCESS from the
AcquireWakeLock and ReleaseWakeLock OS callouts, since without these
the adapter cannot be properly disabled.

Bug: 23390297
Change-Id: I9801ccc7f72d83d132363fc888319bfb9b2eff29

service/hal/bluetooth_interface.cpp

index 647f328..496b148 100644 (file)
@@ -100,14 +100,18 @@ int AcquireWakeLockCallout(const char* /* lock_name */) {
   // TODO(armansito): According to sharvil@, this interface doesn't even need to
   // exist and can be done entirely from within osi by interfacing directly with
   // the kernel. Remove these stubs once that's fixed. (See http://b/23390297)
-  return BT_STATUS_UNSUPPORTED;
+  // Lie here and return success so that enabling and disabling the controller
+  // works before this is properly implemented.
+  return BT_STATUS_SUCCESS;
 }
 
 int ReleaseWakeLockCallout(const char* /* lock_name */) {
   // TODO(armansito): According to sharvil@, this interface doesn't even need to
   // exist and can be done entirely from within osi by interfacing directly with
   // the kernel. Remove these stubs once that's fixed. (See http://b/23390297)
-  return BT_STATUS_UNSUPPORTED;
+  // Lie here and return success so that enabling and disabling the controller
+  // works before this is properly implemented.
+  return BT_STATUS_SUCCESS;
 }
 
 // The HAL Bluetooth DM callbacks.