1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HELP smali in app mod

Discussion in 'Discussions' started by egames, Sep 5, 2015.

  1. egames

    egames Guest

    Hi

    anyone can help me how to edit this smali to free in app purchase ? thanks :)

    .class public Lcom/xis/android/purchase/PurchaseService;
    .super Ljava/lang/Object;
    .source "PurchaseService.java"


    # annotations
    .annotation system Ldalvik/annotation/MemberClasses;
    value = {
    Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;,
    Lcom/xis/android/purchase/PurchaseService$QueryInitialFinishedListener;,
    Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;,
    Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;,
    Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;
    }
    .end annotation


    # static fields
    .field public static final BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE:I = 0x3

    .field public static final BILLING_RESPONSE_RESULT_DEVELOPER_ERROR:I = 0x5

    .field public static final BILLING_RESPONSE_RESULT_ERROR:I = 0x6

    .field public static final BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED:I = 0x7

    .field public static final BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED:I = 0x8

    .field public static final BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE:I = 0x4

    .field public static final BILLING_RESPONSE_RESULT_OK:I = 0x0

    .field public static final BILLING_RESPONSE_RESULT_USER_CANCELED:I = 0x1

    .field public static final GET_SKU_DETAILS_ITEM_LIST:Ljava/lang/String; = "ITEM_ID_LIST"

    .field public static final GET_SKU_DETAILS_ITEM_TYPE_LIST:Ljava/lang/String; = "ITEM_TYPE_LIST"

    .field public static final IABHELPER_BAD_RESPONSE:I = -0x3ea

    .field public static final IABHELPER_ERROR_BASE:I = -0x3e8

    .field public static final IABHELPER_MISSING_TOKEN:I = -0x3ef

    .field public static final IABHELPER_REMOTE_EXCEPTION:I = -0x3e9

    .field public static final IABHELPER_REQUEST_PAYMENT:I = 0x1

    .field public static final IABHELPER_REQUEST_PRODUCT:I = 0x0

    .field public static final IABHELPER_SEND_INTENT_FAILED:I = -0x3ec

    .field public static final IABHELPER_UNKNOWN_ERROR:I = -0x3f0

    .field public static final IABHELPER_UNKNOWN_PURCHASE_RESPONSE:I = -0x3ee

    .field public static final IABHELPER_USER_CANCELLED:I = -0x3ed

    .field public static final IABHELPER_VERIFICATION_FAILED:I = -0x3eb

    .field public static final INAPP_CONTINUATION_TOKEN:Ljava/lang/String; = "INAPP_CONTINUATION_TOKEN"

    .field public static final ITEM_TYPE_INAPP:Ljava/lang/String; = "inapp"

    .field public static final RESPONSE_BUY_INTENT:Ljava/lang/String; = "BUY_INTENT"

    .field public static final RESPONSE_CODE:Ljava/lang/String; = "RESPONSE_CODE"

    .field public static final RESPONSE_GET_SKU_DETAILS_LIST:Ljava/lang/String; = "DETAILS_LIST"

    .field public static final RESPONSE_INAPP_ITEM_LIST:Ljava/lang/String; = "INAPP_PURCHASE_ITEM_LIST"

    .field public static final RESPONSE_INAPP_PURCHASE_DATA:Ljava/lang/String; = "INAPP_PURCHASE_DATA"

    .field public static final RESPONSE_INAPP_PURCHASE_DATA_LIST:Ljava/lang/String; = "INAPP_PURCHASE_DATA_LIST"

    .field public static final RESPONSE_INAPP_SIGNATURE:Ljava/lang/String; = "INAPP_DATA_SIGNATURE"

    .field public static final RESPONSE_INAPP_SIGNATURE_LIST:Ljava/lang/String; = "INAPP_DATA_SIGNATURE_LIST"


    # instance fields
    .field private activity:Landroid/app/Activity;

    .field public inventorys:Lcom/xis/android/purchase/Inventory;

    .field mAsyncInProgress:Z

    .field mAsyncOperation:Ljava/lang/String;

    .field mContext:Landroid/content/Context;

    .field mDebugLog:Z

    .field mDebugTag:Ljava/lang/String;

    .field mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    .field mRequestCode:I

    .field mService:Lcom/android/vending/billing/IInAppBillingService;

    .field mServiceConn:Landroid/content/ServiceConnection;

    .field minitialized:Z

    .field public products:Lcom/xis/android/purchase/Products;

    .field private purchaseHandler:Landroid/os/Handler;


    # direct methods
    .method public constructor <init>(Landroid/app/Activity;)V
    .locals 3
    .param p1, "activity" # Landroid/app/Activity;

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 125
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 53
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugLog:Z

    .line 54
    const-string v0, "IabHelper"

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugTag:Ljava/lang/String;

    .line 57
    iput-boolean v2, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    .line 60
    iput-boolean v2, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncInProgress:Z

    .line 63
    const-string v0, ""

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncOperation:Ljava/lang/String;

    .line 73
    iput-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->activity:Landroid/app/Activity;

    .line 121
    iput-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->inventorys:Lcom/xis/android/purchase/Inventory;

    .line 122
    iput-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->products:Lcom/xis/android/purchase/Products;

    .line 124
    iput-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->purchaseHandler:Landroid/os/Handler;

    .line 126
    iput-object p1, p0, Lcom/xis/android/purchase/PurchaseService;->activity:Landroid/app/Activity;

    .line 127
    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    .line 128
    const-string v0, "IAB helper create."

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 130
    new-instance v0, Lcom/xis/android/purchase/PurchaseService$1;

    invoke-direct {v0, p0}, Lcom/xis/android/purchase/PurchaseService$1;-><init>(Lcom/xis/android/purchase/PurchaseService;)V

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->purchaseHandler:Landroid/os/Handler;

    .line 146
    return-void
    .end method

    .method public static getResponseDesc(I)Ljava/lang/String;
    .locals 5
    .param p0, "code" # I

    .prologue
    .line 706
    const-string v3, "0:OK/1:User Canceled/2:Unknown/3:Billing Unavailable/4:Item unavailable/5:Developer Error/6:Error/7:Item Already Owned/8:Item not owned"

    .line 709
    const-string v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 710
    .local v0, "iab_msgs":[Ljava/lang/String;
    const-string v3, "0:OK/-1001:Remote exception during initialization/-1002:Bad response received/-1003:purchase signature verification failed/-1004:Send intent failed/-1005:User cancelled/-1006:Unknown purchase response/-1007:Missing token/-1008:Unknown error"

    .line 717
    const-string v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    .line 719
    .local v1, "iabhelper_msgs":[Ljava/lang/String;
    const/16 v3, -0x3e8

    if-gt p0, v3, :cond_1

    .line 720
    rsub-int v2, p0, -0x3e8

    .line 721
    .local v2, "index":I
    if-ltz v2, :cond_0

    array-length v3, v1

    if-ge v2, v3, :cond_0

    .line 722
    aget-object v3, v1, v2

    .line 728
    .end local v2 # "index":I
    :goto_0
    return-object v3

    .line 724
    .restart local v2 # "index":I
    :cond_0
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ":Unknown IAB Helper Error"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 725
    .end local v2 # "index":I
    :cond_1
    if-ltz p0, :cond_2

    array-length v3, v0

    if-lt p0, v3, :cond_3

    .line 726
    :cond_2
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ":Unknown"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 728
    :cond_3
    aget-object v3, v0, p0

    goto :goto_0
    .end method

    .method private onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V
    .locals 5
    .param p1, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;
    .param p2, "result" # Lcom/xis/android/purchase/IabResult;
    .param p3, "purchase" # Lcom/xis/android/purchase/Purchase;

    .prologue
    .line 255
    if-eqz p1, :cond_0

    .line 257
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v4

    invoke-direct {v0, v4}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    .line 258
    .local v0, "handler":Landroid/os/Handler;
    move-object v3, p2

    .line 259
    .local v3, "result_f":Lcom/xis/android/purchase/IabResult;
    move-object v2, p3

    .line 260
    .local v2, "purchase_f":Lcom/xis/android/purchase/Purchase;
    move-object v1, p1

    .line 261
    .local v1, "listener_f":Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;
    new-instance v4, Lcom/xis/android/purchase/PurchaseService$3;

    invoke-direct {v4, p0, v1, v3, v2}, Lcom/xis/android/purchase/PurchaseService$3;-><init>(Lcom/xis/android/purchase/PurchaseService;Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    invoke-virtual {v0, v4}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 267
    .end local v0 # "handler":Landroid/os/Handler;
    .end local v1 # "listener_f":Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;
    .end local v2 # "purchase_f":Lcom/xis/android/purchase/Purchase;
    .end local v3 # "result_f":Lcom/xis/android/purchase/IabResult;
    :cond_0
    return-void
    .end method


    # virtual methods
    .method public checkSetupDone(Ljava/lang/String;)V
    .locals 3
    .param p1, "operation" # Ljava/lang/String;

    .prologue
    .line 733
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-nez v0, :cond_0

    .line 734
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Illegal state for operation ("

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 735
    const-string v1, "): IAB helper is not set up."

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 734
    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 736
    new-instance v0, Ljava/lang/IllegalStateException;

    .line 737
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "IAB helper is not set up. Can\'t perform operation: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 738
    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 737
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 736
    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 740
    :cond_0
    return-void
    .end method

    .method consume(Ljava/lang/String;Ljava/lang/String;)V
    .locals 6
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "token" # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
    value = {
    Lcom/xis/android/purchase/IabException;
    }
    .end annotation

    .prologue
    .line 673
    const-string v2, "consume"

    invoke-virtual {p0, v2}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 675
    if-eqz p2, :cond_0

    :try_start_0
    const-string v2, ""

    invoke-virtual {p2, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 676
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Can\'t consume "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ". No token."

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 677
    new-instance v2, Lcom/xis/android/purchase/IabException;

    const/16 v3, -0x3ef

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "PurchaseInfo is missing token for sku: "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 678
    invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ", token:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 677
    invoke-direct {v2, v3, v4}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;)V

    throw v2
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 691
    :catch_0
    move-exception v0

    .line 692
    .local v0, "e":Landroid/os/RemoteException;
    new-instance v2, Lcom/xis/android/purchase/IabException;

    const/16 v3, -0x3e9

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "Remote exception while consuming. productid: "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ", token:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v3, v4, v0}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;Ljava/lang/Exception;)V

    throw v2

    .line 681
    .end local v0 # "e":Landroid/os/RemoteException;
    :cond_1
    :try_start_1
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Consuming sku: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ", token: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 682
    iget-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mService:Lcom/android/vending/billing/IInAppBillingService;

    const/4 v3, 0x3

    iget-object v4, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    invoke-virtual {v4}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    invoke-interface {v2, v3, v4, p2}, Lcom/android/vending/billing/IInAppBillingService;->consumePurchase(ILjava/lang/String;Ljava/lang/String;)I

    move-result v1

    .line 683
    .local v1, "response":I
    if-nez v1, :cond_2

    .line 684
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Successfully consumed sku: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 694
    return-void

    .line 687
    :cond_2
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Error consuming consuming sku "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, ". "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-static {v1}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 688
    new-instance v2, Lcom/xis/android/purchase/IabException;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Error consuming sku "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v1, v3}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;)V

    throw v2
    :try_end_1
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
    .end method

    .method public consumeAsync(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;)I
    .locals 1
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "orderid" # Ljava/lang/String;
    .param p3, "token" # Ljava/lang/String;
    .param p4, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;

    .prologue
    .line 638
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-nez v0, :cond_0

    .line 639
    const/4 v0, -0x4

    .line 644
    :goto_0
    return v0

    .line 641
    :cond_0
    const-string v0, "consume"

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 642
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/xis/android/purchase/PurchaseService;->consumeAsyncInternal(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;)V

    .line 644
    const/4 v0, 0x0

    goto :goto_0
    .end method

    .method consumeAsyncInternal(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;)V
    .locals 8
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "orderid" # Ljava/lang/String;
    .param p3, "token" # Ljava/lang/String;
    .param p4, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;

    .prologue
    .line 648
    new-instance v5, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-direct {v5, v0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    .line 649
    .local v5, "handler":Landroid/os/Handler;
    const-string v0, "consume"

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->flagStartAsync(Ljava/lang/String;)V

    .line 650
    new-instance v7, Ljava/lang/Thread;

    new-instance v0, Lcom/xis/android/purchase/PurchaseService$6;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p3

    move-object v4, p4

    move-object v6, p2

    invoke-direct/range {v0 .. v6}, Lcom/xis/android/purchase/PurchaseService$6;-><init>(Lcom/xis/android/purchase/PurchaseService;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;Landroid/os/Handler;Ljava/lang/String;)V

    invoke-direct {v7, v0}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 670
    invoke-virtual {v7}, Ljava/lang/Thread;->start()V

    .line 671
    return-void
    .end method

    .method public enableDebugLogging(Z)V
    .locals 0
    .param p1, "enable" # Z

    .prologue
    .line 157
    iput-boolean p1, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugLog:Z

    .line 158
    return-void
    .end method

    .method public enableDebugLogging(ZLjava/lang/String;)V
    .locals 0
    .param p1, "enable" # Z
    .param p2, "tag" # Ljava/lang/String;

    .prologue
    .line 152
    iput-boolean p1, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugLog:Z

    .line 153
    iput-object p2, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugTag:Ljava/lang/String;

    .line 154
    return-void
    .end method

    .method public finalize()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 222
    const-string v0, "Disposing."

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 223
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    .line 224
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mServiceConn:Landroid/content/ServiceConnection;

    if-eqz v0, :cond_1

    .line 225
    const-string v0, "Unbinding from service."

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 226
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    if-eqz v0, :cond_0

    .line 227
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->mServiceConn:Landroid/content/ServiceConnection;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V

    .line 228
    :cond_0
    iput-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mServiceConn:Landroid/content/ServiceConnection;

    .line 229
    iput-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mService:Lcom/android/vending/billing/IInAppBillingService;

    .line 230
    iput-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    .line 232
    :cond_1
    return-void
    .end method

    .method flagEndAsync()V
    .locals 2

    .prologue
    .line 791
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Ending async operation: "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncOperation:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 792
    const-string v0, ""

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncOperation:Ljava/lang/String;

    .line 793
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncInProgress:Z

    .line 794
    return-void
    .end method

    .method flagStartAsync(Ljava/lang/String;)V
    .locals 3
    .param p1, "operation" # Ljava/lang/String;

    .prologue
    .line 781
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncInProgress:Z

    if-eqz v0, :cond_0

    .line 782
    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "Can\'t start async operation ("

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 783
    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ") because another async operation("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 784
    iget-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncOperation:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ") is in progress."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 782
    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 785
    :cond_0
    iput-object p1, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncOperation:Ljava/lang/String;

    .line 786
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->mAsyncInProgress:Z

    .line 787
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Starting async operation: "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 788
    return-void
    .end method

    .method public getResponseCodeFromBundle(Landroid/os/Bundle;)I
    .locals 4
    .param p1, "b" # Landroid/os/Bundle;

    .prologue
    .line 744
    const-string v1, "RESPONSE_CODE"

    invoke-virtual {p1, v1}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    .line 745
    .local v0, "o":Ljava/lang/Object;
    if-nez v0, :cond_0

    .line 746
    const-string v1, "Bundle with null response code, assuming OK (known issue)"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 747
    const/4 v1, 0x0

    .line 751
    .end local v0 # "o":Ljava/lang/Object;
    :goto_0
    return v1

    .line 748
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_0
    instance-of v1, v0, Ljava/lang/Integer;

    if-eqz v1, :cond_1

    .line 749
    check-cast v0, Ljava/lang/Integer;

    .end local v0 # "o":Ljava/lang/Object;
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v1

    goto :goto_0

    .line 750
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_1
    instance-of v1, v0, Ljava/lang/Long;

    if-eqz v1, :cond_2

    .line 751
    check-cast v0, Ljava/lang/Long;

    .end local v0 # "o":Ljava/lang/Object;
    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    long-to-int v1, v1

    goto :goto_0

    .line 753
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_2
    const-string v1, "Unexpected type for bundle response code."

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 754
    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 755
    new-instance v1, Ljava/lang/RuntimeException;

    .line 756
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Unexpected type for bundle response code: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 757
    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 756
    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 755
    invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v1
    .end method

    .method public getResponseCodeFromIntent(Landroid/content/Intent;)I
    .locals 4
    .param p1, "i" # Landroid/content/Intent;

    .prologue
    .line 763
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    const-string v2, "RESPONSE_CODE"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    .line 764
    .local v0, "o":Ljava/lang/Object;
    if-nez v0, :cond_0

    .line 765
    const-string v1, "Intent with no response code, assuming OK (known issue)"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 766
    const/4 v1, 0x0

    .line 770
    .end local v0 # "o":Ljava/lang/Object;
    :goto_0
    return v1

    .line 767
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_0
    instance-of v1, v0, Ljava/lang/Integer;

    if-eqz v1, :cond_1

    .line 768
    check-cast v0, Ljava/lang/Integer;

    .end local v0 # "o":Ljava/lang/Object;
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v1

    goto :goto_0

    .line 769
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_1
    instance-of v1, v0, Ljava/lang/Long;

    if-eqz v1, :cond_2

    .line 770
    check-cast v0, Ljava/lang/Long;

    .end local v0 # "o":Ljava/lang/Object;
    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v1

    long-to-int v1, v1

    goto :goto_0

    .line 772
    .restart local v0 # "o":Ljava/lang/Object;
    :cond_2
    const-string v1, "Unexpected type for intent response code."

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 773
    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 774
    new-instance v1, Ljava/lang/RuntimeException;

    .line 775
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Unexpected type for intent response code: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 776
    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 775
    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 774
    invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v1
    .end method

    .method public handleActivityResult(IILandroid/content/Intent;)Z
    .locals 12
    .param p1, "requestCode" # I
    .param p2, "resultCode" # I
    .param p3, "data" # Landroid/content/Intent;

    .prologue
    const/4 v6, 0x0

    const/4 v9, -0x1

    const/16 v11, -0x3ea

    const/4 v7, 0x1

    const/4 v10, 0x0

    .line 357
    iget v8, p0, Lcom/xis/android/purchase/PurchaseService;->mRequestCode:I

    if-eq p1, v8, :cond_0

    .line 432
    :goto_0
    return v6

    .line 360
    :cond_0
    const-string v8, "handleActivityResult"

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 363
    invoke-virtual {p0}, Lcom/xis/android/purchase/PurchaseService;->flagEndAsync()V

    .line 365
    if-nez p3, :cond_1

    .line 366
    const-string v6, "Null data in IAB activity result."

    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 367
    new-instance v5, Lcom/xis/android/purchase/IabResult;

    .line 368
    const-string v6, "Null data in IAB result"

    .line 367
    invoke-direct {v5, v11, v6}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 369
    .local v5, "result":Lcom/xis/android/purchase/IabResult;
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    invoke-direct {p0, v6, v5, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    move v6, v7

    .line 370
    goto :goto_0

    .line 374
    .end local v5 # "result":Lcom/xis/android/purchase/IabResult;
    :cond_1
    invoke-virtual {p0, p3}, Lcom/xis/android/purchase/PurchaseService;->getResponseCodeFromIntent(Landroid/content/Intent;)I

    move-result v4

    .line 375
    .local v4, "responseCode":I
    const-string v8, "INAPP_PURCHASE_DATA"

    invoke-virtual {p3, v8}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 376
    .local v3, "purchaseData":Ljava/lang/String;
    const-string v8, "INAPP_DATA_SIGNATURE"

    invoke-virtual {p3, v8}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 379
    .local v0, "dataSignature":Ljava/lang/String;
    if-ne p2, v9, :cond_5

    .line 380
    if-nez v4, :cond_5

    .line 381
    const-string v8, "Successful resultcode from purchase activity."

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 382
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Purchase data: "

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 383
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Data signature: "

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 384
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Extras: "

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 386
    if-eqz v3, :cond_2

    if-nez v0, :cond_3

    .line 387
    :cond_2
    const-string v6, "BUG: either purchaseData or dataSignature is null."

    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 388
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v8, "Extras: "

    invoke-direct {v6, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v8

    invoke-virtual {v8}, Landroid/os/Bundle;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 389
    new-instance v5, Lcom/xis/android/purchase/IabResult;

    const/16 v6, -0x3f0

    .line 390
    const-string v8, "IAB returned null purchaseData or dataSignature"

    .line 389
    invoke-direct {v5, v6, v8}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 391
    .restart local v5 # "result":Lcom/xis/android/purchase/IabResult;
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    invoke-direct {p0, v6, v5, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    move v6, v7

    .line 392
    goto/16 :goto_0

    .line 395
    .end local v5 # "result":Lcom/xis/android/purchase/IabResult;
    :cond_3
    const/4 v2, 0x0

    .line 397
    .local v2, "purchase":Lcom/xis/android/purchase/Purchase;
    :try_start_0
    new-instance v2, Lcom/xis/android/purchase/Purchase;

    .end local v2 # "purchase":Lcom/xis/android/purchase/Purchase;
    invoke-direct {v2, v3, v0}, Lcom/xis/android/purchase/Purchase;-><init>(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 405
    .restart local v2 # "purchase":Lcom/xis/android/purchase/Purchase;
    iget-object v8, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    new-instance v9, Lcom/xis/android/purchase/IabResult;

    const-string v10, "Success"

    invoke-direct {v9, v6, v10}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    invoke-direct {p0, v8, v9, v2}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    .end local v2 # "purchase":Lcom/xis/android/purchase/Purchase;
    :cond_4
    :goto_1
    move v6, v7

    .line 432
    goto/16 :goto_0

    .line 398
    :catch_0
    move-exception v1

    .line 399
    .local v1, "e":Lorg/json/JSONException;
    const-string v6, "Failed to parse purchase data."

    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 400
    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    .line 401
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    new-instance v8, Lcom/xis/android/purchase/IabResult;

    const-string v9, "Failed to parse purchase data."

    invoke-direct {v8, v11, v9}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    invoke-direct {p0, v6, v8, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    move v6, v7

    .line 402
    goto/16 :goto_0

    .line 406
    .end local v1 # "e":Lorg/json/JSONException;
    :cond_5
    if-ne p2, v9, :cond_6

    .line 408
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v8, "Result code was OK but in-app billing response was not OK: "

    invoke-direct {v6, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 409
    invoke-static {v4}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 408
    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 410
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    if-eqz v6, :cond_4

    .line 411
    new-instance v5, Lcom/xis/android/purchase/IabResult;

    .line 412
    const-string v6, "Problem purchashing item."

    .line 411
    invoke-direct {v5, v4, v6}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 413
    .restart local v5 # "result":Lcom/xis/android/purchase/IabResult;
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    invoke-direct {p0, v6, v5, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    goto :goto_1

    .line 415
    .end local v5 # "result":Lcom/xis/android/purchase/IabResult;
    :cond_6
    if-nez p2, :cond_7

    .line 416
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v8, "Purchase canceled - Response: "

    invoke-direct {v6, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 417
    invoke-static {v4}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 416
    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 418
    new-instance v5, Lcom/xis/android/purchase/IabResult;

    const/16 v6, -0x3ed

    const-string v8, "User canceled."

    invoke-direct {v5, v6, v8}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 419
    .restart local v5 # "result":Lcom/xis/android/purchase/IabResult;
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    if-eqz v6, :cond_4

    .line 420
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    invoke-direct {p0, v6, v5, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    goto :goto_1

    .line 423
    .end local v5 # "result":Lcom/xis/android/purchase/IabResult;
    :cond_7
    new-instance v6, Ljava/lang/StringBuilder;

    const-string v8, "Purchase failed. Result code: "

    invoke-direct {v6, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 424
    invoke-static {p2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v8, ". Response: "

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    .line 425
    invoke-static {v4}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 423
    invoke-virtual {p0, v6}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 426
    new-instance v5, Lcom/xis/android/purchase/IabResult;

    const/16 v6, -0x3ee

    .line 427
    const-string v8, "Unknown purchase response."

    .line 426
    invoke-direct {v5, v6, v8}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 428
    .restart local v5 # "result":Lcom/xis/android/purchase/IabResult;
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    if-eqz v6, :cond_4

    .line 429
    iget-object v6, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    invoke-direct {p0, v6, v5, v10}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    goto/16 :goto_1
    .end method

    .method public initialize(Lcom/xis/android/purchase/PurchaseService$QueryInitialFinishedListener;)V
    .locals 4
    .param p1, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryInitialFinishedListener;
    .annotation system Ldalvik/annotation/Throws;
    value = {
    Ljava/lang/Exception;
    }
    .end annotation

    .prologue
    .line 170
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-eqz v0, :cond_0

    .line 171
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "IAB helper is already set up."

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 175
    :cond_0
    const-string v0, "Starting in-app billing setup."

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 176
    new-instance v0, Lcom/xis/android/purchase/PurchaseService$2;

    invoke-direct {v0, p0, p1}, Lcom/xis/android/purchase/PurchaseService$2;-><init>(Lcom/xis/android/purchase/PurchaseService;Lcom/xis/android/purchase/PurchaseService$QueryInitialFinishedListener;)V

    iput-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mServiceConn:Landroid/content/ServiceConnection;

    .line 210
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    new-instance v1, Landroid/content/Intent;

    .line 211
    const-string v2, "com.android.vending.billing.InAppBillingService.BIND"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 212
    iget-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mServiceConn:Landroid/content/ServiceConnection;

    const/4 v3, 0x1

    .line 210
    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z

    .line 213
    return-void
    .end method

    .method public launchPurchaseFlow(Ljava/lang/String;ILcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;)I
    .locals 1
    .param p1, "sku" # Ljava/lang/String;
    .param p2, "requestCode" # I
    .param p3, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    .prologue
    .line 251
    const-string v0, ""

    invoke-virtual {p0, p1, p2, p3, v0}, Lcom/xis/android/purchase/PurchaseService;->launchPurchaseFlow(Ljava/lang/String;ILcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Ljava/lang/String;)I

    move-result v0

    return v0
    .end method

    .method public launchPurchaseFlow(Ljava/lang/String;ILcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Ljava/lang/String;)I
    .locals 12
    .param p1, "sku" # Ljava/lang/String;
    .param p2, "requestCode" # I
    .param p3, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;
    .param p4, "extraData" # Ljava/lang/String;

    .prologue
    .line 294
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-nez v0, :cond_0

    .line 295
    const/4 v0, -0x4

    .line 339
    :goto_0
    return v0

    .line 297
    :cond_0
    const-string v0, "launchPurchaseFlow"

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 298
    const-string v0, "launchPurchaseFlow"

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->flagStartAsync(Ljava/lang/String;)V

    .line 301
    :try_start_0
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Constructing buy intent for "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 302
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mService:Lcom/android/vending/billing/IInAppBillingService;

    const/4 v1, 0x3

    .line 303
    iget-object v2, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    const-string v4, "inapp"

    move-object v3, p1

    move-object/from16 v5, p4

    .line 302
    invoke-interface/range {v0 .. v5}, Lcom/android/vending/billing/IInAppBillingService;->getBuyIntent(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v7

    .line 304
    .local v7, "buyIntentBundle":Landroid/os/Bundle;
    invoke-virtual {p0, v7}, Lcom/xis/android/purchase/PurchaseService;->getResponseCodeFromBundle(Landroid/os/Bundle;)I

    move-result v10

    .line 305
    .local v10, "response":I
    if-eqz v10, :cond_1

    .line 306
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Unable to buy item, Error response: "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v10}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 308
    invoke-virtual {p0}, Lcom/xis/android/purchase/PurchaseService;->flagEndAsync()V

    .line 309
    new-instance v11, Lcom/xis/android/purchase/IabResult;

    const-string v0, "Unable to buy item"

    invoke-direct {v11, v10, v0}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 310
    .local v11, "result":Lcom/xis/android/purchase/IabResult;
    const/4 v0, 0x0

    invoke-direct {p0, p3, v11, v0}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    .line 311
    const/16 v0, -0xb

    goto :goto_0

    .line 314
    .end local v11 # "result":Lcom/xis/android/purchase/IabResult;
    :cond_1
    const-string v0, "BUY_INTENT"

    invoke-virtual {v7, v0}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v9

    check-cast v9, Landroid/app/PendingIntent;

    .line 315
    .local v9, "pendingIntent":Landroid/app/PendingIntent;
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Launching buy intent for "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ". Request code: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 316
    iput p2, p0, Lcom/xis/android/purchase/PurchaseService;->mRequestCode:I

    .line 317
    iput-object p3, p0, Lcom/xis/android/purchase/PurchaseService;->mPaymentListener:Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;

    .line 318
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->activity:Landroid/app/Activity;

    invoke-virtual {v9}, Landroid/app/PendingIntent;->getIntentSender()Landroid/content/IntentSender;

    move-result-object v1

    .line 319
    new-instance v3, Landroid/content/Intent;

    invoke-direct {v3}, Landroid/content/Intent;-><init>()V

    const/4 v2, 0x0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v4

    .line 320
    const/4 v2, 0x0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v5

    const/4 v2, 0x0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v6

    move v2, p2

    .line 318
    invoke-virtual/range {v0 .. v6}, Landroid/app/Activity;->startIntentSenderForResult(Landroid/content/IntentSender;ILandroid/content/Intent;III)V
    :try_end_0
    .catch Landroid/content/IntentSender$SendIntentException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_1

    .line 339
    .end local v7 # "buyIntentBundle":Landroid/os/Bundle;
    .end local v9 # "pendingIntent":Landroid/app/PendingIntent;
    .end local v10 # "response":I
    :goto_1
    const/4 v0, 0x0

    goto/16 :goto_0

    .line 321
    :catch_0
    move-exception v8

    .line 322
    .local v8, "e":Landroid/content/IntentSender$SendIntentException;
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "SendIntentException while launching purchase flow for sku "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 323
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 322
    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 324
    invoke-virtual {v8}, Landroid/content/IntentSender$SendIntentException;->printStackTrace()V

    .line 326
    invoke-virtual {p0}, Lcom/xis/android/purchase/PurchaseService;->flagEndAsync()V

    .line 327
    new-instance v11, Lcom/xis/android/purchase/IabResult;

    const/16 v0, -0x3ec

    .line 328
    const-string v1, "Failed to send intent."

    .line 327
    invoke-direct {v11, v0, v1}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 329
    .restart local v11 # "result":Lcom/xis/android/purchase/IabResult;
    const/4 v0, 0x0

    invoke-direct {p0, p3, v11, v0}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    goto :goto_1

    .line 330
    .end local v8 # "e":Landroid/content/IntentSender$SendIntentException;
    .end local v11 # "result":Lcom/xis/android/purchase/IabResult;
    :catch_1
    move-exception v8

    .line 331
    .local v8, "e":Landroid/os/RemoteException;
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "RemoteException while launching purchase flow for sku "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 332
    invoke-virtual {v8}, Landroid/os/RemoteException;->printStackTrace()V

    .line 334
    invoke-virtual {p0}, Lcom/xis/android/purchase/PurchaseService;->flagEndAsync()V

    .line 335
    new-instance v11, Lcom/xis/android/purchase/IabResult;

    const/16 v0, -0x3e9

    .line 336
    const-string v1, "Remote exception while starting purchase flow"

    .line 335
    invoke-direct {v11, v0, v1}, Lcom/xis/android/purchase/IabResult;-><init>(ILjava/lang/String;)V

    .line 337
    .restart local v11 # "result":Lcom/xis/android/purchase/IabResult;
    const/4 v0, 0x0

    invoke-direct {p0, p3, v11, v0}, Lcom/xis/android/purchase/PurchaseService;->onPaymentFinished(Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Lcom/xis/android/purchase/IabResult;Lcom/xis/android/purchase/Purchase;)V

    goto :goto_1
    .end method

    .method logDebug(Ljava/lang/String;)V
    .locals 1
    .param p1, "msg" # Ljava/lang/String;

    .prologue
    .line 797
    iget-boolean v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugLog:Z

    if-eqz v0, :cond_0

    .line 798
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugTag:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 799
    :cond_0
    return-void
    .end method

    .method logError(Ljava/lang/String;)V
    .locals 3
    .param p1, "msg" # Ljava/lang/String;

    .prologue
    .line 802
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugTag:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "In-app billing error: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 803
    return-void
    .end method

    .method logWarn(Ljava/lang/String;)V
    .locals 3
    .param p1, "msg" # Ljava/lang/String;

    .prologue
    .line 806
    iget-object v0, p0, Lcom/xis/android/purchase/PurchaseService;->mDebugTag:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "In-app billing warning: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 807
    return-void
    .end method

    .method public queryInventory()Lcom/xis/android/purchase/Inventory;
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
    value = {
    Lcom/xis/android/purchase/IabException;
    }
    .end annotation

    .prologue
    .line 475
    const-string v3, "queryInventory"

    invoke-virtual {p0, v3}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 477
    :try_start_0
    new-instance v1, Lcom/xis/android/purchase/Inventory;

    invoke-direct {v1}, Lcom/xis/android/purchase/Inventory;-><init>()V

    .line 478
    .local v1, "inv":Lcom/xis/android/purchase/Inventory;
    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->queryPurchases(Lcom/xis/android/purchase/Inventory;)I

    move-result v2

    .line 479
    .local v2, "r":I
    if-eqz v2, :cond_0

    .line 480
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const-string v4, "Error refreshing inventory (querying owned items)."

    invoke-direct {v3, v2, v4}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;)V

    throw v3
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_1

    .line 484
    .end local v1 # "inv":Lcom/xis/android/purchase/Inventory;
    .end local v2 # "r":I
    :catch_0
    move-exception v0

    .line 485
    .local v0, "e":Landroid/os/RemoteException;
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const/16 v4, -0x3e9

    const-string v5, "Remote exception while refreshing inventory."

    invoke-direct {v3, v4, v5, v0}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;Ljava/lang/Exception;)V

    throw v3

    .line 487
    .end local v0 # "e":Landroid/os/RemoteException;
    :catch_1
    move-exception v0

    .line 488
    .local v0, "e":Lorg/json/JSONException;
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const/16 v4, -0x3ea

    const-string v5, "Error parsing JSON response while refreshing inventory."

    invoke-direct {v3, v4, v5, v0}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;Ljava/lang/Exception;)V

    throw v3

    .line 482
    .end local v0 # "e":Lorg/json/JSONException;
    .restart local v1 # "inv":Lcom/xis/android/purchase/Inventory;
    .restart local v2 # "r":I
    :cond_0
    return-object v1
    .end method

    .method queryProducts(Lcom/xis/android/purchase/Products;Ljava/util/List;)I
    .locals 11
    .param p1, "products" # Lcom/xis/android/purchase/Products;
    .annotation system Ldalvik/annotation/Signature;
    value = {
    "(",
    "Lcom/xis/android/purchase/Products;",
    "Ljava/util/List",
    "<",
    "Ljava/lang/String;",
    ">;)I"
    }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
    value = {
    Landroid/os/RemoteException;,
    Lorg/json/JSONException;
    }
    .end annotation

    .prologue
    .local p2, "moreSkus":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    const/4 v2, 0x0

    .line 585
    const-string v7, "Querying SKU details."

    invoke-virtual {p0, v7}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 586
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    .line 587
    .local v5, "skuList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    invoke-virtual {p1}, Lcom/xis/android/purchase/Products;->getAllOwnedProductIds()Ljava/util/List;

    move-result-object v7

    invoke-virtual {v5, v7}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 588
    if-eqz p2, :cond_0

    invoke-virtual {v5, p2}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 590
    :cond_0
    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v7

    if-nez v7, :cond_2

    .line 591
    const-string v7, "queryPrices: nothing to do because there are no SKUs."

    invoke-virtual {p0, v7}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 617
    :cond_1
    :goto_0
    return v2

    .line 595
    :cond_2
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 596
    .local v1, "querySkus":Landroid/os/Bundle;
    const-string v7, "ITEM_ID_LIST"

    invoke-virtual {v1, v7, v5}, Landroid/os/Bundle;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V

    .line 597
    iget-object v7, p0, Lcom/xis/android/purchase/PurchaseService;->mService:Lcom/android/vending/billing/IInAppBillingService;

    const/4 v8, 0x3

    iget-object v9, p0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    invoke-virtual {v9}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v9

    const-string v10, "inapp"

    invoke-interface {v7, v8, v9, v10, v1}, Lcom/android/vending/billing/IInAppBillingService;->getSkuDetails(ILjava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;

    move-result-object v4

    .line 599
    .local v4, "skuDetails":Landroid/os/Bundle;
    const-string v7, "DETAILS_LIST"

    invoke-virtual {v4, v7}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v7

    if-nez v7, :cond_4

    .line 600
    invoke-virtual {p0, v4}, Lcom/xis/android/purchase/PurchaseService;->getResponseCodeFromBundle(Landroid/os/Bundle;)I

    move-result v2

    .line 601
    .local v2, "response":I
    if-eqz v2, :cond_3

    .line 602
    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "getSkuDetails() failed: "

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v2}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {p0, v7}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    goto :goto_0

    .line 605
    :cond_3
    const-string v7, "getSkuDetails() returned a bundle with neither an error nor a detail list."

    invoke-virtual {p0, v7}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 606
    const/16 v2, -0x3ea

    goto :goto_0

    .line 610
    .end local v2 # "response":I
    :cond_4
    const-string v7, "DETAILS_LIST"

    invoke-virtual {v4, v7}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v3

    .line 612
    .local v3, "responseList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v8

    if-eqz v8, :cond_1

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    .line 613
    .local v6, "thisResponse":Ljava/lang/String;
    new-instance v0, Lcom/xis/android/purchase/SkuDetails;

    invoke-direct {v0, v6}, Lcom/xis/android/purchase/SkuDetails;-><init>(Ljava/lang/String;)V

    .line 614
    .local v0, "d":Lcom/xis/android/purchase/SkuDetails;
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "Got sku details: "

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {p0, v8}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 615
    invoke-virtual {p1, v0}, Lcom/xis/android/purchase/Products;->addSkuDetails(Lcom/xis/android/purchase/SkuDetails;)V

    goto :goto_1
    .end method

    .method public queryProducts(Ljava/util/List;)Lcom/xis/android/purchase/Products;
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
    value = {
    "(",
    "Ljava/util/List",
    "<",
    "Ljava/lang/String;",
    ">;)",
    "Lcom/xis/android/purchase/Products;"
    }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
    value = {
    Lcom/xis/android/purchase/IabException;
    }
    .end annotation

    .prologue
    .line 568
    .local p1, "moreSkus":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    const-string v3, "queryInventory"

    invoke-virtual {p0, v3}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 570
    :try_start_0
    new-instance v1, Lcom/xis/android/purchase/Products;

    invoke-direct {v1}, Lcom/xis/android/purchase/Products;-><init>()V

    .line 571
    .local v1, "products":Lcom/xis/android/purchase/Products;
    invoke-virtual {p0, v1, p1}, Lcom/xis/android/purchase/PurchaseService;->queryProducts(Lcom/xis/android/purchase/Products;Ljava/util/List;)I

    move-result v2

    .line 572
    .local v2, "r":I
    if-eqz v2, :cond_0

    .line 573
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const-string v4, "Error refreshing inventory (querying prices of items)."

    invoke-direct {v3, v2, v4}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;)V

    throw v3
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_1

    .line 577
    .end local v1 # "products":Lcom/xis/android/purchase/Products;
    .end local v2 # "r":I
    :catch_0
    move-exception v0

    .line 578
    .local v0, "e":Landroid/os/RemoteException;
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const/16 v4, -0x3e9

    const-string v5, "Remote exception while refreshing inventory."

    invoke-direct {v3, v4, v5, v0}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;Ljava/lang/Exception;)V

    throw v3

    .line 580
    .end local v0 # "e":Landroid/os/RemoteException;
    :catch_1
    move-exception v0

    .line 581
    .local v0, "e":Lorg/json/JSONException;
    new-instance v3, Lcom/xis/android/purchase/IabException;

    const/16 v4, -0x3ea

    const-string v5, "Error parsing JSON response while refreshing inventory."

    invoke-direct {v3, v4, v5, v0}, Lcom/xis/android/purchase/IabException;-><init>(ILjava/lang/String;Ljava/lang/Exception;)V

    throw v3

    .line 575
    .end local v0 # "e":Lorg/json/JSONException;
    .restart local v1 # "products":Lcom/xis/android/purchase/Products;
    .restart local v2 # "r":I
    :cond_0
    return-object v1
    .end method

    .method public queryProductsAsync(Ljava/util/List;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)I
    .locals 3
    .param p2, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;
    .annotation system Ldalvik/annotation/Signature;
    value = {
    "(",
    "Ljava/util/List",
    "<",
    "Ljava/lang/String;",
    ">;",
    "Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;",
    ")I"
    }
    .end annotation

    .prologue
    .line 536
    .local p1, "productids":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    .line 537
    .local v0, "handler":Landroid/os/Handler;
    iget-boolean v1, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-nez v1, :cond_0

    .line 538
    const/4 v1, -0x4

    .line 564
    :goto_0
    return v1

    .line 540
    :cond_0
    const-string v1, "queryInventory"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 541
    const-string v1, "refresh inventory"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->flagStartAsync(Ljava/lang/String;)V

    .line 542
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/xis/android/purchase/PurchaseService$5;

    invoke-direct {v2, p0, p1, v0, p2}, Lcom/xis/android/purchase/PurchaseService$5;-><init>(Lcom/xis/android/purchase/PurchaseService;Ljava/util/List;Landroid/os/Handler;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 562
    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    .line 564
    const/4 v1, 0x0

    goto :goto_0
    .end method

    .method queryPurchases(Lcom/xis/android/purchase/Inventory;)I
    .locals 17
    .param p1, "inv" # Lcom/xis/android/purchase/Inventory;
    .annotation system Ldalvik/annotation/Throws;
    value = {
    Lorg/json/JSONException;,
    Landroid/os/RemoteException;
    }
    .end annotation

    .prologue
    .line 493
    const-string v13, "Querying owned items..."

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 494
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Package name: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, p0

    iget-object v14, v0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    invoke-virtual {v14}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 495
    const/4 v12, 0x0

    .line 496
    .local v12, "verificationFailed":Z
    const/4 v1, 0x0

    .line 499
    .local v1, "continueToken":Ljava/lang/String;
    :cond_0
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Calling getPurchases with continuation token: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 500
    move-object/from16 v0, p0

    iget-object v13, v0, Lcom/xis/android/purchase/PurchaseService;->mService:Lcom/android/vending/billing/IInAppBillingService;

    const/4 v14, 0x3

    move-object/from16 v0, p0

    iget-object v15, v0, Lcom/xis/android/purchase/PurchaseService;->mContext:Landroid/content/Context;

    invoke-virtual {v15}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v15

    const-string v16, "inapp"

    move-object/from16 v0, v16

    invoke-interface {v13, v14, v15, v0, v1}, Lcom/android/vending/billing/IInAppBillingService;->getPurchases(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object v3

    .line 502
    .local v3, "ownedItems":Landroid/os/Bundle;
    move-object/from16 v0, p0

    invoke-virtual {v0, v3}, Lcom/xis/android/purchase/PurchaseService;->getResponseCodeFromBundle(Landroid/os/Bundle;)I

    move-result v8

    .line 503
    .local v8, "response":I
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Owned items response: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 504
    if-eqz v8, :cond_1

    .line 505
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "getPurchases() failed: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v8}, Lcom/xis/android/purchase/PurchaseService;->getResponseDesc(I)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 531
    .end local v8 # "response":I
    :goto_0
    return v8

    .line 508
    .restart local v8 # "response":I
    :cond_1
    const-string v13, "INAPP_PURCHASE_ITEM_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v13

    if-eqz v13, :cond_2

    .line 509
    const-string v13, "INAPP_PURCHASE_DATA_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v13

    if-eqz v13, :cond_2

    .line 510
    const-string v13, "INAPP_DATA_SIGNATURE_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v13

    if-nez v13, :cond_3

    .line 511
    :cond_2
    const-string v13, "Bundle returned from getPurchases() doesn\'t contain required fields."

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logError(Ljava/lang/String;)V

    .line 512
    const/16 v8, -0x3ea

    goto :goto_0

    .line 515
    :cond_3
    const-string v13, "INAPP_PURCHASE_ITEM_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v4

    .line 516
    .local v4, "ownedSkus":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    const-string v13, "INAPP_PURCHASE_DATA_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v7

    .line 517
    .local v7, "purchaseDataList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    const-string v13, "INAPP_DATA_SIGNATURE_LIST"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v10

    .line 519
    .local v10, "signatureList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_1
    invoke-virtual {v7}, Ljava/util/ArrayList;->size()I

    move-result v13

    if-lt v2, v13, :cond_4

    .line 527
    const-string v13, "INAPP_CONTINUATION_TOKEN"

    invoke-virtual {v3, v13}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 528
    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "Continuation token: "

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    move-object/from16 v0, p0

    invoke-virtual {v0, v13}, Lcom/xis/android/purchase/PurchaseService;->logDebug(Ljava/lang/String;)V

    .line 529
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v13

    if-eqz v13, :cond_0

    .line 531
    if-eqz v12, :cond_5

    const/16 v13, -0x3eb

    :goto_2
    move v8, v13

    goto :goto_0

    .line 520
    :cond_4
    invoke-virtual {v7, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    .line 521
    .local v6, "purchaseData":Ljava/lang/String;
    invoke-virtual {v10, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/lang/String;

    .line 522
    .local v9, "signature":Ljava/lang/String;
    invoke-virtual {v4, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Ljava/lang/String;

    .line 523
    .local v11, "sku":Ljava/lang/String;
    new-instance v5, Lcom/xis/android/purchase/Purchase;

    invoke-direct {v5, v6, v9}, Lcom/xis/android/purchase/Purchase;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 524
    .local v5, "purchase":Lcom/xis/android/purchase/Purchase;
    move-object/from16 v0, p1

    invoke-virtual {v0, v5}, Lcom/xis/android/purchase/Inventory;->addPurchase(Lcom/xis/android/purchase/Purchase;)V

    .line 519
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    .line 531
    .end local v5 # "purchase":Lcom/xis/android/purchase/Purchase;
    .end local v6 # "purchaseData":Ljava/lang/String;
    .end local v9 # "signature":Ljava/lang/String;
    .end local v11 # "sku":Ljava/lang/String;
    :cond_5
    const/4 v13, 0x0

    goto :goto_2
    .end method

    .method public requestInventoryAsync(Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;)I
    .locals 3
    .param p1, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;

    .prologue
    .line 444
    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    .line 445
    .local v0, "handler":Landroid/os/Handler;
    iget-boolean v1, p0, Lcom/xis/android/purchase/PurchaseService;->minitialized:Z

    if-nez v1, :cond_0

    .line 446
    const/4 v1, -0x4

    .line 472
    :goto_0
    return v1

    .line 448
    :cond_0
    const-string v1, "queryInventory"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->checkSetupDone(Ljava/lang/String;)V

    .line 449
    const-string v1, "refresh inventory"

    invoke-virtual {p0, v1}, Lcom/xis/android/purchase/PurchaseService;->flagStartAsync(Ljava/lang/String;)V

    .line 450
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/xis/android/purchase/PurchaseService$4;

    invoke-direct {v2, p0, v0, p1}, Lcom/xis/android/purchase/PurchaseService$4;-><init>(Lcom/xis/android/purchase/PurchaseService;Landroid/os/Handler;Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 470
    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    .line 472
    const/4 v1, 0x0

    goto :goto_0
    .end method

    .method public request_consume(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;)I
    .locals 1
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "orderid" # Ljava/lang/String;
    .param p3, "token" # Ljava/lang/String;
    .param p4, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;

    .prologue
    .line 634
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/xis/android/purchase/PurchaseService;->consumeAsync(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryConsumeFinishedListener;)I

    move-result v0

    return v0
    .end method

    .method public request_inventory(Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;)I
    .locals 1
    .param p1, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;

    .prologue
    .line 440
    invoke-virtual {p0, p1}, Lcom/xis/android/purchase/PurchaseService;->requestInventoryAsync(Lcom/xis/android/purchase/PurchaseService$QueryInventoryFinishedListener;)I

    move-result v0

    return v0
    .end method

    .method public request_payment(Ljava/lang/String;ILcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Ljava/lang/String;)I
    .locals 1
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "requestCode" # I
    .param p3, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;
    .param p4, "payload" # Ljava/lang/String;

    .prologue
    .line 243
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/xis/android/purchase/PurchaseService;->launchPurchaseFlow(Ljava/lang/String;ILcom/xis/android/purchase/PurchaseService$QueryPaymentFinishedListener;Ljava/lang/String;)I

    move-result v0

    return v0
    .end method

    .method public request_product(Ljava/lang/String;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)I
    .locals 2
    .param p1, "productid" # Ljava/lang/String;
    .param p2, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;

    .prologue
    .line 620
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 621
    .local v0, "productids":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/String;>;"
    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 622
    invoke-virtual {p0, v0, p2}, Lcom/xis/android/purchase/PurchaseService;->queryProductsAsync(Ljava/util/List;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)I

    move-result v1

    return v1
    .end method

    .method public request_product(Ljava/util/List;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)I
    .locals 1
    .param p2, "listener" # Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;
    .annotation system Ldalvik/annotation/Signature;
    value = {
    "(",
    "Ljava/util/List",
    "<",
    "Ljava/lang/String;",
    ">;",
    "Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;",
    ")I"
    }
    .end annotation

    .prologue
    .line 626
    .local p1, "productids":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    invoke-virtual {p0, p1, p2}, Lcom/xis/android/purchase/PurchaseService;->queryProductsAsync(Ljava/util/List;Lcom/xis/android/purchase/PurchaseService$QueryProductFinishedListener;)I

    move-result v0

    return v0
    .end method
     
  2. BobTheOne23

    BobTheOne23 Advanced Member

    Joined:
    Aug 30, 2015
    Messages:
    56
    Likes Received:
    16
    have you tryed lucky patcher?
     
Loading...
  • About Us

    Android Republic - Android Game Hacks - Offering only the most advanced and exclusive android hacks, protections like Xigncode are easily bypassed by our team.

    Exclusive Android hacks, android protections cracked, only the best available games, here you will find only the best games such as Kritika, Summoners War, Raven, Dragon Striker, Avabel, Evil Bane, 7knights and seven knights, Darkness Reborn, Soul Seeker all fully hacked and waiting for you! easy xigncode and dxshield bypass too!, way better than alpha gamers or alphagamers no need for booster or root, simple the best android cheat apk available.