FrescoModule$LollipopBitmapMemoryCacheParamsSupplier.smali
.class public Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;
.super Ljava/lang/Object;
.source "FrescoModule.java"
# 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 public activityManager:Landroid/app/ActivityManager;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Landroid/app/ActivityManager;)V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
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
iget-object v0, p0, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->activityManager:Landroid/app/ActivityManager;
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
:cond_1f
div-int/lit8 v0, v0, 0x4
return v0
.end method
# virtual methods
.method public get()Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
.registers 8
invoke-direct {p0}, Lcom/facebook/react/modules/fresco/FrescoModule$LollipopBitmapMemoryCacheParamsSupplier;->getMaxCacheSize()I
move-result v1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x15
if-lt v0, v2, :cond_1b
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
:cond_1b
new-instance v6, Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
const/16 v2, 0x100
const v3, 0x7fffffff
const v4, 0x7fffffff
const v5, 0x7fffffff
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
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