.class public final Ls4/k;
.super Ld9/h;
.source ""

# interfaces
.implements Lh9/c;


# annotations
.annotation runtime Ld9/e;
    c = "com.floydwiz.gamingcenter.viewmodels.MainActivityVM$geAddAppData$2"
    f = "MainActivityVM.kt"
    l = {}
    m = "invokeSuspend"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ld9/h;",
        "Lh9/c<",
        "Lq9/w;",
        "Lb9/d<",
        "-",
        "Ljava/util/ArrayList<",
        "Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;",
        ">;>;",
        "Ljava/lang/Object;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic v:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lb9/d;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Lb9/d<",
            "-",
            "Ls4/k;",
            ">;)V"
        }
    .end annotation

    iput-object p1, p0, Ls4/k;->v:Landroid/content/Context;

    const/4 p1, 0x2

    invoke-direct {p0, p1, p2}, Ld9/h;-><init>(ILb9/d;)V

    return-void
.end method


# virtual methods
.method public final b(Ljava/lang/Object;Lb9/d;)Lb9/d;
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            "Lb9/d<",
            "*>;)",
            "Lb9/d<",
            "Ly8/k;",
            ">;"
        }
    .end annotation

    new-instance p1, Ls4/k;

    iget-object v0, p0, Ls4/k;->v:Landroid/content/Context;

    invoke-direct {p1, v0, p2}, Ls4/k;-><init>(Landroid/content/Context;Lb9/d;)V

    return-object p1
.end method

.method public e(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .registers 4

    check-cast p1, Lq9/w;

    check-cast p2, Lb9/d;

    .line 1
    new-instance p1, Ls4/k;

    iget-object v0, p0, Ls4/k;->v:Landroid/content/Context;

    invoke-direct {p1, v0, p2}, Ls4/k;-><init>(Landroid/content/Context;Lb9/d;)V

    .line 2
    sget-object p2, Ly8/k;->a:Ly8/k;

    invoke-virtual {p1, p2}, Ls4/k;->o(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    return-object p1
.end method

.method public final o(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 11

    invoke-static {p1}, Le/h;->h(Ljava/lang/Object;)V

    iget-object p1, p0, Ls4/k;->v:Landroid/content/Context;

    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object p1

    const/16 v0, 0x80

    invoke-virtual {p1, v0}, Landroid/content/pm/PackageManager;->getInstalledApplications(I)Ljava/util/List;

    move-result-object p1

    const-string v0, "context.packageManager.g\u2026ageManager.GET_META_DATA)"

    invoke-static {p1, v0}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_1d
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_5f

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/ApplicationInfo;

    iget v2, v1, Landroid/content/pm/ApplicationInfo;->flags:I

    and-int/lit16 v3, v2, 0x80

    if-gtz v3, :cond_36

    and-int/lit8 v2, v2, 0x1

    if-lez v2, :cond_34

    goto :goto_36

    :cond_34
    const/4 v2, 0x0

    goto :goto_37

    :cond_36
    :goto_36
    const/4 v2, 0x1

    :goto_37
    if-eqz v2, :cond_3a

    goto :goto_1d

    :cond_3a
    new-instance v2, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;

    iget-object v3, p0, Ls4/k;->v:Landroid/content/Context;

    iget-object v4, v1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    const-string v5, "pkg.packageName"

    invoke-static {v4, v5}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-static {v3, v4}, Lq4/a;->b(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iget-object v1, v1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    const/4 v6, 0x0

    const/4 v7, 0x0

    iget-object v3, p0, Ls4/k;->v:Landroid/content/Context;

    invoke-static {v1, v5}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-static {v3, v1}, Lq4/a;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v8

    move-object v3, v2

    move-object v5, v1

    invoke-direct/range {v3 .. v8}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1d

    :cond_5f
    return-object v0
.end method
