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

Commit ec9ca392 authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz Committed by Automerger Merge Worker
Browse files

Fix warnings from Move scannerMap from GattService am: adacd755 am: e0b33caa

parents e20a4c63 e0b33caa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import java.util.UUID;
 * This class manages application callbacks and keeps track of GATT connections.
 * @hide
 */
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
public class ContextMap<C, T> {
    private static final String TAG = GattServiceConfig.TAG_PREFIX + "ContextMap";

+5 −9
Original line number Diff line number Diff line
@@ -2880,8 +2880,7 @@ public class GattService extends ProfileService {
    // Check and deliver scan results for different scan clients.
    private void deliverBatchScan(ScanClient client, Set<ScanResult> allResults)
            throws RemoteException {
        TransitionalScanHelper.ScannerMap.App app =
                mTransitionalScanHelper.getScannerMap().getById(client.scannerId);
        ContextMap.App app = mTransitionalScanHelper.getScannerMap().getById(client.scannerId);
        if (app == null) {
            return;
        }
@@ -3089,8 +3088,7 @@ public class GattService extends ProfileService {
    }

    void onScanParamSetupCompleted(int status, int scannerId) throws RemoteException {
        TransitionalScanHelper.ScannerMap.App app =
                mTransitionalScanHelper.getScannerMap().getById(scannerId);
        ContextMap.App app = mTransitionalScanHelper.getScannerMap().getById(scannerId);
        if (app == null || app.callback == null) {
            Log.e(TAG, "Advertise app or callback is null");
            return;
@@ -3317,8 +3315,7 @@ public class GattService extends ProfileService {
        scanClient.associatedDevices = getAssociatedDevices(callingPackage);

        AppScanStats app = mTransitionalScanHelper.getScannerMap().getAppScanStatsById(scannerId);
        TransitionalScanHelper.ScannerMap.App cbApp =
                mTransitionalScanHelper.getScannerMap().getById(scannerId);
        ContextMap.App cbApp = mTransitionalScanHelper.getScannerMap().getById(scannerId);
        if (app != null) {
            scanClient.stats = app;
            boolean isFilteredScan = (filters != null) && !filters.isEmpty();
@@ -3370,7 +3367,7 @@ public class GattService extends ProfileService {
            return;
        }

        TransitionalScanHelper.ScannerMap.App app =
        ContextMap.App app =
                mTransitionalScanHelper.getScannerMap().add(uuid, null, null, piInfo, this);

        app.mUserHandle = UserHandle.getUserHandleForUid(Binder.getCallingUid());
@@ -3479,8 +3476,7 @@ public class GattService extends ProfileService {
        }
        PendingIntentInfo pii = new PendingIntentInfo();
        pii.intent = intent;
        TransitionalScanHelper.ScannerMap.App app =
                mTransitionalScanHelper.getScannerMap().getByContextInfo(pii);
        ContextMap.App app = mTransitionalScanHelper.getScannerMap().getByContextInfo(pii);
        if (VDBG) {
            Log.d(TAG, "stopScan(PendingIntent): app found = " + app);
        }