Camera: Fix the crash which may occur when suspend resume key is pressed
continuously

If the suspend resume key is pressed in succession, the callbacks in
receiveRawPicture and receiveRawSnapshot may result in a crash. These
callbacks run in a child thread. Once the mMsgEbaled is checked in these
routines, they block on get picture ioctl. Meanwhile if the main thread
disables all callback messages on suspend request, when child thread executes,
callback results in a crash. So a check is added again before the callback
is being actually executed.

Change-Id: I4ef41ea6f30a570c96df9c605b6a2c84125efae7
1 file changed