diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java
index 0a4aad25cd..c2596b3f7a 100644
--- a/app/src/main/java/eu/faircode/email/ApplicationEx.java
+++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java
@@ -481,7 +481,7 @@ public class ApplicationEx extends Application
if (version < BuildConfig.VERSION_CODE)
editor.remove("crash_report_count");
- if (!BuildConfig.TEST_RELEASE)
+ if (!Log.isTestRelease())
editor.remove("test1").remove("test2").remove("test3").remove("test4").remove("test5");
if (version < 468) {
diff --git a/app/src/main/java/eu/faircode/email/DebugHelper.java b/app/src/main/java/eu/faircode/email/DebugHelper.java
index 243e133b0b..4d99d3d9cf 100644
--- a/app/src/main/java/eu/faircode/email/DebugHelper.java
+++ b/app/src/main/java/eu/faircode/email/DebugHelper.java
@@ -277,7 +277,7 @@ public class DebugHelper {
autostart == null ? "?" : Boolean.toString(autostart == 0)));
boolean reporting = prefs.getBoolean("crash_reports", false);
- if (reporting || BuildConfig.TEST_RELEASE) {
+ if (reporting || Log.isTestRelease()) {
String uuid = prefs.getString("uuid", null);
sb.append(String.format("Bugsnag UUID: %s\r\n", uuid == null ? "-" : uuid));
}
diff --git a/app/src/main/java/eu/faircode/email/EmailService.java b/app/src/main/java/eu/faircode/email/EmailService.java
index 5788c34b6a..733e85fcc7 100644
--- a/app/src/main/java/eu/faircode/email/EmailService.java
+++ b/app/src/main/java/eu/faircode/email/EmailService.java
@@ -184,7 +184,7 @@ public class EmailService implements AutoCloseable {
long protocol_since = prefs.getLong("protocol_since", 0);
if (protocol_since == 0)
prefs.edit().putLong("protocol_since", now).apply();
- else if (protocol_since + PROTOCOL_LOG_DURATION < now && !BuildConfig.TEST_RELEASE)
+ else if (protocol_since + PROTOCOL_LOG_DURATION < now && !Log.isTestRelease())
prefs.edit().putBoolean("protocol", false).apply();
this.log = prefs.getBoolean("protocol", false);
this.ssl_harden = prefs.getBoolean("ssl_harden", false);
diff --git a/app/src/main/java/eu/faircode/email/EntityLog.java b/app/src/main/java/eu/faircode/email/EntityLog.java
index 3402d73072..6ac4a3165a 100644
--- a/app/src/main/java/eu/faircode/email/EntityLog.java
+++ b/app/src/main/java/eu/faircode/email/EntityLog.java
@@ -110,7 +110,7 @@ public class EntityLog {
if (context == null)
return;
if (type == Type.Debug &&
- !(BuildConfig.DEBUG || BuildConfig.TEST_RELEASE))
+ !(BuildConfig.DEBUG || Log.isTestRelease()))
return;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
index 32ff4c805f..4849d53f9e 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
@@ -1971,7 +1971,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
grpBitbucket.setVisibility(View.GONE);
grpAnnouncements.setVisibility(TextUtils.isEmpty(BuildConfig.ANNOUNCEMENT_URI)
? View.GONE : View.VISIBLE);
- grpTest.setVisibility(BuildConfig.TEST_RELEASE ? View.VISIBLE : View.GONE);
+ grpTest.setVisibility(Log.isTestRelease() ? View.VISIBLE : View.GONE);
setLastCleanup(prefs.getLong("last_cleanup", -1));
@@ -1986,7 +1986,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
(external == null ? null : external.getAbsolutePath()) + (emulated ? " emulated" : ""));
swExactAlarms.setEnabled(AlarmManagerCompatEx.canScheduleExactAlarms(getContext()));
- swTestIab.setVisibility(BuildConfig.DEBUG && BuildConfig.TEST_RELEASE ? View.VISIBLE : View.GONE);
+ swTestIab.setVisibility(BuildConfig.DEBUG && Log.isTestRelease() ? View.VISIBLE : View.GONE);
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java
index 54cc6ef66b..aef8f1bf7d 100644
--- a/app/src/main/java/eu/faircode/email/Helper.java
+++ b/app/src/main/java/eu/faircode/email/Helper.java
@@ -1356,7 +1356,7 @@ public class Helper {
html += "Locale: " + Html.escapeHtml(slocale.toString()) + "
";
if (language != null)
html += "Language: " + Html.escapeHtml(language) + "
";
- if ((reporting || BuildConfig.TEST_RELEASE) && uuid != null)
+ if ((reporting || Log.isTestRelease()) && uuid != null)
html += "UUID: " + Html.escapeHtml(uuid) + "
";
html += "