If I recall correctly, the mutex protects the camera hardware context.
A malevolent application could start a picture snap and disconnect the
camera on another thread. Without the mutex to protect the camera
context, it could cause the media server to crash.

On Jan 9, 6:01 pm, Hank And <[email protected]> wrote:
> Hi,
>
> I seldom program multithreads. I am curious about why it needs a
> Mutex::Autolock to protect access to CameraService::Client::takePicture
> ()? We don't have multiple camera clients, right? Is it for preventing
> consecutively taking pictures?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to