use of org.geometerplus.fbreader.network.authentication.litres.LitResAuthenticationManager in project FBReaderJ by geometer.
the class ListenerCallback method onReceive.
@Override
public void onReceive(Context context, final Intent intent) {
final NetworkLibrary library = Util.networkLibrary(context);
if (Util.SIGNIN_ACTION.equals(intent.getAction())) {
final String url = intent.getStringExtra(CATALOG_URL);
final INetworkLink link = library.getLinkByUrl(url);
if (link != null) {
final NetworkAuthenticationManager mgr = link.authenticationManager();
if (mgr instanceof LitResAuthenticationManager) {
new Thread(new Runnable() {
public void run() {
try {
processSignup((LitResAuthenticationManager) mgr, intent);
} catch (ZLNetworkException e) {
e.printStackTrace();
}
}
}).start();
}
}
} else {
library.fireModelChangedEvent(NetworkLibrary.ChangeListener.Code.SomeCode);
}
}
Aggregations