update version & remove log runControlNoException
This commit is contained in:
3 files changed
+20
-13
No files matched your search
+2
-2
@@ -13,8 +13,8 @@ android {
|
||||
applicationId "com.github.kr328.clash"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 10013
|
||||
versionName "1.0.13-alpha"
|
||||
versionCode 10014
|
||||
versionName "1.0.14-alpha"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.github.kr328.clash
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.github.kr328.clash.core.Constants
|
||||
import com.github.kr328.clash.core.utils.Log
|
||||
import com.google.firebase.FirebaseApp
|
||||
@@ -37,21 +38,32 @@ class MainApplication : Application() {
|
||||
}
|
||||
|
||||
override fun warn(message: String, throwable: Throwable?) {
|
||||
throwable?.also {
|
||||
Crashlytics.logException(it)
|
||||
}
|
||||
|
||||
android.util.Log.w(Constants.TAG, message, throwable)
|
||||
}
|
||||
|
||||
override fun error(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
throwable?.also {
|
||||
Crashlytics.logException(it)
|
||||
}
|
||||
|
||||
android.util.Log.e(Constants.TAG, message, throwable)
|
||||
}
|
||||
|
||||
override fun wtf(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
throwable?.also {
|
||||
Crashlytics.logException(it)
|
||||
}
|
||||
|
||||
android.util.Log.wtf(Constants.TAG, message, throwable)
|
||||
}
|
||||
|
||||
override fun debug(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
android.util.Log.d(Constants.TAG, message, throwable)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,18 +46,13 @@ abstract class BaseClash(private val controllerPath: File) {
|
||||
): R? {
|
||||
return try {
|
||||
runControl(command, block)
|
||||
} catch (e: Exception) {
|
||||
Log.w("Run command $command failure", e)
|
||||
null
|
||||
}
|
||||
} catch (ignored: Exception) { null }
|
||||
}
|
||||
|
||||
protected fun runControlNoException(command: Int) {
|
||||
try {
|
||||
runControl(command)
|
||||
} catch (e: Exception) {
|
||||
Log.w("Run command $command failure", e)
|
||||
}
|
||||
} catch (ignored: Exception) {}
|
||||
}
|
||||
|
||||
protected fun DataOutputStream.writeString(string: String) {
|
||||
|
||||
Reference in new issue
Block a user