Verifying events from TouchInteractionService
There is a guaranteed order in which TIS events will be registered
relative to other TIS events. However, relative to the touch events
arriving to the activity, TIS events can come in any order.
Now the event checker verifies 2 independent ordered event sequences:
from TIS, and “the rest” (Main).
Change-Id: I5872e0e3b0b498050a91c67105fbe4a29411375a
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index f3c5191..217a41c 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -42,6 +42,7 @@
import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.logging.UserEventDispatcher.UserEventDelegate;
import com.android.launcher3.testing.TestLogging;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.ViewCache;
@@ -330,9 +331,7 @@
return;
}
try {
- if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
- TestLogging.recordEvent("start: shortcut: " + packageName);
- }
+ TestLogging.recordEvent(TestProtocol.SEQUENCE_MAIN, "start: shortcut", packageName);
getSystemService(LauncherApps.class).startShortcut(packageName, id, sourceBounds,
startActivityOptions, user);
} catch (SecurityException | IllegalStateException e) {