diff --git a/app/build.gradle b/app/build.gradle index 371aae0f7..2be0352a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.gianlu.aria2app" minSdkVersion 21 targetSdkVersion 28 - versionCode 178 - versionName "5.1.4" + versionCode 179 + versionName "5.1.5" } buildTypes { diff --git a/app/src/main/java/com/gianlu/aria2app/Utils.java b/app/src/main/java/com/gianlu/aria2app/Utils.java index f93c3eb0b..79f19794c 100644 --- a/app/src/main/java/com/gianlu/aria2app/Utils.java +++ b/app/src/main/java/com/gianlu/aria2app/Utils.java @@ -50,6 +50,7 @@ public final class Utils { public static final String ACTION_NEW_BATCH = "new_batch_add"; public static final String ACTION_INTERCEPTED_WEBVIEW = "intercepted_webview"; public static final String ACTION_USE_IN_APP_DOWNLOADER = "use_in_app_downloader"; + public static final String ACTION_WEBVIEW_SET_HOMEPAGE = "set_webview_homepage"; private static final Collection streamableMimeTypes = new HashSet<>(); static { diff --git a/app/src/main/java/com/gianlu/aria2app/WebView/WebViewActivity.java b/app/src/main/java/com/gianlu/aria2app/WebView/WebViewActivity.java index fe8c6a116..3567ba4cc 100644 --- a/app/src/main/java/com/gianlu/aria2app/WebView/WebViewActivity.java +++ b/app/src/main/java/com/gianlu/aria2app/WebView/WebViewActivity.java @@ -28,6 +28,7 @@ import com.gianlu.aria2app.LoadingActivity; import com.gianlu.aria2app.PK; import com.gianlu.aria2app.R; +import com.gianlu.aria2app.ThisApplication; import com.gianlu.aria2app.Utils; import com.gianlu.commonutils.Analytics.AnalyticsApplication; import com.gianlu.commonutils.Dialogs.ActivityWithDialog; @@ -229,6 +230,7 @@ private void showGoToDialog(boolean compulsory) { .setNeutralButton(R.string.setAsDefault, (dialog, which) -> { Prefs.putString(PK.WEBVIEW_HOMEPAGE, guessUrl(input.getText().toString())); web.loadUrl(guessUrl(input.getText().toString())); + ThisApplication.sendAnalytics(Utils.ACTION_WEBVIEW_SET_HOMEPAGE); }) .setPositiveButton(R.string.visit, (dialog, which) -> web.loadUrl(guessUrl(input.getText().toString())));