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

Commit 17dcff6b authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Reduce logspam for background scans" am: 38f103e2

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2007274

Change-Id: Ic2e9a8816138827b5b71d6b23b03afa20f2f18a7
parents d192bcc1 38f103e2
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -1778,7 +1778,9 @@ public class GattService extends ProfileService {
        for (ScanClient client : mScanManager.getRegularScanQueue()) {
            ScannerMap.App app = mScannerMap.getById(client.scannerId);
            if (app == null) {
                Log.i(TAG, "App is null; skip.");
                if (VDBG) {
                    Log.d(TAG, "App is null; skip.");
                }
                continue;
            }

@@ -1790,7 +1792,9 @@ public class GattService extends ProfileService {
            if (settings.getLegacy()) {
                if ((eventType & ET_LEGACY_MASK) == 0) {
                    // If this is legacy scan, but nonlegacy result - skip.
                    Log.i(TAG, "Legacy scan, non legacy result; skip.");
                    if (VDBG) {
                        Log.d(TAG, "Legacy scan, non legacy result; skip.");
                    }
                    continue;
                } else {
                    // Some apps are used to fixed-size advertise data.
@@ -1831,8 +1835,10 @@ public class GattService extends ProfileService {
            }
            MatchResult matchResult = matchesFilters(client, result, originalAddress);
            if (!hasPermission || !matchResult.getMatches()) {
                Log.i(TAG, "Skipping client: permission="
                if (VDBG) {
                    Log.d(TAG, "Skipping client: permission="
                            + hasPermission + " matches=" + matchResult.getMatches());
                }
                continue;
            }

@@ -1844,7 +1850,9 @@ public class GattService extends ProfileService {
            }

            if ((settings.getCallbackType() & ScanSettings.CALLBACK_TYPE_ALL_MATCHES) == 0) {
                Log.i(TAG, "Skipping client: CALLBACK_TYPE_ALL_MATCHES");
                if (VDBG) {
                    Log.d(TAG, "Skipping client: CALLBACK_TYPE_ALL_MATCHES");
                }
                continue;
            }