HurriyetSDK$6.smali
.class final Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;
.super Ljava/lang/Object;
.source "HurriyetSDK.java"
# interfaces
.implements Lretrofit2/Callback;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Ltr/com/hurriyet/androidsdk/HurriyetSDK;->getVideoDetail(Ltr/com/hurriyet/androidsdk/model/content/App;Ljava/lang/String;ZLtr/com/hurriyet/androidsdk/callback/VideoDetailCallback;)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/content/videodetail/VideoDetailResponse;",
">;"
}
.end annotation
# instance fields
.field final synthetic val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
# direct methods
.method constructor <init>(Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;)V
.registers 2
.line 269
iput-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;->val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
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/content/videodetail/VideoDetailResponse;",
">;",
"Ljava/lang/Throwable;",
")V"
}
.end annotation
.line 286
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;->val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
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/VideoDetailCallback;->onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
return-void
.end method
.method public onResponse(Lretrofit2/Call;Lretrofit2/Response;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Call<",
"Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;",
">;",
"Lretrofit2/Response<",
"Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;",
">;)V"
}
.end annotation
if-eqz p2, :cond_44
.line 272
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_44
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;
iget-object p1, p1, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;->data:Ljava/util/ArrayList;
if-nez p1, :cond_13
goto :goto_44
.line 276
:cond_13
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;
iget-object p1, p1, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;->data:Ljava/util/ArrayList;
invoke-static {p1}, Ltr/com/hurriyet/androidsdk/utils/ResponseMapper;->mapFeed(Ljava/util/ArrayList;)Ljava/util/ArrayList;
move-result-object p1
if-eqz p1, :cond_39
.line 277
invoke-virtual {p1}, Ljava/util/ArrayList;->isEmpty()Z
move-result v0
if-eqz v0, :cond_28
goto :goto_39
.line 281
:cond_28
iget-object v0, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;->val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
const/4 v1, 0x0
invoke-virtual {p2}, Lretrofit2/Response;->body()Ljava/lang/Object;
move-result-object p2
check-cast p2, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;
iget-object p2, p2, Ltr/com/hurriyet/androidsdk/response/content/videodetail/VideoDetailResponse;->dataLayer:Ltr/com/hurriyet/androidsdk/response/content/DataLayer;
const-string v2, ""
invoke-interface {v0, v2, v1, p1, p2}, Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;->onSuccessFeed(Ljava/lang/String;Ltr/com/hurriyet/androidsdk/model/content/Content;Ljava/util/ArrayList;Ltr/com/hurriyet/androidsdk/response/content/DataLayer;)V
return-void
.line 278
:cond_39
:goto_39
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;->val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
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/VideoDetailCallback;->onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
return-void
.line 273
:cond_44
:goto_44
iget-object p1, p0, Ltr/com/hurriyet/androidsdk/HurriyetSDK$6;->val$callback:Ltr/com/hurriyet/androidsdk/callback/VideoDetailCallback;
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/VideoDetailCallback;->onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
return-void
.end method