feat: restrict strictmode to only catch non api usage, reducing log spam
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
d7b61f1caa
commit
fe66108af8
|
|
@ -1,6 +1,7 @@
|
||||||
package chat.stoat
|
package chat.stoat
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import android.os.Build
|
||||||
import android.os.StrictMode
|
import android.os.StrictMode
|
||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
|
|
@ -25,7 +26,9 @@ class StoatApplication : Application() {
|
||||||
StrictMode.VmPolicy
|
StrictMode.VmPolicy
|
||||||
.Builder()
|
.Builder()
|
||||||
.apply {
|
.apply {
|
||||||
detectAll()
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
detectNonSdkApiUsage()
|
||||||
|
}
|
||||||
penaltyLog()
|
penaltyLog()
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue