f.smali

.class public Lo1/f;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field private static volatile b:Lo1/f;


# instance fields
.field private final a:Landroid/content/SharedPreferences;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .registers 4

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-string v0, "com.garena.android.msdk.PendingPayCachePreference"

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object p1

    iput-object p1, p0, Lo1/f;->a:Landroid/content/SharedPreferences;

    return-void
.end method

.method public static a(Landroid/content/Context;)Lo1/f;
    .registers 3

    sget-object v0, Lo1/f;->b:Lo1/f;

    if-nez v0, :cond_17

    const-class v0, Lo1/f;

    monitor-enter v0

    :try_start_7
    sget-object v1, Lo1/f;->b:Lo1/f;

    if-nez v1, :cond_12

    new-instance v1, Lo1/f;

    invoke-direct {v1, p0}, Lo1/f;-><init>(Landroid/content/Context;)V

    sput-object v1, Lo1/f;->b:Lo1/f;

    :cond_12
    monitor-exit v0

    goto :goto_17

    :catchall_14
    move-exception p0

    monitor-exit v0
    :try_end_16
    .catchall {:try_start_7 .. :try_end_16} :catchall_14

    throw p0

    :cond_17
    :goto_17
    sget-object p0, Lo1/f;->b:Lo1/f;

    return-object p0
.end method

.method private c(Landroid/content/Context;Ljava/lang/String;)J
    .registers 5

    invoke-static {p1}, Lo1/f;->a(Landroid/content/Context;)Lo1/f;

    move-result-object p1

    iget-object p1, p1, Lo1/f;->a:Landroid/content/SharedPreferences;

    const-wide/16 v0, 0x0

    invoke-interface {p1, p2, v0, v1}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide p1

    return-wide p1
.end method


# virtual methods
.method public b(Landroid/content/Context;)J
    .registers 5

    invoke-static {}, Lcom/beetalk/sdk/n;->t()Lcom/beetalk/sdk/n$c;

    move-result-object v0

    sget-object v1, Lcom/beetalk/sdk/n$c;->b:Lcom/beetalk/sdk/n$c;

    if-ne v0, v1, :cond_c

    const-wide/32 v0, 0xc350

    return-wide v0

    :cond_c
    invoke-static {p1}, Lo1/f;->a(Landroid/content/Context;)Lo1/f;

    move-result-object p1

    iget-object p1, p1, Lo1/f;->a:Landroid/content/SharedPreferences;

    const-string v0, "KEY_PENDING_COMMIT_REQUEST_INTERVAL"

    const-wide/32 v1, 0x5265c00

    invoke-interface {p1, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v0

    return-wide v0
.end method

.method public d(Landroid/content/Context;Ljava/lang/String;)Z
    .registers 7

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    invoke-direct {p0, p1, p2}, Lo1/f;->c(Landroid/content/Context;Ljava/lang/String;)J

    move-result-wide v2

    sub-long/2addr v0, v2

    invoke-virtual {p0, p1}, Lo1/f;->b(Landroid/content/Context;)J

    move-result-wide p1

    cmp-long v2, v0, p1

    if-lez v2, :cond_13

    const/4 p1, 0x1

    goto :goto_14

    :cond_13
    const/4 p1, 0x0

    :goto_14
    return p1
.end method

.method public e(Landroid/content/Context;Ljava/lang/String;)V
    .registers 5

    invoke-static {p1}, Lo1/f;->a(Landroid/content/Context;)Lo1/f;

    move-result-object p1

    iget-object p1, p1, Lo1/f;->a:Landroid/content/SharedPreferences;

    invoke-interface {p1}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object p1

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    invoke-interface {p1, p2, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->apply()V

    return-void
.end method