Dianne, thanks.

We found this issue under OOM condition.

In OOM, android seems do following actions in order.
1) kill background service
2) call foreground activity OnLowMemory
3) GC

It looks strange that 2) is after 1).
If activity can know OOM before service gotten killed, there will be a
chance to release service's binding connection.
Since service will restart later, activity can rebind it in smooth way, not
killed by system



On Mon, Feb 23, 2009 at 4:49 PM, Dianne Hackborn <[email protected]>wrote:

> This has nothing to do with services.  If a process hosting a content
> provider goes away, any processes that are currently clients of that
> provider also are killed.
>
>
> On Mon, Feb 23, 2009 at 12:13 AM, Formosalf <[email protected]> wrote:
>
>> Hi all,
>>
>> I have a quick experiment about service and app.
>> Ap who bound the service will be killed by system if the service dies.
>>
>> Here is my experiment steps:
>> 1. start camera and taking a picture
>> 2. kill the android.process.media within adb shell.
>> 3. the camera will killed by system with following logcat.
>>
>>
>> I/ActivityManager(   60): Process android.process.media (pid 1968) has
>> died.
>> I/ActivityThread( 1942): Removing dead content provider: media
>> I/ActivityThread( 1962): Removing dead content provider: media
>> I/ActivityManager(   60): Killing app com.android.camera (pid 1942)
>> because provider com.android.providers.media.MediaProvider is in dying
>> process android.process.media
>> I/Process (   60): Sending signal. PID: 1942 SIG: 9
>> I/ActivityManager(   60): Killing app com.android.music (pid 1962) because
>> provider com.android.providers.media.MediaProvider is in dying process
>> android.process.media
>> I/Process (   60): Sending signal. PID: 1962 SIG: 9
>> D/Zygote  (   33): Process 1968 terminated by signal (15)
>>
>>
>> Following is my questions.
>> 1. is camera killed by ibinder?
>> 2. is there any way to handle the service died in java ap? because in low
>> memory condition, the service is easy to be killed. Since service will
>> restart later, maybe AP can just wait for these services restart instead of
>> killing by system. It seems easy to handle it in native with ibinder's
>> deadnotifier, but the whole story seems different in java layer.
>>
>> Thanks.
>>
>>
>>
>
>
> --
> 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.  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-framework" 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-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to