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

Commit dcb8a406 authored by Raphael Kim's avatar Raphael Kim Committed by Android (Google) Code Review
Browse files

Merge "[CDM] Fix a bug where turning off Bluetooth before CDM BLE device...

Merge "[CDM] Fix a bug where turning off Bluetooth before CDM BLE device discovery timeout results in a crash." into main
parents ff02350e bb7eeb8a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -277,7 +277,12 @@ public class CompanionDeviceDiscoveryService extends Service {

        // Stop BLE scanning.
        if (mBleScanCallback != null) {
            try {
                mBleScanner.stopScan(mBleScanCallback);
            } catch (IllegalStateException e) {
                Slog.e(TAG, "Unable to stop BLE scanner. The scanner is already"
                        + " turned off or Bluetooth is disabled.");
            }
        }

        Handler.getMain().removeCallbacks(mSoftTimeoutRunnable);