Skip to content

Commit

Permalink
[TF][KILL] Android Billing
Browse files Browse the repository at this point in the history
  • Loading branch information
thermatk committed Jul 19, 2022
1 parent cc742dd commit 034a093
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 209 deletions.
2 changes: 0 additions & 2 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ dependencies {
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'

implementation 'com.android.billingclient:billing:5.0.0'

implementation 'org.osmdroid:osmdroid-android:6.1.10'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void onReceive(Context context, Intent intent) {
DownloadController.getInstance(a);
}
ChatThemeController.init();
BillingController.getInstance().startConnection();
// BillingController.getInstance().startConnection();
}

public ApplicationLoader() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class BuildVars {
public static String PLAYSTORE_APP_URL = "https://f-droid.org/en/packages/org.telegram.messenger/";

// You can use this flag to disable Google Play Billing (If you're making fork and want it to be in Google Play)
public static boolean IS_BILLING_UNAVAILABLE = false;
public static boolean IS_BILLING_UNAVAILABLE = true;

static {
if (ApplicationLoader.applicationContext != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,8 @@
import androidx.core.graphics.ColorUtils;
import androidx.recyclerview.widget.RecyclerView;

import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingFlowParams;
import com.android.billingclient.api.ProductDetails;

import org.telegram.PhoneFormat.PhoneFormat;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.BillingController;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MediaDataController;
Expand Down Expand Up @@ -555,7 +550,7 @@ public static void buyPremium(BaseFragment fragment, String source) {
fragment.showDialog(new PremiumNotAvailableBottomSheet(fragment));
return;
}

/*
PremiumPreviewFragment.sentPremiumButtonClick();
if (BuildVars.useInvoiceBilling()) {
Expand Down Expand Up @@ -617,14 +612,15 @@ public static void buyPremium(BaseFragment fragment, String source) {
AlertsCreator.processError(fragment.getCurrentAccount(), error, fragment, req);
}
});
});
});*/
}

public static String getPremiumButtonText(int currentAccount) {
if (BuildVars.IS_BILLING_UNAVAILABLE) {
return LocaleController.getString(R.string.SubscribeToPremiumNotAvailable);
}

return LocaleController.getString(R.string.SubscribeToPremiumNotAvailable);
/*
if (BuildVars.useInvoiceBilling()) {
TLRPC.TL_help_premiumPromo premiumPromo = MediaDataController.getInstance(currentAccount).getPremiumPromo();
if (premiumPromo != null) {
Expand Down Expand Up @@ -659,6 +655,7 @@ public static String getPremiumButtonText(int currentAccount) {
}
return LocaleController.formatString(R.string.SubscribeToPremium, price);
*/
}

private void measureGradient(int w, int h) {
Expand Down

0 comments on commit 034a093

Please sign in to comment.