Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +8 −4 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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; } Loading @@ -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); Loading @@ -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) { Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +8 −4 Original line number Diff line number Diff line Loading @@ -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()); Loading @@ -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; } Loading @@ -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); Loading @@ -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) { Loading