2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Add some logs to ConnectivityManager.NetworkCallback

This commit is contained in:
Albert Vaca Cintora
2023-09-07 09:14:38 +02:00
parent ce055818c9
commit 3fbef1da87

View File

@@ -131,11 +131,13 @@ public class BackgroundService extends Service {
cm.registerNetworkCallback(networkRequestBuilder.build(), new ConnectivityManager.NetworkCallback() {
@Override
public void onAvailable(Network network) {
Log.i("BackgroundService", "Valid network available");
connectedToNonCellularNetwork.postValue(true);
onNetworkChange(network);
}
@Override
public void onLost(Network network) {
Log.i("BackgroundService", "Valid network lost");
connectedToNonCellularNetwork.postValue(false);
}
});