1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-01 13:35:49 +01:00
This commit is contained in:
mamutcho 2019-12-23 11:22:11 +02:00
commit 8cc5ed04cd
2 changed files with 5 additions and 0 deletions

View File

@ -814,6 +814,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
}
if (mAutoConnectInvervalReceiver != null) {
unregisterReceiver(mAutoConnectInvervalReceiver);
mAutoConnectIntervalReceiver.destroy();
mAutoConnectInvervalReceiver = null;
}
}

View File

@ -103,4 +103,8 @@ public class AutoConnectIntervalReceiver extends BroadcastReceiver {
}
}
public void destroy() {
LocalBroadcastManager.getInstance(service).unregisterReceiver(this);
}
}