diff --git a/app/src/main/java/com/stevesoltys/seedvault/App.kt b/app/src/main/java/com/stevesoltys/seedvault/App.kt index 47a279a1..d369d523 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/App.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/App.kt @@ -6,6 +6,7 @@ import android.app.backup.IBackupManager import android.content.Context.BACKUP_SERVICE import android.os.Build import android.os.ServiceManager.getService +import android.os.StrictMode import com.stevesoltys.seedvault.crypto.cryptoModule import com.stevesoltys.seedvault.header.headerModule import com.stevesoltys.seedvault.metadata.MetadataManager @@ -63,6 +64,21 @@ class App : Application() { ) ) } + if (isDebugBuild()) { + StrictMode.setThreadPolicy( + StrictMode.ThreadPolicy.Builder() + .detectAll() + .penaltyLog() + .penaltyFlashScreen() + .build() + ) + StrictMode.setVmPolicy( + StrictMode.VmPolicy.Builder() + .detectAll() + .penaltyLog() + .build() + ) + } migrateTokenFromMetadataToSettingsManager() }