Watch service leaks

This commit is contained in:
M66B 2022-05-02 10:15:29 +02:00
parent 358bbaad84
commit 149539afec
8 changed files with 23 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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