Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +11 −11 Original line number Diff line number Diff line Loading @@ -57,16 +57,16 @@ public class A2dpService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "A2dpService"; private BluetoothAdapter mAdapter = null; private HandlerThread mStateMachinesThread = null; private BluetoothAdapter mAdapter; private HandlerThread mStateMachinesThread; private Avrcp mAvrcp; @VisibleForTesting A2dpNativeInterface mA2dpNativeInterface = null; A2dpNativeInterface mA2dpNativeInterface; private AudioManager mAudioManager; private A2dpCodecConfig mA2dpCodecConfig = null; private BluetoothDevice mActiveDevice = null; private A2dpCodecConfig mA2dpCodecConfig; private BluetoothDevice mActiveDevice; private final ConcurrentMap<BluetoothDevice, A2dpStateMachine> mStateMachines = new ConcurrentHashMap<>(); Loading @@ -76,8 +76,8 @@ public class A2dpService extends ProfileService { // Upper limit of all A2DP devices that are Connected or Connecting private int mMaxConnectedAudioDevices = 1; private BroadcastReceiver mBondStateChangedReceiver = null; private BroadcastReceiver mConnectionStateChangedReceiver = null; private BroadcastReceiver mBondStateChangedReceiver; private BroadcastReceiver mConnectionStateChangedReceiver; public A2dpService() { mA2dpNativeInterface = A2dpNativeInterface.getInstance(); Loading Loading @@ -252,7 +252,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); List<BluetoothDevice> devices = new ArrayList<>(); for (A2dpStateMachine sm : mStateMachines.values()) { if (sm.isConnected()) { devices.add(sm.getDevice()); Loading Loading @@ -294,7 +294,7 @@ public class A2dpService extends ProfileService { List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); List<BluetoothDevice> devices = new ArrayList<>(); Set<BluetoothDevice> bondedDevices = mAdapter.getBondedDevices(); for (BluetoothDevice device : bondedDevices) { Loading Loading @@ -835,7 +835,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices() { A2dpService service = getService(); if (service == null) { return new ArrayList<BluetoothDevice>(0); return new ArrayList<>(0); } return service.getConnectedDevices(); } Loading @@ -844,7 +844,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { A2dpService service = getService(); if (service == null) { return new ArrayList<BluetoothDevice>(0); return new ArrayList<>(0); } return service.getDevicesMatchingConnectionStates(states); } Loading android/app/src/com/android/bluetooth/a2dp/A2dpStackEvent.java +2 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,9 @@ public class A2dpStackEvent { static final int AUDIO_STATE_STARTED = 2; public int type = EVENT_TYPE_NONE; public BluetoothDevice device = null; public BluetoothDevice device; public int valueInt = 0; public BluetoothCodecStatus codecStatus = null; public BluetoothCodecStatus codecStatus; A2dpStackEvent(int type) { this.type = type; Loading android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ final class A2dpStateMachine extends StateMachine { private final BluetoothDevice mDevice; private boolean mIsPlaying = false; private BluetoothCodecStatus mCodecStatus = null; private BluetoothCodecStatus mCodecStatus; A2dpStateMachine(BluetoothDevice device, A2dpService svc, Context context, A2dpNativeInterface a2dpNativeInterface, Looper looper) { Loading android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class A2dpServiceTest { private BluetoothDevice mTestDevice; private static final int TIMEOUT_MS = 1000; // 1s private BroadcastReceiver mConnectionStateChangedReceiver = null; private BroadcastReceiver mConnectionStateChangedReceiver; private final BlockingQueue<Intent> mConnectionStateChangedQueue = new LinkedBlockingQueue<>(); @Mock private AdapterService mAdapterService; Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +11 −11 Original line number Diff line number Diff line Loading @@ -57,16 +57,16 @@ public class A2dpService extends ProfileService { private static final boolean DBG = true; private static final String TAG = "A2dpService"; private BluetoothAdapter mAdapter = null; private HandlerThread mStateMachinesThread = null; private BluetoothAdapter mAdapter; private HandlerThread mStateMachinesThread; private Avrcp mAvrcp; @VisibleForTesting A2dpNativeInterface mA2dpNativeInterface = null; A2dpNativeInterface mA2dpNativeInterface; private AudioManager mAudioManager; private A2dpCodecConfig mA2dpCodecConfig = null; private BluetoothDevice mActiveDevice = null; private A2dpCodecConfig mA2dpCodecConfig; private BluetoothDevice mActiveDevice; private final ConcurrentMap<BluetoothDevice, A2dpStateMachine> mStateMachines = new ConcurrentHashMap<>(); Loading @@ -76,8 +76,8 @@ public class A2dpService extends ProfileService { // Upper limit of all A2DP devices that are Connected or Connecting private int mMaxConnectedAudioDevices = 1; private BroadcastReceiver mBondStateChangedReceiver = null; private BroadcastReceiver mConnectionStateChangedReceiver = null; private BroadcastReceiver mBondStateChangedReceiver; private BroadcastReceiver mConnectionStateChangedReceiver; public A2dpService() { mA2dpNativeInterface = A2dpNativeInterface.getInstance(); Loading Loading @@ -252,7 +252,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); List<BluetoothDevice> devices = new ArrayList<>(); for (A2dpStateMachine sm : mStateMachines.values()) { if (sm.isConnected()) { devices.add(sm.getDevice()); Loading Loading @@ -294,7 +294,7 @@ public class A2dpService extends ProfileService { List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); List<BluetoothDevice> devices = new ArrayList<>(); Set<BluetoothDevice> bondedDevices = mAdapter.getBondedDevices(); for (BluetoothDevice device : bondedDevices) { Loading Loading @@ -835,7 +835,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices() { A2dpService service = getService(); if (service == null) { return new ArrayList<BluetoothDevice>(0); return new ArrayList<>(0); } return service.getConnectedDevices(); } Loading @@ -844,7 +844,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { A2dpService service = getService(); if (service == null) { return new ArrayList<BluetoothDevice>(0); return new ArrayList<>(0); } return service.getDevicesMatchingConnectionStates(states); } Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStackEvent.java +2 −2 Original line number Diff line number Diff line Loading @@ -42,9 +42,9 @@ public class A2dpStackEvent { static final int AUDIO_STATE_STARTED = 2; public int type = EVENT_TYPE_NONE; public BluetoothDevice device = null; public BluetoothDevice device; public int valueInt = 0; public BluetoothCodecStatus codecStatus = null; public BluetoothCodecStatus codecStatus; A2dpStackEvent(int type) { this.type = type; Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ final class A2dpStateMachine extends StateMachine { private final BluetoothDevice mDevice; private boolean mIsPlaying = false; private BluetoothCodecStatus mCodecStatus = null; private BluetoothCodecStatus mCodecStatus; A2dpStateMachine(BluetoothDevice device, A2dpService svc, Context context, A2dpNativeInterface a2dpNativeInterface, Looper looper) { Loading
android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class A2dpServiceTest { private BluetoothDevice mTestDevice; private static final int TIMEOUT_MS = 1000; // 1s private BroadcastReceiver mConnectionStateChangedReceiver = null; private BroadcastReceiver mConnectionStateChangedReceiver; private final BlockingQueue<Intent> mConnectionStateChangedQueue = new LinkedBlockingQueue<>(); @Mock private AdapterService mAdapterService; Loading