Set host name to an obvious invalid value.
Change-Id: Ib2cf597ec75000c704becc9eaafbec015bbd45ab
Signed-off-by: Luo Yu <yuluo@google.com>
(cherry picked from commit 457937b1fd18993d1ca29784ddfa3b916602cf18)
diff --git a/src/com/google/appindexing/api/ApiCreator.java b/src/com/google/appindexing/api/ApiCreator.java
index 3c05162..41b92c1 100644
--- a/src/com/google/appindexing/api/ApiCreator.java
+++ b/src/com/google/appindexing/api/ApiCreator.java
@@ -157,6 +157,10 @@
"<!-- ATTENTION: This was auto-generated to add Google Play services to your project for\n" +
" App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->";
+ /* To prompt developers to update deep link url, sets default url to a noticeable wrong url */
+ static private final String DEFAULT_DEEP_LINK_URL = "http://[ENTER-YOUR-URL-HERE]";
+
+
private Project myProject = null;
private Module myModule = null;
private PsiFile myFile = null;
@@ -461,7 +465,7 @@
if (pageName.endsWith("Activity")) {
pageName = pageName.substring(0, pageName.length() - 8);
}
- String url = deepLink == null ? "http://host/path" : deepLink;
+ String url = deepLink == null ? DEFAULT_DEEP_LINK_URL : deepLink;
String getActionMethod = String.format(
GET_ACTION_FORMAT, methodName, pageName, url, myImportClasses.get(CLASS_ACTION), myImportClasses.get(CLASS_THING));
PsiMethod newGetAction = myFactory.createMethodFromText(getActionMethod, null);