Add anomaly reporting if RejectedExecutionException occurs when creating a conference/connection.

Flag: EXEMPT logging/anomaly reporting change only
Bug: 388588560
Test: build + atest CallsManagerTest
Change-Id: I1687bd796a4d05be7b6a76fea147cdc82d27402c
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index 0f33f71..7a95cc8 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -111,6 +111,11 @@
             UUID.fromString("af6b293b-239f-4ccf-bf3a-db212594e29d");
     public static final String NULL_SCHEDULED_EXECUTOR_ERROR_MSG =
             "Scheduled executor is null when creating connection/conference.";
+    public static final UUID EXECUTOR_REJECTED_EXECUTION_ERROR_UUID =
+            UUID.fromString("649b348c-9d3f-451e-bae9-d9920e7b422c");
+
+    public static final String EXECUTOR_REJECTED_EXECUTION_ERROR_MSG =
+            "Scheduled executor caused a Rejected Execution Exception when creating connection.";
 
     private static final String TELECOM_ABBREVIATION = "cast";
     private static final long SERVICE_BINDING_TIMEOUT = 15000L;
@@ -1672,6 +1677,9 @@
                     } catch (RejectedExecutionException e) {
                         Log.e(this, e, "createConference: mScheduledExecutor was "
                                 + "already shutdown");
+                        mAnomalyReporter.reportAnomaly(
+                                EXECUTOR_REJECTED_EXECUTION_ERROR_UUID,
+                                EXECUTOR_REJECTED_EXECUTION_ERROR_MSG);
                     }
                 } else {
                     Log.w(this, "createConference: Scheduled executor is null or shutdown");
@@ -1814,6 +1822,9 @@
                     } catch (RejectedExecutionException e) {
                         Log.e(this, e, "createConnection: mScheduledExecutor was "
                                 + "already shutdown");
+                        mAnomalyReporter.reportAnomaly(
+                                EXECUTOR_REJECTED_EXECUTION_ERROR_UUID,
+                                EXECUTOR_REJECTED_EXECUTION_ERROR_MSG);
                     }
                 } else {
                     Log.w(this, "createConnection: Scheduled executor is null or shutdown");