Remove message notifications when shutting down.

This commit is contained in:
akwizgran
2014-02-05 17:21:43 +00:00
parent f17a760805
commit 8b5d88d1c5

View File

@@ -136,6 +136,10 @@ public class BriarService extends RoboService implements EventListener {
public void onDestroy() {
super.onDestroy();
if(LOG.isLoggable(INFO)) LOG.info("Destroyed");
Object o = getSystemService(NOTIFICATION_SERVICE);
NotificationManager nm = (NotificationManager) o;
nm.cancel(PRIVATE_MESSAGE_NOTIFICATION_ID);
nm.cancel(GROUP_POST_NOTIFICATION_ID);
stopForeground(true);
// Stop the services in a background thread
new Thread() {