From 8b5d88d1c5e56d081bcb3ffc3f03fe958f38d23d Mon Sep 17 00:00:00 2001 From: akwizgran <akwizgran@users.sourceforge.net> Date: Wed, 5 Feb 2014 17:21:43 +0000 Subject: [PATCH] Remove message notifications when shutting down. --- briar-android/src/org/briarproject/android/BriarService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/briar-android/src/org/briarproject/android/BriarService.java b/briar-android/src/org/briarproject/android/BriarService.java index 96de8c0795..4e0f8ce8b5 100644 --- a/briar-android/src/org/briarproject/android/BriarService.java +++ b/briar-android/src/org/briarproject/android/BriarService.java @@ -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() { -- GitLab