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

Commit bcd9147d 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 am: 17dcff6b am: 1c6db52f

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

Change-Id: I474ab9d15e374e1535a4043060e842ae80539c74
parents 53624dfb 1c6db52f
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -1776,7 +1776,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;
            }

@@ -1788,7 +1790,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.
@@ -1829,8 +1833,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;
            }

@@ -1842,7 +1848,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;
            }