mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 03:07:32 +01:00
cleanup autoconnectintervalreceiver when unregistering
This commit is contained in:
parent
09632afb78
commit
6f91e6053e
@ -814,6 +814,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
}
|
||||
if (mAutoConnectInvervalReceiver != null) {
|
||||
unregisterReceiver(mAutoConnectInvervalReceiver);
|
||||
mAutoConnectIntervalReceiver.destroy();
|
||||
mAutoConnectInvervalReceiver = null;
|
||||
}
|
||||
}
|
||||
|
@ -103,4 +103,8 @@ public class AutoConnectIntervalReceiver extends BroadcastReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
LocalBroadcastManager.getInstance(service).unregisterReceiver(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user