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

Commit 869c869c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "LeAudioService: Handle possible IllegalStateException"

parents 2f945a39 05d0005e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1715,7 +1715,11 @@ public class LeAudioService extends ProfileService {
            }
        }

        try {
            mAudioServersScanner.stopScan(mScanCallback);
        } catch (IllegalStateException e) {
            Log.e(TAG, "Fail to stop scanner, consider it stopped", e);
        }

        /* Callback is the indicator for scanning being enabled */
        mScanCallback = null;
@@ -1765,7 +1769,12 @@ public class LeAudioService extends ProfileService {
                .setScanMode(ScanSettings.SCAN_MODE_BALANCED)
                .build();

        try {
            mAudioServersScanner.startScan(filterList, settings, mScanCallback);
        } catch (IllegalStateException e) {
            Log.e(TAG, "Fail to start scanner, consider it stopped", e);
            mScanCallback = null;
        }
    }

    // Suppressed since this is part of a local process