diff --git a/F-Droid/src/org/fdroid/fdroid/Preferences.java b/F-Droid/src/org/fdroid/fdroid/Preferences.java index 2502d8eac..fbbd1ee41 100644 --- a/F-Droid/src/org/fdroid/fdroid/Preferences.java +++ b/F-Droid/src/org/fdroid/fdroid/Preferences.java @@ -230,7 +230,9 @@ public class Preferences implements SharedPreferences.OnSharedPreferenceChangeLi @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - Log.d(TAG, "Invalidating preference '" + key + "'."); + if (BuildConfig.DEBUG) { + Log.d(TAG, "Invalidating preference '" + key + "'."); + } uninitialize(key); switch (key) { diff --git a/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java b/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java index d362babfc..ef2de0686 100644 --- a/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java +++ b/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java @@ -5,6 +5,7 @@ import android.os.Build; import android.system.ErrnoException; import android.util.Log; +import org.fdroid.fdroid.BuildConfig; import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.data.SanitizedFile; @@ -58,7 +59,9 @@ public class FileCompat extends Compatibility { dest.getAbsolutePath() }; try { - Log.d(TAG, "Executing command: " + commands[0] + " " + commands[1] + " " + commands[2]); + if (BuildConfig.DEBUG) { + Log.d(TAG, "Executing command: " + commands[0] + " " + commands[1] + " " + commands[2]); + } Process proc = Runtime.getRuntime().exec(commands); Utils.consumeStream(proc.getInputStream()); Utils.consumeStream(proc.getErrorStream()); @@ -106,7 +109,9 @@ public class FileCompat extends Compatibility { }; try { - Log.d(TAG, "Executing following command: " + args[0] + " " + args[1] + " " + args[2]); + if (BuildConfig.DEBUG) { + Log.d(TAG, "Executing following command: " + args[0] + " " + args[1] + " " + args[2]); + } Process proc = Runtime.getRuntime().exec(args); Utils.consumeStream(proc.getInputStream()); Utils.consumeStream(proc.getErrorStream());