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
Post a Comment