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

Commit 77980b9e authored by Wei Wang's avatar Wei Wang Committed by Android Git Automerger
Browse files

am a52a1095: Merge "fix build." into lmp-dev

* commit 'a52a1095':
  fix build.
parents fa4a4359 a52a1095
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.bluetooth.IBluetoothGattServerCallback;
import android.bluetooth.le.AdvertiseCallback;
import android.bluetooth.le.AdvertiseData;
import android.bluetooth.le.AdvertiseSettings;
import android.bluetooth.le.ResultStorageDescriptor;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanRecord;
import android.bluetooth.le.ScanResult;
@@ -300,10 +301,10 @@ public class GattService extends ProfileService {

        @Override
        public void startScan(int appIf, boolean isServer, ScanSettings settings,
                List<ScanFilter> filters) {
                List<ScanFilter> filters, List storages) {
            GattService service = getService();
            if (service == null) return;
            service.startScan(appIf, isServer, settings, filters);
            service.startScan(appIf, isServer, settings, filters, storages);
        }

        public void stopScan(int appIf, boolean isServer) {
@@ -1278,10 +1279,10 @@ public class GattService extends ProfileService {
    }

    void startScan(int appIf, boolean isServer, ScanSettings settings,
            List<ScanFilter> filters) {
            List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages) {
        if (DBG) Log.d(TAG, "start scan with filters");
        enforceAdminPermission();
        mScanManager.startScan(new ScanClient(appIf, isServer, settings, filters));
        mScanManager.startScan(new ScanClient(appIf, isServer, settings, filters, storages));
    }

    void flushPendingBatchResults(int clientIf, boolean isServer) {
+13 −5
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.bluetooth.gatt;

import android.bluetooth.le.ResultStorageDescriptor;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanSettings;

@@ -34,31 +35,38 @@ import java.util.UUID;
    UUID[] uuids;
    ScanSettings settings;
    List<ScanFilter> filters;
    List<List<ResultStorageDescriptor>> storages;

    private static final ScanSettings DEFAULT_SCAN_SETTINGS = new ScanSettings.Builder()
            .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build();

    ScanClient(int appIf, boolean isServer) {
        this(appIf, isServer, new UUID[0], DEFAULT_SCAN_SETTINGS, null);
        this(appIf, isServer, new UUID[0], DEFAULT_SCAN_SETTINGS, null, null);
    }

    ScanClient(int appIf, boolean isServer, UUID[] uuids) {
        this(appIf, isServer, uuids, DEFAULT_SCAN_SETTINGS, null);
        this(appIf, isServer, uuids, DEFAULT_SCAN_SETTINGS, null, null);
    }

    ScanClient(int appIf, boolean isServer, ScanSettings settings,
            List<ScanFilter> filters) {
        this(appIf, isServer, new UUID[0], settings, filters);
        this(appIf, isServer, new UUID[0], settings, filters, null);
    }


    ScanClient(int appIf, boolean isServer, ScanSettings settings,
            List<ScanFilter> filters,  List<List<ResultStorageDescriptor>> storages) {
        this(appIf, isServer, new UUID[0], settings, filters, storages);
    }

    private ScanClient(int appIf, boolean isServer, UUID[] uuids, ScanSettings settings,
            List<ScanFilter> filters) {
            List<ScanFilter> filters, List<List<ResultStorageDescriptor>> storages) {
        this.clientIf = appIf;
        this.isServer = isServer;
        this.uuids = uuids;
        this.settings = settings;
        this.filters = filters;

        this.storages = storages;
    }

    @Override