diff --git a/res/values/strings.xml b/res/values/strings.xml index 12baeeb47..c02cf391e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -35,8 +35,8 @@ Use system permissions to install, update, and remove packages Do not use system permissions to install, update, and remove packages Broadcast Local Repo - Advertize your local repo using Bonjour (mDNS) - Do not advertize your local repo. + Advertise your local repo using Bonjour (mDNS) + Do not advertise your local repo. Search Results App Details diff --git a/src/org/fdroid/fdroid/localrepo/LocalRepoService.java b/src/org/fdroid/fdroid/localrepo/LocalRepoService.java index 4ecc8e23e..18571c401 100644 --- a/src/org/fdroid/fdroid/localrepo/LocalRepoService.java +++ b/src/org/fdroid/fdroid/localrepo/LocalRepoService.java @@ -97,7 +97,8 @@ public class LocalRepoService extends Service { // launch LocalRepoActivity if the user selects this notification Intent intent = new Intent(this, LocalRepoActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); - PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, 0); + PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, + PendingIntent.FLAG_CANCEL_CURRENT); notification = new NotificationCompat.Builder(this) .setContentTitle(getText(R.string.local_repo_running)) .setContentText(getText(R.string.touch_to_configure_local_repo)) @@ -223,9 +224,10 @@ public class LocalRepoService extends Service { localRepoBonjourChangeListener = null; } if (jmdns != null) { - if (pairService != null) + if (pairService != null) { jmdns.unregisterService(pairService); - pairService = null; + pairService = null; + } jmdns.unregisterAllServices(); try { jmdns.close();