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,6 +17,10 @@ class RevoltApplication : Application() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
AndroidLogcatLogger.installOnDebuggableApp(this, minPriority = LogPriority.VERBOSE)
|
AndroidLogcatLogger.installOnDebuggableApp(this, minPriority = LogPriority.VERBOSE)
|
||||||
|
|
||||||
|
if (BuildConfig.DEBUG) {
|
||||||
|
// Enable strict mode primarily to catch non-API usage, although we detect all
|
||||||
|
// violations for our reference.
|
||||||
|
// https://developer.android.com/reference/android/os/StrictMode
|
||||||
StrictMode.setVmPolicy(
|
StrictMode.setVmPolicy(
|
||||||
StrictMode.VmPolicy
|
StrictMode.VmPolicy
|
||||||
.Builder()
|
.Builder()
|
||||||
|
|
@ -27,6 +31,7 @@ class RevoltApplication : Application() {
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
instance = this
|
instance = this
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue