Loading android/app/src/com/android/bluetooth/bass_client/BassClientStateMachine.java +2 −2 Original line number Diff line number Diff line Loading @@ -457,11 +457,11 @@ public class BassClientStateMachine extends StateMachine { subGroup.addChannel(channel.build()); } byte[] arrayCodecId = baseLevel2.codecId; long codeId = (long) ((arrayCodecId[4] & 0xff) << 32 long codeId = ((long) (arrayCodecId[4] & 0xff)) << 32 | (arrayCodecId[3] & 0xff) << 24 | (arrayCodecId[2] & 0xff) << 16 | (arrayCodecId[1] & 0xff) << 8 | (arrayCodecId[0] & 0xff)); | (arrayCodecId[0] & 0xff); subGroup.setCodecId(codeId); subGroup.setCodecSpecificConfig(BluetoothLeAudioCodecConfigMetadata. fromRawBytes(baseLevel2.codecConfigInfo)); Loading android/app/src/com/android/bluetooth/gatt/ScanManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.view.Display; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.BluetoothAdapterProxy; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayDeque; Loading Loading @@ -110,7 +111,9 @@ public class ScanManager { // Scan parameters for batch scan. private BatchScanParams mBatchScanParms; private Integer mCurUsedTrackableAdvertisements; private final Object mCurUsedTrackableAdvertisementsLock = new Object(); @GuardedBy("mCurUsedTrackableAdvertisementsLock") private int mCurUsedTrackableAdvertisements = 0; private final GattService mService; private final AdapterService mAdapterService; private BroadcastReceiver mBatchAlarmReceiver; Loading Loading @@ -157,7 +160,6 @@ public class ScanManager { Collections.newSetFromMap(new ConcurrentHashMap<ScanClient, Boolean>()); mService = service; mScanNative = new ScanNative(); mCurUsedTrackableAdvertisements = 0; mDm = mService.getSystemService(DisplayManager.class); mActivityManager = mService.getSystemService(ActivityManager.class); mLocationManager = mService.getSystemService(LocationManager.class); Loading Loading @@ -716,8 +718,10 @@ public class ScanManager { } public int getCurrentUsedTrackingAdvertisement() { synchronized (mCurUsedTrackableAdvertisementsLock) { return mCurUsedTrackableAdvertisements; } } private class ScanNative { Loading Loading @@ -1508,7 +1512,7 @@ public class ScanManager { boolean allocate) { int maxTotalTrackableAdvertisements = AdapterService.getAdapterService().getTotalNumOfTrackableAdvertisements(); synchronized (mCurUsedTrackableAdvertisements) { synchronized (mCurUsedTrackableAdvertisementsLock) { int availableEntries = maxTotalTrackableAdvertisements - mCurUsedTrackableAdvertisements; if (allocate) { Loading android/app/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessor.java +2 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.bluetooth.Utils; import java.util.HashMap; import java.util.Map; import java.util.Objects; class VendorCommandResponseProcessor { Loading Loading @@ -106,7 +107,7 @@ class VendorCommandResponseProcessor { // replace all white spaces commandWord = commandWord.replaceAll("\\s+", ""); if (SUPPORTED_VENDOR_AT_COMMANDS.get(commandWord) != (Integer) (vendorId)) { if (!Objects.equals(SUPPORTED_VENDOR_AT_COMMANDS.get(commandWord), vendorId)) { Log.e(TAG, "Invalid command " + atCommand + ", " + vendorId + ". Cand=" + commandWord); return false; Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +1 −1 Original line number Diff line number Diff line Loading @@ -752,7 +752,7 @@ public class LeAudioService extends ProfileService { } synchronized (mGroupLock) { for (Map.Entry<BluetoothDevice, Integer> entry : mDeviceGroupIdMap.entrySet()) { if (entry.getValue() != groupId) { if (!Objects.equals(entry.getValue(), groupId)) { continue; } LeAudioStateMachine sm = mStateMachines.get(entry.getKey()); Loading android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -673,7 +673,7 @@ class MceStateMachine extends StateMachine { case NEW_MESSAGE: // Infer the timestamp for this message as 'now' and read status false // instead of getting the message listing data for it if (!mMessages.contains(ev.getHandle())) { if (!mMessages.containsKey(ev.getHandle())) { Calendar calendar = Calendar.getInstance(); MessageMetadata metadata = new MessageMetadata(ev.getHandle(), calendar.getTime().getTime(), false); Loading Loading
android/app/src/com/android/bluetooth/bass_client/BassClientStateMachine.java +2 −2 Original line number Diff line number Diff line Loading @@ -457,11 +457,11 @@ public class BassClientStateMachine extends StateMachine { subGroup.addChannel(channel.build()); } byte[] arrayCodecId = baseLevel2.codecId; long codeId = (long) ((arrayCodecId[4] & 0xff) << 32 long codeId = ((long) (arrayCodecId[4] & 0xff)) << 32 | (arrayCodecId[3] & 0xff) << 24 | (arrayCodecId[2] & 0xff) << 16 | (arrayCodecId[1] & 0xff) << 8 | (arrayCodecId[0] & 0xff)); | (arrayCodecId[0] & 0xff); subGroup.setCodecId(codeId); subGroup.setCodecSpecificConfig(BluetoothLeAudioCodecConfigMetadata. fromRawBytes(baseLevel2.codecConfigInfo)); Loading
android/app/src/com/android/bluetooth/gatt/ScanManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.view.Display; import com.android.bluetooth.Utils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.BluetoothAdapterProxy; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayDeque; Loading Loading @@ -110,7 +111,9 @@ public class ScanManager { // Scan parameters for batch scan. private BatchScanParams mBatchScanParms; private Integer mCurUsedTrackableAdvertisements; private final Object mCurUsedTrackableAdvertisementsLock = new Object(); @GuardedBy("mCurUsedTrackableAdvertisementsLock") private int mCurUsedTrackableAdvertisements = 0; private final GattService mService; private final AdapterService mAdapterService; private BroadcastReceiver mBatchAlarmReceiver; Loading Loading @@ -157,7 +160,6 @@ public class ScanManager { Collections.newSetFromMap(new ConcurrentHashMap<ScanClient, Boolean>()); mService = service; mScanNative = new ScanNative(); mCurUsedTrackableAdvertisements = 0; mDm = mService.getSystemService(DisplayManager.class); mActivityManager = mService.getSystemService(ActivityManager.class); mLocationManager = mService.getSystemService(LocationManager.class); Loading Loading @@ -716,8 +718,10 @@ public class ScanManager { } public int getCurrentUsedTrackingAdvertisement() { synchronized (mCurUsedTrackableAdvertisementsLock) { return mCurUsedTrackableAdvertisements; } } private class ScanNative { Loading Loading @@ -1508,7 +1512,7 @@ public class ScanManager { boolean allocate) { int maxTotalTrackableAdvertisements = AdapterService.getAdapterService().getTotalNumOfTrackableAdvertisements(); synchronized (mCurUsedTrackableAdvertisements) { synchronized (mCurUsedTrackableAdvertisementsLock) { int availableEntries = maxTotalTrackableAdvertisements - mCurUsedTrackableAdvertisements; if (allocate) { Loading
android/app/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessor.java +2 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.bluetooth.Utils; import java.util.HashMap; import java.util.Map; import java.util.Objects; class VendorCommandResponseProcessor { Loading Loading @@ -106,7 +107,7 @@ class VendorCommandResponseProcessor { // replace all white spaces commandWord = commandWord.replaceAll("\\s+", ""); if (SUPPORTED_VENDOR_AT_COMMANDS.get(commandWord) != (Integer) (vendorId)) { if (!Objects.equals(SUPPORTED_VENDOR_AT_COMMANDS.get(commandWord), vendorId)) { Log.e(TAG, "Invalid command " + atCommand + ", " + vendorId + ". Cand=" + commandWord); return false; Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +1 −1 Original line number Diff line number Diff line Loading @@ -752,7 +752,7 @@ public class LeAudioService extends ProfileService { } synchronized (mGroupLock) { for (Map.Entry<BluetoothDevice, Integer> entry : mDeviceGroupIdMap.entrySet()) { if (entry.getValue() != groupId) { if (!Objects.equals(entry.getValue(), groupId)) { continue; } LeAudioStateMachine sm = mStateMachines.get(entry.getKey()); Loading
android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -673,7 +673,7 @@ class MceStateMachine extends StateMachine { case NEW_MESSAGE: // Infer the timestamp for this message as 'now' and read status false // instead of getting the message listing data for it if (!mMessages.contains(ev.getHandle())) { if (!mMessages.containsKey(ev.getHandle())) { Calendar calendar = Calendar.getInstance(); MessageMetadata metadata = new MessageMetadata(ev.getHandle(), calendar.getTime().getTime(), false); Loading