fix: only use vm strict mode in debug
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
6ea094e1b5
commit
e4d58120aa
|
|
@ -17,15 +17,20 @@ class RevoltApplication : Application() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
AndroidLogcatLogger.installOnDebuggableApp(this, minPriority = LogPriority.VERBOSE)
|
AndroidLogcatLogger.installOnDebuggableApp(this, minPriority = LogPriority.VERBOSE)
|
||||||
|
|
||||||
StrictMode.setVmPolicy(
|
if (BuildConfig.DEBUG) {
|
||||||
StrictMode.VmPolicy
|
// Enable strict mode primarily to catch non-API usage, although we detect all
|
||||||
.Builder()
|
// violations for our reference.
|
||||||
.apply {
|
// https://developer.android.com/reference/android/os/StrictMode
|
||||||
detectAll()
|
StrictMode.setVmPolicy(
|
||||||
penaltyLog()
|
StrictMode.VmPolicy
|
||||||
}
|
.Builder()
|
||||||
.build()
|
.apply {
|
||||||
)
|
detectAll()
|
||||||
|
penaltyLog()
|
||||||
|
}
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue