Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02c9adf1 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by android-build-merger
Browse files

Merge "Init JNI in Bluetooth Service not the Bluetooth State machine" am: 7d655143

am: b428f370

Change-Id: I817e4c9a5e148af07aba764c3a480d0d5b190d64
parents a3ee5bf7 b428f370
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -490,6 +490,7 @@ static void classInitNative(JNIEnv* env, jclass clazz) {
}

static void initializeNative(JNIEnv* env, jobject object) {
  ALOGD("%s: HfpClient", __func__);
  const bt_interface_t* btInf = getBluetoothInterface();
  if (btInf == NULL) {
    ALOGE("Bluetooth module is not loaded");
+7 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ public class HeadsetClientService extends ProfileService {
    public static String HFP_CLIENT_STOP_TAG = "hfp_client_stop_tag";

    static {
        NativeInterface.initializeNative();
        NativeInterface.classInitNative();
    }

    @Override
@@ -81,6 +81,12 @@ public class HeadsetClientService extends ProfileService {

    @Override
    protected synchronized boolean start() {
        if (DBG) {
            Log.d(TAG, "start()");
        }
        // Setup the JNI service
        NativeInterface.initializeNative();

        mSmFactory = new HeadsetClientStateMachineFactory();
        mStateMachineMap.clear();

+0 −4
Original line number Diff line number Diff line
@@ -166,10 +166,6 @@ public class HeadsetClientStateMachine extends StateMachine {
        return mDisconnected;
    }

    static {
        NativeInterface.classInitNative();
    }

    public void dump(StringBuilder sb) {
        ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice);
        ProfileService.println(sb, "mAudioOn: " + mAudioOn);