mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-06 10:17:04 +01:00
[Bangle.js] check if globalUartReceiver is set and move its removal to separate method
This commit is contained in:
parent
2e06d7afa5
commit
56ec206f5b
@ -182,10 +182,17 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
GBApplication.getContext().unregisterReceiver(globalUartReceiver); // remove uart.tx intent listener
|
stopGlobalUartReceiver();
|
||||||
stopLocationUpdate();
|
stopLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void stopGlobalUartReceiver(){
|
||||||
|
if(globalUartReceiver != null){
|
||||||
|
GBApplication.getContext().unregisterReceiver(globalUartReceiver); // remove uart.tx intent listener
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void stopLocationUpdate() {
|
private void stopLocationUpdate() {
|
||||||
GBLocationManager.stop(getContext(), this, null);
|
GBLocationManager.stop(getContext(), this, null);
|
||||||
gpsUpdateSetup = false;
|
gpsUpdateSetup = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user