MCPcopy Create free account
hub / github.com/M66B/FairEmail / onDestroy

Method onDestroy

app/src/main/java/eu/faircode/email/ServiceSend.java:231–254  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 @Override
232 public void onDestroy() {
233 EntityLog.log(this, "Service send destroy");
234
235 PreferenceManager.getDefaultSharedPreferences(this).unregisterOnSharedPreferenceChangeListener(this);
236
237 unregisterReceiver(connectionChangedReceiver);
238
239 ConnectivityManager cm = Helper.getSystemService(this, ConnectivityManager.class);
240 cm.unregisterNetworkCallback(networkCallback);
241
242 getMainHandler().removeCallbacks(_checkConnectivity);
243
244 owner.stop();
245 handling.clear();
246
247 stopForeground(true);
248
249 NotificationManager nm = Helper.getSystemService(this, NotificationManager.class);
250 nm.cancel(NotificationHelper.NOTIFICATION_SEND);
251
252 super.onDestroy();
253 CoalMine.watch(this, this.getClass().getName() + "#onDestroy");
254 }
255
256 @Override
257 public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {

Callers

nothing calls this directly

Calls 8

logMethod · 0.95
getSystemServiceMethod · 0.95
watchMethod · 0.95
getNameMethod · 0.65
getMainHandlerMethod · 0.45
stopMethod · 0.45
clearMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected