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

Commit c1272a41 authored by Wei Wang's avatar Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug where batch scan wasn't stopped correctly." into nyc-dev

parents ee0a5030 021a59c7
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -235,12 +235,12 @@ public class ScanManager {
            Utils.enforceAdminPermission(mService);
            if (client == null) return;

            if (mRegularScanClients.contains(client)) {
                // The ScanClient passed in just holds the clientIf. We retrieve the real client,
                // which may have workSource set.
            client = mScanNative.getClient(client.clientIf);
                client = mScanNative.getRegularScanClient(client.clientIf);
                if (client == null) return;

            if (mRegularScanClients.contains(client)) {
                mScanNative.stopRegularScan(client);
                if (!mScanNative.isOpportunisticScanClient(client)) {
                    mScanNative.configureRegularScanParams();
@@ -647,8 +647,8 @@ public class ScanManager {
            removeScanFilters(client.clientIf);
        }

        // Find the scan client information
        ScanClient getClient(int clientIf) {
        // Find the regular scan client information.
        ScanClient getRegularScanClient(int clientIf) {
            for (ScanClient client : mRegularScanClients) {
              if (client.clientIf == clientIf) return client;
            }