From 1febe9ebe93d30a5b8e21e750738a2d0cc2a0d21 Mon Sep 17 00:00:00 2001 From: Greg Alexander Date: Tue, 16 Dec 2014 15:55:14 -0500 Subject: [PATCH] add service lifetime termination, and notes about future service foregrounding.. --- src/org/galexander/sshd/SimpleSSHDService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/galexander/sshd/SimpleSSHDService.java b/src/org/galexander/sshd/SimpleSSHDService.java index 1e1c238..3626427 100644 --- a/src/org/galexander/sshd/SimpleSSHDService.java +++ b/src/org/galexander/sshd/SimpleSSHDService.java @@ -25,12 +25,16 @@ public class SimpleSSHDService extends Service { if (activity != null) { activity.update_startstop(); } +/* XXX - maybe we should call startForeground(), but then we'd have to make a + * bogus notification... */ return START_STICKY; } else { stop_sshd(); if (activity != null) { activity.update_startstop(); } + stopSelf(); +/* XXX - need stopForeground() too ? */ return START_NOT_STICKY; } }