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

Commit 36d0841e authored by William Escande's avatar William Escande
Browse files

CsipSet: App exception aren't from SystemServer

Calling into IBluetoothCsipSetCoordinator will call the
CsipSetCoordinatorService 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: Id89076adf63c0cbaa6d536b04ae1421ae5464745
parent c927f80d
Loading
Loading
Loading
Loading
+9 −9
Original line number Original line Diff line number Diff line
@@ -285,7 +285,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -318,7 +318,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -349,7 +349,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -380,7 +380,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -406,7 +406,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -433,7 +433,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -459,7 +459,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -498,7 +498,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;
@@ -533,7 +533,7 @@ public final class BluetoothCsipSetCoordinator implements BluetoothProfile, Auto
            } catch (TimeoutException e) {
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
            }
        }
        }
        return defaultValue;
        return defaultValue;