Gatt: App exception aren't from SystemServer
Calling into mService(IBluetoothGatt) will call the GattService from
Bluetooth app that does not live in the systemServer.
Therefore, exception should be rethrown as runtimeException
Bug: 298264617
Test: atest CtsBluetoothTestCases | Cts does not handled failure in the
binder nor any of the Test framework we currently have
Change-Id: Ie2ed38e5076242c1001e231f70105890c86ea116
diff --git a/framework/java/android/bluetooth/BluetoothGatt.java b/framework/java/android/bluetooth/BluetoothGatt.java
index 90922a8..d602f7d 100644
--- a/framework/java/android/bluetooth/BluetoothGatt.java
+++ b/framework/java/android/bluetooth/BluetoothGatt.java
@@ -1498,7 +1498,7 @@
synchronized (mDeviceBusyLock) {
mDeviceBusy = false;
}
- throw e.rethrowFromSystemServer();
+ throw e.rethrowAsRuntimeException();
}
return requestStatus;
@@ -1641,7 +1641,7 @@
synchronized (mDeviceBusyLock) {
mDeviceBusy = false;
}
- e.rethrowFromSystemServer();
+ throw e.rethrowAsRuntimeException();
}
return BluetoothStatusCodes.ERROR_UNKNOWN;
}