b.smali

.class public final Le2/b;
.super Ljava/lang/Object;
.source "AsyncImageUtils.kt"


# annotations
.annotation runtime Lkotlin/Metadata;
    bv = {
        0x1,
        0x0,
        0x3
    }
    d1 = {
        "\u0000p\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0004\u001a\u0014\u0010\u0002\u001a\u0004\u0018\u00010\u00032\u0008\u0010\u0004\u001a\u0004\u0018\u00010\u0005H\u0000\u001a1\u0010\u0006\u001a\u00020\u00072\u0008\u0010\u0008\u001a\u0004\u0018\u00010\t2\u0008\u0010\n\u001a\u0004\u0018\u00010\u000b2\u0012\u0010\u000c\u001a\u000e\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u00070\rH\u0080\u0008\u001a\u0017\u0010\u000f\u001a\u00020\u00072\u000c\u0010\u000c\u001a\u0008\u0012\u0004\u0012\u00020\u00070\u0010H\u0080\u0008\u001a\u0014\u0010\u0011\u001a\u00020\u0012*\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0014H\u0000\u001a!\u0010\u0015\u001a\n\u0012\u0004\u0012\u0002H\u0017\u0018\u00010\u0016\"\u0006\u0008\u0000\u0010\u0017\u0018\u0001*\u0006\u0012\u0002\u0008\u00030\u0016H\u0086\u0008\u001a\u000c\u0010\u0018\u001a\u00020\u0012*\u00020\u0012H\u0000\u001a\u000c\u0010\u0019\u001a\u00020\u0012*\u00020\u0012H\u0000\u001a\u000c\u0010\u001a\u001a\u00020\u0012*\u00020\u0012H\u0000\u001a\u000c\u0010\u001b\u001a\u00020\u0012*\u00020\u0012H\u0000\u001a\u0016\u0010\u001c\u001a\u0004\u0018\u00010\u001d*\u00020\t2\u0006\u0010\u001e\u001a\u00020\u001fH\u0000\u001a\u0012\u0010 \u001a\u0004\u0018\u00010!*\u0006\u0012\u0002\u0008\u00030\"H\u0000\u001a\u000e\u0010#\u001a\u0004\u0018\u00010$*\u00020\u0012H\u0000\u001a\u0012\u0010%\u001a\u0008\u0012\u0002\u0008\u0003\u0018\u00010\"*\u00020\u0012H\u0000\u001a\u000e\u0010&\u001a\u0004\u0018\u00010\u0014*\u00020\u0012H\u0000\u001a\u000c\u0010\'\u001a\u00020(*\u00020\u0012H\u0000\u001a\u0014\u0010)\u001a\n\u0012\u0004\u0012\u00020\u0014\u0018\u00010\u0016*\u00020\u0012H\u0000\u001a\u001a\u0010*\u001a\u00020\u0012*\u00020\u00122\u000c\u0010+\u001a\u0008\u0012\u0002\u0008\u0003\u0018\u00010\"H\u0000\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0082T\u00a2\u0006\u0002\n\u0000\u00a8\u0006,"
    }
    d2 = {
        "TAG",
        "",
        "calResizeOpts",
        "Lcom/facebook/imagepipeline/common/ResizeOptions;",
        "opts",
        "Lcom/foody/android/image/service/EnumImageResizeOpts;",
        "getTypedArray",
        "",
        "context",
        "Landroid/content/Context;",
        "attrs",
        "Landroid/util/AttributeSet;",
        "block",
        "Lkotlin/Function1;",
        "Landroid/content/res/TypedArray;",
        "runOnFrescoInitialized",
        "Lkotlin/Function0;",
        "addUri",
        "Lcom/foody/android/image/service/AsyncImageView;",
        "uri",
        "Landroid/net/Uri;",
        "asLinkedListOfType",
        "Ljava/util/LinkedList;",
        "T",
        "clearAllTagContents",
        "clearBuilder",
        "clearHolder",
        "clearUris",
        "getDrawableSafely",
        "Landroid/graphics/drawable/Drawable;",
        "id",
        "",
        "getGenericDraweeHierarchy",
        "Lcom/facebook/drawee/generic/GenericDraweeHierarchy;",
        "Lcom/facebook/drawee/view/DraweeHolder;",
        "getHierarchy",
        "Lcom/facebook/drawee/interfaces/DraweeHierarchy;",
        "getHolder",
        "getLastUri",
        "getOrCreateBuilder",
        "Lcom/facebook/drawee/backends/pipeline/PipelineDraweeControllerBuilder;",
        "getUris",
        "setHolder",
        "holder",
        "impl_release"
    }
    k = 0x2
    mv = {
        0x1,
        0x1,
        0x10
    }
