feat: restrict strictmode to only catch non api usage, reducing log spam

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2025-10-19 02:56:38 +02:00
parent d7b61f1caa
commit fe66108af8
1 changed files with 4 additions and 1 deletions

View File

@ -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()