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

Commit 809c0cfa authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "Register connect callback when the service is up" am: d648cd05 am:...

Merge "Register connect callback when the service is up" am: d648cd05 am: 26199761 am: 4c0c9193 am: 5ed560ce

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2512597



Change-Id: I14272d224a5da6075879d55c53f2266a655ab8a1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 72ffc43e 5ed560ce
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -3987,6 +3987,22 @@ public final class BluetoothAdapter {
                                }
                            }
                        }
                        synchronized (mBluetoothConnectionCallbackExecutorMap) {
                            if (!mBluetoothConnectionCallbackExecutorMap.isEmpty()) {
                                try {
                                    final SynchronousResultReceiver recv =
                                            SynchronousResultReceiver.get();
                                    mService.registerBluetoothConnectionCallback(
                                            mConnectionCallback,
                                            mAttributionSource, recv);
                                    recv.awaitResultNoInterrupt(getSyncTimeout())
                                            .getValue(null);
                                } catch (RemoteException | TimeoutException e) {
                                    Log.e(TAG, "onBluetoothServiceUp: Failed to register "
                                            + "bluetooth connection callback", e);
                                }
                            }
                        }
                    } finally {
                        mServiceLock.readLock().unlock();
                    }