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

Commit 12013934 authored by William Escande's avatar William Escande
Browse files

BluetoothDevice: App exception aren't from SystemServer

Calling into (IBluetooth) will call the AdapterService 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: I1b5df5c4f7d59e8dc01a20ac805ff04e840c6b19
parent d49e915e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1765,7 +1765,7 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
                Log.e(TAG, "", e);
                throw e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
        }
        return defaultValue;
@@ -2202,7 +2202,7 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
                Log.e(TAG, "", e);
                throw e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
        }
        return defaultValue;
@@ -2249,7 +2249,7 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
                Log.e(TAG, "", e);
                throw e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
        }
        return defaultValue;
@@ -3497,7 +3497,7 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            } catch (RemoteException e) {
                Log.e(TAG, "", e);
                throw e.rethrowFromSystemServer();
                throw e.rethrowAsRuntimeException();
            }
        }
        return defaultValue;