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

Commit 380d3f49 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Gerrit Code Review
Browse files

Merge "No crash when remote service dead"

parents 40e58a22 370be0ce
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -88,11 +88,9 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
                                service.registerCallback(mCallback, mAttributionSource, recv);
                                recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
                            }
                        } catch (TimeoutException e) {
                        } catch (RemoteException | TimeoutException e) {
                            Log.e(TAG, e.toString() + "\n"
                                    + Log.getStackTraceString(new Throwable()));
                        } catch (RemoteException e) {
                            throw e.rethrowFromSystemServer();
                        }
                    }
                }
+1 −3
Original line number Diff line number Diff line
@@ -91,10 +91,8 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
                                service.registerCallback(mCallback, mAttributionSource, recv);
                                recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
                            }
                        } catch (TimeoutException e) {
                        } catch (RemoteException | TimeoutException e) {
                            Log.e(TAG, "Failed to register callback", e);
                        } catch (RemoteException e) {
                            throw e.rethrowFromSystemServer();
                        }
                    }
                }
+6 −5
Original line number Diff line number Diff line
@@ -194,11 +194,12 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
                                recv.awaitResultNoInterrupt(getSyncTimeout())
                                        .getValue(null);
                            }
                        } catch (TimeoutException e) {
                            Log.e(TAG, "onBluetoothServiceUp: Failed to register "
                                    + "Le Broadcaster callback", e);
                        } catch (RemoteException e) {
                            throw e.rethrowFromSystemServer();
                        } catch (RemoteException | TimeoutException e) {
                            Log.e(
                                    TAG,
                                    "onServiceConnected: Failed to register "
                                            + "Le Broadcaster callback",
                                    e);
                        }
                    }
                }