[GH-ISSUE #420] ConnectivityChangedReceiver will log misleading messages #296

Closed
opened 2026-02-28 01:24:02 +03:00 by kerem · 0 comments
Owner

Originally created by @alxndrsn on GitHub (Apr 8, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/420

Originally assigned to: @eyedol on GitHub.

The logging code in ConnectivityChangedReceiver.onReceive() will log misleading messages if SMSSync is disabled. The code effectively reads:

public void onReceive(Context context, Intent intent) {
    if (is_connected AND service_enabled) {
        ...
        return;
    }
    ...
    App.getAppComponent().fileManager()
            .appendAndClose(context.getString(R.string.no_data_connection));
}

On every connection change (connection lost, connection gained, connection changed (mobile vs wifi)), this will log no_data_connection if App.getAppComponent().prefsFactory().serviceEnabled().get() evaluates false.

Originally created by @alxndrsn on GitHub (Apr 8, 2016). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/420 Originally assigned to: @eyedol on GitHub. [The logging code in `ConnectivityChangedReceiver.onReceive()`](https://github.com/ushahidi/SMSSync/blob/83597cc3322051e60d339a43044ba634657fd445/smssync/src/main/java/org/addhen/smssync/presentation/receiver/ConnectivityChangedReceiver.java#L80) will log misleading messages if SMSSync is disabled. The code effectively reads: ``` java public void onReceive(Context context, Intent intent) { if (is_connected AND service_enabled) { ... return; } ... App.getAppComponent().fileManager() .appendAndClose(context.getString(R.string.no_data_connection)); } ``` On every connection change (connection lost, connection gained, connection changed (mobile vs wifi)), this will log `no_data_connection` if `App.getAppComponent().prefsFactory().serviceEnabled().get()` evaluates `false`.
kerem closed this issue 2026-02-28 01:24:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#296
No description provided.