On Wed, Nov 18, 2009 at 8:27 AM, jotobjects <[email protected]> wrote:


> Don't you care just as much about Activities that have threads running
> the background?
>

No, the system can freely kill those processes when it needs memory.  Thus
this isn't the cause of the main problem, the overall system becoming slow
because too much stuff is trying to run.  If it is running it will be
consuming battery, and if this is not what you want you will see this in the
battery usage stats as your battery goes down, and thus know what app to
blame.  There also should be some improvements to the organization of these
settings (manage apps and battery use) to make it easier to discover and
deal with these apps.


> Are you saying that this UI allows the user to see AND force-kill
> processes and all their alarms and notifications (sorry I haven't
> looked at this 2.0 feature)?
>

I'm not sure which UI you are talking about.  The "force stop" button that
has been around since 1.5 does everything we have been talking about:
killing processes, unregistering alarms, etc.  The new running services UI
-only- stops a service, doesn't kill a process or anything else, because
that is all that is needed to free up that process to be available to the
system.


> A little doubt about all this - Why worry about Services that run in
> the background?  Yes it uses memory but the system can kill processes
> if it needs to obtain more memory (and Services should be coded to
> handle that when it happens).


By definition, a service running in the background does NOT want to be
killed, because this is telling the system that it is actively doing stuff.
 Thus if a lot of applications run services like this, we will run out of
memory to have any background processes (so each time you switch apps a new
process needs to be started), and eventually will start thrashing around in
the services processes that all need to be running but there is not enough
memory to do so.  Thus is the main failure case see in the "too many things
running causing the system to slow" situation that we are all trying to
address.


> If an App has alarms that cause it to
> restart then that is the business of the App and should be allowed.
>

Unless the user explicitly presses force stop to get the app to stop.
 Ultimately the user is in charge, not the app.  The problem with the task
killers is that they put the user in charge not realizing what they are
actually doing.


> If an App is badly written and does that too much the user can make a
> decision that they don't want the App. It seems like all this follows
> from the platform without any task killing facility being necessary.
> What am I missing?
>

Everything above.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Reply via email to