Skip to content
Snippets Groups Projects
Commit d49e915e authored by William Escande's avatar William Escande
Browse files

DistanceMeasurement: App exception aren't from SystemServer

Calling into 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: Ibc6e21b7f04d7c534516b3210f93e03ed3db2bb6
parent 5a1d4285
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ public final class DistanceMeasurementManager {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
return null;
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
}
}
......
......@@ -115,7 +115,7 @@ public final class DistanceMeasurementSession {
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
}
return defaultValue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment