Fix F-droid build

This commit is contained in:
Lucas Lima 2020-08-16 20:47:10 -03:00
parent ac8868d56a
commit 2e0db440e5
No known key found for this signature in database
GPG key ID: 049CCC5A365B00D2
3 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,15 @@
package dev.lucasnlm.external
import android.content.Context
class ExternalAnalyticsWrapper(
context: Context
) : IExternalAnalyticsWrapper {
override fun setup(context: Context, properties: Map<String, String>) {
// F-droid build doesn't have analytics.
}
override fun sendEvent(name: String, content: Map<String, String>) {
// F-droid build doesn't have analytics.
}
}

View file

@ -0,0 +1,13 @@
package dev.lucasnlm.external
import android.app.Activity
import android.content.Context
import android.content.Intent
class InstantAppManager : IInstantAppManager {
override fun isInstantAppSupported(context: Context): Boolean = false
override fun isInAppPaymentsSupported(context: Context): Boolean = false
override fun showInstallPrompt(activity: Activity, intent: Intent?, requestCode: Int, referrer: String?): Boolean = false
}

View file

@ -0,0 +1,31 @@
package dev.lucasnlm.external
import android.app.Activity
import android.content.Context
import android.content.Intent
class PlayGamesManager(
context: Context
) : IPlayGamesManager {
override fun hasGooglePlayGames(): Boolean = false
override fun silentLogin(activity: Activity) {
// F-droid build doesn't have Google Play Games
}
override fun getLoginIntent(): Intent? = null
override fun handleLoginResult(data: Intent?) {
// F-droid build doesn't have Google Play Games
}
override fun isLogged(): Boolean = false
override fun openAchievements(activity: Activity) {
// F-droid build doesn't have Google Play Games
}
override fun openLeaderboards(activity: Activity) {
// F-droid build doesn't have Google Play Games
}
}