TAPL: logging incoming intents

Even though ActivityTaskManager already logs intents, logging this will
simplify flake/error investigations that are considered to be too
time-consuming.

Also, this will make it possible in future to programmatically detect
whether the bug is introduced by the system or Launcher.

Bug: 133010698
Change-Id: I7dcadd95baa23f29bb661d6b42280bd2a2f0e099
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 7265a1a..d8c4c5c 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1429,6 +1429,9 @@
 
     @Override
     protected void onNewIntent(Intent intent) {
+        if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
+            Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Launcher.onNewIntent: " + intent);
+        }
         Object traceToken = TraceHelper.INSTANCE.beginSection(ON_NEW_INTENT_EVT);
         super.onNewIntent(intent);