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

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

This reverts commit f4ccad8329.
This commit is contained in:
Simon Frei 2024-01-02 12:24:46 +01:00 committed by GitHub
parent 9ed273a32e
commit 58e02308aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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