Code example for ConditionVariable

Methods: open

0
	 
	// callback from login checker, saves result and unlocks condition variable 
	protected void setLoginResult(Boolean result)
	{ 
		login_ok = result;
		condv.open();
	} 
	 
	// Verify that our credentials are correct by opening the API URL. If they are,  
	// we'll get 'auth:1' in the result. We also check for the min API version (3). 
	public Boolean verifyLogin()
	{ 
		login_ok = false;
		condv = new ConditionVariable();
 
		class ltask extends AsyncTask<Void, Void, Void>
		{ 
			protected Void doInBackground(Void... params)
			{ 
				setLoginResult(checkAuth()); 
				return null;