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

Commit cfe372b9 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Get rid of ResultStorageDescriptor

It's never used

Bug: 192615539
Merged-In: Id8155f666f28cbecab414e6c074a1a7ea74cd947
Change-Id: Id8155f666f28cbecab414e6c074a1a7ea74cd947
parent b28f7132
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import android.bluetooth.le.IAdvertisingSetCallback;
import android.bluetooth.le.IPeriodicAdvertisingCallback;
import android.bluetooth.le.IScannerCallback;
import android.bluetooth.le.PeriodicAdvertisingParameters;
import android.bluetooth.le.ResultStorageDescriptor;
import android.bluetooth.le.ScanCallback;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanRecord;
@@ -502,12 +501,12 @@ public class GattService extends ProfileService {

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

@@ -2136,7 +2135,7 @@ public class GattService extends ProfileService {
    }

    void startScan(int scannerId, ScanSettings settings, List<ScanFilter> filters,
            List<List<ResultStorageDescriptor>> storages, String callingPackage,
            String callingPackage,
            @Nullable String callingFeatureId) {
        if (DBG) {
            Log.d(TAG, "start scan with filters");
@@ -2148,7 +2147,7 @@ public class GattService extends ProfileService {
        }
        settings = enforceReportDelayFloor(settings);
        enforcePrivilegedPermissionIfNeeded(filters);
        final ScanClient scanClient = new ScanClient(scannerId, settings, filters, storages);
        final ScanClient scanClient = new ScanClient(scannerId, settings, filters);
        scanClient.userHandle = Binder.getCallingUserHandle();
        mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
        scanClient.eligibleForSanitizedExposureNotification =
@@ -2246,7 +2245,7 @@ public class GattService extends ProfileService {
    void continuePiStartScan(int scannerId, ScannerMap.App app) {
        final PendingIntentInfo piInfo = app.info;
        final ScanClient scanClient =
                new ScanClient(scannerId, piInfo.settings, piInfo.filters, null);
                new ScanClient(scannerId, piInfo.settings, piInfo.filters);
        scanClient.hasLocationPermission = app.hasLocationPermission;
        scanClient.userHandle = app.mUserHandle;
        scanClient.isQApp = app.mIsQApp;
+1 −9
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.bluetooth.gatt;

import android.bluetooth.le.ResultStorageDescriptor;
import android.bluetooth.le.ScanFilter;
import android.bluetooth.le.ScanSettings;
import android.os.Binder;
@@ -36,7 +35,6 @@ import java.util.Objects;
    public ScanSettings passiveSettings;
    public int appUid;
    public List<ScanFilter> filters;
    public List<List<ResultStorageDescriptor>> storages;
    // App associated with the scan client died.
    public boolean appDied;
    public boolean hasLocationPermission;
@@ -54,20 +52,14 @@ import java.util.Objects;
            new ScanSettings.Builder().setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY).build();

    ScanClient(int scannerId) {
        this(scannerId, DEFAULT_SCAN_SETTINGS, null, null);
        this(scannerId, DEFAULT_SCAN_SETTINGS, null);
    }

    ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters) {
        this(scannerId, settings, filters, null);
    }

    ScanClient(int scannerId, ScanSettings settings, List<ScanFilter> filters,
            List<List<ResultStorageDescriptor>> storages) {
        this.scannerId = scannerId;
        this.settings = settings;
        this.passiveSettings = null;
        this.filters = filters;
        this.storages = storages;
        this.appUid = Binder.getCallingUid();
    }