android - What is this piece of code doing? -


i got https://developers.facebook.com/docs/android/login-with-facebook/v2.1

basically relates login process

private void onclicklogin() {     session session = session.getactivesession();     if (!session.isopened() && !session.isclosed()) {         session.openforread(new session.openrequest(this)         .setpermissions(arrays.aslist("public_profile"))         .setcallback(statuscallback));     } else {         session.openactivesession(getactivity(), this, true, statuscallback);     } } 

why facebook check if session not opened(closed assuming) , session not closed(assuming open then)?

won't conditional statement evaluate false?

if examine source, you'll notice isopened() , isclosed() not logical complements of each other 2 distinct state enumeration values session can in.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -