Watch service leaks

pull/207/head
M66B 3 years ago
parent 358bbaad84
commit 149539afec

@ -67,6 +67,7 @@ public class ServiceExternal extends Service {
Log.i("Service external destroy"); Log.i("Service external destroy");
stopForeground(true); stopForeground(true);
super.onDestroy(); super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
} }
@Override @Override

@ -142,4 +142,10 @@ public class ServicePowerControl extends ControlsProviderService {
.putExtra("tab", "misc"), .putExtra("tab", "misc"),
PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.FLAG_UPDATE_CURRENT);
} }
@Override
public void onDestroy() {
super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
}
} }

@ -190,6 +190,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
nm.cancel(NotificationHelper.NOTIFICATION_SEND); nm.cancel(NotificationHelper.NOTIFICATION_SEND);
super.onDestroy(); super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
} }
@Override @Override

@ -924,6 +924,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
nm.cancel(NotificationHelper.NOTIFICATION_SYNCHRONIZE); nm.cancel(NotificationHelper.NOTIFICATION_SYNCHRONIZE);
super.onDestroy(); super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
} }
@Override @Override

@ -28,4 +28,10 @@ public class ServiceTileClear extends TileService {
public void onClick() { public void onClick() {
startActivityAndCollapse(ActivityClear.getIntent(this)); startActivityAndCollapse(ActivityClear.getIntent(this));
} }
@Override
public void onDestroy() {
super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
}
} }

@ -84,4 +84,10 @@ public class ServiceTileSynchronize extends TileService implements SharedPrefere
boolean enabled = !prefs.getBoolean("enabled", true); boolean enabled = !prefs.getBoolean("enabled", true);
prefs.edit().putBoolean("enabled", enabled).apply(); prefs.edit().putBoolean("enabled", enabled).apply();
} }
@Override
public void onDestroy() {
super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
}
} }

@ -86,6 +86,7 @@ public class ServiceTileUnseen extends TileService {
public void onDestroy() { public void onDestroy() {
owner.destroy(); owner.destroy();
super.onDestroy(); super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
} }
public void onStartListening() { public void onStartListening() {

@ -77,6 +77,7 @@ public class ServiceUI extends IntentService {
public void onDestroy() { public void onDestroy() {
Log.i("Service UI destroy"); Log.i("Service UI destroy");
super.onDestroy(); super.onDestroy();
CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
} }
@Override @Override

Loading…
Cancel
Save