1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-25 22:01:16 +00:00

Revert using StrictMode VmPolicy only in debug build type (fixes #2032)

This reverts commit f4ccad8329.
This commit is contained in:
Simon Frei 2024-01-02 12:10:38 +01:00
parent 5cabe050cc
commit 6594955c00

View file

@ -25,13 +25,10 @@ public class SyncthingApp extends Application {
new Languages(this).setLanguage(this); new Languages(this).setLanguage(this);
if (BuildConfig.DEBUG) { // The main point here is to use a VM policy without
setStrictMode(); // `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.
private void setStrictMode() {
// Set VM policy to avoid crash when sending folder URI to file manager.
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder() StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
.detectAll() .detectAll()
.penaltyLog() .penaltyLog()