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

Commit 52b36a7c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Clear A2DP active device during start/stop in the native stack"

parents 5a671020 a2783584
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -121,9 +121,8 @@ public class A2dpService extends ProfileService {
        mStateMachinesThread = new HandlerThread("A2dpService.StateMachines");
        mStateMachinesThread.start();

        // Step 5: Setup codec config and clear active device
        // Step 5: Setup codec config
        mA2dpCodecConfig = new A2dpCodecConfig(this, mA2dpNativeInterface);
        mActiveDevice = null;

        // Step 6: Initialize native interface
        mA2dpNativeInterface.init(mA2dpCodecConfig.codecConfigPriorities());
@@ -141,6 +140,9 @@ public class A2dpService extends ProfileService {
        // Step 8: Mark service as started
        setA2dpService(this);

        // Step 9: Clear active device
        setActiveDevice(null);

        return true;
    }

@@ -152,6 +154,9 @@ public class A2dpService extends ProfileService {
            return true;
        }

        // Step 9: Clear active device
        setActiveDevice(null);

        // Step 8: Mark service as stopped
        setA2dpService(null);

@@ -165,9 +170,8 @@ public class A2dpService extends ProfileService {
        mA2dpNativeInterface.cleanup();
        mA2dpNativeInterface = null;

        // Step 5: Clear codec config and active device
        // Step 5: Clear codec config
        mA2dpCodecConfig = null;
        mActiveDevice = null;

        // Step 4: Destroy state machines and stop handler thread
        synchronized (mStateMachines) {