mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-03 07:48:36 +00:00
Add BillingDependencies and shared implementation.
This commit is contained in:
committed by
Cody Henthorne
parent
36bfd19bcf
commit
982b90d423
@@ -452,7 +452,7 @@ public class ApplicationDependencyProvider implements AppDependencies.Provider {
|
||||
|
||||
@Override
|
||||
public @NonNull BillingApi provideBillingApi() {
|
||||
return BillingFactory.create(context, RemoteConfig.messageBackups());
|
||||
return BillingFactory.create(GooglePlayBillingDependencies.INSTANCE, RemoteConfig.messageBackups());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2024 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.thoughtcrime.securesms.dependencies
|
||||
|
||||
import android.content.Context
|
||||
import org.signal.core.util.billing.BillingDependencies
|
||||
|
||||
/**
|
||||
* Dependency object for Google Play Billing.
|
||||
*/
|
||||
object GooglePlayBillingDependencies : BillingDependencies {
|
||||
|
||||
override val context: Context get() = AppDependencies.application
|
||||
|
||||
override suspend fun getProductId(): String {
|
||||
return "backup" // TODO [message-backups] This really shouldn't be hardcoded into the app.
|
||||
}
|
||||
|
||||
override suspend fun getBasePlanId(): String {
|
||||
return "monthly" // TODO [message-backups] This really shouldn't be hardcoded into the app.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user