<commit_before>package com.eggheadgames.inapppayments;

import android.app.Activity;
import android.content.Context;

import com.billing.BillingService;
import com.billing.PurchaseServiceListener;
import com.billing.SubscriptionServiceListener;
import com.billing.amazon.AmazonBillingService;
import com.billing.google.GoogleBillingService;

import java.util.List;

//Public front-end for IAP functionality. 

public class IAPManager {

    private static BillingService billingService;
    public static int BUILD_TARGET_GOOGLE = 0;
    public static int BUILD_TARGET_AMAZON = 1;

    public static void build(Context context, int buildTarget, List<String> iapkeys) {
        //Build-specific initializations
        if (buildTarget == BUILD_TARGET_GOOGLE) {
            billingService = new GoogleBillingService(context, iapkeys);
        } else if (buildTarget == BUILD_TARGET_AMAZON) {
            billingService = new AmazonBillingService(context, iapkeys);
        }
    }

    public static void init(String key) {
        billingService.init(key);
    }

    public static void addPurchaseListener(PurchaseServiceListener purchaseServiceListener) {
        billingService.addPurchaseListener(purchaseServiceListener);
    }

    public static void removePurchaseListener(PurchaseServiceListener purchaseServiceListener) {
        billingService.removePurchaseListener(purchaseServiceListener);
    }

    public static void addSubscriptionListener(SubscriptionServiceListener subscriptionServiceListener) {
        billingService.addSubscriptionListener(subscriptionServiceListener);
    }

    public static void removeSubscriptionListener(SubscriptionServiceListener subscriptionServiceListener) {
        billingService.removeSubscriptionListener(subscriptionServiceListener);
    }

    public static void buy(Activity activity, String sku, int id) {
        billingService.buy(activity, sku, id);
    }

    public static void subscribe(Activity activity, String sku, int id) {
        billingService.subscribe(activity, sku, id);
    }

    public static void unsubscribe(Activity activity, String sku, int id) {
        billingService.unsubscribe(activity, sku, id);
    }

    public static void enableDebugLogging(boolean enable) {
        billingService.enableDebugLogging(enable);
    }

    public static void destroy() {
        billingService.close();
    }

    public static BillingService getBillingService() {
        return billingService;
    }
}<commit_msg>moved enabling logging into init method<commit_after>package com.eggheadgames.inapppayments;

import android.app.Activity;
import android.content.Context;

import com.billing.BillingService;
import com.billing.PurchaseServiceListener;
import com.billing.SubscriptionServiceListener;
import com.billing.amazon.AmazonBillingService;
import com.billing.google.GoogleBillingService;

import java.util.List;

//Public front-end for IAP functionality. 

public class IAPManager {

    private static BillingService billingService;
    public static int BUILD_TARGET_GOOGLE = 0;
    public static int BUILD_TARGET_AMAZON = 1;

    public static void build(Context context, int buildTarget, List<String> iapkeys) {
        //Build-specific initializations
        if (buildTarget == BUILD_TARGET_GOOGLE) {
            billingService = new GoogleBillingService(context, iapkeys);
        } else if (buildTarget == BUILD_TARGET_AMAZON) {
            billingService = new AmazonBillingService(context, iapkeys);
        }
    }

    public static void init(String key, boolean enableLogging) {
        billingService.init(key);
        billingService.enableDebugLogging(enableLogging);
    }

    public static void addPurchaseListener(PurchaseServiceListener purchaseServiceListener) {
        billingService.addPurchaseListener(purchaseServiceListener);
    }

    public static void removePurchaseListener(PurchaseServiceListener purchaseServiceListener) {
        billingService.removePurchaseListener(purchaseServiceListener);
    }

    public static void addSubscriptionListener(SubscriptionServiceListener subscriptionServiceListener) {
        billingService.addSubscriptionListener(subscriptionServiceListener);
    }

    public static void removeSubscriptionListener(SubscriptionServiceListener subscriptionServiceListener) {
        billingService.removeSubscriptionListener(subscriptionServiceListener);
    }

    public static void buy(Activity activity, String sku, int id) {
        billingService.buy(activity, sku, id);
    }

    public static void subscribe(Activity activity, String sku, int id) {
        billingService.subscribe(activity, sku, id);
    }

    public static void unsubscribe(Activity activity, String sku, int id) {
        billingService.unsubscribe(activity, sku, id);
    }

    public static void destroy() {
        billingService.close();
    }

    public static BillingService getBillingService() {
        return billingService;
    }
}
{'fraction_non_alphanumeric': 0.06913928643418665, 'fraction_numerical': 0.0008062890546260835, 'mean_word_length': 4.084016393442623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6988176', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1271, 'n_words': 300}