2019-04-11 23:08:29 +00:00
|
|
|
.class public Lcom/discord/utilities/view/chips/ChipsImageUtil;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ChipsImageUtil.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final SMALL_IMAGE_MAX_SIZE:I = 0xc8
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static getImageRequest(Ljava/lang/String;II)Lcom/facebook/imagepipeline/request/ImageRequestBuilder;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->r(Landroid/net/Uri;)Lcom/facebook/imagepipeline/request/ImageRequestBuilder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
sget-object v1, Lcom/facebook/imagepipeline/request/b$b;->UK:Lcom/facebook/imagepipeline/request/b$b;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
iput-object v1, v0, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->So:Lcom/facebook/imagepipeline/request/b$b;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
const-string v1, "gif"
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
const/16 p0, 0xc8
|
|
|
|
|
|
|
|
if-gt p1, p0, :cond_0
|
|
|
|
|
|
|
|
if-gt p2, p0, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
sget-object p0, Lcom/facebook/imagepipeline/request/b$a;->UH:Lcom/facebook/imagepipeline/request/b$a;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2019-05-24 03:06:45 +00:00
|
|
|
sget-object p0, Lcom/facebook/imagepipeline/request/b$a;->UI:Lcom/facebook/imagepipeline/request/b$a;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
:goto_1
|
2019-05-24 03:06:45 +00:00
|
|
|
iput-object p0, v0, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->Uy:Lcom/facebook/imagepipeline/request/b$a;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
if-lez p1, :cond_2
|
|
|
|
|
|
|
|
if-lez p2, :cond_2
|
|
|
|
|
|
|
|
new-instance p0, Lcom/facebook/imagepipeline/a/e;
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/facebook/imagepipeline/a/e;-><init>(II)V
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
iput-object p0, v0, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->MW:Lcom/facebook/imagepipeline/a/e;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setImage(Landroid/widget/ImageView;Ljava/lang/String;I)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-static {p0, p1, p2, p2}, Lcom/discord/utilities/view/chips/ChipsImageUtil;->setImage(Landroid/widget/ImageView;Ljava/lang/String;II)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setImage(Landroid/widget/ImageView;Ljava/lang/String;II)V
|
|
|
|
.locals 3
|
|
|
|
.param p1 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
check-cast p0, Lcom/facebook/drawee/view/DraweeView;
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/facebook/drawee/view/DraweeView;->setController(Lcom/facebook/drawee/d/a;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
invoke-static {}, Lcom/facebook/drawee/backends/pipeline/c;->fN()Lcom/facebook/drawee/backends/pipeline/e;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/view/DraweeView;->getController()Lcom/facebook/drawee/d/a;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Lcom/facebook/drawee/backends/pipeline/e;->a(Lcom/facebook/drawee/d/a;)Lcom/facebook/drawee/controller/a;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/facebook/drawee/backends/pipeline/e;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Lcom/facebook/drawee/backends/pipeline/e;->m(Landroid/net/Uri;)Lcom/facebook/drawee/backends/pipeline/e;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
iput-boolean v1, v0, Lcom/facebook/drawee/controller/a;->GP:Z
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
check-cast v0, Lcom/facebook/drawee/backends/pipeline/e;
|
|
|
|
|
|
|
|
invoke-static {p1, p2, p3}, Lcom/discord/utilities/view/chips/ChipsImageUtil;->getImageRequest(Ljava/lang/String;II)Lcom/facebook/imagepipeline/request/ImageRequestBuilder;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
invoke-virtual {p1}, Lcom/facebook/imagepipeline/request/ImageRequestBuilder;->jy()Lcom/facebook/imagepipeline/request/b;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lcom/facebook/drawee/backends/pipeline/e;->F(Ljava/lang/Object;)Lcom/facebook/drawee/controller/a;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/facebook/drawee/backends/pipeline/e;
|
|
|
|
|
2019-05-24 03:06:45 +00:00
|
|
|
invoke-virtual {p1}, Lcom/facebook/drawee/backends/pipeline/e;->gl()Lcom/facebook/drawee/controller/AbstractDraweeController;
|
2019-04-11 23:08:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/facebook/drawee/view/DraweeView;->setController(Lcom/facebook/drawee/d/a;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|