LogEntity.smali

.class public Lio/rong/common/dlog/LogEntity;
.super Ljava/lang/Object;
.source "LogEntity.java"


# static fields
.field public static final CrashLogFileName:Ljava/lang/String; = "rong_sdk_crash.log"

.field private static final LOG_DIR:Ljava/lang/String; = "rong_log"

.field public static final LogFileName:Ljava/lang/String; = "rong_sdk.log"

.field private static final Log_Default_Url:Ljava/lang/String; = "https://feedback.cn.ronghub.com"

.field public static final MODE_DEBUG:I = 0x1

.field public static final MODE_RELEASE:I = 0x0

.field public static final MODE_TEST:I = 0x2

.field private static final SP_APP_KEY:Ljava/lang/String; = "APP_KEY"

.field private static final SP_MONITOR_LEVEL:Ljava/lang/String; = "MONITOR_LEVEL"

.field private static final SP_MONITOR_TYPE:Ljava/lang/String; = "MONITOR_TYPE"

.field private static final SP_NAME:Ljava/lang/String; = "FwLog"

.field private static final SP_OFFLINE_LOG_SERVER:Ljava/lang/String; = "OFFLINE_LOG_SERVER"

.field private static final SP_ONLINE_LOG_SERVER:Ljava/lang/String; = "ONLINE_LOG_SERVER"

.field private static final SP_SDK_VER:Ljava/lang/String; = "SDK_VER"

.field private static final SP_START_LOG_TIME:Ljava/lang/String; = "START_LOG_TIME"

.field private static final SP_TOKEN:Ljava/lang/String; = "TOKEN"

.field private static final SP_UPLOAD_CACHE_LIST:Ljava/lang/String; = "UPLOAD_CACHE_LIST"

.field private static final SP_USER_ID:Ljava/lang/String; = "USER_ID"

.field private static instance:Lio/rong/common/dlog/LogEntity;


# instance fields
.field private appKey:Ljava/lang/String;

.field private consoleLogLevel:I

.field private isDebugMode:Z

.field private logDir:Ljava/lang/String;

.field private logListener:Lio/rong/common/dlog/DLog$ILogListener;

.field private monitorLevel:I

.field private monitorType:I

.field private offlineLogServer:Ljava/lang/String;

.field private onlineLogServer:Ljava/lang/String;

.field private sdkVer:Ljava/lang/String;

.field private sharedPreferences:Landroid/content/SharedPreferences;

.field private startLogTime:J

.field private token:Ljava/lang/String;

