summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jakub Pawlowski <jpawlowski@google.com> 2017-08-17 06:15:43 -0700
committer Jakub Pawlowski <jpawlowski@google.com> 2017-08-17 07:39:02 -0700
commitf73863dc29c5adc70117649d24f9b65f6b3232be (patch)
tree558589bc63b90138013a1410b7d51864d7369fd5
parent42d3eadb37a8788d62bc9dedfa9f4cb37f2a88d7 (diff)
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
-rw-r--r--core/java/android/bluetooth/le/BluetoothLeAdvertiser.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
index dfd5996c6a00..fb9b19f1fddc 100644
--- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
+++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -453,8 +453,7 @@ public final class BluetoothLeAdvertiser {
gatt.stopAdvertisingSet(wrapped);
} catch (RemoteException e) {
Log.e(TAG, "Failed to stop advertising - ", e);
- throw new IllegalStateException("Failed to stop advertising");
- }
+ }
}
/**