.end annotation


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public static final a(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
    .registers 5

    const/4 v0, 0x0

    const/4 v1, -0x1

    if-ne p1, v1, :cond_5

    return-object v0

    :cond_5
    :try_start_5
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    if-le v1, v2, :cond_10

    invoke-virtual {p0, p1}, Landroid/content/Context;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object p0

    goto :goto_18

    :cond_10
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p0

    invoke-virtual {p0, p1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object p0
    :try_end_18
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_5 .. :try_end_18} :catch_1a

    :goto_18
    move-object v0, p0

    goto :goto_27

    :catch_1a
    move-exception p0

    sget-object v1, Lqa/d;->e:Lqa/d$a;

    new-instance v2, Le2/b$a;

    invoke-direct {v2, p1, p0}, Le2/b$a;-><init>(ILandroid/content/res/Resources$NotFoundException;)V

    const-string p0, "AsyncImageUtils"

    invoke-virtual {v1, p0, v2}, Lqa/d$a;->b(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V

    :goto_27
    return-object v0
.end method

.method public static final a(Lcom/facebook/drawee/view/DraweeHolder;)Lcom/facebook/drawee/generic/GenericDraweeHierarchy;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/facebook/drawee/view/DraweeHolder<",
            "*>;)",
            "Lcom/facebook/drawee/generic/GenericDraweeHierarchy;"
        }
    .end annotation

    invoke-virtual {p0}, Lcom/facebook/drawee/view/DraweeHolder;->getHierarchy()Lcom/facebook/drawee/interfaces/DraweeHierarchy;

    move-result-object p0

    instance-of v0, p0, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;

    if-nez v0, :cond_9

    const/4 p0, 0x0

    :cond_9
    check-cast p0, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;

    return-object p0
.end method

.method public static final a(Lcom/foody/android/image/service/EnumImageResizeOpts;)Lcom/facebook/imagepipeline/common/ResizeOptions;
    .registers 2

    if-nez p0, :cond_3

    goto :goto_17

    :cond_3
    sget-object v0, Le2/a;->$EnumSwitchMapping$0:[I

    invoke-virtual {p0}, Ljava/lang/Enum;->ordinal()I

    move-result p0

    aget p0, v0, p0

    const/4 v0, 0x1

    if-eq p0, v0, :cond_2e

    const/4 v0, 0x2

    if-eq p0, v0, :cond_27

    const/4 v0, 0x3

    if-eq p0, v0, :cond_20

    const/4 v0, 0x4

    if-eq p0, v0, :cond_19

    :goto_17
    const/4 p0, 0x0

    goto :goto_34

    :cond_19
    sget-object p0, Le2/i;->e:Le2/i;

    invoke-virtual {p0}, Le2/i;->a()Lcom/facebook/imagepipeline/common/ResizeOptions;

    move-result-object p0

    goto :goto_34

    :cond_20
    sget-object p0, Le2/i;->e:Le2/i;

    invoke-virtual {p0}, Le2/i;->b()Lcom/facebook/imagepipeline/common/ResizeOptions;

    move-result-object p0

    goto :goto_34

    :cond_27
    sget-object p0, Le2/i;->e:Le2/i;

    invoke-virtual {p0}, Le2/i;->d()Lcom/facebook/imagepipeline/common/ResizeOptions;

    move-result-object p0

    goto :goto_34

    :cond_2e
    sget-object p0, Le2/i;->e:Le2/i;

    invoke-virtual {p0}, Le2/i;->c()Lcom/facebook/imagepipeline/common/ResizeOptions;

    move-result-object p0

    :goto_34
    return-object p0
.end method

.method public static final a(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 1

    invoke-static {p0}, Le2/b;->c(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;

    invoke-static {p0}, Le2/b;->d(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;

    invoke-static {p0}, Le2/b;->b(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;

    return-object p0
.end method

.method public static final a(Lcom/foody/android/image/service/AsyncImageView;Landroid/net/Uri;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 3

    invoke-static {p0}, Le2/b;->h(Lcom/foody/android/image/service/AsyncImageView;)Ljava/util/LinkedList;

    move-result-object v0

    if-eqz v0, :cond_7

    goto :goto_c

    :cond_7
    new-instance v0, Ljava/util/LinkedList;

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

    :goto_c
    invoke-virtual {v0, p1}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    sget p1, Ld2/a;->AsyncImageView_Uris:I

    invoke-virtual {p0, p1, v0}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    return-object p0
.end method

.method public static final a(Lcom/foody/android/image/service/AsyncImageView;Lcom/facebook/drawee/view/DraweeHolder;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/foody/android/image/service/AsyncImageView;",
            "Lcom/facebook/drawee/view/DraweeHolder<",
            "*>;)",
            "Lcom/foody/android/image/service/AsyncImageView;"
        }
    .end annotation

    sget v0, Ld2/a;->AsyncImageView_DraweeHolder:I

    invoke-virtual {p0, v0, p1}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    return-object p0
.end method

.method public static final b(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 3

    sget v0, Ld2/a;->AsyncImageView_PipelineDraweeControllerBuilder:I

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    return-object p0
.end method

.method public static final c(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 3

    sget v0, Ld2/a;->AsyncImageView_DraweeHolder:I

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    return-object p0
.end method

.method public static final d(Lcom/foody/android/image/service/AsyncImageView;)Lcom/foody/android/image/service/AsyncImageView;
    .registers 3

    sget v0, Ld2/a;->AsyncImageView_Uris:I

    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    return-object p0
.end method

.method public static final e(Lcom/foody/android/image/service/AsyncImageView;)Lcom/facebook/drawee/view/DraweeHolder;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/foody/android/image/service/AsyncImageView;",
            ")",
            "Lcom/facebook/drawee/view/DraweeHolder<",
            "*>;"
        }
    .end annotation

    sget v0, Ld2/a;->AsyncImageView_DraweeHolder:I

    invoke-virtual {p0, v0}, Landroid/widget/ImageView;->getTag(I)Ljava/lang/Object;

    move-result-object p0

    instance-of v0, p0, Lcom/facebook/drawee/view/DraweeHolder;

    if-nez v0, :cond_b

    const/4 p0, 0x0

    :cond_b
    check-cast p0, Lcom/facebook/drawee/view/DraweeHolder;

    return-object p0
.end method

.method public static final f(Lcom/foody/android/image/service/AsyncImageView;)Landroid/net/Uri;
    .registers 1

    invoke-static {p0}, Le2/b;->h(Lcom/foody/android/image/service/AsyncImageView;)Ljava/util/LinkedList;

    move-result-object p0

    if-eqz p0, :cond_d

    invoke-static {p0}, Lkotlin/collections/CollectionsKt___CollectionsKt;->lastOrNull(Ljava/util/List;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/net/Uri;

    goto :goto_e

    :cond_d
    const/4 p0, 0x0

    :goto_e
    return-object p0
.end method

.method public static final g(Lcom/foody/android/image/service/AsyncImageView;)Lcom/facebook/drawee/backends/pipeline/PipelineDraweeControllerBuilder;
    .registers 3

    sget v0, Ld2/a;->AsyncImageView_PipelineDraweeControllerBuilder:I

    invoke-virtual {p0, v0}, Landroid/widget/ImageView;->getTag(I)Ljava/lang/Object;

    move-result-object v0

    instance-of v1, v0, Lcom/facebook/drawee/backends/pipeline/PipelineDraweeControllerBuilder;

    if-nez v1, :cond_b

    const/4 v0, 0x0

    :cond_b
    check-cast v0, Lcom/facebook/drawee/backends/pipeline/PipelineDraweeControllerBuilder;

    if-eqz v0, :cond_10

    return-object v0

    :cond_10
    invoke-static {}, Lcom/facebook/drawee/backends/pipeline/Fresco;->newDraweeControllerBuilder()Lcom/facebook/drawee/backends/pipeline/PipelineDraweeControllerBuilder;

    move-result-object v0

    sget v1, Ld2/a;->AsyncImageView_PipelineDraweeControllerBuilder:I

    invoke-virtual {p0, v1, v0}, Landroid/widget/ImageView;->setTag(ILjava/lang/Object;)V

    const-string p0, "Fresco.newDraweeControll\u2026erBuilder, builder)\n    }"

    invoke-static {v0, p0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    return-object v0
.end method

.method public static final h(Lcom/foody/android/image/service/AsyncImageView;)Ljava/util/LinkedList;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/foody/android/image/service/AsyncImageView;",
            ")",
            "Ljava/util/LinkedList<",
            "Landroid/net/Uri;",
            ">;"
        }
    .end annotation

    sget v0, Ld2/a;->AsyncImageView_Uris:I

    invoke-virtual {p0, v0}, Landroid/widget/ImageView;->getTag(I)Ljava/lang/Object;

    move-result-object p0

    instance-of v0, p0, Ljava/util/LinkedList;

    const/4 v1, 0x0

    if-nez v0, :cond_c

    move-object p0, v1

    :cond_c
    check-cast p0, Ljava/util/LinkedList;

    if-eqz p0, :cond_3d

    instance-of v0, p0, Ljava/util/Collection;

    const/4 v2, 0x1

    if-eqz v0, :cond_1c

    invoke-interface {p0}, Ljava/util/Collection;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_1c

    goto :goto_2f

    :cond_1c
    invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result v3

    if-eqz v3, :cond_2f

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

    move-result-object v3

    instance-of v3, v3, Landroid/net/Uri;

    if-nez v3, :cond_20

    const/4 v2, 0x0

    :cond_2f
    :goto_2f
    if-eqz v2, :cond_3d

    if-eqz p0, :cond_35

    move-object v1, p0

    goto :goto_3d

    :cond_35
    new-instance p0, Lkotlin/TypeCastException;

    const-string v0, "null cannot be cast to non-null type java.util.LinkedList<T>"

    invoke-direct {p0, v0}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V

    throw p0

    :cond_3d
    :goto_3d
    return-object v1
.end method