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

Commit a8d87481 authored by Grant Menke's avatar Grant Menke Committed by Android (Google) Code Review
Browse files

Merge "Check ScheduledExecutor non-nullness before scheduling timeout cleanup" into main

parents 0f0d3680 06db75a5
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -1655,11 +1655,13 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                        }
                    }
                };
                // Post cleanup to the executor service and cache the future, so we can cancel it if
                // needed.
                ScheduledFuture<?> future = mScheduledExecutor.schedule(r.getRunnableToCancel(),
                        SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                if (mScheduledExecutor != null) {
                    // Post cleanup to the executor service and cache the future,
                    // so we can cancel it if needed.
                    ScheduledFuture<?> future = mScheduledExecutor.schedule(
                        r.getRunnableToCancel(),SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                    mScheduledFutureMap.put(call, future);
                }
                try {
                    mServiceInterface.createConference(
                            call.getConnectionManagerPhoneAccount(),
@@ -1784,11 +1786,13 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                        }
                    }
                };
                // Post cleanup to the executor service and cache the future, so we can cancel it if
                // needed.
                ScheduledFuture<?> future = mScheduledExecutor.schedule(r.getRunnableToCancel(),
                        SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                if (mScheduledExecutor != null) {
                    // Post cleanup to the executor service and cache the future,
                    // so we can cancel it if needed.
                    ScheduledFuture<?> future = mScheduledExecutor.schedule(
                        r.getRunnableToCancel(),SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                    mScheduledFutureMap.put(call, future);
                }
                try {
                    if (mFlags.cswServiceInterfaceIsNull() && mServiceInterface == null) {
                        if (mFlags.dontTimeoutDestroyedCalls()) {