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

Commit 617b708e authored by Prerepa Viswanadham's avatar Prerepa Viswanadham
Browse files

Obtain capabilities from BLE chipset for it's support of various features

Change-Id: I594790bd837a22488c1e080e340cb1c66ed4367b
parent 0ade0e52
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -76,6 +76,9 @@ public class AdapterService extends Service {
    private static final String TAG = "BluetoothAdapterService";
    private static final boolean DBG = false;
    private static final boolean TRACE_REF = true;
    private static final int MIN_ADVT_INSTANCES_FOR_MA = 5;
    private static final int MIN_OFFLOADED_FILTERS = 10;
    private static final int MIN_OFFLOADED_SCAN_STORAGE_BYTES = 2048;
    //For Debugging only
    private static int sRefCount=0;

@@ -986,6 +989,27 @@ public class AdapterService extends Service {
             if (service == null) return ;
             service.unregisterCallback(cb);
         }

         public boolean isMultiAdvertisementSupported() {
             AdapterService service = getService();
             if (service == null) return false;
             int val = service.getNumOfAdvertisementInstancesSupported();
             return (val >= MIN_ADVT_INSTANCES_FOR_MA);
         }

         public boolean isOffloadedFilteringSupported() {
             AdapterService service = getService();
             if (service == null) return false;
             int val = service.getNumOfOffloadedScanFilterSupported();
             return (val >= MIN_OFFLOADED_FILTERS);
         }

         public boolean isOffloadedScanBatchingSupported() {
             AdapterService service = getService();
             if (service == null) return false;
             int val = service.getOffloadedScanResultStorage();
             return (val >= MIN_OFFLOADED_SCAN_STORAGE_BYTES);
         }
    };