PausedTestFragment$1.smali
.class Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;
.super Ljava/lang/Object;
.source "PausedTestFragment.java"
# interfaces
.implements Lcom/android/volley/Response$Listener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/yctpublication/mastes/mytests/PausedTestFragment;->getFinishedAssessments()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/android/volley/Response$Listener<",
"Lorg/json/JSONObject;",
">;"
}
.end annotation
# instance fields
.field final synthetic this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
# direct methods
.method constructor <init>(Lcom/yctpublication/mastes/mytests/PausedTestFragment;)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x8010
}
names = {
"this$0"
}
.end annotation
.line 109
iput-object p1, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public bridge synthetic onResponse(Ljava/lang/Object;)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x1000
}
names = {
"response"
}
.end annotation
.line 109
check-cast p1, Lorg/json/JSONObject;
invoke-virtual {p0, p1}, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->onResponse(Lorg/json/JSONObject;)V
return-void
.end method
.method public onResponse(Lorg/json/JSONObject;)V
.registers 7
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"response"
}
.end annotation
const-string v0, "data"
const/4 v1, 0x0
:try_start_3
const-string v2, "status"
.line 113
invoke-virtual {p1, v2}, Lorg/json/JSONObject;->getBoolean(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_47
const-string v2, "response"
.line 114
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 115
new-instance v2, Lorg/json/JSONArray;
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-direct {v2, p1}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
move p1, v1
.line 116
:goto_1e
invoke-virtual {v2}, Lorg/json/JSONArray;->length()I
move-result v0
if-ge p1, v0, :cond_3f
.line 117
new-instance v0, Lcom/google/gson/Gson;
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
.line 118
invoke-virtual {v2, p1}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;
move-result-object v3
const-class v4, Lcom/yctpublication/mastes/models/PausedTestModel;
invoke-virtual {v0, v3, v4}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/yctpublication/mastes/models/PausedTestModel;
.line 119
iget-object v3, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
iget-object v3, v3, Lcom/yctpublication/mastes/mytests/PausedTestFragment;->testList:Ljava/util/ArrayList;
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
add-int/lit8 p1, p1, 0x1
goto :goto_1e
.line 123
:cond_3f
iget-object p1, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
iget-object p1, p1, Lcom/yctpublication/mastes/mytests/PausedTestFragment;->adapter:Landroidx/recyclerview/widget/RecyclerView$Adapter;
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyDataSetChanged()V
goto :goto_70
.line 126
:cond_47
iget-object v0, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
invoke-virtual {v0}, Lcom/yctpublication/mastes/mytests/PausedTestFragment;->getContext()Landroid/content/Context;
move-result-object v0
const-string v2, "message"
invoke-virtual {p1, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object p1
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
:try_end_5a
.catch Lorg/json/JSONException; {:try_start_3 .. :try_end_5a} :catch_5b
goto :goto_70
:catch_5b
move-exception p1
.line 129
invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V
.line 130
iget-object v0, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
invoke-virtual {v0}, Lcom/yctpublication/mastes/mytests/PausedTestFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {p1}, Lorg/json/JSONException;->getLocalizedMessage()Ljava/lang/String;
move-result-object p1
invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object p1
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
.line 132
:goto_70
iget-object p1, p0, Lcom/yctpublication/mastes/mytests/PausedTestFragment$1;->this$0:Lcom/yctpublication/mastes/mytests/PausedTestFragment;
iget-object p1, p1, Lcom/yctpublication/mastes/mytests/PausedTestFragment;->progressBar:Landroid/widget/ProgressBar;
const/16 v0, 0x8
invoke-virtual {p1, v0}, Landroid/widget/ProgressBar;->setVisibility(I)V
return-void
.end method