HurriyetSDK$32.smali
.class final Ltr/com/hurriyet/androidsdk/HurriyetSDK$32;
.super Ljava/lang/Object;
.source "HurriyetSDK.java"
# interfaces
.implements Lretrofit2/Callback;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Ltr/com/hurriyet/androidsdk/HurriyetSDK;->getCurrency(Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;)Lretrofit2/Call;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lretrofit2/Callback<",
"Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;",
">;"
}
.end annotation
# instance fields
.field final synthetic val$callback:Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;
# direct methods
.method constructor <init>(Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;)V
.registers 2
.line 1096
iput-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$32;->val$callback:Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onFailure(Lretrofit2/Call;Ljava/lang/Throwable;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Call<",
"Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;",
">;",
"Ljava/lang/Throwable;",
")V"
}
.end annotation
.line 1110
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$32;->val$callback:Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;
new-instance p2, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;
invoke-direct {p2}, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;-><init>()V
invoke-interface {p1, p2}, Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;->onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
return-void
.end method
.method public onResponse(Lretrofit2/Call;Lretrofit2/Response;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Call<",
"Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;",
">;",
"Lretrofit2/Response<",
"Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;",
">;)V"
}
.end annotation
if-eqz p2, :cond_2e
.line 1100
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_2e
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;
iget-object p1, p1, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;->data:Ljava/util/List;
if-eqz p1, :cond_2e
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;
iget-object p1, p1, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;->data:Ljava/util/List;
invoke-interface {p1}, Ljava/util/List;->size()I
move-result p1
if-lez p1, :cond_2e
.line 1101
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$32;->val$callback:Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p2
check-cast p2, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;
iget-object p2, p2, Ltr/com/hurriyet/androidsdk/response/currency/CurrencyResponse;->data:Ljava/util/List;
invoke-interface {p1, p2}, Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;->onSuccess(Ljava/util/List;)V
goto :goto_38
.line 1103
:cond_2e
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$32;->val$callback:Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;
new-instance p2, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;
invoke-direct {p2}, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;-><init>()V
invoke-interface {p1, p2}, Ltr/com/hurriyet/androidsdk/callback/CurrencyCallback;->onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
:goto_38
return-void
.end method