Enable StrictMode for userdebug builds
This commit is contained in:
parent
948cd597d8
commit
4387353227
1 changed files with 16 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue