Bluetooth: Add conditional check to call init
Adding isA2dpOffloadSupported flag as conditional check to call init to
optimize the boot timing for a2dpoffload disabled devices.
Change-Id: I1e0fe2c907868e9edb717e5da049125aea0e30ed
diff --git a/device/src/Bluetooth.cpp b/device/src/Bluetooth.cpp
index 1d2a2fa..e295850 100644
--- a/device/src/Bluetooth.cpp
+++ b/device/src/Bluetooth.cpp
@@ -1341,7 +1341,6 @@
pluginHandler = NULL;
pluginCodec = NULL;
- init();
param_bt_a2dp.reconfig = false;
param_bt_a2dp.a2dp_suspended = false;
param_bt_a2dp.a2dp_capture_suspended = false;
@@ -1354,6 +1353,10 @@
isA2dpOffloadSupported);
param_bt_a2dp.reconfig_supported = isA2dpOffloadSupported;
param_bt_a2dp.latency = 0;
+
+ if (isA2dpOffloadSupported) {
+ init();
+ }
}
BtA2dp::~BtA2dp()