mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Skip onAvailable on Android O+
This commit is contained in:
parent
a80a8c66c7
commit
8852867f6e
1 changed files with 3 additions and 1 deletions
|
@ -2030,7 +2030,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|||
private final ConnectivityManager.NetworkCallback networkCallback = new ConnectivityManager.NetworkCallback() {
|
||||
@Override
|
||||
public void onAvailable(@NonNull Network network) {
|
||||
updateNetworkState(network, "available");
|
||||
// Android O+: this will always immediately be followed by a call to onCapabilitiesChanged/onLinkPropertiesChanged
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
|
||||
updateNetworkState(network, "available");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue