Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ public class A2dpService extends ProfileService { // Protect setActiveDevice() so all invoked is handled squentially private final Object mActiveSwitchingGuard = new Object(); // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all A2DP devices: Bonded or Connected private static final int MAX_A2DP_STATE_MACHINES = 50; // Upper limit of all A2DP devices that are Connected or Connecting Loading Loading @@ -218,7 +221,7 @@ public class A2dpService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +4 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ public class CsipSetCoordinatorService extends ProfileService { private static final boolean DBG = false; private static final String TAG = "CsipSetCoordinatorService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all CSIP devices: Bonded or Connected private static final int MAX_CSIS_STATE_MACHINES = 10; private static CsipSetCoordinatorService sCsipSetCoordinatorService; Loading Loading @@ -184,7 +187,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +4 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public class HearingAidService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "HearingAidService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all HearingAid devices: Bonded or Connected private static final int MAX_HEARING_AID_STATE_MACHINES = 10; private static HearingAidService sHearingAidService; Loading Loading @@ -191,7 +194,7 @@ public class HearingAidService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −1 Original line number Diff line number Diff line Loading @@ -99,6 +99,9 @@ public class HeadsetService extends ProfileService { {BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_CONNECTED}; private static final int DIALING_OUT_TIMEOUT_MS = 10000; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; private int mMaxHeadsetConnections = 1; private BluetoothDevice mActiveDevice; private AdapterService mAdapterService; Loading Loading @@ -238,7 +241,7 @@ public class HeadsetService extends ProfileService { // Step 2: Stop handler thread try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +4 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ public class LeAudioService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "LeAudioService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all LeAudio devices: Bonded or Connected private static final int MAX_LE_AUDIO_STATE_MACHINES = 10; private static LeAudioService sLeAudioService; Loading Loading @@ -262,7 +265,7 @@ public class LeAudioService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,9 @@ public class A2dpService extends ProfileService { // Protect setActiveDevice() so all invoked is handled squentially private final Object mActiveSwitchingGuard = new Object(); // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all A2DP devices: Bonded or Connected private static final int MAX_A2DP_STATE_MACHINES = 50; // Upper limit of all A2DP devices that are Connected or Connecting Loading Loading @@ -218,7 +221,7 @@ public class A2dpService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading
android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +4 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,9 @@ public class CsipSetCoordinatorService extends ProfileService { private static final boolean DBG = false; private static final String TAG = "CsipSetCoordinatorService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all CSIP devices: Bonded or Connected private static final int MAX_CSIS_STATE_MACHINES = 10; private static CsipSetCoordinatorService sCsipSetCoordinatorService; Loading Loading @@ -184,7 +187,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading
android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +4 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public class HearingAidService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "HearingAidService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all HearingAid devices: Bonded or Connected private static final int MAX_HEARING_AID_STATE_MACHINES = 10; private static HearingAidService sHearingAidService; Loading Loading @@ -191,7 +194,7 @@ public class HearingAidService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −1 Original line number Diff line number Diff line Loading @@ -99,6 +99,9 @@ public class HeadsetService extends ProfileService { {BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_CONNECTED}; private static final int DIALING_OUT_TIMEOUT_MS = 10000; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; private int mMaxHeadsetConnections = 1; private BluetoothDevice mActiveDevice; private AdapterService mAdapterService; Loading Loading @@ -238,7 +241,7 @@ public class HeadsetService extends ProfileService { // Step 2: Stop handler thread try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +4 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ public class LeAudioService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "LeAudioService"; // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all LeAudio devices: Bonded or Connected private static final int MAX_LE_AUDIO_STATE_MACHINES = 10; private static LeAudioService sLeAudioService; Loading Loading @@ -262,7 +265,7 @@ public class LeAudioService extends ProfileService { if (mStateMachinesThread != null) { try { mStateMachinesThread.quitSafely(); mStateMachinesThread.join(); mStateMachinesThread.join(SM_THREAD_JOIN_TIMEOUT_MS); mStateMachinesThread = null; } catch (InterruptedException e) { // Do not rethrow as we are shutting down anyway Loading