Loading src/com/android/server/telecom/ConnectionServiceWrapper.java +31 −10 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; Loading Loading @@ -1349,11 +1350,21 @@ 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 && !mScheduledExecutor.isShutdown()) { try { // 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); } catch (RejectedExecutionException e) { Log.e(this, e, "createConference: mScheduledExecutor was " + "already shutdown"); } } else { Log.w(this, "createConference: Scheduled executor is null or shutdown"); } try { mServiceInterface.createConference( call.getConnectionManagerPhoneAccount(), Loading Loading @@ -1465,11 +1476,21 @@ 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 && !mScheduledExecutor.isShutdown()) { try { // 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); } catch (RejectedExecutionException e) { Log.e(this, e, "createConnection: mScheduledExecutor was " + "already shutdown"); } } else { Log.w(this, "createConnection: Scheduled executor is null or shutdown"); } try { mServiceInterface.createConnection( call.getConnectionManagerPhoneAccount(), Loading Loading
src/com/android/server/telecom/ConnectionServiceWrapper.java +31 −10 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; Loading Loading @@ -1349,11 +1350,21 @@ 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 && !mScheduledExecutor.isShutdown()) { try { // 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); } catch (RejectedExecutionException e) { Log.e(this, e, "createConference: mScheduledExecutor was " + "already shutdown"); } } else { Log.w(this, "createConference: Scheduled executor is null or shutdown"); } try { mServiceInterface.createConference( call.getConnectionManagerPhoneAccount(), Loading Loading @@ -1465,11 +1476,21 @@ 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 && !mScheduledExecutor.isShutdown()) { try { // 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); } catch (RejectedExecutionException e) { Log.e(this, e, "createConnection: mScheduledExecutor was " + "already shutdown"); } } else { Log.w(this, "createConnection: Scheduled executor is null or shutdown"); } try { mServiceInterface.createConnection( call.getConnectionManagerPhoneAccount(), Loading