77 优化任务领取,log存储data/data/
This commit is contained in:
@@ -28,12 +28,13 @@ import com.xscm.moduleutil.listener.MessageListenerSingleton
|
||||
import com.xscm.moduleutil.utils.CustomMsgCode
|
||||
import io.reactivex.disposables.Disposable
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
open class Application : CommonAppContext() {
|
||||
|
||||
var APP_CONENT = ""
|
||||
var APP_CONTENT = ""
|
||||
|
||||
var LOGUTILS_SAVE_PATH = ""
|
||||
var CRASHUTILS_SAVE_PATH = ""
|
||||
@@ -60,9 +61,13 @@ open class Application : CommonAppContext() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
APP_CONENT = getExternalFilesDir("APP_CONTENT")?.absolutePath.toString()
|
||||
LOGUTILS_SAVE_PATH = getExternalFilesDir("APP_CONTENT/APP_LOG")?.absolutePath.toString()
|
||||
CRASHUTILS_SAVE_PATH = getExternalFilesDir("APP_CONTENT/APP_CRASH")?.absolutePath.toString()
|
||||
// 应用内部存储 filesDir 目录的根路径
|
||||
APP_CONTENT = filesDir.absolutePath
|
||||
// 内部存储下的日志目录
|
||||
LOGUTILS_SAVE_PATH = File(filesDir, "APP_CONTENT/APP_LOG").absolutePath
|
||||
// 内部存储下的崩溃日志目录
|
||||
CRASHUTILS_SAVE_PATH = File(filesDir, "APP_CONTENT/APP_CRASH").absolutePath
|
||||
|
||||
// 初始化单例实例
|
||||
instance = this
|
||||
|
||||
@@ -280,7 +285,7 @@ open class Application : CommonAppContext() {
|
||||
}
|
||||
|
||||
fun getAppContent(): String {
|
||||
return APP_CONENT
|
||||
return APP_CONTENT
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user