Skip to content

Commit

Permalink
Revert using StrictMode VmPolicy only in debug build type (fixes #2032)…
Browse files Browse the repository at this point in the history
… (#2033)

This reverts commit f4ccad8.
  • Loading branch information
imsodin committed Jan 2, 2024
1 parent 9ed273a commit 58e0230
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/src/main/java/com/nutomic/syncthingandroid/SyncthingApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@ public void onCreate() {

new Languages(this).setLanguage(this);

if (BuildConfig.DEBUG) {
setStrictMode();
}
}

private void setStrictMode() {
// Set VM policy to avoid crash when sending folder URI to file manager.
// The main point here is to use a VM policy without
// `detectFileUriExposure`, as that leads to exceptions when e.g.
// opening the ignores file. And it's enabled by default.
// We might want to disable `detectAll` and `penaltyLog` on release (non-RC) builds too.
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
Expand Down

0 comments on commit 58e0230

Please sign in to comment.