ReportPolicy$ReportByInterval.smali
.class public Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;
.super Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportStrategy;
.source "ReportPolicy.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/umeng/commonsdk/statistics/common/ReportPolicy;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "ReportByInterval"
.end annotation
# static fields
.field private static MAX_REPORT_INTERVAL:J
.field private static MIN_REPORT_INTERVAL:J
# instance fields
.field private mReportInterval:J
.field private mTracer:Lcom/umeng/commonsdk/statistics/internal/StatTracer;
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
.line 145
const-wide/32 v0, 0x15f90
sput-wide v0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MIN_REPORT_INTERVAL:J
.line 146
const-wide/32 v0, 0x5265c00
sput-wide v0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MAX_REPORT_INTERVAL:J
return-void
.end method
.method public constructor <init>(Lcom/umeng/commonsdk/statistics/internal/StatTracer;J)V
.registers 4
.prologue
.line 151
invoke-direct {p0}, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportStrategy;-><init>()V
.line 152
iput-object p1, p0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->mTracer:Lcom/umeng/commonsdk/statistics/internal/StatTracer;
.line 153
invoke-virtual {p0, p2, p3}, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->setReportInterval(J)V
.line 154
return-void
.end method
.method public static isValidValue(I)Z
.registers 5
.prologue
.line 181
int-to-long v0, p0
sget-wide v2, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MIN_REPORT_INTERVAL:J
cmp-long v0, v0, v2
if-gez v0, :cond_9
.line 182
const/4 v0, 0x0
.line 184
:goto_8
return v0
:cond_9
const/4 v0, 0x1
goto :goto_8
.end method
# virtual methods
.method public getReportInterval()J
.registers 3
.prologue
.line 177
iget-wide v0, p0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->mReportInterval:J
return-wide v0
.end method
.method public setReportInterval(J)V
.registers 6
.prologue
.line 169
sget-wide v0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MIN_REPORT_INTERVAL:J
cmp-long v0, p1, v0
if-ltz v0, :cond_f
sget-wide v0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MAX_REPORT_INTERVAL:J
cmp-long v0, p1, v0
if-gtz v0, :cond_f
.line 170
iput-wide p1, p0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->mReportInterval:J
.line 174
:goto_e
return-void
.line 172
:cond_f
sget-wide v0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->MIN_REPORT_INTERVAL:J
iput-wide v0, p0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->mReportInterval:J
goto :goto_e
.end method
.method public shouldSendMessage(Z)Z
.registers 8
.prologue
const/4 v0, 0x1
.line 158
if-eqz p1, :cond_4
.line 165
:cond_3
:goto_3
return v0
.line 162
:cond_4
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
invoke-static {}, Lcom/umeng/commonsdk/framework/UMModuleRegister;->getAppContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/umeng/commonsdk/framework/UMEnvelopeBuild;->getLastSuccessfulBuildTime(Landroid/content/Context;)J
move-result-wide v4
sub-long/2addr v2, v4
iget-wide v4, p0, Lcom/umeng/commonsdk/statistics/common/ReportPolicy$ReportByInterval;->mReportInterval:J
cmp-long v1, v2, v4
if-gez v1, :cond_3
.line 165
const/4 v0, 0x0
goto :goto_3
.end method