Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −3 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -1364,7 +1365,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } return service.getConnectedDevices(); Loading @@ -1375,7 +1376,7 @@ public class A2dpService extends ProfileService { int[] states, AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); Loading Loading @@ -1467,7 +1468,7 @@ public class A2dpService extends ProfileService { public List<BluetoothCodecType> getSupportedCodecTypes(AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } enforceBluetoothPrivilegedPermission(service); Loading android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkService.java +3 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -248,7 +249,7 @@ public class A2dpSinkService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { A2dpSinkService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getConnectedDevices(); } Loading @@ -258,7 +259,7 @@ public class A2dpSinkService extends ProfileService { int[] states, AttributionSource source) { A2dpSinkService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); } Loading android/app/src/com/android/bluetooth/audio_util/helpers/Util.java +2 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ class Util { */ public static List<Metadata> toMetadataList(Context context, List<MediaSession.QueueItem> items) { ArrayList<Metadata> list = new ArrayList<Metadata>(); ArrayList<Metadata> list = new ArrayList<>(); if (items == null) return list; Loading @@ -125,7 +125,7 @@ class Util { Metadata data = toMetadata(context, items.get(i)); if (isEmptyData(data)) { Log.e(TAG, "Received an empty Metadata item in list. Returning an empty queue"); return new ArrayList<Metadata>(); return new ArrayList<>(); } data.trackNum = "" + (i + 1); data.numTracks = "" + items.size(); Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.UUID; Loading Loading @@ -382,7 +383,7 @@ public class AvrcpControllerService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { AvrcpControllerService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getConnectedDevices(); } Loading @@ -392,7 +393,7 @@ public class AvrcpControllerService extends ProfileService { int[] states, AttributionSource source) { AvrcpControllerService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); } Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ class AvrcpControllerStateMachine extends StateMachine { if (mCoverArtManager == null) return; AvrcpItem currentTrack = getCurrentTrack(); String currentTrackUuid = currentTrack != null ? currentTrack.getCoverArtUuid() : null; ArrayList<String> unusedArtwork = mBrowseTree.getAndClearUnusedCoverArt(); List<String> unusedArtwork = mBrowseTree.getAndClearUnusedCoverArt(); for (String uuid : unusedArtwork) { if (!uuid.equals(currentTrackUuid)) { mCoverArtManager.removeImage(mDevice, uuid); Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −3 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -1364,7 +1365,7 @@ public class A2dpService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } return service.getConnectedDevices(); Loading @@ -1375,7 +1376,7 @@ public class A2dpService extends ProfileService { int[] states, AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); Loading Loading @@ -1467,7 +1468,7 @@ public class A2dpService extends ProfileService { public List<BluetoothCodecType> getSupportedCodecTypes(AttributionSource source) { A2dpService service = getService(source); if (service == null) { return new ArrayList<>(); return Collections.emptyList(); } enforceBluetoothPrivilegedPermission(service); Loading
android/app/src/com/android/bluetooth/a2dpsink/A2dpSinkService.java +3 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; Loading Loading @@ -248,7 +249,7 @@ public class A2dpSinkService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { A2dpSinkService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getConnectedDevices(); } Loading @@ -258,7 +259,7 @@ public class A2dpSinkService extends ProfileService { int[] states, AttributionSource source) { A2dpSinkService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); } Loading
android/app/src/com/android/bluetooth/audio_util/helpers/Util.java +2 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ class Util { */ public static List<Metadata> toMetadataList(Context context, List<MediaSession.QueueItem> items) { ArrayList<Metadata> list = new ArrayList<Metadata>(); ArrayList<Metadata> list = new ArrayList<>(); if (items == null) return list; Loading @@ -125,7 +125,7 @@ class Util { Metadata data = toMetadata(context, items.get(i)); if (isEmptyData(data)) { Log.e(TAG, "Received an empty Metadata item in list. Returning an empty queue"); return new ArrayList<Metadata>(); return new ArrayList<>(); } data.trackNum = "" + (i + 1); data.numTracks = "" + items.size(); Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.internal.annotations.VisibleForTesting; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.UUID; Loading Loading @@ -382,7 +383,7 @@ public class AvrcpControllerService extends ProfileService { public List<BluetoothDevice> getConnectedDevices(AttributionSource source) { AvrcpControllerService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getConnectedDevices(); } Loading @@ -392,7 +393,7 @@ public class AvrcpControllerService extends ProfileService { int[] states, AttributionSource source) { AvrcpControllerService service = getService(source); if (service == null) { return new ArrayList<BluetoothDevice>(0); return Collections.emptyList(); } return service.getDevicesMatchingConnectionStates(states); } Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -371,7 +371,7 @@ class AvrcpControllerStateMachine extends StateMachine { if (mCoverArtManager == null) return; AvrcpItem currentTrack = getCurrentTrack(); String currentTrackUuid = currentTrack != null ? currentTrack.getCoverArtUuid() : null; ArrayList<String> unusedArtwork = mBrowseTree.getAndClearUnusedCoverArt(); List<String> unusedArtwork = mBrowseTree.getAndClearUnusedCoverArt(); for (String uuid : unusedArtwork) { if (!uuid.equals(currentTrackUuid)) { mCoverArtManager.removeImage(mDevice, uuid); Loading