1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-16 03:59:03 +00:00

add service lifetime termination, and notes about future service foregrounding..

This commit is contained in:
Greg Alexander 2014-12-16 15:55:14 -05:00
parent a9ca75accc
commit 1febe9ebe9

View File

@ -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;
}
}