StoreMonitor.smali
.class public Lcom/unity3d/services/store/StoreMonitor;
.super Ljava/lang/Object;
.source "StoreMonitor.java"
# annotations
.annotation build Landroid/annotation/TargetApi;
value = 0xe
.end annotation
# static fields
.field private static _billingService:Ljava/lang/Object;
.field private static _lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
# direct methods
.method public constructor <init>()V
.registers 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static synthetic access$000()Ljava/lang/Object;
.registers 1
.line 1
sget-object v0, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
return-object v0
.end method
.method static synthetic access$002(Ljava/lang/Object;)Ljava/lang/Object;
.registers 1
.line 1
sput-object p0, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
return-object p0
.end method
.method public static getPurchaseHistory(Ljava/lang/String;I)Lorg/json/JSONObject;
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchMethodException;,
Lcom/unity3d/services/store/core/StoreException;,
Ljava/lang/IllegalAccessException;,
Lorg/json/JSONException;,
Ljava/lang/reflect/InvocationTargetException;,
Ljava/lang/ClassNotFoundException;
}
.end annotation
.line 1
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
invoke-static {v0, v1, p0, p1}, Lcom/unity3d/services/store/StoreBilling;->getPurchaseHistory(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/String;I)Lorg/json/JSONObject;
move-result-object p0
return-object p0
.end method
.method public static getPurchases(Ljava/lang/String;)Lorg/json/JSONObject;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/ClassNotFoundException;,
Ljava/lang/NoSuchMethodException;,
Ljava/lang/reflect/InvocationTargetException;,
Lorg/json/JSONException;,
Ljava/lang/IllegalAccessException;,
Lcom/unity3d/services/store/core/StoreException;
}
.end annotation
.line 1
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
invoke-static {v0, v1, p0}, Lcom/unity3d/services/store/StoreBilling;->getPurchases(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object p0
return-object p0
.end method
.method public static getSkuDetails(Ljava/lang/String;Ljava/util/ArrayList;)Lorg/json/JSONArray;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;)",
"Lorg/json/JSONArray;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchMethodException;,
Lcom/unity3d/services/store/core/StoreException;,
Ljava/lang/IllegalAccessException;,
Lorg/json/JSONException;,
Ljava/lang/reflect/InvocationTargetException;,
Ljava/lang/ClassNotFoundException;
}
.end annotation
.line 1
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
invoke-static {v0, v1, p0, p1}, Lcom/unity3d/services/store/StoreBilling;->getSkuDetails(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/String;Ljava/util/ArrayList;)Lorg/json/JSONArray;
move-result-object p0
return-object p0
.end method
.method public static initialize(Ljava/lang/String;Ljava/lang/String;)V
.registers 4
.line 1
new-instance v0, Landroid/content/Intent;
invoke-direct {v0, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 2
invoke-virtual {v0, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
.line 3
new-instance p0, Lcom/unity3d/services/store/StoreMonitor$1;
invoke-direct {p0}, Lcom/unity3d/services/store/StoreMonitor$1;-><init>()V
.line 4
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplicationContext()Landroid/content/Context;
move-result-object p1
const/4 v1, 0x1
invoke-virtual {p1, v0, p0, v1}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
return-void
.end method
.method public static isBillingSupported(Ljava/lang/String;)I
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/ClassNotFoundException;,
Ljava/lang/NoSuchMethodException;,
Ljava/lang/IllegalAccessException;,
Lcom/unity3d/services/store/core/StoreException;,
Ljava/lang/reflect/InvocationTargetException;
}
.end annotation
.line 1
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplicationContext()Landroid/content/Context;
move-result-object v0
sget-object v1, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
invoke-static {v0, v1, p0}, Lcom/unity3d/services/store/StoreBilling;->isBillingSupported(Landroid/content/Context;Ljava/lang/Object;Ljava/lang/String;)I
move-result p0
return p0
.end method
.method public static isInitialized()Z
.registers 1
.line 1
sget-object v0, Lcom/unity3d/services/store/StoreMonitor;->_billingService:Ljava/lang/Object;
if-eqz v0, :cond_6
const/4 v0, 0x1
goto :goto_7
:cond_6
const/4 v0, 0x0
:goto_7
return v0
.end method
.method public static sendPurchaseStatusOnResume(Ljava/lang/String;Ljava/util/ArrayList;)V
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;)V"
}
.end annotation
const-string v0, "subs"
const-string v1, "inapp"
.line 1
invoke-static {}, Lcom/unity3d/services/store/StoreMonitor;->isInitialized()Z
move-result v2
const/4 v3, 0x3
const/4 v4, 0x2
const/4 v5, 0x1
const/4 v6, 0x0
if-nez v2, :cond_26
.line 2
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object p1
sget-object v0, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v1, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v2, v3, [Ljava/lang/Object;
sget-object v3, Lcom/unity3d/services/store/StoreError;->NOT_INITIALIZED:Lcom/unity3d/services/store/StoreError;
aput-object v3, v2, v6
aput-object p0, v2, v5
const-string p0, "StoreMonitor not initialized"
aput-object p0, v2, v4
invoke-virtual {p1, v0, v1, v2}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
return-void
.line 3
:cond_26
:try_start_26
new-instance v2, Lorg/json/JSONObject;
invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V
.line 4
invoke-virtual {p1, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_38
.line 5
invoke-static {v1}, Lcom/unity3d/services/store/StoreMonitor;->getPurchases(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v7
.line 6
invoke-virtual {v2, v1, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 7
:cond_38
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_45
.line 8
invoke-static {v0}, Lcom/unity3d/services/store/StoreMonitor;->getPurchases(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object p1
.line 9
invoke-virtual {v2, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 10
:cond_45
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object p1
sget-object v0, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v1, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME:Lcom/unity3d/services/store/StoreEvent;
new-array v7, v4, [Ljava/lang/Object;
aput-object p0, v7, v6
aput-object v2, v7, v5
invoke-virtual {p1, v0, v1, v7}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
:try_end_56
.catch Ljava/lang/ClassNotFoundException; {:try_start_26 .. :try_end_56} :catch_eb
.catch Ljava/lang/NoSuchMethodException; {:try_start_26 .. :try_end_56} :catch_d0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_26 .. :try_end_56} :catch_b5
.catch Lorg/json/JSONException; {:try_start_26 .. :try_end_56} :catch_9a
.catch Ljava/lang/IllegalAccessException; {:try_start_26 .. :try_end_56} :catch_7f
.catch Lcom/unity3d/services/store/core/StoreException; {:try_start_26 .. :try_end_56} :catch_58
goto/16 :goto_105
:catch_58
move-exception p1
.line 11
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
const/4 v7, 0x4
new-array v7, v7, [Ljava/lang/Object;
sget-object v8, Lcom/unity3d/services/store/StoreError;->STORE_ERROR:Lcom/unity3d/services/store/StoreError;
aput-object v8, v7, v6
aput-object p0, v7, v5
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v7, v4
invoke-virtual {p1}, Lcom/unity3d/services/store/core/StoreException;->getResultCode()I
move-result p0
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p0
aput-object p0, v7, v3
invoke-virtual {v0, v1, v2, v7}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto/16 :goto_105
:catch_7f
move-exception p1
.line 12
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->ILLEGAL_ACCESS:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/IllegalAccessException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_9a
move-exception p1
.line 13
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->JSON_ERROR:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_b5
move-exception p1
.line 14
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->INVOCATION_TARGET:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_d0
move-exception p1
.line 15
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->NO_SUCH_METHOD:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/NoSuchMethodException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_eb
move-exception p1
.line 16
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_RESUME_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->CLASS_NOT_FOUND:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/ClassNotFoundException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
:goto_105
return-void
.end method
.method public static sendPurchaseStatusOnStop(Ljava/lang/String;Ljava/util/ArrayList;)V
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;)V"
}
.end annotation
const-string v0, "subs"
const-string v1, "inapp"
.line 1
invoke-static {}, Lcom/unity3d/services/store/StoreMonitor;->isInitialized()Z
move-result v2
const/4 v3, 0x3
const/4 v4, 0x2
const/4 v5, 0x1
const/4 v6, 0x0
if-nez v2, :cond_26
.line 2
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object p1
sget-object v0, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v1, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v2, v3, [Ljava/lang/Object;
sget-object v3, Lcom/unity3d/services/store/StoreError;->NOT_INITIALIZED:Lcom/unity3d/services/store/StoreError;
aput-object v3, v2, v6
aput-object p0, v2, v5
const-string p0, "StoreMonitor not initialized"
aput-object p0, v2, v4
invoke-virtual {p1, v0, v1, v2}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
return-void
.line 3
:cond_26
:try_start_26
new-instance v2, Lorg/json/JSONObject;
invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V
.line 4
invoke-virtual {p1, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_38
.line 5
invoke-static {v1}, Lcom/unity3d/services/store/StoreMonitor;->getPurchases(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v7
.line 6
invoke-virtual {v2, v1, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 7
:cond_38
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_45
.line 8
invoke-static {v0}, Lcom/unity3d/services/store/StoreMonitor;->getPurchases(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object p1
.line 9
invoke-virtual {v2, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 10
:cond_45
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object p1
sget-object v0, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v1, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP:Lcom/unity3d/services/store/StoreEvent;
new-array v7, v4, [Ljava/lang/Object;
aput-object p0, v7, v6
aput-object v2, v7, v5
invoke-virtual {p1, v0, v1, v7}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
:try_end_56
.catch Ljava/lang/ClassNotFoundException; {:try_start_26 .. :try_end_56} :catch_eb
.catch Ljava/lang/NoSuchMethodException; {:try_start_26 .. :try_end_56} :catch_d0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_26 .. :try_end_56} :catch_b5
.catch Lorg/json/JSONException; {:try_start_26 .. :try_end_56} :catch_9a
.catch Ljava/lang/IllegalAccessException; {:try_start_26 .. :try_end_56} :catch_7f
.catch Lcom/unity3d/services/store/core/StoreException; {:try_start_26 .. :try_end_56} :catch_58
goto/16 :goto_105
:catch_58
move-exception p1
.line 11
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
const/4 v7, 0x4
new-array v7, v7, [Ljava/lang/Object;
sget-object v8, Lcom/unity3d/services/store/StoreError;->STORE_ERROR:Lcom/unity3d/services/store/StoreError;
aput-object v8, v7, v6
aput-object p0, v7, v5
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v7, v4
invoke-virtual {p1}, Lcom/unity3d/services/store/core/StoreException;->getResultCode()I
move-result p0
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p0
aput-object p0, v7, v3
invoke-virtual {v0, v1, v2, v7}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto/16 :goto_105
:catch_7f
move-exception p1
.line 12
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->ILLEGAL_ACCESS:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/IllegalAccessException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_9a
move-exception p1
.line 13
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->JSON_ERROR:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_b5
move-exception p1
.line 14
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->INVOCATION_TARGET:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_d0
move-exception p1
.line 15
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->NO_SUCH_METHOD:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/NoSuchMethodException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
goto :goto_105
:catch_eb
move-exception p1
.line 16
invoke-static {}, Lcom/unity3d/services/core/webview/WebViewApp;->getCurrentApp()Lcom/unity3d/services/core/webview/WebViewApp;
move-result-object v0
sget-object v1, Lcom/unity3d/services/core/webview/WebViewEventCategory;->STORE:Lcom/unity3d/services/core/webview/WebViewEventCategory;
sget-object v2, Lcom/unity3d/services/store/StoreEvent;->PURCHASE_STATUS_ON_STOP_ERROR:Lcom/unity3d/services/store/StoreEvent;
new-array v3, v3, [Ljava/lang/Object;
sget-object v7, Lcom/unity3d/services/store/StoreError;->CLASS_NOT_FOUND:Lcom/unity3d/services/store/StoreError;
aput-object v7, v3, v6
aput-object p0, v3, v5
invoke-virtual {p1}, Ljava/lang/ClassNotFoundException;->getMessage()Ljava/lang/String;
move-result-object p0
aput-object p0, v3, v4
invoke-virtual {v0, v1, v2, v3}, Lcom/unity3d/services/core/webview/WebViewApp;->sendEvent(Ljava/lang/Enum;Ljava/lang/Enum;[Ljava/lang/Object;)Z
:goto_105
return-void
.end method
.method public static startPurchaseTracking(ZLjava/util/ArrayList;Ljava/util/ArrayList;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(Z",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;)V"
}
.end annotation
.line 1
sget-object v0, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
if-eqz v0, :cond_7
.line 2
invoke-static {}, Lcom/unity3d/services/store/StoreMonitor;->stopPurchaseTracking()V
.line 3
:cond_7
new-instance v0, Lcom/unity3d/services/store/StoreLifecycleListener;
invoke-direct {v0, p0, p1, p2}, Lcom/unity3d/services/store/StoreLifecycleListener;-><init>(ZLjava/util/ArrayList;Ljava/util/ArrayList;)V
sput-object v0, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
.line 4
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplication()Landroid/app/Application;
move-result-object p0
sget-object p1, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
invoke-virtual {p0, p1}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
return-void
.end method
.method public static stopPurchaseTracking()V
.registers 2
.line 1
sget-object v0, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
if-eqz v0, :cond_10
.line 2
invoke-static {}, Lcom/unity3d/services/core/properties/ClientProperties;->getApplication()Landroid/app/Application;
move-result-object v0
sget-object v1, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
invoke-virtual {v0, v1}, Landroid/app/Application;->unregisterActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
const/4 v0, 0x0
.line 3
sput-object v0, Lcom/unity3d/services/store/StoreMonitor;->_lifecycleListener:Lcom/unity3d/services/store/StoreLifecycleListener;
:cond_10
return-void
.end method