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

Commit 4cf705e1 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Bluetooth: Don't throw exception when stopAdvertisingSet fails

When advertising is stopped while Bluetooth is disabled, we should not
throw any exceptions, just log the failure.
This was the default behaviour before the AdvertisingSet was introduced.

Bug: 63819108
Test: manual
Change-Id: I518e071b77b127973aee6f24fa6ced4f28bc9531
Merged-In: I518e071b77b127973aee6f24fa6ced4f28bc9531
(cherry picked from commit f73863dc)
parent 322df289
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -453,7 +453,6 @@ public final class BluetoothLeAdvertiser {
            gatt.stopAdvertisingSet(wrapped);
            gatt.stopAdvertisingSet(wrapped);
       } catch (RemoteException e) {
       } catch (RemoteException e) {
            Log.e(TAG, "Failed to stop advertising - ", e);
            Log.e(TAG, "Failed to stop advertising - ", e);
            throw new IllegalStateException("Failed to stop advertising");
       }
       }
    }
    }