use of com.codez.collar.worker.Worker in project Collar by CodeZsx.
the class UserManager method initUserInfo.
public void initUserInfo() {
Log.i(TAG, "initUserInfo");
if (worker == null) {
worker = new Worker();
worker.initilize(TAG + " work!");
}
HttpUtils.getInstance().getUserService().getUserInfo(AccessTokenKeeper.getInstance().getUid(), null).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<UserBean>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
Log.w(TAG, "onError:" + e.toString());
}
@Override
public void onNext(UserBean userBean) {
Log.i(TAG, "onNext");
userMe = userBean;
sendUpdateUserInfoEvent();
}
});
}