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

MapClient: App exception aren't from SystemServer

Calling into IBluetoothMapClient will call the MapClientService 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: Idf5401282da69391e49361113f3db6c8dcecfec7
parent 241b4b97
No related branches found
No related tags found
No related merge requests found
......@@ -369,7 +369,7 @@ public final class BluetoothMapClient implements BluetoothProfile, AutoCloseable
mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}
......@@ -406,7 +406,7 @@ public final class BluetoothMapClient implements BluetoothProfile, AutoCloseable
mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}
......@@ -439,7 +439,7 @@ public final class BluetoothMapClient implements BluetoothProfile, AutoCloseable
return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
} catch (RemoteException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}
......@@ -503,7 +503,7 @@ public final class BluetoothMapClient implements BluetoothProfile, AutoCloseable
return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
} catch (RemoteException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}
......@@ -562,7 +562,7 @@ public final class BluetoothMapClient implements BluetoothProfile, AutoCloseable
return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
} catch (RemoteException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
throw e.rethrowFromSystemServer();
throw e.rethrowAsRuntimeException();
} catch (TimeoutException e) {
Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
}
......
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