DefaultEncodedMemoryCacheParamsSupplier.smali
.class public Lcom/facebook/imagepipeline/cache/DefaultEncodedMemoryCacheParamsSupplier;
.super Ljava/lang/Object;
.source "DefaultEncodedMemoryCacheParamsSupplier.java"
# interfaces
.implements Lcom/facebook/common/internal/Supplier;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/facebook/common/internal/Supplier<",
"Lcom/facebook/imagepipeline/cache/MemoryCacheParams;",
">;"
}
.end annotation
# static fields
.field private static final MAX_CACHE_ENTRIES:I = 0x7fffffff
.field private static final MAX_EVICTION_QUEUE_ENTRIES:I = 0x7fffffff
.field private static final PARAMS_CHECK_INTERVAL_MS:J
# direct methods
.method static constructor <clinit>()V
.registers 3
.line 22
sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x5
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lcom/facebook/imagepipeline/cache/DefaultEncodedMemoryCacheParamsSupplier;->PARAMS_CHECK_INTERVAL_MS:J
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 17
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private getMaxCacheSize()I
.registers 5
.line 38
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Runtime;->maxMemory()J
move-result-wide v0
const-wide/32 v2, 0x7fffffff
invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
long-to-int v0, v0
const/high16 v1, 0x1000000
if-ge v0, v1, :cond_17
const/high16 v0, 0x100000
return v0
:cond_17
const/high16 v1, 0x2000000
if-ge v0, v1, :cond_1e
const/high16 v0, 0x200000
return v0
:cond_1e
const/high16 v0, 0x400000
return v0
.end method
# virtual methods
.method public get()Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
.registers 10
.line 26
invoke-direct {p0}, Lcom/facebook/imagepipeline/cache/DefaultEncodedMemoryCacheParamsSupplier;->getMaxCacheSize()I
move-result v3
.line 27
div-int/lit8 v5, v3, 0x8
.line 28
new-instance v8, Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
sget-wide v6, Lcom/facebook/imagepipeline/cache/DefaultEncodedMemoryCacheParamsSupplier;->PARAMS_CHECK_INTERVAL_MS:J
const v2, 0x7fffffff
const v4, 0x7fffffff
move-object v0, v8
move v1, v3
invoke-direct/range {v0 .. v7}, Lcom/facebook/imagepipeline/cache/MemoryCacheParams;-><init>(IIIIIJ)V
return-object v8
.end method
.method public bridge synthetic get()Ljava/lang/Object;
.registers 2
.line 16
invoke-virtual {p0}, Lcom/facebook/imagepipeline/cache/DefaultEncodedMemoryCacheParamsSupplier;->get()Lcom/facebook/imagepipeline/cache/MemoryCacheParams;
move-result-object v0
return-object v0
.end method