Code example for ConditionVariable

0
public class PreparePageFadeoutTexture implements OnGLIdleListener { 
    private static final long TIMEOUT = 200;
    public static final String KEY_FADE_TEXTURE = "fade_texture";
 
    private RawTexture mTexture;
    private ConditionVariable mResultReady = new ConditionVariable(false);
    private boolean mCancelled = false;
    private GLView mRootPane;
 
    public PreparePageFadeoutTexture(GLView rootPane) {
        int w = rootPane.getWidth();
        int h = rootPane.getHeight();
        if (w == 0 || h == 0) {
            mCancelled = true;
            return; 
        } 
        mTexture = new RawTexture(w, h, true);
        mRootPane =  rootPane;
    } 
 
    public boolean isCancelled() {