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

Commit b3b347f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add log for registration failure when scanning too frequently" into main am: 2192b346

parents a8843a7f 2192b346
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -465,12 +465,15 @@ public final class BluetoothLeScanner {
                if (mScannerId > 0) {
                    mLeScanClients.put(mScanCallback, this);
                } else {
                    // Registration timed out or got exception, reset RscannerId to -1 so no
                    // Registration timed out or got exception, reset scannerId to -1 so no
                    // subsequent operations can proceed.
                    if (mScannerId == 0) mScannerId = -1;

                    // If scanning too frequently, don't report anything to the app.
                    if (mScannerId == -2) return;
                    if (mScannerId == -2) {
                        Log.e(TAG, "registration failed because app is scanning too frequently");
                        return;
                    }

                    postCallbackError(
                            mScanCallback,