<commit_before>package com.draga;

import com.badlogic.gdx.pay.PurchaseManagerConfig;
import com.badlogic.gdx.pay.PurchaseSystem;
import com.draga.spaceTravels3.Constants;
import com.draga.spaceTravels3.event.PurchasedEvent;

import java.util.ArrayList;

public abstract class Services
{
    private ArrayList<String> purchasedSkus = new ArrayList<>();

    public Services()
    {
    }

    public void setupPurchaseManager()
    {
        if (PurchaseSystem.hasManager())
        {
            PurchaseManagerConfig purchaseManagerConfig = getPurchaseManagerConfig();
            PurchaseSystem.install(new PurchaseObserver(), purchaseManagerConfig, false);
        }
    }

    public void purchaseSku(String sku)
    {
        if (PurchaseSystem.hasManager())
        {
            PurchaseSystem.purchase(sku);
        }
    }

    protected abstract PurchaseManagerConfig getPurchaseManagerConfig();

    public abstract void share();

    public abstract void googleSignIn();

    public abstract boolean googleIsSignedIn();

    public abstract void googleSignOut();

    public abstract void googleShowLeaderboards();

    public abstract void googleUpdateLeaderboard(String leaderboardID, int score);

    public abstract void googleShowLeaderboard(String leaderboardID);

    public abstract void googleUnlockAchievement(String string);

    public abstract void googleShowAchievements();

    public abstract void rateApp();

    public void restorePurchase()
    {
        PurchaseSystem.purchaseRestore();
    }<commit_msg>call gdx pay on app restarted as described on readme<commit_after>package com.draga;

import com.badlogic.gdx.pay.PurchaseManagerConfig;
import com.badlogic.gdx.pay.PurchaseSystem;
import com.draga.spaceTravels3.Constants;
import com.draga.spaceTravels3.event.PurchasedEvent;

import java.util.ArrayList;

public abstract class Services
{
    private ArrayList<String> purchasedSkus = new ArrayList<>();

    public Services()
    {
    }

    public void setupPurchaseManager()
    {
        PurchaseSystem.onAppRestarted();
        if (PurchaseSystem.hasManager())
        {
            PurchaseManagerConfig purchaseManagerConfig = getPurchaseManagerConfig();
            PurchaseSystem.install(new PurchaseObserver(), purchaseManagerConfig, false);
        }
    }

    protected abstract PurchaseManagerConfig getPurchaseManagerConfig();

    public void purchaseSku(String sku)
    {
        if (PurchaseSystem.hasManager())
        {
            PurchaseSystem.purchase(sku);
        }
    }

    public abstract void share();

    public abstract void googleSignIn();

    public abstract boolean googleIsSignedIn();

    public abstract void googleSignOut();

    public abstract void googleShowLeaderboards();

    public abstract void googleUpdateLeaderboard(String leaderboardID, int score);

    public abstract void googleShowLeaderboard(String leaderboardID);

    public abstract void googleUnlockAchievement(String string);

    public abstract void googleShowAchievements();

    public abstract void rateApp();

    public void restorePurchase()
    {
        PurchaseSystem.purchaseRestore();
    }
{'fraction_non_alphanumeric': 0.07731305449936629, 'fraction_numerical': 0.0012674271229404308, 'mean_word_length': 3.535919540229885, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6252611', 'n_tokens_mistral': 847, 'n_tokens_neox': 803, 'n_words': 200}