Skip to content

Commit f4c6953

Browse files
author
Lev Serebryakov
committed
Add setting to enable track splitting on power status change.
De-register options listeners on plugin unload.
1 parent 3da3648 commit f4c6953

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ public void stateChanged(Boolean change) {
141141
public void disable(OsmandApplication app) {
142142
super.disable(app);
143143
app.getNotificationHelper().refreshNotifications();
144+
settings.SAVE_GLOBAL_TRACK_TO_GPX.removeListener(powerChangeOptionListener);
145+
settings.POWERCHANGE_SPLIT_RECORDING.removeListener(powerChangeOptionListener);
144146
if (powerChangeReceiverRegistered.get()) {
145147
app.unregisterReceiver(powerChangeReceiver);
146148
powerChangeReceiverRegistered.set(false);

0 commit comments

Comments
 (0)