mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Starkly reduce crashing
This commit is contained in:
committed by
Albert Vaca Cintora
parent
e77978d1d5
commit
ec638fdbec
@@ -401,6 +401,7 @@ public class MulticastLinkProvider extends BaseLinkProvider implements Multicast
|
||||
@Override
|
||||
public void onDiscoveryStopped(String serviceType) {
|
||||
Log.i(LOG_TAG, "Discovery stopped: " + serviceType);
|
||||
listening = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -448,8 +449,9 @@ public class MulticastLinkProvider extends BaseLinkProvider implements Multicast
|
||||
// This backend does not work on older Android versions
|
||||
return;
|
||||
}
|
||||
if (mNsdManager != null) {
|
||||
if (listening) {
|
||||
mNsdManager.unregisterService(mRegistrationListener);
|
||||
listening = false;
|
||||
}
|
||||
|
||||
if (NetworkHelper.isOnMobileNetwork(context)) {
|
||||
|
Reference in New Issue
Block a user