summaryrefslogtreecommitdiff
path: root/service/java/com/android/server/bluetooth/BluetoothManagerService.java
diff options
context:
space:
mode:
authorSungsoo Lim <sungsoo@google.com>2022-06-29 21:04:49 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-01 00:59:09 +0000
commit0ebbe9d1f66581e0136026b7a2536f4cefdb6071 (patch)
tree21203eb987212677925b0873a8cb166bf13da919 /service/java/com/android/server/bluetooth/BluetoothManagerService.java
parent1eb35585122a52d9ab3e49817ef8632d1eea5536 (diff)
Catch IAE in BluetoothManagerService
Bug: 237175319 Tag: #refactor Test: build Change-Id: I7d7ef16387756a53115701c461fa735f214c3f25 (cherry picked from commit aed442ee917a0e050744ea7008a65d8043604e83) (cherry picked from commit b94bfd919269f879f181726309891992f6b2f475) Merged-In: I7d7ef16387756a53115701c461fa735f214c3f25
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r--service/java/com/android/server/bluetooth/BluetoothManagerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
index 211154ceab..042a4353c5 100644
--- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java
+++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
@@ -2189,7 +2189,11 @@ public class BluetoothManagerService extends IBluetoothManager.Stub {
break;
}
if (msg.arg1 > 0) {
- mContext.unbindService(psc);
+ try {
+ mContext.unbindService(psc);
+ } catch (IllegalArgumentException e) {
+ Log.e(TAG, "Unable to unbind service with intent: " + psc.mIntent, e);
+ }
psc.bindService(msg.arg1 - 1);
}
break;