Snap for 5238804 from 7bdb00f86c1eb0900e8c03a9c17d3ebf95a3d39d to studio-3.4-release

Change-Id: I796acf96bdd3b12297f6351e6dc77105039fd7aa
diff --git a/src/com/google/appindexing/fetchasgoogle/FetchAsGoogleTask.java b/src/com/google/appindexing/fetchasgoogle/FetchAsGoogleTask.java
index 258ccef..92c90e6 100644
--- a/src/com/google/appindexing/fetchasgoogle/FetchAsGoogleTask.java
+++ b/src/com/google/appindexing/fetchasgoogle/FetchAsGoogleTask.java
@@ -15,6 +15,8 @@
  */
 package com.google.appindexing.fetchasgoogle;
 
+import static com.google.wireless.android.sdk.stats.GradleSyncStats.Trigger.TRIGGER_BUILD_BEFORE_BUILDING_APK;
+
 import com.android.annotations.VisibleForTesting;
 import com.android.build.OutputFile;
 import com.android.builder.model.AndroidArtifact;
@@ -338,7 +340,7 @@
         // See: https://code.google.com/p/android/issues/detail?id=70718
         GradleSyncState syncState = GradleSyncState.getInstance(myProject);
         if (syncState.isSyncNeeded() != ThreeState.NO) {
-          GradleSyncInvoker.Request request = GradleSyncInvoker.Request.userRequest();
+          GradleSyncInvoker.Request request = new GradleSyncInvoker.Request(TRIGGER_BUILD_BEFORE_BUILDING_APK);
           request.runInBackground = false;
           GradleSyncInvoker.getInstance().requestProjectSync(myProject, request, new GradleSyncListener() {
             @Override