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

Commit 7a62eeb6 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13611907 from 9a813515 to 25Q3-release

Change-Id: Iaff6299b9c261bb0bed7d12085add3df4f264ed1
parents 01cd1fad 9a813515
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6521,7 +6521,7 @@ public class CallsManager extends Call.ListenerBase
     * Blocks execution until all Telecom handlers have completed their current work.
     */
    public void waitOnHandlers() {
        CountDownLatch mainHandlerLatch = new CountDownLatch(3);
        CountDownLatch mainHandlerLatch = new CountDownLatch(4);
        mHandler.post(() -> {
            mainHandlerLatch.countDown();
        });
@@ -6531,7 +6531,7 @@ public class CallsManager extends Call.ListenerBase
        mCallAudioManager.getCallAudioRouteAdapter().getAdapterHandler().post(() -> {
            mainHandlerLatch.countDown();
        });

        mCallAudioRouteAdapter.getAdapterHandler().post(()-> mainHandlerLatch.countDown());
        try {
            mainHandlerLatch.await(HANDLER_WAIT_TIMEOUT, TimeUnit.MILLISECONDS);
        } catch (InterruptedException e) {
+14 −15
Original line number Diff line number Diff line
@@ -332,8 +332,10 @@ public class InCallController extends CallsManagerListenerBase implements

                    // Notify this new added call
                    if (mInCallServiceInfo.getType() == IN_CALL_SERVICE_TYPE_BLUETOOTH) {
                        if (mBTInCallServices.containsKey(userFromCall)) {
                            sendCallToService(call, mInCallServiceInfo, mBTInCallServices
                                    .get(userFromCall).second);
                        }
                    } else {
                        sendCallToService(call, mInCallServiceInfo,
                                mInCallServices.get(userFromCall).get(mInCallServiceInfo));
@@ -2133,12 +2135,13 @@ public class InCallController extends CallsManagerListenerBase implements
     * @param call The newly added call that triggered the binding to the in-call services.
     */
    public void bindToBTService(Call call, UserHandle userHandle) {
        Log.i(this, "bindToBtService");
        UserHandle userToBind = userHandle == null
                ? getUserFromCall(call)
                : userHandle;
        UserManager um = mContext.getSystemService(UserManager.class);
        UserHandle parentUser = um.getProfileParent(userToBind);
        Log.i(this, "bindToBtService, child:%s  parent:%s", userToBind, parentUser);

        // Track the call if we don't already know about it.
        addCall(call);
        List<InCallServiceInfo> infos = getInCallServiceComponents(userToBind,
@@ -2160,18 +2163,14 @@ public class InCallController extends CallsManagerListenerBase implements
            }
        }

        if (!mBTInCallServiceConnections.containsKey(userToBind)) {
            mBtBindingFuture.put(userToBind, new CompletableFuture<Boolean>().completeOnTimeout(
                    false, mTimeoutsAdapter.getCallBindBluetoothInCallServicesDelay(
        mBtBindingFuture.put(userToBind, new CompletableFuture<Boolean>().completeOnTimeout(false,
                mTimeoutsAdapter.getCallBindBluetoothInCallServicesDelay(
                        mContext, mFeatureFlags), TimeUnit.MILLISECONDS));
        InCallServiceBindingConnection btIcsBindingConnection =
                new InCallServiceBindingConnection(infos.get(0),
                        serviceUnavailableForUser ? parentUser : userToBind);
        mBTInCallServiceConnections.put(userToBind, btIcsBindingConnection);
        }
        final InCallServiceBindingConnection btInCallServiceConnection =
                mBTInCallServiceConnections.get(userToBind);
        btInCallServiceConnection.connect(call);
        btIcsBindingConnection.connect(call);
    }

    /**