DebugUtil.smali

.class public Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;
.super Ljava/lang/Object;
.source "DebugUtil.java"


# static fields
.field public static DEBUG:Z

.field private static mForegroundCount:I

.field private static mTakeToBackground:Z

.field private static sLastLogTime:J


# direct methods
.method static constructor <clinit>()V
    .registers 3

    .prologue
    const/4 v2, 0x0

    .line 4
    sput-boolean v2, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->DEBUG:Z

    .line 6
    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->sLastLogTime:J

    .line 32
    sput v2, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mForegroundCount:I

    .line 41
    const/4 v0, 0x1

    sput-boolean v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mTakeToBackground:Z

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method public static d(Ljava/lang/String;Ljava/lang/String;I)V
    .registers 9

    .prologue
    .line 9
    sget-boolean v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->DEBUG:Z

    if-eqz v0, :cond_14

    .line 10
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v0

    .line 11
    sget-wide v2, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->sLastLogTime:J

    sub-long v2, v0, v2

    .line 12
    const-wide/16 v4, 0x0

    cmp-long v2, v2, v4

    if-gez v2, :cond_12

    .line 15
    :cond_12
    sput-wide v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->sLastLogTime:J

    .line 18
    :cond_14
    return-void
.end method

.method public static getForegroundCount()I
    .registers 1

    .prologue
    .line 35
    sget v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mForegroundCount:I

    return v0
.end method

.method public static getNewException(Ljava/lang/Throwable;Ljava/lang/String;)Ljava/lang/NullPointerException;
    .registers 8

    .prologue
    const/4 v5, 0x0

    .line 21
    invoke-virtual {p0}, Ljava/lang/Throwable;->getStackTrace()[Ljava/lang/StackTraceElement;

    move-result-object v0

    .line 22
    array-length v1, v0

    add-int/lit8 v1, v1, 0x1

    new-array v1, v1, [Ljava/lang/StackTraceElement;

    .line 23
    array-length v2, v0

    invoke-static {v0, v5, v1, v5, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 24
    array-length v0, v0

    new-instance v2, Ljava/lang/StackTraceElement;

    const-string v3, ""

    const-string v4, ""

    invoke-direct {v2, v3, p1, v4, v5}, Ljava/lang/StackTraceElement;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    aput-object v2, v1, v0

    .line 26
    new-instance v0, Ljava/lang/NullPointerException;

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

    .line 27
    invoke-virtual {v0, v1}, Ljava/lang/NullPointerException;->setStackTrace([Ljava/lang/StackTraceElement;)V

    .line 28
    return-object v0
.end method

.method public static hasTakenTobackground()Z
    .registers 1

    .prologue
    .line 44
    sget-boolean v0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mTakeToBackground:Z

    return v0
.end method

.method public static setForegroundCount(I)V
    .registers 1

    .prologue
    .line 39
    sput p0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mForegroundCount:I

    .line 40
    return-void
.end method

.method public static setTakenToBackground(Z)V
    .registers 1

    .prologue
    .line 48
    sput-boolean p0, Lcom/cleanmaster/hpsharelib/base/util/debug/DebugUtil;->mTakeToBackground:Z

    .line 49
    return-void
.end method