179 lines
4.1 KiB
Smali
179 lines
4.1 KiB
Smali
.class public final Lcom/vk/api/apps/AppsGetRecents;
|
|
.super Lcom/vk/api/base/ListAPIRequest;
|
|
.source "AppsGetRecents.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/vk/api/base/ListAPIRequest<",
|
|
"Lcom/vk/dto/common/data/ApiApplication;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
sget-object v0, Lcom/vk/dto/common/data/ApiApplication;->b0:Lcom/vk/dto/common/data/JsonParser;
|
|
|
|
const-string v1, "apps.getRecents"
|
|
|
|
invoke-direct {p0, v1, v0}, Lcom/vk/api/base/ListAPIRequest;-><init>(Ljava/lang/String;Lcom/vk/dto/common/data/JsonParser;)V
|
|
|
|
const-string v0, "platform"
|
|
|
|
const-string v1, "vk_apps"
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, v1}, Lcom/vk/api/sdk/o/VKRequest;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/sdk/o/VKRequest;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lorg/json/JSONObject;)Lcom/vk/dto/common/data/VKList;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lorg/json/JSONObject;",
|
|
")",
|
|
"Lcom/vk/dto/common/data/VKList<",
|
|
"Lcom/vk/dto/common/data/ApiApplication;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "response"
|
|
|
|
.line 2
|
|
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const-string v0, "items"
|
|
|
|
.line 3
|
|
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 4
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 5
|
|
invoke-virtual {p1}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v2
|
|
|
|
:goto_0
|
|
if-ge v1, v2, :cond_0
|
|
|
|
.line 6
|
|
invoke-virtual {p1, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "this.getJSONObject(i)"
|
|
|
|
invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v4, "app"
|
|
|
|
.line 7
|
|
invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v0, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 8
|
|
:cond_0
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
const/16 v1, 0xa
|
|
|
|
invoke-static {v0, v1}, Lkotlin/collections/l;->a(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {p1, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
.line 9
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
.line 10
|
|
check-cast v1, Lorg/json/JSONObject;
|
|
|
|
new-instance v2, Lcom/vk/dto/common/data/ApiApplication;
|
|
|
|
.line 11
|
|
invoke-direct {v2, v1}, Lcom/vk/dto/common/data/ApiApplication;-><init>(Lorg/json/JSONObject;)V
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
.line 12
|
|
:cond_1
|
|
new-instance v0, Lcom/vk/dto/common/data/VKList;
|
|
|
|
invoke-direct {v0, p1}, Lcom/vk/dto/common/data/VKList;-><init>(Ljava/util/Collection;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 13
|
|
:cond_2
|
|
new-instance v0, Lcom/vk/dto/common/data/VKList;
|
|
|
|
invoke-direct {v0}, Lcom/vk/dto/common/data/VKList;-><init>()V
|
|
|
|
:goto_2
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public bridge synthetic a(Lorg/json/JSONObject;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lcom/vk/api/apps/AppsGetRecents;->a(Lorg/json/JSONObject;)Lcom/vk/dto/common/data/VKList;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|