commit | 4cf705e17e393c70486493432d7e596edc8a7f36 | [log] [tgz] |
---|---|---|
author | Jakub Pawlowski <jpawlowski@google.com> | Thu Aug 17 06:15:43 2017 -0700 |
committer | Andre Eisenbach <eisenbach@google.com> | Thu Aug 17 22:34:31 2017 +0000 |
tree | 75b0a667e1b9edaeced00b350c4844c9e7c072b8 | |
parent | 322df2899b55aad62e587f1a42f48d10cfb0d644 [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 Merged-In: I518e071b77b127973aee6f24fa6ced4f28bc9531 (cherry picked from commit f73863dc29c5adc70117649d24f9b65f6b3232be)
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java index dfd5996..fb9b19f 100644 --- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java +++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -453,8 +453,7 @@ gatt.stopAdvertisingSet(wrapped); } catch (RemoteException e) { Log.e(TAG, "Failed to stop advertising - ", e); - throw new IllegalStateException("Failed to stop advertising"); - } + } } /**