Files
rr3-apk/smali_classes2/com/ea/nimble/mtx/googleplay/GooglePlay.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

7605 lines
233 KiB
Smali

.class public Lcom/ea/nimble/mtx/googleplay/GooglePlay;
.super Lcom/ea/nimble/Component;
.source "SourceFile"
# interfaces
.implements Lcom/ea/nimble/mtx/INimbleMTX;
.implements Lcom/ea/nimble/IApplicationLifecycle$ActivityEventCallbacks;
.implements Lcom/ea/nimble/LogSource;
.implements Lcom/android/billingclient/api/PurchasesUpdatedListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$VerifyCallback;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$RestoreTransactionVerifier;,
Lcom/ea/nimble/mtx/googleplay/GooglePlay$JsonData;
}
.end annotation
# static fields
.field private static final CACHE_EXPIRE_TIME:D = 3600.0
.field private static final CACHE_TIMESTAMP_KEY:Ljava/lang/String; = "cacheTimestamp"
.field public static final COMPONENT_ID:Ljava/lang/String; = "com.ea.nimble.mtx.googleplay"
.field public static GOOGLEPLAY_ACTIVITY_RESULT_REQUEST_CODE:I = 0xf1206
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_ACKNOWLEDGED:Ljava/lang/String; = "acknowledged"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_ORDERID:Ljava/lang/String; = "orderId"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASEDATA:Ljava/lang/String; = "purchaseData"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASESTATE:Ljava/lang/String; = "purchaseState"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASETIME:Ljava/lang/String; = "purchaseTime"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_RECEIPT:Ljava/lang/String; = "receipt"
.field public static GOOGLEPLAY_ADDITIONALINFO_KEY_TOKEN:Ljava/lang/String; = "token"
.field public static GOOGLEPLAY_PLATFORM_PARAMETER_APPLICATION_PUBLIC_KEY:Ljava/lang/String; = "GOOGLEPLAY_APPLICATION_PUBLIC_KEY"
.field private static final MAX_REQUEST_RETRY_DELAY:D = 300.0
.field private static final NOTIFICATION_TRACKING2_LOG_EVENT:Ljava/lang/String; = "nimble.notification.tracking2.logEvent"
.field private static final PERSISTENCE_CATALOG_ITEMS:Ljava/lang/String; = "catalogItems"
.field private static final PERSISTENCE_PENDING_TRANSACTIONS:Ljava/lang/String; = "pendingTransactions"
.field private static final PERSISTENCE_PURCHASED_TRANSACTIONS:Ljava/lang/String; = "purchasedTransactions"
.field private static final PERSISTENCE_RECOVERED_TRANSACTIONS:Ljava/lang/String; = "recoveredTransactions"
.field private static final PERSISTENCE_UNRECORDED_TRANSACTIONS:Ljava/lang/String; = "unrecordedTransactions"
.field private static final SYNERGY_API_VERIFY_AND_RECORD_GOOGLEPLAY_PURCHASE:Ljava/lang/String; = "/drm/api/android/verifyAndRecordPurchase"
.field public static final TAG:Ljava/lang/String; = "MTX Google"
# instance fields
.field mCatalogItems:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;",
">;"
}
.end annotation
.end field
.field mPendingTransactions:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.end field
.field mPurchasedTransactions:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.end field
.field mRecoveredTransactions:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.end field
.field mUnrecordedTransactions:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.end field
.field m_appPublicKey:Ljava/lang/String;
.field private m_billingConnectionInProgress:Z
.field private m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.field private m_cacheTimestamp:Ljava/lang/Long;
.field private final m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.field private m_reportingEnabled:Z
.field private m_restoreInProgress:Z
.field m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.field private final m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.field private m_verificationEnabled:Z
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method private constructor <init>()V
.locals 2
.line 276
invoke-direct {p0}, Lcom/ea/nimble/Component;-><init>()V
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingConnectionInProgress:Z
.line 145
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.line 146
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
invoke-direct {v0, p0, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 277
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 278
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 279
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 280
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 281
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
return-void
.end method
.method public static synthetic access$1000(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)Ljava/lang/String;
.locals 0
.line 92
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->generateDeveloperPayloadForTransaction(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static synthetic access$1100(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/util/List;Ljava/util/HashMap;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->processQueryPurchasesResponse(Ljava/util/List;Ljava/util/HashMap;)V
return-void
.end method
.method public static synthetic access$1200(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayError;Ljava/lang/String;)Lcom/ea/nimble/mtx/NimbleMTXError;
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createNimbleMTXErrorWithGooglePlayError(Lcom/ea/nimble/mtx/googleplay/GooglePlayError;Ljava/lang/String;)Lcom/ea/nimble/mtx/NimbleMTXError;
move-result-object p0
return-object p0
.end method
.method public static synthetic access$1300(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2, p3, p4}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.end method
.method public static synthetic access$1500(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/util/List;Ljava/lang/Exception;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->onGooglePlayCatalogItemsRefreshed(Ljava/util/List;Ljava/lang/Exception;)V
return-void
.end method
.method public static synthetic access$1600(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/util/List;Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->getGooglePlayPricingForPendingCatalogItems(Ljava/util/List;Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;)V
return-void
.end method
.method public static synthetic access$1700(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Ljava/lang/String;Lcom/ea/nimble/Error;)Z
.locals 0
.line 92
invoke-direct {p0, p1, p2, p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateTransactionRecordWithNonce(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Ljava/lang/String;Lcom/ea/nimble/Error;)Z
move-result p0
return p0
.end method
.method public static synthetic access$1800(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$VerifyCallback;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->networkCallRecordPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$VerifyCallback;)V
return-void
.end method
.method public static synthetic access$1900(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->networkCallGetNonceFromSynergy(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;)V
return-void
.end method
.method public static synthetic access$200(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)Z
.locals 0
.line 92
iget-boolean p0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
return p0
.end method
.method public static synthetic access$2000(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/util/List;)V
.locals 0
.line 92
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->onRestoreComplete(Ljava/util/List;)V
return-void
.end method
.method public static synthetic access$202(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)Z
.locals 0
.line 92
iput-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
return p1
.end method
.method public static synthetic access$2300(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/lang/Throwable;)Z
.locals 0
.line 92
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isCancelledError(Ljava/lang/Throwable;)Z
move-result p0
return p0
.end method
.method public static synthetic access$2600(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
.locals 0
.line 92
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->saveUnrecordedTransactionsToPersistence()V
return-void
.end method
.method public static synthetic access$300(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)V
.locals 0
.line 92
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->restorePurchasedTransactionsImpl(Z)V
return-void
.end method
.method public static synthetic access$402(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Z)Z
.locals 0
.line 92
iput-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingConnectionInProgress:Z
return p1
.end method
.method public static synthetic access$500(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.locals 0
.line 92
iget-object p0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
return-object p0
.end method
.method public static synthetic access$600(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.locals 0
.line 92
iget-object p0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
return-object p0
.end method
.method public static synthetic access$602(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;)Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.locals 0
.line 92
iput-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
return-object p1
.end method
.method public static synthetic access$800(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/android/billingclient/api/BillingResult;)Lcom/ea/nimble/mtx/googleplay/GooglePlayError;
.locals 0
.line 92
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createGooglePlayErrorFromBillingResult(Lcom/android/billingclient/api/BillingResult;)Lcom/ea/nimble/mtx/googleplay/GooglePlayError;
move-result-object p0
return-object p0
.end method
.method public static synthetic access$900(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.locals 0
.line 92
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
return-void
.end method
.method private broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
.locals 3
.line 1937
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 1938
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object v0
invoke-interface {v0}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
move-result-object v0
.line 1939
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 1940
invoke-virtual {v1, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 1942
new-instance p1, Landroid/os/Bundle;
if-eqz p4, :cond_0
invoke-direct {p1, p4}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V
goto :goto_0
:cond_0
invoke-direct {p1}, Landroid/os/Bundle;-><init>()V
:goto_0
const-string p4, "result"
if-nez p2, :cond_1
const-string p2, "1"
.line 1946
invoke-virtual {p1, p4, p2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_1
:cond_1
const-string v2, "error"
.line 1950
invoke-virtual {p1, v2, p2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
const-string p2, "0"
.line 1951
invoke-virtual {p1, p4, p2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
:goto_1
if-eqz p3, :cond_2
const-string p2, "TRANSACTION_ID"
.line 1957
invoke-virtual {p1, p2, p3}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 1960
:cond_2
invoke-virtual {v1, p1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
.line 1962
invoke-virtual {v0, v1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
return-void
.end method
.method private createBillingHelper()V
.locals 3
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingConnectionInProgress:Z
.line 287
new-instance v0, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object v1
invoke-interface {v1}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
move-result-object v1
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->getAppPublicKey()Ljava/lang/String;
move-result-object v2
invoke-direct {v0, v1, v2}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;-><init>(Landroid/content/Context;Ljava/lang/String;)V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 288
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;
invoke-direct {v1, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
invoke-virtual {v0, v1, p0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->startSetup(Lcom/android/billingclient/api/BillingClientStateListener;Lcom/android/billingclient/api/PurchasesUpdatedListener;)V
return-void
.end method
.method private createGooglePlayErrorFromBillingResult(Lcom/android/billingclient/api/BillingResult;)Lcom/ea/nimble/mtx/googleplay/GooglePlayError;
.locals 5
.line 3049
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
if-eqz p1, :cond_5
.line 3050
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result v0
if-nez v0, :cond_0
goto/16 :goto_2
.line 3058
:cond_0
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result v0
const/4 v1, -0x2
if-eq v0, v1, :cond_3
const/4 v1, -0x1
if-eq v0, v1, :cond_2
const/16 v1, 0xc
const-string v2, "Network connection is down"
if-eq v0, v1, :cond_1
packed-switch v0, :pswitch_data_0
.line 3106
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->UNKNOWN:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Unknown message"
goto :goto_0
.line 3085
:pswitch_0
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Failure to consume since item is not owned"
goto :goto_0
.line 3081
:pswitch_1
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Failure to purchase since item is already owned"
goto :goto_0
.line 3077
:pswitch_2
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ERROR:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "error during the API action"
goto :goto_0
.line 3073
:pswitch_3
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_DEVELOPER_ERROR:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest"
goto :goto_0
.line 3069
:pswitch_4
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Requested product is not available for purchase"
goto :goto_0
.line 3065
:pswitch_5
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Billing API version is not supported for the type requested"
goto :goto_0
.line 3097
:pswitch_6
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
goto :goto_0
.line 3061
:pswitch_7
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_USER_CANCELED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "User pressed back or canceled a dialog"
goto :goto_0
.line 3101
:cond_1
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_NETWORK_ERROR:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
goto :goto_0
.line 3093
:cond_2
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_SERVICE_DISCONNECTED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Play Store service is not connected now - potentially transient state. Play Store could have been updated in the background while your app was still running"
goto :goto_0
.line 3089
:cond_3
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_FEATURE_NOT_SUPPORTED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
const-string v2, "Requested feature is not supported by Play Store on the current device"
.line 3108
:goto_0
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayError;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getDebugMessage()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_4
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, ", Google Play debug message: "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getDebugMessage()Ljava/lang/String;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
goto :goto_1
:cond_4
const-string p1, ""
:goto_1
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v1, v0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;Ljava/lang/String;)V
return-object v1
:cond_5
:goto_2
const/4 p1, 0x0
return-object p1
:pswitch_data_0
.packed-switch 0x1
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method private createNimbleMTXErrorWithGooglePlayError(Lcom/ea/nimble/mtx/googleplay/GooglePlayError;Ljava/lang/String;)Lcom/ea/nimble/mtx/NimbleMTXError;
.locals 3
.line 3113
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 3118
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->PLATFORM_ERROR:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
if-eqz p1, :cond_4
.line 3123
invoke-virtual {p1}, Lcom/ea/nimble/Error;->getCode()I
move-result v1
.line 3124
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_USER_CANCELED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->intValue()I
move-result v2
if-ne v1, v2, :cond_0
.line 3126
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->USER_CANCELED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
goto :goto_0
.line 3128
:cond_0
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->intValue()I
move-result v2
if-ne v1, v2, :cond_1
.line 3130
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->BILLING_NOT_AVAILABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
goto :goto_0
.line 3132
:cond_1
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->intValue()I
move-result v2
if-ne v1, v2, :cond_2
.line 3134
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->ITEM_UNAVAILABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
goto :goto_0
.line 3136
:cond_2
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->intValue()I
move-result v2
if-ne v1, v2, :cond_3
.line 3138
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->ITEM_ALREADY_OWNED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
goto :goto_0
.line 3140
:cond_3
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED:Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayError$Code;->intValue()I
move-result v2
if-ne v1, v2, :cond_4
.line 3142
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->ITEM_NOT_OWNED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
.line 3146
:cond_4
:goto_0
new-instance v1, Lcom/ea/nimble/mtx/NimbleMTXError;
invoke-direct {v1, v0, p2, p1}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;Ljava/lang/Throwable;)V
return-object v1
.end method
.method private filterForResumablePurchaseTransactions(Ljava/util/HashMap;)Ljava/util/HashMap;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;)",
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.line 2779
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2780
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
if-nez p1, :cond_0
return-object v0
.line 2787
:cond_0
invoke-virtual {p1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object p1
invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_3
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2790
iget-object v2, v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_NONCE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_2
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_ACTIVITY_RESPONSE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_2
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_2
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_2
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_CONSUMPTION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_2
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne v2, v3, :cond_1
.line 2797
:cond_2
invoke-virtual {v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_3
return-object v0
.end method
.method private findRecoveredTransactionsWithItemSku(Ljava/lang/String;)Ljava/util/List;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;"
}
.end annotation
.line 2810
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2814
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
if-nez p1, :cond_0
return-object v0
.line 2821
:cond_0
monitor-enter p0
:try_start_0
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2823
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_2
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2825
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v3
invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
.line 2827
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 2830
:cond_2
monitor-exit p0
return-object v0
:goto_1
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method
.method private generateDeveloperPayloadForTransaction(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)Ljava/lang/String;
.locals 2
.line 3152
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 3153
new-instance p1, Ljava/text/SimpleDateFormat;
const-string v0, "MMddHHmmss"
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-direct {p1, v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
const-string v0, "UTC"
.line 3154
invoke-static {v0}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
move-result-object v0
invoke-virtual {p1, v0}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
.line 3155
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
invoke-virtual {p1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method private generateTransactionId()Ljava/lang/String;
.locals 1
.line 2658
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
move-result-object v0
invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private getAppPublicKey()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_appPublicKey:Ljava/lang/String;
return-object v0
.end method
.method public static getComponent()Lcom/ea/nimble/mtx/googleplay/GooglePlay;
.locals 1
const-string v0, "com.ea.nimble.mtx.googleplay"
.line 337
invoke-static {v0}, Lcom/ea/nimble/Base;->getComponent(Ljava/lang/String;)Lcom/ea/nimble/Component;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;
return-object v0
.end method
.method private getGooglePlayPricingForPendingCatalogItems(Ljava/util/List;Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;",
">;",
"Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;",
")V"
}
.end annotation
.line 1795
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
if-eqz p1, :cond_2
.line 1796
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_1
.line 1803
:cond_0
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 1804
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 1806
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
.line 1808
invoke-static {}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product;->newBuilder()Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v4
iget-object v5, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->mSku:Ljava/lang/String;
invoke-virtual {v4, v5}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductId(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v4
const-string v5, "subs"
invoke-virtual {v4, v5}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductType(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v4
invoke-virtual {v4}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->build()Lcom/android/billingclient/api/QueryProductDetailsParams$Product;
move-result-object v4
invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 1809
invoke-static {}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product;->newBuilder()Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v4
iget-object v3, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->mSku:Ljava/lang/String;
invoke-virtual {v4, v3}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductId(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v3
const-string v4, "inapp"
invoke-virtual {v3, v4}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductType(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v3
invoke-virtual {v3}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->build()Lcom/android/billingclient/api/QueryProductDetailsParams$Product;
move-result-object v3
invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_1
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 1812
new-instance v3, Lcom/ea/nimble/mtx/googleplay/GooglePlay$6;
invoke-direct {v3, p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$6;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/util/List;Lcom/ea/nimble/mtx/googleplay/GooglePlay$CatalogItemCallback;)V
invoke-virtual {v2, v0, v1, v3}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->queryProductDetailsAsync(Ljava/util/List;Ljava/util/List;Lcom/android/billingclient/api/ProductDetailsResponseListener;)V
return-void
.line 1798
:cond_2
:goto_1
new-instance p1, Lcom/ea/nimble/Error;
sget-object p2, Lcom/ea/nimble/Error$Code;->UNKNOWN:Lcom/ea/nimble/Error$Code;
const-string v0, "Empty catalog item list for GooglePlay catalog query."
invoke-direct {p1, p2, v0}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
const-string p2, "nimble.notification.mtx.refreshcatalogfinished"
const/4 v0, 0x0
.line 1799
invoke-direct {p0, p2, p1, v0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.end method
.method private googlePlayAcknowledgePurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
.locals 6
.line 2986
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2988
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_ACKNOWLEDGED:Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
.line 2989
iget-object v1, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_TOKEN:Ljava/lang/String;
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
const/4 v2, 0x0
if-eqz v0, :cond_1
if-nez v1, :cond_0
goto :goto_0
:cond_0
move v3, v2
goto :goto_1
:cond_1
:goto_0
const-string v3, "Purchase token is null"
new-array v4, v2, [Ljava/lang/Object;
.line 2993
invoke-static {p0, v3, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2994
new-instance v3, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v4, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNABLE_TO_CONSTRUCT_REQUEST:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v5, "Unable to construct Purchase object from GooglePlayTransaction."
invoke-direct {v3, v4, v5}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
iput-object v3, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 2995
iget-object v3, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v3, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
const/4 v3, 0x1
:goto_1
if-eqz v0, :cond_2
.line 2998
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v4
if-eqz v4, :cond_2
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
const-string v4, "true"
if-ne v0, v4, :cond_2
const-string v0, "Purchase has already been acknowledged triggering callback"
new-array v1, v2, [Ljava/lang/Object;
.line 3000
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_2
:cond_2
if-eqz v3, :cond_4
.line 3005
:goto_2
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p1, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 3007
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
if-eqz v0, :cond_3
.line 3009
invoke-interface {v0, p1}, Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;->itemGrantedComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto :goto_3
:cond_3
const-string p1, "Transaction does not have a consume callback to notify game of the finalize error."
new-array v0, v2, [Ljava/lang/Object;
.line 3013
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_3
return-void
:cond_4
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 3018
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
new-instance v2, Lcom/ea/nimble/mtx/googleplay/GooglePlay$11;
invoke-direct {v2, p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$11;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
invoke-virtual {v0, v1, v2}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->acknowledgeAsync(Ljava/lang/String;Lcom/android/billingclient/api/AcknowledgePurchaseResponseListener;)V
return-void
.end method
.method private googlePlayConsumeItem(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
.locals 4
.line 2537
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_ACKNOWLEDGED:Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
.line 2538
iget-object v1, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_TOKEN:Ljava/lang/String;
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
if-eqz v0, :cond_1
if-nez v1, :cond_0
goto :goto_0
:cond_0
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 2568
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$10;
invoke-direct {v1, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$10;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
invoke-virtual {p1, v0, v1}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->consumeAsync(Ljava/lang/String;Lcom/android/billingclient/api/ConsumeResponseListener;)V
return-void
:cond_1
:goto_0
const-string v0, "Purchase token is null"
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
.line 2542
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2543
new-instance v0, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNABLE_TO_CONSTRUCT_REQUEST:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v3, "Unable to construct Purchase object from GooglePlayTransaction."
invoke-direct {v0, v2, v3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
iput-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 2544
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 2554
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p1, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 2557
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
if-eqz v0, :cond_2
.line 2559
invoke-interface {v0, p1}, Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;->itemGrantedComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto :goto_1
:cond_2
const-string p1, "Transaction does not have a consume callback to notify game of the finalize error."
new-array v0, v1, [Ljava/lang/Object;
.line 2563
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_1
return-void
.end method
.method private static initialize()V
.locals 2
.line 343
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;
invoke-direct {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;-><init>()V
const-string v1, "com.ea.nimble.mtx.googleplay"
invoke-static {v0, v1}, Lcom/ea/nimble/Base;->registerComponent(Lcom/ea/nimble/Component;Ljava/lang/String;)V
return-void
.end method
.method private isCacheExpired()Z
.locals 4
.line 3293
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_cacheTimestamp:Ljava/lang/Long;
if-eqz v0, :cond_1
.line 3294
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_cacheTimestamp:Ljava/lang/Long;
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
move-result-wide v2
sub-long/2addr v0, v2
long-to-double v0, v0
const-wide v2, 0x414b774000000000L # 3600000.0
cmpl-double v0, v0, v2
if-lez v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 v0, 0x1
:goto_1
return v0
.end method
.method private isCancelledError(Ljava/lang/Throwable;)Z
.locals 3
.line 3282
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 3283
instance-of v0, p1, Lcom/ea/nimble/Error;
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
.line 3287
:cond_0
check-cast p1, Lcom/ea/nimble/Error;
.line 3288
invoke-virtual {p1}, Lcom/ea/nimble/Error;->getDomain()Ljava/lang/String;
move-result-object v0
const-string v2, "NimbleError"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_1
invoke-virtual {p1}, Lcom/ea/nimble/Error;->getCode()I
move-result v0
sget-object v2, Lcom/ea/nimble/Error$Code;->NETWORK_OPERATION_CANCELLED:Lcom/ea/nimble/Error$Code;
invoke-virtual {v2}, Lcom/ea/nimble/Error$Code;->intValue()I
move-result v2
if-eq v0, v2, :cond_2
:cond_1
invoke-virtual {p1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
move-result-object p1
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isCancelledError(Ljava/lang/Throwable;)Z
move-result p1
if-eqz p1, :cond_3
:cond_2
const/4 v1, 0x1
:cond_3
return v1
.end method
.method private isTransactionPending()Z
.locals 1
.line 2837
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
const/4 v0, 0x1
.line 2838
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isTransactionPending(Z)Z
move-result v0
return v0
.end method
.method private isTransactionPending(Z)Z
.locals 1
.line 2843
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2845
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 2847
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v0
if-nez v0, :cond_1
if-eqz p1, :cond_0
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-virtual {p1}, Ljava/util/HashMap;->size()I
move-result p1
if-eqz p1, :cond_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 2851
:cond_0
monitor-exit p0
const/4 p1, 0x0
return p1
.line 2849
:cond_1
:goto_0
monitor-exit p0
const/4 p1, 0x1
return p1
.line 2851
:goto_1
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method
.method private loadFromPersistence()V
.locals 6
.line 2858
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
const-string v0, "com.ea.nimble.mtx.googleplay"
.line 2859
sget-object v1, Lcom/ea/nimble/Persistence$Storage;->DOCUMENT:Lcom/ea/nimble/Persistence$Storage;
invoke-static {v0, v1}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
move-result-object v0
const-string v1, "catalogItems"
.line 2862
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
const/4 v2, 0x1
const/4 v3, 0x0
if-eqz v1, :cond_0
.line 2863
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v4
const-class v5, Ljava/util/HashMap;
if-ne v4, v5, :cond_0
.line 2866
new-instance v4, Ljava/util/HashMap;
check-cast v1, Ljava/util/HashMap;
invoke-direct {v4, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2871
monitor-enter p0
:try_start_0
iput-object v4, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
const-string v1, "Restored %d catalog items from persistence."
new-array v5, v2, [Ljava/lang/Object;
.line 2875
invoke-virtual {v4}, Ljava/util/HashMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v5, v3
invoke-static {p0, v1, v5}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2876
monitor-exit p0
goto :goto_0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
:cond_0
:goto_0
const-string v1, "purchasedTransactions"
.line 2880
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
if-eqz v1, :cond_1
.line 2881
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v4
const-class v5, Ljava/util/HashMap;
if-ne v4, v5, :cond_1
.line 2884
new-instance v4, Ljava/util/HashMap;
check-cast v1, Ljava/util/HashMap;
invoke-direct {v4, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2888
monitor-enter p0
:try_start_1
iput-object v4, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
const-string v1, "%d purchased transactions restored from persistence."
new-array v5, v2, [Ljava/lang/Object;
.line 2892
invoke-virtual {v4}, Ljava/util/HashMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v5, v3
invoke-static {p0, v1, v5}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2893
monitor-exit p0
goto :goto_1
:catchall_1
move-exception v0
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
throw v0
:cond_1
const-string v1, "No purchased transactions to restore."
new-array v4, v3, [Ljava/lang/Object;
.line 2897
invoke-static {p0, v1, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_1
const-string v1, "recoveredTransactions"
.line 2902
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
if-eqz v1, :cond_2
.line 2903
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v4
const-class v5, Ljava/util/HashMap;
if-ne v4, v5, :cond_2
.line 2906
new-instance v4, Ljava/util/HashMap;
check-cast v1, Ljava/util/HashMap;
invoke-direct {v4, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2910
monitor-enter p0
:try_start_2
iput-object v4, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
const-string v1, "%d recovered transactions restored from persistence."
new-array v2, v2, [Ljava/lang/Object;
.line 2914
invoke-virtual {v4}, Ljava/util/HashMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
invoke-static {p0, v1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2915
monitor-exit p0
goto :goto_2
:catchall_2
move-exception v0
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
throw v0
:cond_2
const-string v1, "No recovered transactions to restore."
new-array v2, v3, [Ljava/lang/Object;
.line 2919
invoke-static {p0, v1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_2
const-string v1, "pendingTransactions"
.line 2923
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
if-eqz v1, :cond_5
.line 2924
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
const-class v4, Ljava/util/HashMap;
if-ne v2, v4, :cond_5
.line 2927
new-instance v2, Ljava/util/HashMap;
check-cast v1, Ljava/util/HashMap;
invoke-direct {v2, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
const-string v1, "%d pending transactions restored from persistence."
.line 2929
invoke-virtual {v2}, Ljava/util/HashMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
filled-new-array {v4}, [Ljava/lang/Object;
move-result-object v4
invoke-static {p0, v1, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2932
monitor-enter p0
:try_start_3
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
if-nez v1, :cond_3
.line 2936
new-instance v1, Ljava/util/HashMap;
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
iput-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
goto :goto_3
:catchall_3
move-exception v0
goto :goto_5
:cond_3
:goto_3
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2942
invoke-direct {p0, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->filterForResumablePurchaseTransactions(Ljava/util/HashMap;)Ljava/util/HashMap;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2946
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_4
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_4
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
iget-object v4, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 2948
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_4
.line 2950
:cond_4
monitor-exit p0
goto :goto_6
:goto_5
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_3
throw v0
:cond_5
const-string v1, "No pending transactions to restore."
new-array v2, v3, [Ljava/lang/Object;
.line 2954
invoke-static {p0, v1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_6
const-string v1, "unrecordedTransactions"
.line 2957
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
if-eqz v1, :cond_6
.line 2958
instance-of v2, v1, Ljava/util/ArrayList;
if-eqz v2, :cond_6
.line 2961
check-cast v1, Ljava/util/ArrayList;
.line 2962
monitor-enter p0
:try_start_4
iput-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
.line 2965
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_4
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 2966
invoke-virtual {v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;->recordTransactions()V
goto :goto_7
:catchall_4
move-exception v0
.line 2965
:try_start_5
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_4
throw v0
:cond_6
:goto_7
const-string v1, "cacheTimestamp"
.line 2969
invoke-virtual {v0, v1}, Lcom/ea/nimble/Persistence;->getValue(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v0
check-cast v0, Ljava/lang/Long;
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_cacheTimestamp:Ljava/lang/Long;
.line 2971
monitor-enter p0
:try_start_6
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
if-eqz v0, :cond_7
.line 2974
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v0
if-lez v0, :cond_7
.line 2976
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Recovered transactions: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
new-array v1, v3, [Ljava/lang/Object;
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string v0, "nimble.notification.mtx.transactionsrecovered"
const/4 v1, 0x0
.line 2979
invoke-direct {p0, v0, v1, v1, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
goto :goto_8
:catchall_5
move-exception v0
goto :goto_9
.line 2981
:cond_7
:goto_8
monitor-exit p0
return-void
:goto_9
monitor-exit p0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_5
throw v0
.end method
.method private networkCallGetNonceFromSynergy(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;)V
.locals 4
.line 1967
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.line 1970
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$7;
invoke-direct {v1, p0, p2, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$7;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
invoke-virtual {v0, v1}, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;->getNonce(Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog$StringCallback;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
.line 1991
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
.line 1993
new-instance v1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->GET_NONCE_ERROR:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v3, "Error making Synergy getNonce request"
invoke-direct {v1, v2, v3, v0}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;Ljava/lang/Throwable;)V
const/4 v0, 0x0
.line 1995
invoke-interface {p2, p1, v0, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$GetNonceCallback;->onGetNonceComplete(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Ljava/lang/String;Lcom/ea/nimble/Error;)V
:goto_0
return-void
.end method
.method private networkCallRecordPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$VerifyCallback;)V
.locals 3
.line 2358
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2362
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p1, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 2364
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$8;
invoke-direct {v0, p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$8;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
.line 2500
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$9;
invoke-direct {v1, p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$9;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlay$VerifyCallback;)V
.line 2531
new-instance p1, Lcom/ea/nimble/SynergyRequest;
const-string p2, "/drm/api/android/verifyAndRecordPurchase"
sget-object v2, Lcom/ea/nimble/IHttpRequest$Method;->POST:Lcom/ea/nimble/IHttpRequest$Method;
invoke-direct {p1, p2, v2, v0}, Lcom/ea/nimble/SynergyRequest;-><init>(Ljava/lang/String;Lcom/ea/nimble/IHttpRequest$Method;Lcom/ea/nimble/SynergyRequest$SynergyRequestPreparingCallback;)V
.line 2532
invoke-static {}, Lcom/ea/nimble/SynergyNetwork;->getComponent()Lcom/ea/nimble/ISynergyNetwork;
move-result-object p2
invoke-interface {p2, p1, v1}, Lcom/ea/nimble/ISynergyNetwork;->sendRequest(Lcom/ea/nimble/SynergyRequest;Lcom/ea/nimble/SynergyNetworkConnectionCallback;)V
return-void
.end method
.method private onGooglePlayCatalogItemsRefreshed(Ljava/util/List;Ljava/lang/Exception;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;",
">;",
"Ljava/lang/Exception;",
")V"
}
.end annotation
.line 1895
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
const/4 v0, 0x0
if-nez p2, :cond_1
const-string v1, "GooglePlayCatalog Updated."
new-array v0, v0, [Ljava/lang/Object;
.line 1898
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1900
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 1903
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
.line 1904
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 1906
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getSku()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 1908
:cond_0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 1911
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->saveCatalogToPersistence()V
goto :goto_2
.line 1908
:goto_1
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.line 1915
:cond_1
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Error updating GooglePlay Catalog: "
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array v0, v0, [Ljava/lang/Object;
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_2
const/4 p1, 0x0
if-eqz p2, :cond_2
.line 1921
new-instance v0, Lcom/ea/nimble/Error;
sget-object v1, Lcom/ea/nimble/Error$Code;->UNKNOWN:Lcom/ea/nimble/Error$Code;
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v0, v1, v2, p2}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_3
:cond_2
move-object v0, p1
:goto_3
const-string p2, "nimble.notification.mtx.refreshcatalogfinished"
.line 1923
invoke-direct {p0, p2, v0, p1, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.end method
.method private onRestoreComplete(Ljava/util/List;)V
.locals 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;",
">;)V"
}
.end annotation
.line 2190
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2192
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
const/4 v0, 0x0
move v1, v0
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_f
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2195
iget-object v3, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
if-eqz v3, :cond_0
.line 2198
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Error making recordPurchase call to Synergy: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
new-array v4, v0, [Ljava/lang/Object;
invoke-static {p0, v3, v4}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2199
iget-object v3, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v3, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 2202
:cond_0
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v2, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 2212
monitor-enter p0
:try_start_0
iget-object v3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
const/4 v4, 0x1
if-eqz v3, :cond_4
.line 2214
invoke-virtual {v3}, Ljava/util/HashMap;->size()I
move-result v3
if-lez v3, :cond_4
iget-object v3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 2216
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v5
invoke-virtual {v3, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
if-eqz v3, :cond_4
.line 2219
invoke-virtual {v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object v5
sget-object v6, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne v5, v6, :cond_3
.line 2221
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Consumable transaction restored, sku: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getSku()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
new-array v6, v0, [Ljava/lang/Object;
invoke-static {p0, v5, v6}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2227
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v5
invoke-direct {p0, v5}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->findRecoveredTransactionsWithItemSku(Ljava/lang/String;)Ljava/util/List;
move-result-object v5
.line 2228
invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v5
:goto_1
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v6
if-eqz v6, :cond_2
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2230
iget-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
const-string v8, "metadata"
invoke-interface {v7, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v7
check-cast v7, Ljava/lang/String;
.line 2231
invoke-static {v7}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v8
if-eqz v8, :cond_1
.line 2233
iget-object v8, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
const-string v9, "metadata"
invoke-interface {v8, v9, v7}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_2
:catchall_0
move-exception p1
goto/16 :goto_d
.line 2235
:cond_1
:goto_2
new-instance v7, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v8, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_SUPERSEDED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v9, "Transaction has been superseded by restored transaction"
invoke-direct {v7, v8, v9}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
iput-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 2236
iget-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 2237
sget-object v7, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
goto :goto_1
:cond_2
move v5, v4
goto :goto_3
.line 2242
:cond_3
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Non-consumable transaction restored, sku: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getSku()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
new-array v6, v0, [Ljava/lang/Object;
invoke-static {p0, v5, v6}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
move v5, v0
.line 2247
:goto_3
new-instance v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
invoke-direct {v6, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;)V
iput-object v6, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mCatalogItem:Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
goto :goto_4
:cond_4
move v5, v0
.line 2250
:goto_4
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-ne v5, v4, :cond_5
.line 2257
monitor-enter p0
:try_start_1
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2259
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2260
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
.line 2262
sget-object v1, Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;->PURCHASE:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
iput-object v1, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionType:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
.line 2263
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v2, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
:goto_5
move v1, v4
goto/16 :goto_b
:catchall_1
move-exception p1
.line 2260
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
throw p1
.line 2268
:cond_5
monitor-enter p0
:try_start_3
iget-object v3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 2270
invoke-virtual {v3}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v3
invoke-interface {v3}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v3
:cond_6
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_7
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2272
iget-object v5, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
iget-object v6, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_6
move v3, v4
goto :goto_6
:catchall_2
move-exception p1
goto/16 :goto_c
:cond_7
move v3, v0
.line 2278
:goto_6
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
if-nez v3, :cond_d
.line 2281
monitor-enter p0
:try_start_4
iget-object v5, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2283
invoke-virtual {v5}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v5
invoke-interface {v5}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v5
:cond_8
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v6
if-eqz v6, :cond_c
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 2285
iget-object v7, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
iget-object v8, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_8
const-string v3, "Restored item %s already in recovered transactions. Skipping item."
new-array v5, v4, [Ljava/lang/Object;
.line 2287
iget-object v7, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
aput-object v7, v5, v0
invoke-static {p0, v3, v5}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2288
iget-object v3, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_ACTIVITY_RESPONSE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v3, v5, :cond_9
iget-object v3, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mReceipt:Ljava/lang/String;
invoke-static {v3}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v3
if-nez v3, :cond_b
goto :goto_7
:catchall_3
move-exception p1
goto :goto_9
.line 2291
:cond_9
:goto_7
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getReceipt()Ljava/lang/String;
move-result-object v3
iput-object v3, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mReceipt:Ljava/lang/String;
.line 2292
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getNonce()Ljava/lang/String;
move-result-object v3
iput-object v3, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mNonce:Ljava/lang/String;
.line 2293
iget-object v3, v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
iget-object v5, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
invoke-interface {v3, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V
const-string v3, "Recovered transaction was interrupted after GooglePlay success but before purchase callback was triggered. Updating recovered transaction state."
new-array v5, v0, [Ljava/lang/Object;
.line 2295
invoke-static {p0, v3, v5}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2296
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v6, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
iget-boolean v5, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
if-eqz v5, :cond_a
.line 2300
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v6, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
goto :goto_8
.line 2304
:cond_a
invoke-direct {p0, v6, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
:cond_b
:goto_8
move v3, v4
.line 2311
:cond_c
monitor-exit p0
goto :goto_a
:goto_9
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_3
throw p1
:cond_d
:goto_a
if-nez v3, :cond_e
const-string v1, "Found previous transaction for restored item \"%s\". Moving to recovered transactions instead"
.line 2315
iget-object v3, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v3
invoke-static {p0, v1, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2319
monitor-enter p0
:try_start_5
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 2321
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2322
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_4
.line 2324
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v2, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
goto/16 :goto_5
:catchall_4
move-exception p1
.line 2322
:try_start_6
monitor-exit p0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_4
throw p1
.line 2330
:cond_e
:goto_b
monitor-enter p0
:try_start_7
iget-object v3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 2332
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v2
invoke-virtual {v3, v2}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 2333
monitor-exit p0
goto/16 :goto_0
:catchall_5
move-exception p1
monitor-exit p0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_5
throw p1
.line 2278
:goto_c
:try_start_8
monitor-exit p0
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_2
throw p1
.line 2250
:goto_d
:try_start_9
monitor-exit p0
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_0
throw p1
.line 2336
:cond_f
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->savePendingTransactionsToPersistence()V
.line 2338
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->saveUnrecordedTransactionsToPersistence()V
iput-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
const-string p1, "All RESTORE transactions processed. Raising NIMBLE_NOTIFICATION_MTX_RESTORE_PURCHASED_TRANSACTIONS_FINISHED notification."
new-array v0, v0, [Ljava/lang/Object;
.line 2341
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string p1, "nimble.notification.mtx.restorepurchasedtransactionsfinished"
const/4 v0, 0x0
.line 2342
invoke-direct {p0, p1, v0, v0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
if-eqz v1, :cond_10
const-string p1, "nimble.notification.mtx.transactionsrecovered"
.line 2349
invoke-direct {p0, p1, v0, v0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
:cond_10
return-void
.end method
.method private processQueryPurchasesResponse(Ljava/util/List;Ljava/util/HashMap;)V
.locals 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/android/billingclient/api/Purchase;",
">;",
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)V"
}
.end annotation
.line 1289
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 1290
new-instance v1, Ljava/util/HashSet;
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
.line 1292
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
const/4 v3, 0x0
if-eqz v2, :cond_5
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/android/billingclient/api/Purchase;
.line 1294
invoke-virtual {v2}, Lcom/android/billingclient/api/Purchase;->getPurchaseState()I
move-result v4
const/4 v5, 0x1
if-eq v4, v5, :cond_0
const-string v2, "Skipping processing a pending purchase"
new-array v3, v3, [Ljava/lang/Object;
.line 1296
invoke-static {p0, v2, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_0
.line 1300
:cond_0
invoke-virtual {v2}, Lcom/android/billingclient/api/Purchase;->getProducts()Ljava/util/List;
move-result-object v4
invoke-interface {v4, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/String;
.line 1301
invoke-static {v4}, Lcom/ea/nimble/Utility;->safeString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
invoke-interface {v1, v5}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 1304
new-instance v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
invoke-direct {v5}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;-><init>()V
.line 1305
sget-object v6, Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;->RESTORE:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
iput-object v6, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionType:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
.line 1306
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->generateTransactionId()Ljava/lang/String;
move-result-object v6
iput-object v6, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionId:Ljava/lang/String;
.line 1307
invoke-static {v4}, Lcom/ea/nimble/Utility;->safeString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
iput-object v6, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
iget-object v7, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 1309
invoke-virtual {v7, v6}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
if-eqz v6, :cond_4
.line 1312
invoke-virtual {v6}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object v4
sget-object v7, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne v4, v7, :cond_1
const-string v4, "CatalogItem: "
const-string v7, "CONSUMABLE"
new-array v3, v3, [Ljava/lang/Object;
.line 1314
invoke-static {v4, v7, v3}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_1
.line 1316
:cond_1
invoke-virtual {v6}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object v4
sget-object v7, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->NONCONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne v4, v7, :cond_2
const-string v4, "CatalogItem: "
const-string v7, "NONCONSUMABLE"
new-array v3, v3, [Ljava/lang/Object;
.line 1318
invoke-static {v4, v7, v3}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_1
.line 1320
:cond_2
invoke-virtual {v6}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object v4
sget-object v7, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->SUBSCRIPTION:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne v4, v7, :cond_3
const-string v4, "CatalogItem: "
const-string v7, "SUBSCRIPTION"
new-array v3, v3, [Ljava/lang/Object;
.line 1322
invoke-static {v4, v7, v3}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_1
:cond_3
const-string v4, "CatalogItem: "
const-string v7, "UNKNOWN"
new-array v3, v3, [Ljava/lang/Object;
.line 1326
invoke-static {v4, v7, v3}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_1
iget-object v3, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
const-string v4, "localCurrency"
.line 1329
invoke-virtual {v6}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getAdditionalInfo()Ljava/util/Map;
move-result-object v6
const-string v7, "localCurrency"
invoke-interface {v6, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
invoke-interface {v3, v4, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_2
:cond_4
const-string v6, "CatalogItem: "
const-string v7, "UNKNOWN"
new-array v3, v3, [Ljava/lang/Object;
.line 1333
invoke-static {v6, v7, v3}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v3, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
const-string v6, "localCurrency"
.line 1334
invoke-virtual {p2, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/io/Serializable;
invoke-interface {v3, v6, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 1337
:goto_2
invoke-virtual {v2}, Lcom/android/billingclient/api/Purchase;->getDeveloperPayload()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Lcom/ea/nimble/Utility;->safeString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
iput-object v3, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mNonce:Ljava/lang/String;
.line 1338
invoke-virtual {v2}, Lcom/android/billingclient/api/Purchase;->getSignature()Ljava/lang/String;
move-result-object v3
invoke-static {v3}, Lcom/ea/nimble/Utility;->safeString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
iput-object v3, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mReceipt:Ljava/lang/String;
.line 1339
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->UNDEFINED:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v3, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 1340
invoke-direct {p0, v5, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateAdditionalInfoBundleFromBillingPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/android/billingclient/api/Purchase;)V
.line 1341
new-instance v2, Ljava/util/Date;
invoke-direct {v2}, Ljava/util/Date;-><init>()V
iput-object v2, v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTimeStamp:Ljava/util/Date;
.line 1344
invoke-interface {v0, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto/16 :goto_0
:cond_5
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 1348
invoke-virtual {p1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
move-result-object p1
invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_6
:goto_3
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result p2
if-eqz p2, :cond_8
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p2
check-cast p2, Ljava/lang/String;
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 1350
invoke-virtual {v2, p2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 1351
iget-object v2, p2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
invoke-interface {v1, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_6
iget-object v2, p2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_ACTIVITY_RESPONSE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne v2, v4, :cond_6
iget-boolean v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
if-eqz v2, :cond_7
.line 1355
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p2, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
goto :goto_3
.line 1359
:cond_7
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p2, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
goto :goto_3
.line 1365
:cond_8
new-instance p1, Ljava/util/HashMap;
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 1366
invoke-virtual {p2}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
move-result-object p2
invoke-interface {p2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p2
:goto_4
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_9
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
iget-object v4, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 1368
invoke-virtual {v4, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 1369
invoke-virtual {v4}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v4
invoke-interface {p1, v4, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_4
.line 1374
:cond_9
invoke-interface {p1}, Ljava/util/Map;->keySet()Ljava/util/Set;
move-result-object p2
.line 1375
invoke-interface {p2, v1}, Ljava/util/Set;->removeAll(Ljava/util/Collection;)Z
.line 1378
invoke-interface {p2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object p2
:goto_5
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_a
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
.line 1380
invoke-interface {p1, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
.line 1381
monitor-enter p0
:try_start_0
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 1383
invoke-virtual {v2, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1384
invoke-virtual {v2, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 1385
monitor-exit p0
goto :goto_5
:catchall_0
move-exception p1
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.line 1388
:cond_a
invoke-interface {v0}, Ljava/util/List;->size()I
move-result p1
const/4 p2, 0x0
if-nez p1, :cond_b
const-string p1, "MTX Google"
const-string v0, "No restored transactions to verify. Raising NIMBLE_NOTIFICATION_MTX_RESTORE_PURCHASED_TRANSACTIONS_FINISHED notification."
new-array v1, v3, [Ljava/lang/Object;
.line 1391
invoke-static {p1, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGDS(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean v3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
const-string p1, "nimble.notification.mtx.restorepurchasedtransactionsfinished"
.line 1394
invoke-direct {p0, p1, p2, p2, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
goto :goto_6
:cond_b
iget-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
if-eqz p1, :cond_c
.line 1414
new-instance p1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$RestoreTransactionVerifier;
invoke-direct {p1, p0, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$RestoreTransactionVerifier;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
invoke-virtual {p1, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$RestoreTransactionVerifier;->verifyTransactions(Ljava/util/List;)V
goto :goto_6
:cond_c
iget-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_reportingEnabled:Z
if-nez p1, :cond_d
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
.line 1425
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
.line 1427
:cond_d
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->onRestoreComplete(Ljava/util/List;)V
:goto_6
return-void
.end method
.method private refreshBillingClient()V
.locals 2
iget-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingConnectionInProgress:Z
const/4 v1, 0x0
if-nez v0, :cond_1
const-string v0, "Refreshing Billing Service Connection"
new-array v1, v1, [Ljava/lang/Object;
.line 316
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-eqz v0, :cond_0
.line 319
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->dispose()V
const/4 v0, 0x0
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 322
:cond_0
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createBillingHelper()V
goto :goto_0
:cond_1
const-string v0, "Billing Service Connection refresh already in progress"
new-array v1, v1, [Ljava/lang/Object;
.line 326
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_0
return-void
.end method
.method private restorePurchasedTransactionsImpl(Z)V
.locals 3
.line 1161
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
iget-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
const/4 v1, 0x0
if-eqz v0, :cond_0
const-string p1, "restorePurchasedTransactions called while restore already in progress. Aborting."
new-array v0, v1, [Ljava/lang/Object;
.line 1164
invoke-static {p0, p1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.line 1167
:cond_0
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isTransactionPending(Z)Z
move-result p1
const/4 v0, 0x0
if-eqz p1, :cond_1
const-string p1, "restorePurchasedTransactions called while transactions still pending."
new-array v2, v1, [Ljava/lang/Object;
.line 1169
invoke-static {p0, p1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1170
monitor-enter p0
.line 1172
:try_start_0
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "pendingTransactions: "
invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array v2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1173
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "recoveredTransactions: "
invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array v1, v1, [Ljava/lang/Object;
invoke-static {p0, p1, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1174
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 1176
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v1, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_PENDING:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v2, "Can\'t restore purchases while transaction is pending"
invoke-direct {p1, v1, v2}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
const-string v1, "nimble.notification.mtx.restorepurchasedtransactionsfinished"
.line 1177
invoke-direct {p0, v1, p1, v0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
:catchall_0
move-exception p1
.line 1174
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
:cond_1
const-string p1, "restorePurchasedTransactions called."
new-array v1, v1, [Ljava/lang/Object;
.line 1184
invoke-static {p0, p1, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-eqz p1, :cond_3
.line 1187
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->isBillingAvailable()Z
move-result p1
if-nez p1, :cond_2
goto :goto_0
:cond_2
const/4 p1, 0x1
iput-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 1199
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$4;
invoke-direct {v0, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$4;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
invoke-virtual {p1, v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->queryPurchasesAsync(Lcom/android/billingclient/api/PurchasesResponseListener;)V
return-void
.line 1189
:cond_3
:goto_0
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshBillingClient()V
.line 1190
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v1, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->BILLING_NOT_AVAILABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v2, "Billing not available"
invoke-direct {p1, v1, v2}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
const-string v1, "nimble.notification.mtx.restorepurchasedtransactionsfinished"
.line 1191
invoke-direct {p0, v1, p1, v0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.end method
.method private saveCatalogToPersistence()V
.locals 4
.line 2716
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2718
monitor-enter p0
.line 2720
:try_start_0
new-instance v0, Ljava/util/HashMap;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2721
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v1, "com.ea.nimble.mtx.googleplay"
.line 2724
sget-object v2, Lcom/ea/nimble/Persistence$Storage;->DOCUMENT:Lcom/ea/nimble/Persistence$Storage;
invoke-static {v1, v2}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
move-result-object v1
const-string v2, "Saving %d catalog items to persistence."
.line 2726
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v3
invoke-static {p0, v2, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string v2, "catalogItems"
.line 2727
invoke-virtual {v1, v2, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
.line 2729
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_cacheTimestamp:Ljava/lang/Long;
const-string v2, "cacheTimestamp"
.line 2730
invoke-virtual {v1, v2, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
.line 2735
invoke-virtual {v1}, Lcom/ea/nimble/Persistence;->synchronize()V
return-void
:catchall_0
move-exception v0
.line 2721
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private savePendingTransactionsToPersistence()V
.locals 6
.line 2691
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2694
monitor-enter p0
.line 2696
:try_start_0
new-instance v0, Ljava/util/HashMap;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2697
new-instance v1, Ljava/util/HashMap;
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2698
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v2, "com.ea.nimble.mtx.googleplay"
.line 2701
sget-object v3, Lcom/ea/nimble/Persistence$Storage;->DOCUMENT:Lcom/ea/nimble/Persistence$Storage;
invoke-static {v2, v3}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
move-result-object v2
const-string v3, "Saving %d pending and %d previously recovered transactions to persistence."
.line 2703
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-virtual {v1}, Ljava/util/HashMap;->size()I
move-result v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
filled-new-array {v4, v5}, [Ljava/lang/Object;
move-result-object v4
invoke-static {p0, v3, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string v3, "pendingTransactions"
.line 2705
invoke-virtual {v2, v3, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
const-string v0, "recoveredTransactions"
.line 2707
invoke-virtual {v2, v0, v1}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
.line 2711
invoke-virtual {v2}, Lcom/ea/nimble/Persistence;->synchronize()V
return-void
:catchall_0
move-exception v0
.line 2698
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private savePurchasedTransactionsToPersistence()V
.locals 4
.line 2740
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2742
monitor-enter p0
.line 2744
:try_start_0
new-instance v0, Ljava/util/HashMap;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 2745
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v1, "com.ea.nimble.mtx.googleplay"
.line 2748
sget-object v2, Lcom/ea/nimble/Persistence$Storage;->DOCUMENT:Lcom/ea/nimble/Persistence$Storage;
invoke-static {v1, v2}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
move-result-object v1
const-string v2, "Saving %d purchased transactions to persistence."
.line 2750
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v3
invoke-static {p0, v2, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string v2, "purchasedTransactions"
.line 2752
invoke-virtual {v1, v2, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
.line 2757
invoke-virtual {v1}, Lcom/ea/nimble/Persistence;->synchronize()V
return-void
:catchall_0
move-exception v0
.line 2745
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private saveUnrecordedTransactionsToPersistence()V
.locals 4
.line 2762
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2764
monitor-enter p0
.line 2766
:try_start_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 2767
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v1, "com.ea.nimble.mtx.googleplay"
.line 2769
sget-object v2, Lcom/ea/nimble/Persistence$Storage;->DOCUMENT:Lcom/ea/nimble/Persistence$Storage;
invoke-static {v1, v2}, Lcom/ea/nimble/PersistenceService;->getPersistenceForNimbleComponent(Ljava/lang/String;Lcom/ea/nimble/Persistence$Storage;)Lcom/ea/nimble/Persistence;
move-result-object v1
const-string v2, "Saving %d unrecorded transactions to persistence."
.line 2771
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v3
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v3
invoke-static {p0, v2, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string v2, "unrecordedTransactions"
.line 2773
invoke-virtual {v1, v2, v0}, Lcom/ea/nimble/Persistence;->setValue(Ljava/lang/String;Ljava/io/Serializable;)V
.line 2774
invoke-virtual {v1}, Lcom/ea/nimble/Persistence;->synchronize()V
return-void
:catchall_0
move-exception v0
.line 2767
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private updateAdditionalInfoBundleFromBillingPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/android/billingclient/api/Purchase;)V
.locals 4
.line 2663
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
if-eqz p2, :cond_0
.line 2666
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_ORDERID:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getOrderId()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2667
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASETIME:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getPurchaseTime()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2668
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASESTATE:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getPurchaseState()I
move-result v2
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2669
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_TOKEN:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getPurchaseToken()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2670
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_PURCHASEDATA:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getOriginalJson()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2671
iget-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_RECEIPT:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getSignature()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 2672
iget-object p1, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_ACKNOWLEDGED:Ljava/lang/String;
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->isAcknowledged()Z
move-result p2
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p2
invoke-interface {p1, v0, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_0
return-void
.end method
.method private updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.locals 0
.line 2678
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
.line 2680
iput-object p2, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 2683
new-instance p2, Ljava/util/Date;
invoke-direct {p2}, Ljava/util/Date;-><init>()V
iput-object p2, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTimeStamp:Ljava/util/Date;
.line 2686
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->savePendingTransactionsToPersistence()V
return-void
.end method
.method private updateTransactionRecordWithNonce(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Ljava/lang/String;Lcom/ea/nimble/Error;)Z
.locals 3
.line 2001
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
if-nez p3, :cond_1
if-eqz p2, :cond_1
.line 2003
invoke-virtual {p2}, Ljava/lang/String;->length()I
move-result v0
if-nez v0, :cond_0
goto :goto_0
.line 2038
:cond_0
iput-object p2, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mNonce:Ljava/lang/String;
const/4 p1, 0x1
return p1
:cond_1
:goto_0
const/4 p2, 0x0
if-eqz p3, :cond_2
.line 2009
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Error making getNonce call to Synergy: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
new-array v1, p2, [Ljava/lang/Object;
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2010
new-instance v0, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v1, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->VERIFICATION_ERROR:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v2, "Synergy getNonce error"
invoke-direct {v0, v1, v2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_1
:cond_2
const-string p3, "No nonce in Synergy response for getNonce."
new-array v0, p2, [Ljava/lang/Object;
.line 2015
invoke-static {p0, p3, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 2016
new-instance v0, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p3, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->VERIFICATION_ERROR:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v1, "No nonce in Synergy response"
invoke-direct {v0, p3, v1}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
:goto_1
if-eqz p1, :cond_3
.line 2023
iput-object v0, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 2024
iget-object p3, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object p3, p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 2026
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, p1, p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
goto :goto_2
:cond_3
const-string p1, "No transaction record in getNonce error handling. No callback to call."
new-array p3, p2, [Ljava/lang/Object;
.line 2030
invoke-static {p0, p1, p3}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_2
return p2
.end method
# virtual methods
.method public cleanup()V
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Component cleanup"
.line 476
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-eqz v0, :cond_0
.line 480
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->dispose()V
const/4 v0, 0x0
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 484
:cond_0
invoke-static {}, Lcom/ea/nimble/ApplicationLifecycle;->getComponent()Lcom/ea/nimble/IApplicationLifecycle;
move-result-object v0
invoke-interface {v0, p0}, Lcom/ea/nimble/IApplicationLifecycle;->unregisterActivityEventCallbacks(Lcom/ea/nimble/IApplicationLifecycle$ActivityEventCallbacks;)V
return-void
.end method
.method public finalizeTransaction(Ljava/lang/String;Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;)Lcom/ea/nimble/Error;
.locals 9
const-string v0, "finalizeTransaction() call with transactionId(%s)"
filled-new-array {p1}, [Ljava/lang/Object;
move-result-object v1
.line 996
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 999
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1001
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 1002
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_3
const/4 v1, 0x0
if-nez v0, :cond_0
.line 1006
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Could not find transaction by Id to perform finalize, id: "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
.line 1007
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1008
new-instance p2, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v0, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNRECOGNIZED_TRANSACTION_ID:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
invoke-direct {p2, v0, p1}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p2
.line 1012
:cond_0
iget-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_1
const-string v2, "Finalize called on unfinished transaction, for sku, %s."
.line 1015
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v4
filled-new-array {v4}, [Ljava/lang/Object;
move-result-object v4
invoke-static {p0, v2, v4}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1026
:cond_1
iput-object p2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFinalizeCallback:Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;
.line 1029
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getError()Ljava/lang/Exception;
move-result-object p2
if-nez p2, :cond_8
iget-object p2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionType:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
sget-object v2, Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;->PURCHASE:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
if-ne p2, v2, :cond_8
.line 1031
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object p2
.line 1032
sget-object v2, Ljava/util/Locale;->US:Ljava/util/Locale;
const-string v4, "%.2f"
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getPriceDecimal()F
move-result v5
invoke-static {v5}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v5
filled-new-array {v5}, [Ljava/lang/Object;
move-result-object v5
invoke-static {v2, v4, v5}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
.line 1034
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getAdditionalInfo()Ljava/util/Map;
move-result-object v4
const-string v5, "localCurrency"
invoke-interface {v4, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
if-eqz v4, :cond_2
.line 1037
invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v4
goto :goto_0
:cond_2
const-string v4, "Currency information not currently available; using local currency instead."
new-array v5, v1, [Ljava/lang/Object;
.line 1041
invoke-static {p0, v4, v5}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1042
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object v4
invoke-interface {v4}, Lcom/ea/nimble/IApplicationEnvironment;->getCurrencyCode()Ljava/lang/String;
move-result-object v4
:goto_0
iget-object v5, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.line 1045
invoke-virtual {v5, p2}, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;->getSellIdFromSku(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
if-nez v5, :cond_4
.line 1048
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getCatalogItem()Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
move-result-object v6
if-nez v6, :cond_3
iget-object v6, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 1051
invoke-virtual {v6, p2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
:cond_3
if-eqz v6, :cond_4
.line 1056
invoke-virtual {v6}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getSellId()Ljava/lang/String;
move-result-object v5
:cond_4
const-string v6, "com.ea.nimble.tracking"
.line 1060
invoke-static {v6}, Lcom/ea/nimble/Base;->getComponent(Ljava/lang/String;)Lcom/ea/nimble/Component;
move-result-object v6
if-eqz v6, :cond_5
if-eqz v5, :cond_5
.line 1063
check-cast v6, Lcom/ea/nimble/tracking/ITracking;
.line 1064
new-instance v7, Ljava/util/HashMap;
invoke-direct {v7}, Ljava/util/HashMap;-><init>()V
const-string v8, "NIMBLESTANDARD::KEY_MTX_SELLID"
.line 1065
invoke-interface {v7, v8, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string v8, "NIMBLESTANDARD::KEY_MTX_PRICE"
.line 1066
invoke-interface {v7, v8, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string v8, "NIMBLESTANDARD::KEY_MTX_CURRENCY"
.line 1067
invoke-interface {v7, v8, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string v8, "NIMBLESTANDARD::MTX_ITEM_PURCHASED"
.line 1068
invoke-interface {v6, v8, v7}, Lcom/ea/nimble/tracking/ITracking;->logEvent(Ljava/lang/String;Ljava/util/Map;)V
.line 1073
:cond_5
new-instance v6, Ljava/util/HashMap;
invoke-direct {v6}, Ljava/util/HashMap;-><init>()V
const-string v7, "en"
const-string v8, "mtx"
.line 1074
invoke-virtual {v6, v7, v8}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 1076
new-instance v7, Landroid/os/Bundle;
invoke-direct {v7}, Landroid/os/Bundle;-><init>()V
const-string v8, "core"
.line 1077
invoke-virtual {v7, v8, v6}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
const-string v6, "action"
const-string v8, "purchased"
.line 1078
invoke-virtual {v7, v6, v8}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
if-eqz v5, :cond_6
const-string p2, "itemSellId"
.line 1081
invoke-virtual {v7, p2, v5}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_1
:cond_6
const-string v5, "skuAlias"
.line 1085
invoke-virtual {v7, v5, p2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
:goto_1
const-string p2, "price"
.line 1087
invoke-virtual {v7, p2, v2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string p2, "currency"
.line 1088
invoke-virtual {v7, p2, v4}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string p2, "eatid"
.line 1089
invoke-virtual {v7, p2, p1}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 1091
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getAdditionalInfo()Ljava/util/Map;
move-result-object p2
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_ADDITIONALINFO_KEY_ORDERID:Ljava/lang/String;
invoke-interface {p2, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
if-eqz p2, :cond_7
const-string v2, "fptid"
.line 1094
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-virtual {v7, v2, p2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 1097
:cond_7
new-instance p2, Landroid/content/Intent;
invoke-direct {p2}, Landroid/content/Intent;-><init>()V
const-string v2, "nimble.notification.tracking2.logEvent"
.line 1098
invoke-virtual {p2, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 1099
invoke-virtual {p2, v7}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
.line 1100
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object v2
invoke-interface {v2}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
move-result-object v2
invoke-static {v2}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
move-result-object v2
invoke-virtual {v2, p2}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
.line 1104
:cond_8
monitor-enter p0
:try_start_1
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1106
invoke-virtual {p2, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 1107
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_2
.line 1109
invoke-direct {p0, v0, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 1112
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getCatalogItem()Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
move-result-object p2
.line 1113
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getError()Ljava/lang/Exception;
move-result-object v2
if-nez v2, :cond_a
if-eqz p2, :cond_9
.line 1118
invoke-virtual {p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object p2
sget-object v2, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-eq p2, v2, :cond_a
.line 1120
:cond_9
monitor-enter p0
:try_start_2
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
.line 1122
invoke-virtual {p2, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 1123
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 1124
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->savePurchasedTransactionsToPersistence()V
goto :goto_2
:catchall_0
move-exception p1
.line 1123
:try_start_3
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw p1
:cond_a
:goto_2
iget-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_reportingEnabled:Z
if-eqz p1, :cond_b
.line 1130
iget-boolean p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mIsRecorded:Z
if-nez p1, :cond_b
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
if-nez p1, :cond_b
const/4 v1, 0x1
:cond_b
if-eqz v1, :cond_c
.line 1133
monitor-enter p0
:try_start_4
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
.line 1135
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 1136
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
.line 1137
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->saveUnrecordedTransactionsToPersistence()V
goto :goto_3
:catchall_1
move-exception p1
.line 1136
:try_start_5
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
throw p1
.line 1141
:cond_c
:goto_3
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFinalizeCallback:Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;
if-eqz p1, :cond_d
.line 1143
invoke-interface {p1, v0}, Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;->finalizeComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
:cond_d
if-eqz v1, :cond_e
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 1147
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;->recordTransactions()V
:cond_e
const/4 p1, 0x0
return-object p1
:catchall_2
move-exception p1
.line 1107
:try_start_6
monitor-exit p0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_2
throw p1
:catchall_3
move-exception p1
.line 1002
:try_start_7
monitor-exit p0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_3
throw p1
.end method
.method public getAvailableCatalogItems()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/NimbleCatalogItem;",
">;"
}
.end annotation
.line 1747
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
.line 1749
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
if-eqz v0, :cond_1
.line 1751
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isCacheExpired()Z
move-result v0
if-eqz v0, :cond_0
goto :goto_0
.line 1759
:cond_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 1760
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 1772
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$1SkuComparator;
invoke-direct {v1, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$1SkuComparator;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
invoke-static {v0, v1}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
return-object v0
:catchall_0
move-exception v0
goto :goto_1
.line 1753
:cond_1
:goto_0
:try_start_1
monitor-exit p0
const/4 v0, 0x0
return-object v0
.line 1760
:goto_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public getComponentId()Ljava/lang/String;
.locals 1
const-string v0, "com.ea.nimble.mtx.googleplay"
return-object v0
.end method
.method public getLogSourceTitle()Ljava/lang/String;
.locals 1
const-string v0, "MTX Google"
return-object v0
.end method
.method public getPendingTransactions()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/NimbleMTXTransaction;",
">;"
}
.end annotation
.line 1461
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
if-nez v0, :cond_0
const/4 v0, 0x0
return-object v0
.line 1468
:cond_0
monitor-enter p0
.line 1470
:try_start_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 1471
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public getPurchasedTransactions()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/NimbleMTXTransaction;",
">;"
}
.end annotation
.line 1434
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
.line 1436
monitor-enter p0
.line 1438
:try_start_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPurchasedTransactions:Ljava/util/HashMap;
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 1439
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public getRecoveredTransactions()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/ea/nimble/mtx/NimbleMTXTransaction;",
">;"
}
.end annotation
.line 1613
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
if-nez v0, :cond_0
const/4 v0, 0x0
return-object v0
.line 1620
:cond_0
monitor-enter p0
.line 1622
:try_start_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-virtual {v1}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
.line 1623
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
.end method
.method public getTransaction(Ljava/lang/String;)Lcom/ea/nimble/mtx/NimbleMTXTransaction;
.locals 1
.line 1445
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
if-nez v0, :cond_0
const/4 p1, 0x0
return-object p1
.line 1452
:cond_0
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1454
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/ea/nimble/mtx/NimbleMTXTransaction;
.line 1455
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method
.method public itemGranted(Ljava/lang/String;Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;)Lcom/ea/nimble/Error;
.locals 3
const-string v0, "itemGranted() call with transactionId(%s) and type (%s)"
.line 925
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
filled-new-array {p1, v1}, [Ljava/lang/Object;
move-result-object v1
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 930
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 932
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 933
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x0
if-nez v0, :cond_0
.line 936
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string p3, "Could not find transaction by Id to perform item grant, id: "
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 937
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNRECOGNIZED_TRANSACTION_ID:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Could not find transaction to perform item grant."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
:cond_0
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-eqz p1, :cond_7
.line 940
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->isBillingAvailable()Z
move-result p1
if-nez p1, :cond_1
goto :goto_1
.line 948
:cond_1
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq p1, v2, :cond_2
const-string v2, "Transaction in unexpected state for item grant. Transaction state: %s"
filled-new-array {p1}, [Ljava/lang/Object;
move-result-object p1
.line 952
invoke-static {p0, v2, p1}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:cond_2
if-nez p3, :cond_3
const-string p1, "itemGranted called with empty callback parameter."
new-array p2, v1, [Ljava/lang/Object;
.line 957
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 958
new-instance p1, Lcom/ea/nimble/Error;
sget-object p2, Lcom/ea/nimble/Error$Code;->MISSING_CALLBACK:Lcom/ea/nimble/Error$Code;
const-string p3, "Missing callback in itemGranted call."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
return-object p1
.line 962
:cond_3
iput-object p3, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
.line 965
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mCatalogItem:Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
if-eqz p1, :cond_4
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object p1
sget-object p3, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne p1, p3, :cond_4
if-eq p2, p3, :cond_4
const-string p1, "Game called item grant for SKU, %s, and indicated NOT consumable, though cached catalog data indicates the item is a consumable."
.line 969
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object p3
filled-new-array {p3}, [Ljava/lang/Object;
move-result-object p3
invoke-static {p0, p1, p3}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 973
:cond_4
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getError()Ljava/lang/Exception;
move-result-object p1
const/4 p3, 0x0
if-eqz p1, :cond_5
const-string p1, "Transaction for item SKU, %s, granted by game, despite an error. Clearing error from transaction."
.line 975
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v1
filled-new-array {v1}, [Ljava/lang/Object;
move-result-object v1
invoke-static {p0, p1, v1}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 976
iput-object p3, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 979
:cond_5
sget-object p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_CONSUMPTION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 981
sget-object p1, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-ne p2, p1, :cond_6
.line 984
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->googlePlayConsumeItem(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
goto :goto_0
.line 988
:cond_6
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->googlePlayAcknowledgePurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
:goto_0
return-object p3
.line 942
:cond_7
:goto_1
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshBillingClient()V
const-string p1, "Billing service is disconnected or not available"
new-array p2, v1, [Ljava/lang/Object;
.line 943
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 944
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->BILLING_NOT_AVAILABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Billing service disconnected or not available"
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
:catchall_0
move-exception p1
.line 933
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public networkCallGetAvailableItems()V
.locals 2
.line 1654
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGFUNC(Ljava/lang/Object;)V
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.line 1657
new-instance v1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$5;
invoke-direct {v1, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$5;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
invoke-virtual {v0, v1}, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;->getItemCatalog(Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog$ItemCallback;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
.line 1741
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
:goto_0
return-void
.end method
.method public onActivityResult(Landroid/app/Activity;IILandroid/content/Intent;)V
.locals 0
const/4 p1, 0x0
new-array p1, p1, [Ljava/lang/Object;
const-string p2, "onActivityResult"
.line 498
invoke-static {p0, p2, p1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method public onBackPressed()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public onNewIntent(Landroid/app/Activity;Landroid/content/Intent;)V
.locals 0
return-void
.end method
.method public onPurchasesUpdated(Lcom/android/billingclient/api/BillingResult;Ljava/util/List;)V
.locals 7
.param p1 # Lcom/android/billingclient/api/BillingResult;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/util/List;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/android/billingclient/api/BillingResult;",
"Ljava/util/List<",
"Lcom/android/billingclient/api/Purchase;",
">;)V"
}
.end annotation
.line 749
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Purchase finished: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, " "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getDebugMessage()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const/4 v0, 0x0
if-eqz p2, :cond_3
.line 756
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
move-result v2
if-nez v2, :cond_3
.line 758
invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/android/billingclient/api/Purchase;
.line 761
monitor-enter p0
:try_start_0
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 763
invoke-virtual {v2}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v2
invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v2
move-object v3, v0
:cond_0
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 765
iget-object v5, v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
invoke-static {v5}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_0
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getProducts()Ljava/util/List;
move-result-object v5
iget-object v6, v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
invoke-interface {v5, v6}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_0
if-nez v3, :cond_1
move-object v3, v4
goto :goto_0
.line 773
:cond_1
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Multiple transactions with the same sku found! Using the first one. TransactionA: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v6, " TransactionB: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
new-array v5, v1, [Ljava/lang/Object;
invoke-static {p0, v4, v5}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 777
:cond_2
monitor-exit p0
goto :goto_3
:goto_1
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.line 781
:cond_3
monitor-enter p0
:try_start_1
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 783
invoke-virtual {p2}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object p2
invoke-interface {p2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object p2
move-object v3, v0
:cond_4
:goto_2
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_6
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 785
iget-object v4, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v5, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_ACTIVITY_RESPONSE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne v4, v5, :cond_4
if-nez v3, :cond_5
move-object v3, v2
goto :goto_2
.line 793
:cond_5
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "More than one transaction record in WAITING_FOR_GOOGLE_PLAY_RESPONSE state found! Using: "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v5, ". Additional transaction for: "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getItemSku()Ljava/lang/String;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
new-array v4, v1, [Ljava/lang/Object;
invoke-static {p0, v2, v4}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
goto :goto_2
:catchall_1
move-exception p1
goto/16 :goto_7
.line 797
:cond_6
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
move-object p2, v0
:goto_3
if-nez v3, :cond_7
const-string p1, "Transaction record could not be found for purchase"
new-array p2, v1, [Ljava/lang/Object;
.line 802
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 806
new-instance p1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
invoke-direct {p1, p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->restoreItems()V
return-void
.line 812
:cond_7
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result v2
if-eqz v2, :cond_9
const-string v0, "Google Play purchase error"
new-array v2, v1, [Ljava/lang/Object;
.line 814
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
if-eqz p2, :cond_8
.line 818
invoke-direct {p0, v3, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateAdditionalInfoBundleFromBillingPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/android/billingclient/api/Purchase;)V
.line 821
:cond_8
invoke-direct {p0, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createGooglePlayErrorFromBillingResult(Lcom/android/billingclient/api/BillingResult;)Lcom/ea/nimble/mtx/googleplay/GooglePlayError;
move-result-object p1
const-string p2, "Google Play purchase error"
.line 822
invoke-direct {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createNimbleMTXErrorWithGooglePlayError(Lcom/ea/nimble/mtx/googleplay/GooglePlayError;Ljava/lang/String;)Lcom/ea/nimble/mtx/NimbleMTXError;
move-result-object p1
.line 824
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 825
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 826
sget-object p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v3, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 828
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
if-eqz p1, :cond_12
.line 833
:try_start_2
invoke-interface {p1, v3}, Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;->purchaseComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
goto/16 :goto_6
:catch_0
move-exception p1
.line 837
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "MTX_GOOGLE: Unhandled exception in mPurchaseCallback: "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
new-array v0, v1, [Ljava/lang/Object;
invoke-static {p0, p2, v0}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 838
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
goto/16 :goto_6
:cond_9
const-string p1, "GooglePlay Purchase successful."
new-array v2, v1, [Ljava/lang/Object;
.line 845
invoke-static {p0, p1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 848
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getSignature()Ljava/lang/String;
move-result-object p1
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mReceipt:Ljava/lang/String;
if-eqz p1, :cond_a
.line 850
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p1
if-nez p1, :cond_b
:cond_a
const-string p1, "Purchase has an empty signature string. Setting to \"xxxxx\" for test."
new-array v2, v1, [Ljava/lang/Object;
.line 852
invoke-static {p0, p1, v2}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const-string p1, "xxxxxxxxxxxxxxxxxxxxxxxxx"
.line 853
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mReceipt:Ljava/lang/String;
.line 857
:cond_b
invoke-direct {p0, v3, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateAdditionalInfoBundleFromBillingPurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/android/billingclient/api/Purchase;)V
.line 859
invoke-virtual {p2}, Lcom/android/billingclient/api/Purchase;->getPurchaseState()I
move-result p1
const/4 p2, 0x1
if-eq p1, p2, :cond_d
.line 861
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_DEFERRED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v0, "Google Play Purchase still pending"
invoke-direct {p1, p2, v0}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
.line 863
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 864
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 865
sget-object p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v3, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 867
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
if-eqz p1, :cond_c
.line 869
invoke-interface {p1, v3}, Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;->purchaseComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto :goto_4
:cond_c
const-string p1, "Transaction missing callback, cannot notify game of completed purchase"
new-array p2, v1, [Ljava/lang/Object;
.line 873
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:goto_4
return-void
:cond_d
iget-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
if-eqz p1, :cond_f
.line 881
sget-object p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v3, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 883
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
if-eqz p1, :cond_e
.line 886
invoke-interface {p1, v3}, Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;->unverifiedReceiptReceived(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto :goto_5
:cond_e
const-string p1, "Transaction missing callback, cannot notify game of completed purchase"
new-array p2, v1, [Ljava/lang/Object;
.line 890
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 894
:goto_5
new-instance p1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;
invoke-direct {p1, p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
invoke-virtual {p1, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;->verifyTransaction(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
goto :goto_6
:cond_f
iget-boolean p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_reportingEnabled:Z
if-nez p1, :cond_10
iget-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mUnrecordedTransactions:Ljava/util/ArrayList;
.line 905
invoke-virtual {p1, v3}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
.line 909
:cond_10
sget-object p1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v3, p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
.line 910
iget-object p1, v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
if-eqz p1, :cond_11
.line 913
invoke-interface {p1, v3}, Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;->purchaseComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto :goto_6
:cond_11
const-string p1, "Transaction missing callback, cannot notify game of completed purchase"
new-array p2, v1, [Ljava/lang/Object;
.line 917
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:cond_12
:goto_6
return-void
.line 797
:goto_7
:try_start_3
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw p1
.end method
.method public onWindowFocusChanged(Z)V
.locals 0
return-void
.end method
.method public purchaseItem(Ljava/lang/String;Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;Ljava/lang/String;)Lcom/ea/nimble/Error;
.locals 6
const-string v0, "purchaseItem() call with sku(%s)"
filled-new-array {p1}, [Ljava/lang/Object;
move-result-object v1
.line 515
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
const/4 v1, 0x0
if-eqz v0, :cond_c
.line 519
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->isBillingAvailable()Z
move-result v0
if-nez v0, :cond_0
goto/16 :goto_7
:cond_0
if-nez p2, :cond_1
const-string p1, "Missing purchase callback"
new-array p2, v1, [Ljava/lang/Object;
.line 530
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 531
new-instance p2, Lcom/ea/nimble/Error;
sget-object p3, Lcom/ea/nimble/Error$Code;->MISSING_CALLBACK:Lcom/ea/nimble/Error$Code;
invoke-direct {p2, p3, p1}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
return-object p2
.line 535
:cond_1
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->isTransactionPending()Z
move-result v0
if-eqz v0, :cond_2
const-string p1, "purchaseItem called while transactions still pending."
new-array p2, v1, [Ljava/lang/Object;
.line 537
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 539
monitor-enter p0
.line 541
:try_start_0
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "pendingTransactions: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 542
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "recoveredTransactions: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 543
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 545
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_PENDING:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Another transaction is still outstanding."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
:catchall_0
move-exception p1
.line 543
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
:cond_2
iget-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
if-eqz v0, :cond_3
const-string p1, "purchaseItem called while restore is in progress."
new-array p2, v1, [Ljava/lang/Object;
.line 550
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 551
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_PENDING:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Can\'t purchase item while restore is in progress."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
:cond_3
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 556
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v0
if-eqz v0, :cond_4
const-string v0, "mRecoveredTransactions.size() != 0. Resuming transaction."
new-array v2, v1, [Ljava/lang/Object;
.line 558
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 559
invoke-virtual {v0}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_4
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/Map$Entry;
.line 561
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/String;
const-string v4, "transactionId: %s"
filled-new-array {v3}, [Ljava/lang/Object;
move-result-object v5
.line 562
invoke-static {p0, v4, v5}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 563
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 564
iget-object v4, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
iget-object v2, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFinalizeCallback:Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;
invoke-virtual {p0, v3, p2, v4, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->resumeTransaction(Ljava/lang/String;Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;)Lcom/ea/nimble/Error;
goto :goto_0
.line 572
:cond_4
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->generateTransactionId()Ljava/lang/String;
move-result-object v0
.line 580
new-instance v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
invoke-direct {v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;-><init>()V
iput-object p1, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemSku:Ljava/lang/String;
iput-object v0, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionId:Ljava/lang/String;
.line 583
sget-object v3, Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;->PURCHASE:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
iput-object v3, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mTransactionType:Lcom/ea/nimble/mtx/NimbleMTXTransaction$TransactionType;
iput-object p2, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
const-string p2, "Setting metadata... %s for sku %s"
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Object;
.line 585
invoke-static {p3}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result v4
if-eqz v4, :cond_5
move-object v4, p3
goto :goto_1
:cond_5
const-string v4, "not set; metadata is null"
:goto_1
aput-object v4, v3, v1
const/4 v1, 0x1
aput-object p1, v3, v1
invoke-static {p0, p2, v3}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 586
invoke-static {p3}, Lcom/ea/nimble/Utility;->validString(Ljava/lang/String;)Z
move-result p2
if-eqz p2, :cond_6
iget-object p2, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mAdditionalInfo:Ljava/util/Map;
const-string v1, "metadata"
.line 588
invoke-interface {p2, v1, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_6
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.line 591
invoke-virtual {p2, p1}, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;->getSellIdFromSku(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
.line 593
monitor-enter p0
:try_start_2
iget-object p3, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mCatalogItems:Ljava/util/HashMap;
.line 595
invoke-virtual {p3, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
check-cast p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
if-eqz p3, :cond_7
.line 601
new-instance p2, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
invoke-direct {p2, p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;)V
iput-object p2, v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mCatalogItem:Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
.line 602
invoke-virtual {p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getSellId()Ljava/lang/String;
move-result-object p2
goto :goto_2
:catchall_1
move-exception p1
goto/16 :goto_6
.line 604
:cond_7
:goto_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 607
monitor-enter p0
:try_start_3
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 609
invoke-virtual {v1, v0, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 610
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
.line 613
sget-object v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_PREPURCHASE_INFO:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-direct {p0, v2, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->updateGooglePlayTransactionRecordState(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;)V
const-string v1, "com.ea.nimble.tracking"
.line 616
invoke-static {v1}, Lcom/ea/nimble/Base;->getComponent(Ljava/lang/String;)Lcom/ea/nimble/Component;
move-result-object v1
if-eqz v1, :cond_8
if-eqz p2, :cond_8
.line 619
check-cast v1, Lcom/ea/nimble/tracking/ITracking;
.line 620
new-instance v3, Ljava/util/HashMap;
invoke-direct {v3}, Ljava/util/HashMap;-><init>()V
const-string v4, "NIMBLESTANDARD::KEY_MTX_SELLID"
.line 621
invoke-interface {v3, v4, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
const-string v4, "NIMBLESTANDARD::MTX_ITEM_BEGIN_PURCHASE"
.line 622
invoke-interface {v1, v4, v3}, Lcom/ea/nimble/tracking/ITracking;->logEvent(Ljava/lang/String;Ljava/util/Map;)V
.line 627
:cond_8
new-instance v1, Ljava/util/HashMap;
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
const-string v3, "en"
const-string v4, "mtx"
.line 628
invoke-virtual {v1, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 630
new-instance v3, Landroid/os/Bundle;
invoke-direct {v3}, Landroid/os/Bundle;-><init>()V
const-string v4, "core"
.line 631
invoke-virtual {v3, v4, v1}, Landroid/os/Bundle;->putSerializable(Ljava/lang/String;Ljava/io/Serializable;)V
const-string v1, "action"
const-string v4, "begin"
.line 632
invoke-virtual {v3, v1, v4}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
if-eqz p2, :cond_9
const-string v1, "itemSellId"
.line 635
invoke-virtual {v3, v1, p2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_3
:cond_9
const-string p2, "skuAlias"
.line 639
invoke-virtual {v3, p2, p1}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
:goto_3
const/4 p2, 0x0
if-eqz p3, :cond_a
.line 646
invoke-virtual {p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getPriceDecimal()F
move-result v1
.line 647
invoke-virtual {p3}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getAdditionalInfo()Ljava/util/Map;
move-result-object p3
const-string v4, "localCurrency"
invoke-interface {p3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p3
goto :goto_4
:cond_a
const/4 v1, 0x0
move-object p3, p2
:goto_4
if-eqz p3, :cond_b
.line 651
invoke-virtual {p3}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p3
goto :goto_5
.line 655
:cond_b
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object p3
invoke-interface {p3}, Lcom/ea/nimble/IApplicationEnvironment;->getCurrencyCode()Ljava/lang/String;
move-result-object p3
:goto_5
const-string v4, "currency"
.line 657
invoke-virtual {v3, v4, p3}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string p3, "price"
.line 658
sget-object v4, Ljava/util/Locale;->US:Ljava/util/Locale;
const-string v5, "%.2f"
invoke-static {v1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
move-result-object v1
filled-new-array {v1}, [Ljava/lang/Object;
move-result-object v1
invoke-static {v4, v5, v1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v3, p3, v1}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string p3, "eatid"
.line 659
invoke-virtual {v3, p3, v0}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 661
new-instance p3, Landroid/content/Intent;
invoke-direct {p3}, Landroid/content/Intent;-><init>()V
const-string v0, "nimble.notification.tracking2.logEvent"
.line 662
invoke-virtual {p3, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 663
invoke-virtual {p3, v3}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
.line 664
invoke-static {}, Lcom/ea/nimble/ApplicationEnvironment;->getComponent()Lcom/ea/nimble/IApplicationEnvironment;
move-result-object v0
invoke-interface {v0}, Lcom/ea/nimble/IApplicationEnvironment;->getApplicationContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
move-result-object v0
invoke-virtual {v0, p3}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
.line 667
new-instance p3, Ljava/util/ArrayList;
invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V
.line 668
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 670
invoke-static {}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product;->newBuilder()Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
invoke-virtual {v1, p1}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductId(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
const-string v3, "subs"
invoke-virtual {v1, v3}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductType(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
invoke-virtual {v1}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->build()Lcom/android/billingclient/api/QueryProductDetailsParams$Product;
move-result-object v1
invoke-interface {p3, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 671
invoke-static {}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product;->newBuilder()Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
invoke-virtual {v1, p1}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductId(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
const-string v3, "inapp"
invoke-virtual {v1, v3}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->setProductType(Ljava/lang/String;)Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;
move-result-object v1
invoke-virtual {v1}, Lcom/android/billingclient/api/QueryProductDetailsParams$Product$Builder;->build()Lcom/android/billingclient/api/QueryProductDetailsParams$Product;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
.line 672
new-instance v3, Lcom/ea/nimble/mtx/googleplay/GooglePlay$3;
invoke-direct {v3, p0, p1, v2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$3;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Ljava/lang/String;Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
invoke-virtual {v1, p3, v0, v3}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->queryProductDetailsAsync(Ljava/util/List;Ljava/util/List;Lcom/android/billingclient/api/ProductDetailsResponseListener;)V
return-object p2
:catchall_2
move-exception p1
.line 610
:try_start_4
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_2
throw p1
.line 604
:goto_6
:try_start_5
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
throw p1
.line 521
:cond_c
:goto_7
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshBillingClient()V
const-string p1, "billingClient is not set up. Either the GooglePlay app is not present, or the billing server was not bound"
new-array p2, v1, [Ljava/lang/Object;
.line 523
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 524
new-instance p2, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p3, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->BILLING_NOT_AVAILABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
invoke-direct {p2, p3, p1}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p2
.end method
.method public refreshAvailableCatalogItems()V
.locals 5
.line 1630
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
const-string v1, "nimble.notification.mtx.refreshcatalogfinished"
const/4 v2, 0x0
const/4 v3, 0x0
if-eqz v0, :cond_2
.line 1632
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->isBillingAvailable()Z
move-result v0
if-nez v0, :cond_0
goto :goto_0
.line 1641
:cond_0
invoke-static {}, Lcom/ea/nimble/Network;->getComponent()Lcom/ea/nimble/INetwork;
move-result-object v0
invoke-interface {v0}, Lcom/ea/nimble/INetwork;->getStatus()Lcom/ea/nimble/Network$Status;
move-result-object v0
sget-object v4, Lcom/ea/nimble/Network$Status;->OK:Lcom/ea/nimble/Network$Status;
if-eq v0, v4, :cond_1
const-string v0, "refreshAvailable returning because there is no network connection"
new-array v2, v2, [Ljava/lang/Object;
.line 1643
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1644
new-instance v0, Lcom/ea/nimble/Error;
sget-object v2, Lcom/ea/nimble/Error$Code;->NETWORK_NO_CONNECTION:Lcom/ea/nimble/Error$Code;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-direct {v0, v2, v4}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
.line 1645
invoke-direct {p0, v1, v0, v3, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.line 1649
:cond_1
invoke-virtual {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->networkCallGetAvailableItems()V
return-void
.line 1634
:cond_2
:goto_0
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshBillingClient()V
const-string v0, "refreshAvailable returning because billing is unavailable "
new-array v2, v2, [Ljava/lang/Object;
.line 1635
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGW(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1636
new-instance v0, Lcom/ea/nimble/Error;
sget-object v2, Lcom/ea/nimble/Error$Code;->NOT_AVAILABLE:Lcom/ea/nimble/Error$Code;
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-direct {v0, v2, v4}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
.line 1637
invoke-direct {p0, v1, v0, v3, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->broadcastLocalEvent(Ljava/lang/String;Lcom/ea/nimble/Error;Ljava/lang/String;Landroid/os/Bundle;)V
return-void
.end method
.method public restore()V
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Component restore"
.line 402
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 404
new-instance v0, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
sget-object v1, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog$StoreType;->GOOGLE:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog$StoreType;
invoke-direct {v0, v1}, Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;-><init>(Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog$StoreType;)V
iput-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_synergyCatalog:Lcom/ea/nimble/mtx/catalog/synergy/SynergyCatalog;
.line 406
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->loadFromPersistence()V
.line 408
new-instance v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay$2;
invoke-direct {v0, p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$2;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;)V
const-string v1, "nimble.notification.languageChange"
.line 416
invoke-static {v1, v0}, Lcom/ea/nimble/Utility;->registerReceiver(Ljava/lang/String;Landroid/content/BroadcastReceiver;)V
.line 421
invoke-static {}, Lcom/ea/nimble/ApplicationLifecycle;->getComponent()Lcom/ea/nimble/IApplicationLifecycle;
move-result-object v0
invoke-interface {v0, p0}, Lcom/ea/nimble/IApplicationLifecycle;->registerActivityEventCallbacks(Lcom/ea/nimble/IApplicationLifecycle$ActivityEventCallbacks;)V
return-void
.end method
.method public restorePurchasedTransactions()V
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "restorePurchasedTransactions()"
.line 1155
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
const/4 v0, 0x1
.line 1156
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->restorePurchasedTransactionsImpl(Z)V
return-void
.end method
.method public resume()V
.locals 4
const-string v0, "Component resume"
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
.line 446
invoke-static {p0, v0, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-eqz v0, :cond_0
.line 451
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;->isBillingAvailable()Z
move-result v0
if-nez v0, :cond_1
:cond_0
const-string v0, "Billing service is not available, start refreshing connection"
new-array v1, v1, [Ljava/lang/Object;
.line 453
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 454
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->refreshBillingClient()V
.line 457
:cond_1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 459
invoke-virtual {v0}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_2
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_4
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
.line 461
iget-object v2, v1, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v3, :cond_3
sget-object v3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_NONCE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne v2, v3, :cond_2
goto :goto_1
:catchall_0
move-exception v0
goto :goto_2
.line 464
:cond_3
:goto_1
new-instance v2, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;
const/4 v3, 0x0
invoke-direct {v2, p0, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
invoke-virtual {v2, v1}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;->verifyTransaction(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
goto :goto_0
.line 467
:cond_4
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 469
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;->recordTransactions()V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.line 470
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->restoreItems()V
return-void
.line 467
:goto_2
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public resumeTransaction(Ljava/lang/String;Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;)Lcom/ea/nimble/Error;
.locals 6
const-string v0, "Resuming transaction id, %s."
.line 1477
invoke-static {p1}, Lcom/ea/nimble/Utility;->safeString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
filled-new-array {v1}, [Ljava/lang/Object;
move-result-object v1
invoke-static {p0, v0, v1}, Lcom/ea/nimble/Log$Helper;->LOGV(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
if-nez p1, :cond_0
.line 1481
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNRECOGNIZED_TRANSACTION_ID:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Null transaction ID"
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
:cond_0
iget-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_restoreInProgress:Z
const/4 v1, 0x0
if-eqz v0, :cond_1
const-string p1, "resumeTransaction called while restore is in progress."
new-array p2, v1, [Ljava/lang/Object;
.line 1486
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1487
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_PENDING:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Can\'t resume transaction while restore is in progress."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
.line 1491
:cond_1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1493
invoke-virtual {v0}, Ljava/util/HashMap;->size()I
move-result v0
if-lez v0, :cond_3
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1495
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
if-nez v0, :cond_2
.line 1499
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "Resume called while transactions are pending: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object p2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1500
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_PENDING:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Another transaction is pending. It needs to finish and finalize first."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
goto/16 :goto_3
.line 1503
:cond_2
iget-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
if-nez v2, :cond_5
.line 1505
new-instance p1, Lcom/ea/nimble/Error;
sget-object p2, Lcom/ea/nimble/Error$Code;->INVALID_ARGUMENT:Lcom/ea/nimble/Error$Code;
const-string p3, "Cannot resume a pending transaction with no error"
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
monitor-exit p0
return-object p1
:cond_3
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mRecoveredTransactions:Ljava/util/HashMap;
.line 1511
invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;
if-nez v0, :cond_4
.line 1516
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->UNRECOGNIZED_TRANSACTION_ID:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "No transaction for given transaction ID."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
monitor-exit p0
return-object p1
:cond_4
iget-object v2, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->mPendingTransactions:Ljava/util/HashMap;
.line 1519
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getTransactionId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 1521
:cond_5
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 1523
iget-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
const/4 v3, 0x0
if-eqz v2, :cond_7
.line 1525
instance-of v4, v2, Lcom/ea/nimble/Error;
if-eqz v4, :cond_6
check-cast v2, Lcom/ea/nimble/Error;
invoke-virtual {v2}, Lcom/ea/nimble/Error;->getCode()I
move-result v2
sget-object v4, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_SUPERSEDED:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
invoke-virtual {v4}, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->intValue()I
move-result v4
if-ne v2, v4, :cond_6
goto :goto_0
.line 1532
:cond_6
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Resuming transaction that failed in state "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v4, " with error "
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v4, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
new-array v4, v1, [Ljava/lang/Object;
invoke-static {p0, v2, v4}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1533
iget-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 1534
iput-object v3, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 1535
iput-object v3, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 1539
:cond_7
:goto_0
iget-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_PREPURCHASE_INFO:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq v2, v4, :cond_8
sget-object v4, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_ACTIVITY_RESPONSE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne v2, v4, :cond_9
.line 1544
:cond_8
iput-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFailedState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 1545
sget-object v2, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
iput-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
.line 1546
new-instance v2, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object v4, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->NON_CRITICAL_INTERRUPTION:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string v5, "MTX transaction interrupted before account charged."
invoke-direct {v2, v4, v5}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
iput-object v2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mError:Ljava/lang/Exception;
.line 1550
:cond_9
iput-object p2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
.line 1551
iput-object p4, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFinalizeCallback:Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;
.line 1552
iput-object p3, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
.line 1555
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->savePendingTransactionsToPersistence()V
.line 1559
iget-object p2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mGooglePlayTransactionState:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_NONCE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-eq p2, p3, :cond_11
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_SYNERGY_VERIFICATION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne p2, p3, :cond_a
goto/16 :goto_1
.line 1564
:cond_a
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GAME_TO_CONFIRM_ITEM_GRANT:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne p2, p3, :cond_c
.line 1569
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mPurchaseCallback:Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;
if-eqz p1, :cond_b
.line 1571
invoke-interface {p1, v0}, Lcom/ea/nimble/mtx/INimbleMTX$PurchaseTransactionCallback;->purchaseComplete(Lcom/ea/nimble/mtx/NimbleMTXTransaction;)V
goto/16 :goto_2
.line 1575
:cond_b
new-instance p1, Lcom/ea/nimble/Error;
sget-object p2, Lcom/ea/nimble/Error$Code;->MISSING_CALLBACK:Lcom/ea/nimble/Error$Code;
const-string p3, "Resumed transaction not given purchase callback."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
return-object p1
.line 1578
:cond_c
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->WAITING_FOR_GOOGLEPLAY_CONSUMPTION:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne p2, p3, :cond_f
.line 1581
iget-object p1, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mItemGrantedCallback:Lcom/ea/nimble/mtx/INimbleMTX$ItemGrantedCallback;
if-eqz p1, :cond_e
.line 1583
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getCatalogItem()Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
move-result-object p1
if-eqz p1, :cond_d
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getCatalogItem()Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
move-result-object p1
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object p1
if-eqz p1, :cond_d
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->getCatalogItem()Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;
move-result-object p1
invoke-virtual {p1}, Lcom/ea/nimble/mtx/googleplay/GooglePlayCatalogItem;->getItemType()Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
move-result-object p1
sget-object p2, Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;->CONSUMABLE:Lcom/ea/nimble/mtx/NimbleCatalogItem$ItemType;
if-eq p1, p2, :cond_d
.line 1585
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->googlePlayAcknowledgePurchase(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
goto :goto_2
.line 1589
:cond_d
invoke-direct {p0, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->googlePlayConsumeItem(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
goto :goto_2
.line 1594
:cond_e
new-instance p1, Lcom/ea/nimble/Error;
sget-object p2, Lcom/ea/nimble/Error$Code;->MISSING_CALLBACK:Lcom/ea/nimble/Error$Code;
const-string p3, "Resumed transaction not given item granted callback."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/Error;-><init>(Lcom/ea/nimble/Error$Code;Ljava/lang/String;)V
return-object p1
.line 1597
:cond_f
sget-object p3, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;->COMPLETE:Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction$GooglePlayTransactionState;
if-ne p2, p3, :cond_10
.line 1600
iget-object p2, v0, Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;->mFinalizeCallback:Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;
invoke-virtual {p0, p1, p2}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->finalizeTransaction(Ljava/lang/String;Lcom/ea/nimble/mtx/INimbleMTX$FinalizeTransactionCallback;)Lcom/ea/nimble/Error;
goto :goto_2
.line 1604
:cond_10
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "ResumeTransaction called on a transaction that can\'t be resumed: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-array p2, v1, [Ljava/lang/Object;
invoke-static {p0, p1, p2}, Lcom/ea/nimble/Log$Helper;->LOGE(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.line 1605
new-instance p1, Lcom/ea/nimble/mtx/NimbleMTXError;
sget-object p2, Lcom/ea/nimble/mtx/NimbleMTXError$Code;->TRANSACTION_NOT_RESUMABLE:Lcom/ea/nimble/mtx/NimbleMTXError$Code;
const-string p3, "Transaction not in a resumable state."
invoke-direct {p1, p2, p3}, Lcom/ea/nimble/mtx/NimbleMTXError;-><init>(Lcom/ea/nimble/mtx/NimbleMTXError$Code;Ljava/lang/String;)V
return-object p1
.line 1562
:cond_11
:goto_1
new-instance p1, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;
invoke-direct {p1, p0, v3}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;-><init>(Lcom/ea/nimble/mtx/googleplay/GooglePlay;Lcom/ea/nimble/mtx/googleplay/GooglePlay$1;)V
invoke-virtual {p1, v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$PurchaseTransactionVerifier;->verifyTransaction(Lcom/ea/nimble/mtx/googleplay/GooglePlayTransaction;)V
:goto_2
return-object v3
.line 1521
:goto_3
:try_start_1
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw p1
.end method
.method public setPlatformParameters(Ljava/util/Map;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)V"
}
.end annotation
.line 1779
invoke-static {p0}, Lcom/ea/nimble/Log$Helper;->LOGPUBLICFUNC(Ljava/lang/Object;)V
if-nez p1, :cond_0
return-void
:cond_0
sget-object v0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->GOOGLEPLAY_PLATFORM_PARAMETER_APPLICATION_PUBLIC_KEY:Ljava/lang/String;
.line 1785
invoke-interface {p1, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
if-eqz p1, :cond_1
iput-object p1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_appPublicKey:Ljava/lang/String;
:cond_1
return-void
.end method
.method public setup()V
.locals 5
const/4 v0, 0x0
new-array v1, v0, [Ljava/lang/Object;
const-string v2, "Component setup"
.line 355
invoke-static {p0, v2, v1}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_billingHelper:Lcom/ea/nimble/mtx/googleplay/billing/BillingHelper;
if-nez v1, :cond_0
.line 365
invoke-direct {p0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->createBillingHelper()V
:cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
iput-boolean v1, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_reportingEnabled:Z
const-string v1, "com.ea.nimble.mtx.enableVerification"
.line 372
invoke-static {v1}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
const-string v2, "false"
.line 373
invoke-virtual {v2, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v3
const-string v4, "true"
if-eqz v3, :cond_3
const-string v1, "Receipt verification has been disabled."
new-array v3, v0, [Ljava/lang/Object;
.line 375
invoke-static {p0, v1, v3}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_verificationEnabled:Z
const-string v1, "com.ea.nimble.mtx.reportingEnabled"
.line 387
invoke-static {v1}, Lcom/ea/nimble/NimbleApplicationConfiguration;->getConfigValueAsString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 388
invoke-virtual {v2, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_1
const-string v1, "Transaction reporting has been disabled."
new-array v2, v0, [Ljava/lang/Object;
.line 390
invoke-static {p0, v1, v2}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_reportingEnabled:Z
goto :goto_0
.line 393
:cond_1
invoke-virtual {v4, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_2
const-string v1, "Value com.ea.nimble.mtx.reportingEnabled corrupted or non existed in manifest file."
new-array v0, v0, [Ljava/lang/Object;
.line 395
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:cond_2
:goto_0
return-void
.line 380
:cond_3
invoke-virtual {v4, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_4
const-string v1, "Value com.ea.nimble.mtx.enableVerification corrupted or non existed in manifest file."
new-array v0, v0, [Ljava/lang/Object;
.line 382
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
:cond_4
return-void
.end method
.method public suspend()V
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Component suspend"
.line 438
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 439
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;->cancel()V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.line 440
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->cancel()V
return-void
.end method
.method public teardown()V
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Component teardown"
.line 430
invoke-static {p0, v1, v0}, Lcom/ea/nimble/Log$Helper;->LOGD(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_transactionRecorder:Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;
.line 431
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$TransactionRecorder;->cancel()V
iget-object v0, p0, Lcom/ea/nimble/mtx/googleplay/GooglePlay;->m_itemRestorer:Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;
.line 432
invoke-virtual {v0}, Lcom/ea/nimble/mtx/googleplay/GooglePlay$ItemRestorer;->cancel()V
return-void
.end method