Skip to content

Commit

Permalink
sync: Use PasswdSafeUtil.DEBUG flag for force sync option and trace logs
Browse files Browse the repository at this point in the history
Use the PasswdSafeUtil.DEBUG setting instead of the base BuildConfig as the
PasswdSafeUtil setting can be easily disabled even when building in debug mode.
  • Loading branch information
jefftharris committed Feb 23, 2025
1 parent ab3512f commit ab927e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void onCreate(Bundle savedInstanceState)
LoaderManager lm = LoaderManager.getInstance(this);
lm.initLoader(LOADER_PROVIDERS, null, this);

if (BuildConfig.DEBUG) {
if (PasswdSafeUtil.DEBUG) {
CheckBox success = findViewById(R.id.force_sync_failure);
GuiUtils.setVisible(success, true);
success.setChecked(SyncApp.get(this).isForceSyncFailure());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import androidx.work.WorkInfo;
import androidx.work.WorkManager;

import com.jefftharris.passwdsafe.lib.GenericProviderNaming;
import com.jefftharris.passwdsafe.lib.PasswdSafeLog;
import com.jefftharris.passwdsafe.lib.PasswdSafeUtil;
import com.jefftharris.passwdsafe.lib.ProviderType;
Expand Down Expand Up @@ -166,7 +167,7 @@ public void updateProviderState()
*/
public boolean isForceSyncFailure()
{
return BuildConfig.DEBUG && itsIsForceSyncFailure;
return PasswdSafeUtil.DEBUG && itsIsForceSyncFailure;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import androidx.core.app.NotificationCompat;
import androidx.core.util.Pair;

import com.jefftharris.passwdsafe.lib.BuildConfig;
import com.jefftharris.passwdsafe.lib.GenericProviderNaming;
import com.jefftharris.passwdsafe.lib.PasswdSafeUtil;
import com.jefftharris.passwdsafe.lib.view.GuiUtils;
Expand Down Expand Up @@ -428,7 +427,7 @@ private void finish()
*/
private void addTrace(String trace)
{
if (!BuildConfig.DEBUG) {
if (!PasswdSafeUtil.DEBUG) {
return;
}

Expand Down

0 comments on commit ab927e1

Please sign in to comment.