TestSeriesFragment$5.smali

.class Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;
.super Ljava/lang/Object;
.source "TestSeriesFragment.java"

# interfaces
.implements Lcom/android/volley/Response$Listener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->getMasterCategory()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<",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;


# direct methods
.method constructor <init>(Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;)V
    .registers 2
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x8010
        }
        names = {
            "this$0"
        }
    .end annotation

    .line 164
    iput-object p1, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    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 164
    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->onResponse(Ljava/lang/String;)V

    return-void
.end method

.method public onResponse(Ljava/lang/String;)V
    .registers 8
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x0
        }
        names = {
            "response"
        }
    .end annotation

    .line 167
    iget-object v0, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    # invokes: Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->getTestSeries()V
    invoke-static {v0}, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->access$000(Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;)V

    .line 169
    :try_start_5
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string p1, "status"

    .line 170
    invoke-virtual {v0, p1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v1, "true"

    .line 171
    invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_69

    const-string p1, "data"

    .line 172
    invoke-virtual {v0, p1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p1

    const/4 v0, 0x0

    .line 173
    :goto_1f
    invoke-virtual {p1}, Lorg/json/JSONArray;->length()I

    move-result v1

    if-ge v0, v1, :cond_44

    .line 174
    invoke-virtual {p1, v0}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v1

    .line 175
    iget-object v2, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    iget-object v2, v2, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->masterSubCategoryModelArrayList:Ljava/util/ArrayList;

    new-instance v3, Lcom/yctpublication/mastes/models/MasterSubCategoryModel;

    const-string v4, "subcategoryid"

    .line 176
    invoke-virtual {v1, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v5, "subcategory"

    .line 177
    invoke-virtual {v1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v3, v4, v1}, Lcom/yctpublication/mastes/models/MasterSubCategoryModel;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 175
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v0, 0x1

    goto :goto_1f

    .line 180
    :cond_44
    iget-object p1, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    new-instance v0, Lcom/yctpublication/mastes/masterevooktestquiz/adpater/TestSeriesSubCategoryAdapter;

    iget-object v1, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    invoke-virtual {v1}, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->getContext()Landroid/content/Context;

    move-result-object v1

    iget-object v2, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    iget-object v2, v2, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->masterSubCategoryModelArrayList:Ljava/util/ArrayList;

    iget-object v3, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    invoke-direct {v0, v1, v2, v3}, Lcom/yctpublication/mastes/masterevooktestquiz/adpater/TestSeriesSubCategoryAdapter;-><init>(Landroid/content/Context;Ljava/util/List;Landroidx/fragment/app/Fragment;)V

    iput-object v0, p1, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->categoryTypeListAdapter:Lcom/yctpublication/mastes/masterevooktestquiz/adpater/TestSeriesSubCategoryAdapter;

    .line 181
    iget-object p1, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    iget-object p1, p1, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->test_series_category_list:Landroidx/recyclerview/widget/RecyclerView;

    iget-object v0, p0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment$5;->this$0:Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;

    iget-object v0, v0, Lcom/yctpublication/mastes/masterevooktestquiz/fragment/TestSeriesFragment;->categoryTypeListAdapter:Lcom/yctpublication/mastes/masterevooktestquiz/adpater/TestSeriesSubCategoryAdapter;

    invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
    :try_end_64
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_64} :catch_65

    goto :goto_69

    :catch_65
    move-exception p1

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

    :cond_69
    :goto_69
    return-void
.end method