.field private userId:Ljava/lang/String;


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

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

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->offlineLogServer:Ljava/lang/String;

    .line 3
    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->onlineLogServer:Ljava/lang/String;

    .line 4
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-eqz v1, :cond_18

    .line 5
    iget v1, v1, Landroid/content/pm/ApplicationInfo;->flags:I

    and-int/lit8 v1, v1, 0x2

    if-eqz v1, :cond_18

    const/4 v1, 0x1

    goto :goto_19

    :cond_18
    const/4 v1, 0x0

    :goto_19
    iput-boolean v1, p0, Lio/rong/common/dlog/LogEntity;->isDebugMode:Z

    const-string v1, "FwLog"

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

    move-result-object v1

    iput-object v1, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    .line 7
    invoke-static {}, Lio/rong/imlib/common/SavePathUtils;->isSavePathEmpty()Z

    move-result v1

    const-string v4, "rong_log"

    if-nez v1, :cond_56

    .line 8
    new-instance p1, Ljava/lang/StringBuilder;

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

    invoke-static {}, Lio/rong/imlib/common/SavePathUtils;->getSavePath()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v0, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->logDir:Ljava/lang/String;

    .line 9
    new-instance p1, Ljava/io/File;

    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->logDir:Ljava/lang/String;

    invoke-direct {p1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 10
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_9d

    .line 11
    invoke-virtual {p1}, Ljava/io/File;->mkdirs()Z

    goto :goto_9d

    .line 12
    :cond_56
    :try_start_56
    invoke-virtual {p1, v4}, Landroid/content/Context;->getExternalFilesDir(Ljava/lang/String;)Ljava/io/File;

    move-result-object v0
    :try_end_5a
    .catch Ljava/lang/ArrayIndexOutOfBoundsException; {:try_start_56 .. :try_end_5a} :catch_5b

    goto :goto_5f

    :catch_5b
    move-exception v1

    .line 13
    invoke-virtual {v1}, Ljava/lang/ArrayIndexOutOfBoundsException;->printStackTrace()V

    :goto_5f
    if-eqz v0, :cond_68

    .line 14
    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->logDir:Ljava/lang/String;

    goto :goto_9d

    .line 15
    :cond_68
    :try_start_68
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object p1

    invoke-virtual {p1}, Ljava/io/File;->getAbsoluteFile()Ljava/io/File;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    sget-object p1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 16
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->logDir:Ljava/lang/String;
    :try_end_86
    .catch Ljava/lang/Exception; {:try_start_68 .. :try_end_86} :catch_87

    goto :goto_9d

    :catch_87
    move-exception p1

    const/16 v0, 0x200

    .line 17
    sget-object v1, Lio/rong/common/dlog/DLog$LogTag;->L_CRASH_MAIN_EPT_E:Lio/rong/common/dlog/DLog$LogTag;

    invoke-virtual {v1}, Lio/rong/common/dlog/DLog$LogTag;->getTag()Ljava/lang/String;

    move-result-object v1

    new-array v4, v2, [Ljava/lang/Object;

    invoke-static {p1}, Lio/rong/common/dlog/DLog;->stackToString(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object p1

    aput-object p1, v4, v3

    const-string p1, "stacks"

    invoke-static {v2, v0, v1, p1, v4}, Lio/rong/common/dlog/DLog;->write(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V

    :cond_9d
    :goto_9d
    return-void
.end method

.method public static getInstance()Lio/rong/common/dlog/LogEntity;
    .registers 2

    .line 1
    sget-object v0, Lio/rong/common/dlog/LogEntity;->instance:Lio/rong/common/dlog/LogEntity;

    if-eqz v0, :cond_5

    return-object v0

    .line 2
    :cond_5
    new-instance v0, Ljava/lang/RuntimeException;

    const-string v1, "LogEntity.init() has not been called."

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

    throw v0
.end method

.method static init(Landroid/content/Context;)V
    .registers 2

    .line 1
    sget-object v0, Lio/rong/common/dlog/LogEntity;->instance:Lio/rong/common/dlog/LogEntity;

    if-nez v0, :cond_b

    .line 2
    new-instance v0, Lio/rong/common/dlog/LogEntity;

    invoke-direct {v0, p0}, Lio/rong/common/dlog/LogEntity;-><init>(Landroid/content/Context;)V

    sput-object v0, Lio/rong/common/dlog/LogEntity;->instance:Lio/rong/common/dlog/LogEntity;

    :cond_b
    return-void
.end method


# virtual methods
.method addLogStamp(Ljava/lang/String;)V
    .registers 9

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getUploadCacheList()Lorg/json/JSONArray;

    move-result-object v0

    .line 2
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    :try_start_9
    const-string v2, "filename"

    .line 3
    invoke-virtual {v1, v2, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "sdkVer"

    .line 4
    invoke-static {}, Lio/rong/common/dlog/LogEntity;->getInstance()Lio/rong/common/dlog/LogEntity;

    move-result-object v2

    invoke-virtual {v2}, Lio/rong/common/dlog/LogEntity;->getSdkVer()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "appKey"

    .line 5
    invoke-static {}, Lio/rong/common/dlog/LogEntity;->getInstance()Lio/rong/common/dlog/LogEntity;

    move-result-object v2

    invoke-virtual {v2}, Lio/rong/common/dlog/LogEntity;->getAppKey()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "userId"

    .line 6
    invoke-static {}, Lio/rong/common/dlog/LogEntity;->getInstance()Lio/rong/common/dlog/LogEntity;

    move-result-object v2

    invoke-virtual {v2}, Lio/rong/common/dlog/LogEntity;->getUserId()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "token"

    .line 7
    invoke-static {}, Lio/rong/common/dlog/LogEntity;->getInstance()Lio/rong/common/dlog/LogEntity;

    move-result-object v2

    invoke-virtual {v2}, Lio/rong/common/dlog/LogEntity;->getToken()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 8
    invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
    :try_end_45
    .catch Lorg/json/JSONException; {:try_start_9 .. :try_end_45} :catch_46

    goto :goto_61

    :catch_46
    move-exception p1

    const/16 v1, 0x200

    .line 9
    sget-object v2, Lio/rong/common/dlog/DLog$LogTag;->G_CRASH_E:Lio/rong/common/dlog/DLog$LogTag;

    invoke-virtual {v2}, Lio/rong/common/dlog/DLog$LogTag;->getTag()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x1

    new-array v4, v3, [Ljava/lang/Object;

    const/4 v5, 0x0

    invoke-static {p1}, Lio/rong/common/dlog/DLog;->stackToString(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object v6

    aput-object v6, v4, v5

    const-string v5, "stacks"

    invoke-static {v3, v1, v2, v5, v4}, Lio/rong/common/dlog/DLog;->write(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V

    .line 10
    invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V

    .line 11
    :goto_61
    invoke-virtual {p0, v0}, Lio/rong/common/dlog/LogEntity;->setUploadCacheList(Lorg/json/JSONArray;)V

    return-void
.end method

.method public deleteUploadCacheList(I)V
    .registers 6

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    monitor-enter v0

    .line 2
    :try_start_3
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getUploadCacheList()Lorg/json/JSONArray;

    move-result-object v1

    if-eqz v1, :cond_25

    .line 3
    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v3, 0x13

    if-lt v2, v3, :cond_12

    .line 4
    invoke-virtual {v1, p1}, Lorg/json/JSONArray;->remove(I)Ljava/lang/Object;

    .line 5
    :cond_12
    iget-object p1, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object p1

    const-string v2, "UPLOAD_CACHE_LIST"

    invoke-virtual {v1}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object p1

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

    .line 6
    :cond_25
    monitor-exit v0

    return-void

    :catchall_27
    move-exception p1

    monitor-exit v0
    :try_end_29
    .catchall {:try_start_3 .. :try_end_29} :catchall_27

    throw p1
.end method

.method getAppKey()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->appKey:Ljava/lang/String;

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "APP_KEY"

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->appKey:Ljava/lang/String;

    .line 3
    :cond_f
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->appKey:Ljava/lang/String;

    return-object v0
.end method

.method getConsoleLogLevel()I
    .registers 2

    .line 1
    iget v0, p0, Lio/rong/common/dlog/LogEntity;->consoleLogLevel:I

    return v0
.end method

.method getFileMaxSize()J
    .registers 3

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getLogMode()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_b

    const-wide/32 v0, 0xc800

    goto :goto_e

    :cond_b
    const-wide/32 v0, 0x100000

    :goto_e
    return-wide v0
.end method

.method getLogDir()Ljava/lang/String;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->logDir:Ljava/lang/String;

    return-object v0
.end method

.method getLogListener()Lio/rong/common/dlog/DLog$ILogListener;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->logListener:Lio/rong/common/dlog/DLog$ILogListener;

    return-object v0
.end method

.method getLogMode()I
    .registers 2

    .line 1
    iget-boolean v0, p0, Lio/rong/common/dlog/LogEntity;->isDebugMode:Z

    return v0
.end method

.method getMonitorLevel()I
    .registers 4

    .line 1
    iget v0, p0, Lio/rong/common/dlog/LogEntity;->monitorLevel:I

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "MONITOR_LEVEL"

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

    move-result v0

    iput v0, p0, Lio/rong/common/dlog/LogEntity;->monitorLevel:I

    .line 3
    :cond_f
    iget v0, p0, Lio/rong/common/dlog/LogEntity;->monitorLevel:I

    return v0
.end method

.method getMonitorType()I
    .registers 4

    .line 1
    iget v0, p0, Lio/rong/common/dlog/LogEntity;->monitorType:I

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "MONITOR_TYPE"

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

    move-result v0

    iput v0, p0, Lio/rong/common/dlog/LogEntity;->monitorType:I

    .line 3
    :cond_f
    iget v0, p0, Lio/rong/common/dlog/LogEntity;->monitorType:I

    return v0
.end method

.method getOfflineLogServer()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->offlineLogServer:Ljava/lang/String;

    if-nez v0, :cond_10

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const-string v1, "OFFLINE_LOG_SERVER"

    const-string v2, "https://feedback.cn.ronghub.com"

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->offlineLogServer:Ljava/lang/String;

    .line 3
    :cond_10
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->offlineLogServer:Ljava/lang/String;

    return-object v0
.end method

.method getOnlineLogServer()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->onlineLogServer:Ljava/lang/String;

    if-nez v0, :cond_10

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const-string v1, "ONLINE_LOG_SERVER"

    const-string v2, ""

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->onlineLogServer:Ljava/lang/String;

    .line 3
    :cond_10
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->onlineLogServer:Ljava/lang/String;

    return-object v0
.end method

.method getOutDateTime()J
    .registers 3

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getLogMode()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_b

    const-wide/32 v0, 0x493e0

    goto :goto_e

    :cond_b
    const-wide/32 v0, 0xf731400

    :goto_e
    return-wide v0
.end method

.method getSdkVer()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sdkVer:Ljava/lang/String;

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "SDK_VER"

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->sdkVer:Ljava/lang/String;

    .line 3
    :cond_f
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sdkVer:Ljava/lang/String;

    return-object v0
.end method

.method getStartLogTime()J
    .registers 6

    .line 1
    iget-wide v0, p0, Lio/rong/common/dlog/LogEntity;->startLogTime:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_12

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const-string v1, "START_LOG_TIME"

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

    move-result-wide v0

    iput-wide v0, p0, Lio/rong/common/dlog/LogEntity;->startLogTime:J

    .line 3
    :cond_12
    iget-wide v0, p0, Lio/rong/common/dlog/LogEntity;->startLogTime:J

    return-wide v0
.end method

.method getToken()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->token:Ljava/lang/String;

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "TOKEN"

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->token:Ljava/lang/String;

    .line 3
    :cond_f
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->token:Ljava/lang/String;

    return-object v0
.end method

.method public getUploadCacheList()Lorg/json/JSONArray;
    .registers 8

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const-string v1, "UPLOAD_CACHE_LIST"

    const/4 v2, 0x0

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

    move-result-object v0

    if-nez v0, :cond_11

    .line 2
    :try_start_b
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    goto :goto_33

    .line 3
    :cond_11
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1, v0}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
    :try_end_16
    .catch Lorg/json/JSONException; {:try_start_b .. :try_end_16} :catch_17

    goto :goto_33

    :catch_17
    move-exception v1

    const/16 v2, 0x200

    .line 4
    sget-object v3, Lio/rong/common/dlog/DLog$LogTag;->G_GET_UPLOAD_CACHE_E:Lio/rong/common/dlog/DLog$LogTag;

    invoke-virtual {v3}, Lio/rong/common/dlog/DLog$LogTag;->getTag()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x1

    new-array v5, v4, [Ljava/lang/Object;

    const/4 v6, 0x0

    aput-object v0, v5, v6

    const-string v0, "cache"

    invoke-static {v4, v2, v3, v0, v5}, Lio/rong/common/dlog/DLog;->write(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V

    .line 5
    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    .line 6
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    :goto_33
    return-object v1
.end method

.method getUploadTimeInterval()J
    .registers 3

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getLogMode()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_b

    const-wide/32 v0, 0x1d4c0

    goto :goto_e

    :cond_b
    const-wide/32 v0, 0x124f80

    :goto_e
    return-wide v0
.end method

.method public getUploadUrl()Ljava/lang/String;
    .registers 2

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getOfflineLogServer()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getUserId()Ljava/lang/String;
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->userId:Ljava/lang/String;

    if-nez v0, :cond_f

    .line 2
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x0

    const-string v2, "USER_ID"

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/common/dlog/LogEntity;->userId:Ljava/lang/String;

    .line 3
    :cond_f
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->userId:Ljava/lang/String;

    return-object v0
.end method

.method setAppKey(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "APP_KEY"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->appKey:Ljava/lang/String;

    return-void
.end method

.method setConsoleLogLevel(I)V
    .registers 2

    .line 1
    iput p1, p0, Lio/rong/common/dlog/LogEntity;->consoleLogLevel:I

    return-void
.end method

.method setLogListener(Lio/rong/common/dlog/DLog$ILogListener;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->logListener:Lio/rong/common/dlog/DLog$ILogListener;

    return-void
.end method

.method setMonitorLevel(I)V
    .registers 4

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getLogMode()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_8

    const/4 p1, 0x6

    .line 2
    :cond_8
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "MONITOR_LEVEL"

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

    move-result-object v0

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

    .line 3
    iput p1, p0, Lio/rong/common/dlog/LogEntity;->monitorLevel:I

    return-void
.end method

.method setMonitorType(I)V
    .registers 4

    .line 1
    invoke-virtual {p0}, Lio/rong/common/dlog/LogEntity;->getLogMode()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_a

    const p1, 0xfffffff

    .line 2
    :cond_a
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "MONITOR_TYPE"

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

    move-result-object v0

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

    .line 3
    iput p1, p0, Lio/rong/common/dlog/LogEntity;->monitorType:I

    return-void
.end method

.method setOfflineLogServer(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "OFFLINE_LOG_SERVER"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->offlineLogServer:Ljava/lang/String;

    return-void
.end method

.method setOnlineLogServer(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "ONLINE_LOG_SERVER"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->onlineLogServer:Ljava/lang/String;

    return-void
.end method

.method setSdkVer(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "SDK_VER"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->sdkVer:Ljava/lang/String;

    return-void
.end method

.method setStartLogTime(J)V
    .registers 5

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "START_LOG_TIME"

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

    move-result-object v0

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

    .line 2
    iput-wide p1, p0, Lio/rong/common/dlog/LogEntity;->startLogTime:J

    return-void
.end method

.method setToken(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "TOKEN"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->token:Ljava/lang/String;

    return-void
.end method

.method setUploadCacheList(Lorg/json/JSONArray;)V
    .registers 5

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

    monitor-enter v0

    if-eqz p1, :cond_18

    .line 2
    :try_start_5
    iget-object v1, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v1

    const-string v2, "UPLOAD_CACHE_LIST"

    invoke-virtual {p1}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-interface {v1, v2, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object p1

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

    .line 3
    :cond_18
    monitor-exit v0

    return-void

    :catchall_1a
    move-exception p1

    monitor-exit v0
    :try_end_1c
    .catchall {:try_start_5 .. :try_end_1c} :catchall_1a

    throw p1
.end method

.method setUserId(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/common/dlog/LogEntity;->sharedPreferences:Landroid/content/SharedPreferences;

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

    move-result-object v0

    const-string v1, "USER_ID"

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

    move-result-object v0

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

    .line 2
    iput-object p1, p0, Lio/rong/common/dlog/LogEntity;->userId:Ljava/lang/String;

    return-void
.end method