Code example for ConditionVariable

0
import com.android.gallery3d.common.ApiHelper; 
 
import java.io.IOException; 
 
public class CameraManager { 
    private static final String TAG = "CameraManager";
    private static CameraManager sCameraManager = new CameraManager();
 
    // Thread progress signals 
    private ConditionVariable mSig = new ConditionVariable();
 
    private Parameters mParameters;
    private IOException mReconnectException;
 
    private static final int RELEASE = 1;
    private static final int RECONNECT = 2;
    private static final int UNLOCK = 3;
    private static final int LOCK = 4;
    private static final int SET_PREVIEW_TEXTURE_ASYNC = 5;
    private static final int START_PREVIEW_ASYNC = 6;
    private static final int STOP_PREVIEW = 7;