Loading android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +22 −23 Original line number Diff line number Diff line Loading @@ -779,11 +779,11 @@ public class CsipSetCoordinatorService extends ProfileService { Log.d(TAG, "notifySetMemberAvailable: " + device + ", " + groupId); /* Sent intent as well */ Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_SET_MEMBER_AVAILABLE); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId); intent.addFlags( Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_SET_MEMBER_AVAILABLE) .putExtra(BluetoothDevice.EXTRA_DEVICE, device) .putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId) .addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); Loading @@ -796,25 +796,31 @@ public class CsipSetCoordinatorService extends ProfileService { BluetoothDevice device = stackEvent.device; Log.d(TAG, "Message from native: " + stackEvent); Intent intent = null; int groupId = stackEvent.valueInt1; if (stackEvent.type == CsipSetCoordinatorStackEvent.EVENT_TYPE_DEVICE_AVAILABLE) { requireNonNull(device); intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_DEVICE_AVAILABLE); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stackEvent.device); intent.putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId); intent.putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_SIZE, stackEvent.valueInt2); intent.putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_TYPE_UUID, stackEvent.valueUuid1); handleDeviceAvailable( device, groupId, stackEvent.valueInt3, stackEvent.valueUuid1, stackEvent.valueInt2); Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_DEVICE_AVAILABLE) .putExtra(BluetoothDevice.EXTRA_DEVICE, stackEvent.device) .putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId) .putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_SIZE, stackEvent.valueInt2) .putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_TYPE_UUID, stackEvent.valueUuid1) .addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); } else if (stackEvent.type == CsipSetCoordinatorStackEvent.EVENT_TYPE_SET_MEMBER_AVAILABLE) { requireNonNull(device); Loading @@ -830,13 +836,6 @@ public class CsipSetCoordinatorService extends ProfileService { handleGroupLockChanged(groupId, lock_status, lock_state); } if (intent != null) { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); } synchronized (mStateMachines) { CsipSetCoordinatorStateMachine sm = mStateMachines.get(device); Loading Loading
android/app/src/com/android/bluetooth/csip/CsipSetCoordinatorService.java +22 −23 Original line number Diff line number Diff line Loading @@ -779,11 +779,11 @@ public class CsipSetCoordinatorService extends ProfileService { Log.d(TAG, "notifySetMemberAvailable: " + device + ", " + groupId); /* Sent intent as well */ Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_SET_MEMBER_AVAILABLE); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId); intent.addFlags( Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_SET_MEMBER_AVAILABLE) .putExtra(BluetoothDevice.EXTRA_DEVICE, device) .putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId) .addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); Loading @@ -796,25 +796,31 @@ public class CsipSetCoordinatorService extends ProfileService { BluetoothDevice device = stackEvent.device; Log.d(TAG, "Message from native: " + stackEvent); Intent intent = null; int groupId = stackEvent.valueInt1; if (stackEvent.type == CsipSetCoordinatorStackEvent.EVENT_TYPE_DEVICE_AVAILABLE) { requireNonNull(device); intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_DEVICE_AVAILABLE); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, stackEvent.device); intent.putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId); intent.putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_SIZE, stackEvent.valueInt2); intent.putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_TYPE_UUID, stackEvent.valueUuid1); handleDeviceAvailable( device, groupId, stackEvent.valueInt3, stackEvent.valueUuid1, stackEvent.valueInt2); Intent intent = new Intent(BluetoothCsipSetCoordinator.ACTION_CSIS_DEVICE_AVAILABLE) .putExtra(BluetoothDevice.EXTRA_DEVICE, stackEvent.device) .putExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, groupId) .putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_SIZE, stackEvent.valueInt2) .putExtra( BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_TYPE_UUID, stackEvent.valueUuid1) .addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); } else if (stackEvent.type == CsipSetCoordinatorStackEvent.EVENT_TYPE_SET_MEMBER_AVAILABLE) { requireNonNull(device); Loading @@ -830,13 +836,6 @@ public class CsipSetCoordinatorService extends ProfileService { handleGroupLockChanged(groupId, lock_status, lock_state); } if (intent != null) { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendOrderedBroadcast(intent, BLUETOOTH_PRIVILEGED); } synchronized (mStateMachines) { CsipSetCoordinatorStateMachine sm = mStateMachines.get(device); Loading