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

Commit e7dd1e07 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Expose isCISCentralSupported() and isLePeriodicAdvertisingSyncTransferSenderSupported() API"

parents b9a36edf 7f33ae6f
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -2375,6 +2375,34 @@ public class AdapterService extends Service {
            return service.isLePeriodicAdvertisingSupported();
        }

        @Override
        public int isCisCentralSupported() {
            AdapterService service = getService();
            if (service == null) {
                return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED;
            }

            if (service.mAdapterProperties.isLeConnectedIsochronousStreamCentralSupported()) {
                return BluetoothStatusCodes.SUCCESS;
            }

            return BluetoothStatusCodes.ERROR_FEATURE_NOT_SUPPORTED;
        }

        @Override
        public int isLePeriodicAdvertisingSyncTransferSenderSupported() {
            AdapterService service = getService();
            if (service == null) {
                return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED;
            }

            if (service.mAdapterProperties.isLePeriodicAdvertisingSyncTransferSenderSupported()) {
                return BluetoothStatusCodes.SUCCESS;
            }

            return BluetoothStatusCodes.ERROR_FEATURE_NOT_SUPPORTED;
        }

        @Override
        public int getLeMaximumAdvertisingDataLength() {
            AdapterService service = getService();