package com.ss.android.ugc.aweme.services;

import X.46i;
import X.Lnj;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.aweme.app.SharePrefCache;
import com.ss.android.ugc.aweme.framework.services.IUserService;
import com.ss.android.ugc.aweme.profile.model.User;

public class BaseUserService implements IUserService {
    static {
        Covode.recordClassIndex(105025);
    }

    public void clearUser() {
    }

    public void refreshUser() {
    }

    public boolean getAuthGoods() {
        return 46i.LJFF().getAuthGoods();
    }

    public User getCurrentUser() {
        return 46i.LJFF().getCurUser();
    }

    public String getCurrentUserID() {
        return 46i.LJFF().getCurUserId();
    }

    public boolean isLogin() {
        return 46i.LJFF().isLogin();
    }

    public void logout() {
        46i.LIZIZ().logout("expired_logout", "sdk_expired_logout");
    }

    public boolean isOldUser() {
        return ((Boolean) SharePrefCache.inst().getIsOldUser().LIZLLL()).booleanValue();
    }

    public boolean isUserEmpty(User user) {
        return 46i.LJFF().isUserEmpty(user);
    }

    public void setBroadcasterRoomId(long j) {
        46i.LJFF().getCurUser().setBroadcasterRoomId(j);
    }

    public void setIsOldUser(boolean z) {
        SharePrefCache.inst().getIsOldUser().LIZIZ(Boolean.valueOf(z));
    }

    public static IUserService createIUserServicebyMonsterPlugin(boolean z) {
        MethodCollector.i(506);
        IUserService iUserService = (IUserService) Lnj.LIZ(IUserService.class, z);
        if (iUserService != null) {
            MethodCollector.o(506);
            return iUserService;
        }
        Object LIZIZ = Lnj.LIZIZ(IUserService.class, z);
        if (LIZIZ != null) {
            IUserService iUserService2 = (IUserService) LIZIZ;
            MethodCollector.o(506);
            return iUserService2;
        }
        if (Lnj.al == null) {
            synchronized (IUserService.class) {
                try {
                    if (Lnj.al == null) {
                        Lnj.al = new BaseUserService();
                    }
                } catch (Throwable th) {
                    MethodCollector.o(506);
                    throw th;
                }
            }
        }
        BaseUserService baseUserService = (BaseUserService) Lnj.al;
        MethodCollector.o(506);
        return baseUserService;
    }

    public void logout(String str, String str2) {
        46i.LIZIZ().logout(str, str2);
    }
}
