Loading android/app/src/com/android/bluetooth/bas/BatteryService.java +1 −9 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ public class BatteryService extends ProfileService { // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1_000; private static final int MAX_BATTERY_STATE_MACHINES = 10; private static BatteryService sBatteryService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; Loading Loading @@ -411,14 +410,7 @@ public class BatteryService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_BATTERY_STATE_MACHINES) { Log.e( TAG, "Maximum number of Battery state machines reached: " + MAX_BATTERY_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = BatteryStateMachine.make(device, this, mStateMachinesThread.getLooper()); mStateMachines.put(device, sm); Loading android/app/src/com/android/bluetooth/bass_client/BassClientService.java +1 −9 Original line number Diff line number Diff line Loading @@ -99,7 +99,6 @@ import java.util.concurrent.ConcurrentHashMap; /** Broacast Assistant Scan Service */ public class BassClientService extends ProfileService { private static final String TAG = BassClientService.class.getSimpleName(); private static final int MAX_BASS_CLIENT_STATE_MACHINES = 10; private static final int MAX_ACTIVE_SYNCED_SOURCES_NUM = 4; private static final int MAX_BIS_DISCOVERY_TRIES_NUM = 5; Loading Loading @@ -1160,14 +1159,7 @@ public class BassClientService extends ProfileService { if (stateMachine != null) { return stateMachine; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_BASS_CLIENT_STATE_MACHINES) { Log.e( TAG, "Maximum number of Bassclient state machines reached: " + MAX_BASS_CLIENT_STATE_MACHINES); return null; } log("Creating a new state machine for " + device); stateMachine = BassObjectsFactory.getInstance() Loading android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +1 −10 Original line number Diff line number Diff line Loading @@ -73,8 +73,6 @@ public class CsipSetCoordinatorService extends ProfileService { // 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; private Handler mHandler = null; Loading Loading @@ -904,14 +902,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_CSIS_STATE_MACHINES) { Log.e( TAG, "Maximum number of CSIS state machines reached: " + MAX_CSIS_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = CsipSetCoordinatorStateMachine.make( Loading android/app/src/com/android/bluetooth/vc/VolumeControlService.java +1 −10 Original line number Diff line number Diff line Loading @@ -75,8 +75,6 @@ public class VolumeControlService extends ProfileService { // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all VolumeControl devices: Bonded or Connected private static final int MAX_VC_STATE_MACHINES = 10; private static final int LE_AUDIO_MAX_VOL = 255; private static VolumeControlService sVolumeControlService; Loading Loading @@ -1209,14 +1207,7 @@ public class VolumeControlService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_VC_STATE_MACHINES) { Log.e( TAG, "Maximum number of VolumeControl state machines reached: " + MAX_VC_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = VolumeControlStateMachine.make( Loading Loading
android/app/src/com/android/bluetooth/bas/BatteryService.java +1 −9 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ public class BatteryService extends ProfileService { // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1_000; private static final int MAX_BATTERY_STATE_MACHINES = 10; private static BatteryService sBatteryService; private AdapterService mAdapterService; private DatabaseManager mDatabaseManager; Loading Loading @@ -411,14 +410,7 @@ public class BatteryService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_BATTERY_STATE_MACHINES) { Log.e( TAG, "Maximum number of Battery state machines reached: " + MAX_BATTERY_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = BatteryStateMachine.make(device, this, mStateMachinesThread.getLooper()); mStateMachines.put(device, sm); Loading
android/app/src/com/android/bluetooth/bass_client/BassClientService.java +1 −9 Original line number Diff line number Diff line Loading @@ -99,7 +99,6 @@ import java.util.concurrent.ConcurrentHashMap; /** Broacast Assistant Scan Service */ public class BassClientService extends ProfileService { private static final String TAG = BassClientService.class.getSimpleName(); private static final int MAX_BASS_CLIENT_STATE_MACHINES = 10; private static final int MAX_ACTIVE_SYNCED_SOURCES_NUM = 4; private static final int MAX_BIS_DISCOVERY_TRIES_NUM = 5; Loading Loading @@ -1160,14 +1159,7 @@ public class BassClientService extends ProfileService { if (stateMachine != null) { return stateMachine; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_BASS_CLIENT_STATE_MACHINES) { Log.e( TAG, "Maximum number of Bassclient state machines reached: " + MAX_BASS_CLIENT_STATE_MACHINES); return null; } log("Creating a new state machine for " + device); stateMachine = BassObjectsFactory.getInstance() Loading
android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +1 −10 Original line number Diff line number Diff line Loading @@ -73,8 +73,6 @@ public class CsipSetCoordinatorService extends ProfileService { // 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; private Handler mHandler = null; Loading Loading @@ -904,14 +902,7 @@ public class CsipSetCoordinatorService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_CSIS_STATE_MACHINES) { Log.e( TAG, "Maximum number of CSIS state machines reached: " + MAX_CSIS_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = CsipSetCoordinatorStateMachine.make( Loading
android/app/src/com/android/bluetooth/vc/VolumeControlService.java +1 −10 Original line number Diff line number Diff line Loading @@ -75,8 +75,6 @@ public class VolumeControlService extends ProfileService { // Timeout for state machine thread join, to prevent potential ANR. private static final int SM_THREAD_JOIN_TIMEOUT_MS = 1000; // Upper limit of all VolumeControl devices: Bonded or Connected private static final int MAX_VC_STATE_MACHINES = 10; private static final int LE_AUDIO_MAX_VOL = 255; private static VolumeControlService sVolumeControlService; Loading Loading @@ -1209,14 +1207,7 @@ public class VolumeControlService extends ProfileService { if (sm != null) { return sm; } // Limit the maximum number of state machines to avoid DoS attack if (mStateMachines.size() >= MAX_VC_STATE_MACHINES) { Log.e( TAG, "Maximum number of VolumeControl state machines reached: " + MAX_VC_STATE_MACHINES); return null; } Log.d(TAG, "Creating a new state machine for " + device); sm = VolumeControlStateMachine.make( Loading