Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -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;
    }