Handle multithreading in ActiveGestureLog

ArrayList.add is not thread-safe. Attempting rapid calls across threads is the only way for it to throw ArrayIndexOutOfBoundsException.

Flag: EXEMPT bug fix
Fixes: 360619084
Test: checked TIS logs
Change-Id: I66e5f2e13d5237717abcf42e56efa2942f317676
diff --git a/quickstep/src/com/android/quickstep/util/ActiveGestureLog.java b/quickstep/src/com/android/quickstep/util/ActiveGestureLog.java
index c54862a..d46b8fc 100644
--- a/quickstep/src/com/android/quickstep/util/ActiveGestureLog.java
+++ b/quickstep/src/com/android/quickstep/util/ActiveGestureLog.java
@@ -23,6 +23,7 @@
 import java.io.PrintWriter;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 import java.util.Locale;
@@ -237,7 +238,8 @@
     /** An entire log of entries associated with a single log ID */
     protected static class EventLog {
 
-        protected final List<EventEntry> eventEntries = new ArrayList<>();
+        protected final List<EventEntry> eventEntries =
+                Collections.synchronizedList(new ArrayList<>());
         protected final int logId;
         protected final boolean mIsFullyGesturalNavMode;