Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 593f1735 authored by wenbinw's avatar wenbinw Committed by Steve Kondik
Browse files

Camera: Fix camcorder crash during pause and resume

When camcorder is suspended in background, if it receives resume
and pause event in very short interval, crash will happen.
After receiving resume event, the onresume method will be called,
and it will start another thread for starting preview. And soon,
the main thread receives pause event, the onpause method which will
close camera is called.
There will be a racing between the main thread and start preview
thread. If close camera get done first, crash will be observed.
To avoid the racing, the close camera operation should wait for the
start preview operation, and the join method is used here for
synchronization.

CRs-Fixed: 526007
Change-Id: Idf6a8660378bf1a65af1f5194a35d30822f1dcf6
parent 2c0ca4de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment