495 lines
11 KiB
Smali
495 lines
11 KiB
Smali
.class public abstract Lcom/in2wow/sdk/triggerresponse/TriggerResponse;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Landroid/os/Parcelable;
|
|
|
|
|
|
# instance fields
|
|
.field protected a:Ljava/lang/String;
|
|
|
|
.field protected b:Ljava/lang/String;
|
|
|
|
.field protected c:Z
|
|
|
|
.field protected d:Z
|
|
|
|
.field protected e:Z
|
|
|
|
.field protected f:Lcom/in2wow/sdk/triggerresponse/e;
|
|
|
|
.field protected g:Lorg/json/JSONObject;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 15
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 20
|
|
iput-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->a:Ljava/lang/String;
|
|
|
|
iput-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->b:Ljava/lang/String;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 21
|
|
iput-boolean v1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->c:Z
|
|
|
|
iput-boolean v1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->d:Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
iput-boolean v1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->e:Z
|
|
|
|
.line 22
|
|
iput-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->f:Lcom/in2wow/sdk/triggerresponse/e;
|
|
|
|
.line 23
|
|
iput-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(ZLandroid/content/Context;Ljava/lang/String;Lcom/in2wow/sdk/triggerresponse/b;)V
|
|
.locals 6
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/high16 v2, 0x10000000
|
|
|
|
.line 66
|
|
:try_start_0
|
|
invoke-static {p2}, Lcom/in2wow/sdk/m/p;->a(Ljava/lang/String;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 70
|
|
:cond_0
|
|
invoke-static {p2, p3}, Lcom/in2wow/sdk/triggerresponse/a;->a(Ljava/lang/String;Lcom/in2wow/sdk/triggerresponse/b;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 72
|
|
invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "http://"
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
.line 73
|
|
invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "https://"
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v4, 0x1
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_2
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 76
|
|
new-instance p0, Landroid/content/Intent;
|
|
|
|
invoke-direct {p0}, Landroid/content/Intent;-><init>()V
|
|
|
|
.line 77
|
|
const-class v4, Lcom/intowow/sdk/WebViewActivity;
|
|
|
|
invoke-virtual {p0, p1, v4}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;
|
|
|
|
.line 78
|
|
invoke-virtual {p0, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
.line 79
|
|
new-instance v4, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v4}, Landroid/os/Bundle;-><init>()V
|
|
|
|
const-string v5, "mUrlPath"
|
|
|
|
.line 80
|
|
invoke-virtual {v4, v5, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 81
|
|
invoke-virtual {p0, v4}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
.line 82
|
|
invoke-virtual {p1, p0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 84
|
|
:cond_2
|
|
invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
.line 85
|
|
new-instance v3, Landroid/content/Intent;
|
|
|
|
const-string v4, "android.intent.action.VIEW"
|
|
|
|
invoke-direct {v3, v4, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
.line 86
|
|
invoke-virtual {v3, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
.line 87
|
|
invoke-virtual {p1, v3}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
|
|
:try_end_0
|
|
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
nop
|
|
|
|
.line 94
|
|
invoke-static {p2, p3}, Lcom/in2wow/sdk/triggerresponse/a;->a(Ljava/lang/String;Lcom/in2wow/sdk/triggerresponse/b;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 95
|
|
invoke-virtual {p0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "fb://"
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result p2
|
|
|
|
const-string p3, "/"
|
|
|
|
.line 96
|
|
invoke-virtual {p0, p3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 98
|
|
array-length p2, p0
|
|
|
|
const/4 p3, 0x4
|
|
|
|
if-lt p2, p3, :cond_3
|
|
|
|
const/4 p2, 0x3
|
|
|
|
.line 99
|
|
aget-object p0, p0, p2
|
|
|
|
const-string p2, "https://www.facebook.com/%s"
|
|
|
|
.line 100
|
|
new-array p3, v1, [Ljava/lang/Object;
|
|
|
|
aput-object p0, p3, v0
|
|
|
|
invoke-static {p2, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 102
|
|
:try_start_1
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
.line 103
|
|
new-instance p2, Landroid/content/Intent;
|
|
|
|
const-string p3, "android.intent.action.VIEW"
|
|
|
|
invoke-direct {p2, p3, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
.line 104
|
|
invoke-virtual {p2, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
.line 105
|
|
invoke-virtual {p1, p2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
|
|
:try_end_1
|
|
.catch Landroid/content/ActivityNotFoundException; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
:catch_1
|
|
:cond_3
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_4
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 49
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->b:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->b:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, ""
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected a(Landroid/os/Parcel;)V
|
|
.locals 3
|
|
|
|
.line 121
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "{}"
|
|
|
|
:goto_0
|
|
invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 122
|
|
new-array v0, v0, [Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-boolean v2, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->c:Z
|
|
|
|
aput-boolean v2, v0, v1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeBooleanArray([Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public abstract a(Lcom/in2wow/sdk/triggerresponse/e;)V
|
|
.end method
|
|
|
|
.method public a(ZLorg/json/JSONObject;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 28
|
|
:cond_0
|
|
iput-boolean p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->c:Z
|
|
|
|
.line 29
|
|
iput-object p2, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
.line 32
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string p2, "action"
|
|
|
|
invoke-virtual {p1, p2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 33
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string p2, "action"
|
|
|
|
invoke-virtual {p1, p2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->a:Ljava/lang/String;
|
|
|
|
.line 37
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string p2, "inapp"
|
|
|
|
invoke-virtual {p1, p2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 38
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string p2, "inapp"
|
|
|
|
invoke-virtual {p1, p2, v0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result p1
|
|
|
|
iput-boolean p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->d:Z
|
|
|
|
.line 42
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string p2, "repeatable"
|
|
|
|
invoke-virtual {p1, p2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 43
|
|
iget-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const-string v0, "repeatable"
|
|
|
|
invoke-virtual {p1, v0, p2}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result p1
|
|
|
|
iput-boolean p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->e:Z
|
|
|
|
:cond_3
|
|
return p2
|
|
.end method
|
|
|
|
.method public b()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 58
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->b:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected b(Landroid/os/Parcel;)V
|
|
.locals 2
|
|
|
|
.line 125
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 126
|
|
new-array v1, v1, [Z
|
|
|
|
.line 127
|
|
invoke-virtual {p1, v1}, Landroid/os/Parcel;->readBooleanArray([Z)V
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 130
|
|
:try_start_0
|
|
new-instance p1, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {p1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 131
|
|
aget-boolean p1, v1, p1
|
|
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->g:Lorg/json/JSONObject;
|
|
|
|
invoke-virtual {p0, p1, v0}, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->a(ZLorg/json/JSONObject;)Z
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public c()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 55
|
|
iget-object v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->a:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public d()Z
|
|
.locals 1
|
|
|
|
.line 115
|
|
iget-boolean v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->d:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public e()Z
|
|
.locals 1
|
|
|
|
.line 118
|
|
iget-boolean v0, p0, Lcom/in2wow/sdk/triggerresponse/TriggerResponse;->e:Z
|
|
|
|
return v0
|
|
.end method
|