[android][sdk] Move getDonateUrl outside sdk

Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
Andrei Shkrob
2025-08-15 17:25:39 +02:00
committed by Konstantin Pastbin
parent d3c64a262b
commit 431e305a48
5 changed files with 17 additions and 9 deletions

View File

@@ -390,14 +390,9 @@ public final class Config
}
@NonNull
public static String getDonateUrl(@NonNull Context context)
public static String getDonateUrl()
{
final String url = getString(KEY_DONATE_URL);
// Enable donations by default if not Google or Huawei. Replace comaps.app/donate/ with localized page.
if ((url.isEmpty() && !mFlavor.equals("google") && !mFlavor.equals("huawei"))
|| url.endsWith("comaps.app/donate/"))
return context.getString(R.string.app_site_url) + "donate/";
return url;
return getString(KEY_DONATE_URL);
}
public static void init(@NonNull Context context, @NonNull SharedPreferences prefs, @NonNull String flavor,