FrescoModule$LollipopBitmapMemoryCacheParamsSupplier.smali
.class Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/facebook/common/internal/Supplier;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/facebook/react/modules/fresco/FrescoModule;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "LollipopBitmapMemoryCacheParamsSupplier"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/facebook/common/internal/Supplier<",
"Lcom/facebook/imagepipeline/cache/MemoryCacheParams;",
">;"
}
.end annotation
# instance fields
.field private activityManager:Landroid/app/ActivityManager;
# direct methods
.method public constructor <init>(Landroid/app/ActivityManager;)V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->activityManager:Landroid/app/ActivityManager;
return-void
.end method
.method private getMaxCacheSize()I
.registers 3
.line 1
iget-object v0, p0, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->activityManager:Landroid/app/ActivityManager;
.line 2
invoke-virtual {v0}, Landroid/app/ActivityManager;->getMemoryClass()I
move-result v0
const/high16 v1, 0x100000
mul-int v0, v0, v1
const v1, 0x7fffffff
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v0
const/high16 v1, 0x2000000
if-ge v0, v1, :cond_18
const/high16 v0, 0x400000
return v0
:cond_18
const/high16 v1, 0x4000000
if-ge v0, v1, :cond_1f
const/high16 v0, 0x600000
return v0
.line 3
:cond_1f
div-int/lit8 v0, v0, 0x4
return v0
.end method
# virtual methods
.method public get()Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
.registers 8
.line 2
invoke-direct {p0}, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->getMaxCacheSize()I
move-result v1
.line 3
new-instance v6, Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
const/16 v2, 0x100
const v3, 0x7fffffff
const/16 v4, 0x258
const v5, 0x1e8480
move-object v0, v6
invoke-direct/range {v0 .. v5}, Lcom/facebook/imagepipeline/cache/MemoryCacheParams;-><init>(IIIII)V
return-object v6
.end method
.method public bridge synthetic get()Ljava/lang/Object;
.registers 2
.line 1
invoke-virtual {p0}, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->get()Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
move-result-object v0
return-object v0
.end method