apkfuckery/com.discord/smali/com/discord/utilities/images/MGImagesBitmap.smali

235 lines
6.4 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lcom/discord/utilities/images/MGImagesBitmap;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "MGImagesBitmap.kt"
2019-02-04 20:08:30 +00:00
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/discord/utilities/images/MGImagesBitmap$CirclePostProcessor;
}
.end annotation
# static fields
2019-02-17 02:24:41 +00:00
.field private static final DECODE_ERROR:Ljava/lang/String; = "Unable to decode image."
.field private static final DECODE_ERROR_MISSING_BITMAP:Ljava/lang/String; = "Unable to decode image as bitmap."
2019-02-04 20:08:30 +00:00
.field public static final INSTANCE:Lcom/discord/utilities/images/MGImagesBitmap;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/discord/utilities/images/MGImagesBitmap;
invoke-direct {v0}, Lcom/discord/utilities/images/MGImagesBitmap;-><init>()V
sput-object v0, Lcom/discord/utilities/images/MGImagesBitmap;->INSTANCE:Lcom/discord/utilities/images/MGImagesBitmap;
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final getBitmap(Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"IIZ",
"Lkotlin/jvm/functions/Function1<",
"-",
"Landroid/graphics/Bitmap;",
"Lkotlin/Unit;",
">;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/Throwable;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
const-string v0, "imageUrl"
2019-05-22 23:20:16 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
const-string v0, "onSuccess"
2019-05-22 23:20:16 +00:00
invoke-static {p5, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
const-string v0, "onError"
2019-05-22 23:20:16 +00:00
invoke-static {p6, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-06-25 01:04:50 +00:00
invoke-static {}, Lcom/facebook/drawee/backends/pipeline/c;->fT()Lcom/facebook/imagepipeline/b/g;
2019-02-04 20:08:30 +00:00
move-result-object v0
const/4 v1, 0x0
invoke-static {p1, p2, p3, v1}, Lcom/discord/utilities/images/MGImages;->getImageRequest(Ljava/lang/String;IIZ)Lcom/facebook/imagepipeline/request/ImageRequestBuilder;
move-result-object p1
if-eqz p4, :cond_0
new-instance p4, Lcom/discord/utilities/images/MGImagesBitmap$CirclePostProcessor;
invoke-direct {p4, p2, p3}, Lcom/discord/utilities/images/MGImagesBitmap$CirclePostProcessor;-><init>(II)V
check-cast p4, Lcom/facebook/imagepipeline/request/c;
invoke-virtual {p1, p4}, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->a(Lcom/facebook/imagepipeline/request/c;)Lcom/facebook/imagepipeline/request/ImageRequestBuilder;
:cond_0
2019-06-25 01:04:50 +00:00
invoke-virtual {p1}, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->jD()Lcom/facebook/imagepipeline/request/b;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-17 02:24:41 +00:00
invoke-virtual {v0, p1}, Lcom/facebook/imagepipeline/b/g;->b(Lcom/facebook/imagepipeline/request/b;)Lcom/facebook/b/c;
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-17 02:24:41 +00:00
:try_start_0
invoke-static {p1}, Lcom/facebook/b/d;->f(Lcom/facebook/b/c;)Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/facebook/common/references/CloseableReference;
if-eqz p2, :cond_3
check-cast p2, Ljava/io/Closeable;
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_1
.catchall {:try_start_0 .. :try_end_0} :catchall_1
const/4 p3, 0x0
:try_start_1
move-object p4, p2
check-cast p4, Lcom/facebook/common/references/CloseableReference;
invoke-virtual {p4}, Lcom/facebook/common/references/CloseableReference;->get()Ljava/lang/Object;
move-result-object p4
instance-of v0, p4, Lcom/facebook/imagepipeline/f/b;
if-nez v0, :cond_1
move-object p4, p3
:cond_1
check-cast p4, Lcom/facebook/imagepipeline/f/b;
if-eqz p4, :cond_2
2019-06-25 01:04:50 +00:00
invoke-virtual {p4}, Lcom/facebook/imagepipeline/f/b;->im()Landroid/graphics/Bitmap;
2019-02-17 02:24:41 +00:00
move-result-object p4
const-string v0, "closeableBitmap.underlyingBitmap"
2019-05-22 23:20:16 +00:00
invoke-static {p4, v0}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-17 02:24:41 +00:00
invoke-interface {p5, p4}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_2
new-instance p4, Ljava/lang/Throwable;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
const-string p5, "Unable to decode image as bitmap."
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-direct {p4, p5}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
invoke-interface {p6, p4}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
:goto_0
2019-06-25 01:04:50 +00:00
sget-object p4, Lkotlin/Unit;->bfg:Lkotlin/Unit;
2019-02-17 02:24:41 +00:00
:try_end_1
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
2019-02-04 20:08:30 +00:00
2019-02-17 02:24:41 +00:00
:try_start_2
2019-05-04 02:59:52 +00:00
invoke-static {p2, p3}, Lkotlin/d/a;->a(Ljava/io/Closeable;Ljava/lang/Throwable;)V
2019-02-17 02:24:41 +00:00
:try_end_2
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_1
.catchall {:try_start_2 .. :try_end_2} :catchall_1
goto :goto_2
:catchall_0
move-exception p4
goto :goto_1
:catch_0
move-exception p3
:try_start_3
throw p3
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:goto_1
:try_start_4
2019-05-04 02:59:52 +00:00
invoke-static {p2, p3}, Lkotlin/d/a;->a(Ljava/io/Closeable;Ljava/lang/Throwable;)V
2019-02-17 02:24:41 +00:00
throw p4
:cond_3
new-instance p2, Ljava/lang/Throwable;
const-string p3, "Unable to decode image."
invoke-direct {p2, p3}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;)V
invoke-interface {p6, p2}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:try_end_4
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_1
.catchall {:try_start_4 .. :try_end_4} :catchall_1
:goto_2
2019-06-25 01:04:50 +00:00
invoke-interface {p1}, Lcom/facebook/b/c;->fI()Z
2019-02-17 02:24:41 +00:00
return-void
:catchall_1
move-exception p2
goto :goto_3
:catch_1
move-exception p2
:try_start_5
invoke-interface {p6, p2}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
2019-06-25 01:04:50 +00:00
invoke-interface {p1}, Lcom/facebook/b/c;->fI()Z
2019-02-04 20:08:30 +00:00
return-void
2019-02-17 02:24:41 +00:00
:goto_3
2019-06-25 01:04:50 +00:00
invoke-interface {p1}, Lcom/facebook/b/c;->fI()Z
2019-02-17 02:24:41 +00:00
throw p2
2019-02-04 20:08:30 +00:00
.end method