Based on the blog post when the "task killing" of applications was 
introduced, I would say that restarting a service of a killed application 
(process) was an implementation bug.  It was clear from the blog post that 
when and end-user "task killed" an application then that application (and 
all components of it) should not run again until manually started.  

The clear intent was to give end-users control of "sticky" applications 
that would just not stop and allow them to be terminated.

On Thursday, December 12, 2013 9:20:34 PM UTC, 3c wrote:
>
> The swipe app out of recent tasks is supposed (as far as I understand it) 
> to terminate all activities but keep services running. This is true (and I 
> verified that behavior) until KitKat (verified on 4.4.1 and 4.4.2).
>
> In KitKat, the app is killed instantly:
> 12-12 22:04:47.386: I/ActivityManager(784): Killing 
> 16695:<package_name>/u0a80 (adj 16): remove task
>
> And will not run until the user manually starts the app again!
>
> Looking at the Android settings, Applications, Running tab shows the app 
> as running 0 processes and 1 service. However the service is completely 
> gone and no actual Linux process is running it. A "ps" clearly reveals it's 
> not running. Service is not even restarted!
>
> The onTaskRemoved() method is called as expected and then app is 
> permanently killed.
>
> On Android 4.3, the app process is killed (along with all background 
> services), however those services returning START_STICKY are restarted as 
> expected.
>
> Adding a notification icon using the foreground service flag does solves 
> this, however the UI memory is no longer claimed and it's not the behavior 
> that's being documented, is it?
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to