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

Commit 784de2e4 authored by Grant Menke's avatar Grant Menke
Browse files

Add anomaly reporting for when ScheduledExecutorService is null when creating...

Add anomaly reporting for when ScheduledExecutorService is null when creating a conference/connection.

Change-Id: I3cb7922996f322aac96633d97fc6ce79be94cdf6
Flag: EXEMPT logging/anaomaly reporting change only
Bug: 385392542
Test: build
parent a8d87481
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        ConnectionServiceFocusManager.ConnectionServiceFocus, CallSourceService {

    /**
     * Anomaly Report UUIDs and corresponding error descriptions specific to CallsManager.
     * Anomaly Report UUIDs and corresponding error descriptions specific to
     * ConnectionServiceWrapper.
     */
    public static final UUID CREATE_CONNECTION_TIMEOUT_ERROR_UUID =
            UUID.fromString("54b7203d-a79f-4cbd-b639-85cd93a39cbb");
@@ -105,6 +106,10 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
            UUID.fromString("caafe5ea-2472-4c61-b2d8-acb9d47e13dd");
    public static final String CREATE_CONFERENCE_TIMEOUT_ERROR_MSG =
            "Timeout expired before Telecom conference was created.";
    public static final UUID NULL_SCHEDULED_EXECUTOR_ERROR_UUID =
            UUID.fromString("af6b293b-239f-4ccf-bf3a-db212594e29d");
    public static final String NULL_SCHEDULED_EXECUTOR_ERROR_MSG =
            "Scheduled executor is null when creating connection/conference.";

    private static final String TELECOM_ABBREVIATION = "cast";
    private static final long SERVICE_BINDING_TIMEOUT = 15000L;
@@ -1661,6 +1666,11 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                    ScheduledFuture<?> future = mScheduledExecutor.schedule(
                        r.getRunnableToCancel(),SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                    mScheduledFutureMap.put(call, future);
                } else {
                    Log.w(this, "createConference: Scheduled executor is null");
                    mAnomalyReporter.reportAnomaly(
                        NULL_SCHEDULED_EXECUTOR_ERROR_UUID,
                        NULL_SCHEDULED_EXECUTOR_ERROR_MSG);
                }
                try {
                    mServiceInterface.createConference(
@@ -1792,6 +1802,11 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                    ScheduledFuture<?> future = mScheduledExecutor.schedule(
                        r.getRunnableToCancel(),SERVICE_BINDING_TIMEOUT, TimeUnit.MILLISECONDS);
                    mScheduledFutureMap.put(call, future);
                } else {
                    Log.w(this, "createConnection: Scheduled executor is null");
                    mAnomalyReporter.reportAnomaly(
                        NULL_SCHEDULED_EXECUTOR_ERROR_UUID,
                        NULL_SCHEDULED_EXECUTOR_ERROR_MSG);
                }
                try {
                    if (mFlags.cswServiceInterfaceIsNull() && mServiceInterface == null) {