mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 04:11:14 +00:00
Use StrictMode VmPolicy only in debug build type (#2002)
`StrictMode` makes sense mainly in for debug build types, enabling it for release does not provide any value as it can add additional overhead and its logs going to be removed (because R8 strips them).
This commit is contained in:
parent
ae27e7bb4d
commit
f4ccad8329
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,12 @@ public class SyncthingApp extends Application {
|
|||
|
||||
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.
|
||||
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
|
||||
.detectAll()
|
||||
|
|
Loading…
Reference in a new issue