Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de9ad043 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove hidden dependency ArrayUtils wtfStack" am: 2925ef43

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1826249

Change-Id: Iba8e5c897cddb169dd8cdec1245ac6254fdbdea2
parents b407a2cd 2925ef43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ public class CsipSetCoordinatorNativeInterface {
    private CsipSetCoordinatorNativeInterface() {
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        if (mAdapter == null) {
            Log.wtfStack(TAG, "No Bluetooth Adapter Available");
            Log.wtf(TAG, "No Bluetooth Adapter Available");
        }
    }

+2 −3
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.btservice.ProfileService;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;

import java.util.ArrayList;
import java.util.HashMap;
@@ -246,7 +245,7 @@ public class CsipSetCoordinatorService extends ProfileService {
            return false;
        }
        ParcelUuid[] featureUuids = mAdapterService.getRemoteUuids(device);
        if (!ArrayUtils.contains(featureUuids, BluetoothUuid.COORDINATED_SET)) {
        if (!Utils.arrayContains(featureUuids, BluetoothUuid.COORDINATED_SET)) {
            Log.e(TAG, "Cannot connect to " + device + " : Remote does not have CSIS UUID");
            return false;
        }
@@ -342,7 +341,7 @@ public class CsipSetCoordinatorService extends ProfileService {
        synchronized (mStateMachines) {
            for (BluetoothDevice device : bondedDevices) {
                final ParcelUuid[] featureUuids = device.getUuids();
                if (!ArrayUtils.contains(featureUuids, BluetoothUuid.COORDINATED_SET)) {
                if (!Utils.arrayContains(featureUuids, BluetoothUuid.COORDINATED_SET)) {
                    continue;
                }
                int connectionState = BluetoothProfile.STATE_DISCONNECTED;
+4 −4
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ public class CsipSetCoordinatorStateMachine extends StateMachine {
                        Log.d(TAG, "Disconnected: stack event: " + event);
                    }
                    if (!mDevice.equals(event.device)) {
                        Log.wtfStack(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                        Log.wtf(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                    }
                    switch (event.type) {
                        case CsipSetCoordinatorStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED:
@@ -270,7 +270,7 @@ public class CsipSetCoordinatorStateMachine extends StateMachine {
                    CsipSetCoordinatorStackEvent event = (CsipSetCoordinatorStackEvent) message.obj;
                    log("Connecting: stack event: " + event);
                    if (!mDevice.equals(event.device)) {
                        Log.wtfStack(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                        Log.wtf(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                    }
                    switch (event.type) {
                        case CsipSetCoordinatorStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED:
@@ -356,7 +356,7 @@ public class CsipSetCoordinatorStateMachine extends StateMachine {
                    CsipSetCoordinatorStackEvent event = (CsipSetCoordinatorStackEvent) message.obj;
                    log("Disconnecting: stack event: " + event);
                    if (!mDevice.equals(event.device)) {
                        Log.wtfStack(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                        Log.wtf(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                    }
                    switch (event.type) {
                        case CsipSetCoordinatorStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED:
@@ -453,7 +453,7 @@ public class CsipSetCoordinatorStateMachine extends StateMachine {
                    CsipSetCoordinatorStackEvent event = (CsipSetCoordinatorStackEvent) message.obj;
                    log("Connected: stack event: " + event);
                    if (!mDevice.equals(event.device)) {
                        Log.wtfStack(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                        Log.wtf(TAG, "Device(" + mDevice + "): event mismatch: " + event);
                    }
                    switch (event.type) {
                        case CsipSetCoordinatorStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED: