Allow disabling ABRP uploads independently

This commit is contained in:
TCFDONMEZ
2026-10-05 00:28:28 +03:00
parent dbbfb9f803
commit 90982580af
10 changed files with 88 additions and 11 deletions
@@ -50,8 +50,10 @@ public class BootReceiver extends BroadcastReceiver {
SharedPreferences secure = SecurePrefs.get(context);
boolean haveCreds = !secure.getString(SecurePrefs.KEY_TOKEN, "").trim().isEmpty()
&& !secure.getString(SecurePrefs.KEY_API_KEY, "").trim().isEmpty();
boolean uploadEnabled = prefs.getBoolean(UploadSettings.KEY_ABRP_UPLOAD_ENABLED,
UploadSettings.DEFAULT_ABRP_UPLOAD_ENABLED);
if (!enabled || !autostart || !haveCreds) {
if (!enabled || !autostart || (uploadEnabled && !haveCreds)) {
Log.i(TAG, action + " ignored (enabled=" + enabled
+ " autostart=" + autostart + " credentials=" + haveCreds + ")");
return;