速狼加速器 v1.3.05版本的 MD5 值为:16b5e8af5c3774d85c1aa8bd4f624d0b
以下内容为反编译后的 UserInfo.java 源代码,内容仅作参考
package com.lzz.youtu.pojo;
import android.text.TextUtils;
import androidx.core.os.EnvironmentCompat;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.lzz.youtu.AppControl;
import com.lzz.youtu.CacheStruct.CustomerConfig;
import com.lzz.youtu.CacheStruct.VpnConfig;
import com.lzz.youtu.data.GsonUtil;
import com.lzz.youtu.data.LogUtils;
import com.lzz.youtu.network.LocalDataManager;
import com.lzz.youtu.pojo2.ReadJson;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
public class UserInfo {
private static UserInfo ourInstance = new UserInfo();
private String banner;
private String co_operation;
private int connect;
private String connectdata;
private String context;
private String country;
private String customer_service_config;
private String email;
private String feedback_titles;
private String home_page;
private String interval_get_node;
private String interval_get_node_load;
private String interval_get_node_pings;
private String interval_test_delay;
private String ip;
private String keepalive;
private long loginSuccessTime;
private List<Notice> notice;
private List<Online> online;
private String pass;
private String phone;
private List<ReadJson.PlanBean> plan;
private String points;
private String proxy_app_list;
private String ret;
private String share_url;
private int shared_count;
private String time;
private ArrayList<String> titleList = new ArrayList<>();
private int track_enable;
private String user_id;
private String user_type;
private String username;
private List<Version> version;
private int vipType;
private String vpn;
private VpnConfig vpnConfig;
private String vpn_config;
private String vpn_def_area;
public static UserInfo getInstance() {
return ourInstance;
}
private void initVipType(UserInfo userInfo) {
List<ReadJson.PlanBean> plan = userInfo.getPlan();
int i = 0;
if (plan != null) {
for (ReadJson.PlanBean planBean : plan) {
if (planBean.getType() > i) {
i = planBean.getType();
}
}
}
userInfo.setVipType(i);
}
private void init(UserInfo userInfo) {
userInfo.vpnConfig = new VpnConfig(userInfo.vpn);
String str = userInfo.customer_service_config;
if (str != null && !str.isEmpty()) {
CustomerConfig.stringToObject(userInfo.customer_service_config);
LocalDataManager.getInstance().setData(LocalDataManager.CacheKey.CUSTOMER_CONFIG, CustomerConfig.getInstance(), userInfo.customer_service_config);
}
initVipType(userInfo);
}
public void initUser(UserInfo userInfo) {
ourInstance = userInfo;
LogUtils.dLog(getClass().getName(), "[initUser]: [userInfo]:" + userInfo);
init(userInfo);
}
public boolean isLoginUser() {
return (AppControl.LoginMode.ValueOf(LocalDataManager.getInstance().getInt(LocalDataManager.CacheKey.LOGIN_MODE)) == AppControl.LoginMode.NO_LOGIN || TextUtils.isEmpty(getUsername()) || TextUtils.isEmpty(getPass()) || this.online != null) ? false : true;
}
public boolean isNormalUser() {
return getUser_type().equals("1");
}
public void cleanUser() {
if (ourInstance != null) {
ourInstance = null;
}
ourInstance = new UserInfo();
}
public enum VersionType {
UNKNOWN(EnvironmentCompat.MEDIA_UNKNOWN),
APK("apk"),
H5("H5Resource");
private String value;
VersionType(String str) {
this.value = str;
}
public String getValue() {
return this.value;
}
public static VersionType getVersionTypeByValue(String str) {
for (VersionType versionType : values()) {
if (versionType.getValue().equalsIgnoreCase(str)) {
return versionType;
}
}
return UNKNOWN;
}
}
public void setCo_operation(String str) {
this.co_operation = str;
}
public String getCo_operation() {
return this.co_operation;
}
public String getProxy_app_list() {
return this.proxy_app_list;
}
public void setProxy_app_list(String str) {
this.proxy_app_list = str;
}
public String getVpn_config() {
return this.vpn_config;
}
public void setVpn_config(String str) {
this.vpn_config = str;
}
public String getPoints() {
return this.points;
}
public void setPoints(String str) {
this.points = str;
}
public String getHome_page() {
return this.home_page;
}
public void setHome_page(String str) {
this.home_page = str;
}
public String getBanner() {
return this.banner;
}
public void setBanner(String str) {
this.banner = str;
}
public void setTrack_enable(int i) {
this.track_enable = i;
}
public int getTrack_enable() {
return this.track_enable;
}
public String getUser_id() {
return this.user_id;
}
public void setUser_id(String str) {
this.user_id = str;
}
public String getCustomer_service_config() {
return this.customer_service_config;
}
public void setCustomer_service_config(String str) {
this.customer_service_config = str;
}
public String getShare_url() {
return this.share_url;
}
public void setShare_url(String str) {
this.share_url = str;
}
public int getShared_count() {
return this.shared_count;
}
public void setShared_count(int i) {
this.shared_count = i;
}
public String getFeedback_titles() {
return this.feedback_titles;
}
public void setFeedback_titles(String str) {
this.feedback_titles = str;
}
public void setVpn_def_area(String str) {
this.vpn_def_area = str;
}
public String getVpn_def_area() {
return this.vpn_def_area;
}
public String getInterval_get_node() {
return this.interval_get_node;
}
public String getInterval_get_node_pings() {
return this.interval_get_node_pings;
}
public String getInterval_test_delay() {
return this.interval_test_delay;
}
public String getInterval_get_node_load() {
return this.interval_get_node_load;
}
public void setInterval_get_node_load(String str) {
this.interval_get_node_load = str;
}
public void setInterval_get_node(String str) {
this.interval_get_node = str;
}
public void setInterval_get_node_pings(String str) {
this.interval_get_node_pings = str;
}
public void setInterval_test_delay(String str) {
this.interval_test_delay = str;
}
public String getVpn() {
return this.vpn;
}
public void setVpn(String str) {
this.vpn = str;
if (str == null || str.isEmpty()) {
return;
}
this.vpnConfig = new VpnConfig(str);
}
public VpnConfig getVpnConfig() {
return this.vpnConfig;
}
public void setIp(String str) {
this.ip = str;
}
public String getIp() {
return this.ip;
}
public String getCountry() {
return this.country;
}
public void setCountry(String str) {
this.country = str;
}
public boolean checkNodePermissions(int i) {
return this.vipType >= i;
}
public boolean canAccess(int i) {
return i == 0 || (checkNodePermissions(i) && checkPlanTime());
}
public boolean checkPlanTime() {
if (this.plan != null) {
Date date = new Date();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Iterator<ReadJson.PlanBean> it2 = this.plan.iterator();
while (it2.hasNext()) {
try {
if (date.compareTo(simpleDateFormat.parse(it2.next().getEnd_time())) < 0) {
return true;
}
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
}
return false;
}
public int getVipType() {
return this.vipType;
}
public void setVipType(int i) {
this.vipType = i;
}
public long getLoginSuccessTime() {
return this.loginSuccessTime;
}
public void setLoginSuccessTime(long j) {
this.loginSuccessTime = j;
}
public ArrayList<String> getTitleList() {
return this.titleList;
}
private void setTitleList(ArrayList<String> arrayList) {
ourInstance.titleList.addAll(arrayList);
}
public String getUser_type() {
return this.user_type;
}
public void setUser_type(String str) {
this.user_type = str;
}
public int getConnect() {
return this.connect;
}
public void setConnect(int i) {
this.connect = i;
}
public String getConnectdata() {
return this.connectdata;
}
public void setConnectdata(String str) {
this.connectdata = str;
}
public String getContext() {
return this.context;
}
public void setContext(String str) {
this.context = str;
}
public String getKeepalive() {
return this.keepalive;
}
public void setKeepalive(String str) {
this.keepalive = str;
}
public String getPass() {
return this.pass;
}
public void setPass(String str) {
this.pass = str;
}
public String getRet() {
return this.ret;
}
public void setRet(String str) {
this.ret = str;
}
public String getTime() {
return this.time;
}
public void setTime(String str) {
this.time = str;
}
public String getUsername() {
return this.username;
}
public static boolean isNumeric(String str) {
return Pattern.compile("[0-9]*").matcher(str).matches();
}
public void setUsername(String str) {
this.username = str;
}
public List<ReadJson.PlanBean> getPlan() {
return this.plan;
}
public void addPlan(ReadJson.PlanBean planBean) {
boolean z;
if (this.plan == null) {
this.plan = new ArrayList();
}
Iterator<ReadJson.PlanBean> it2 = this.plan.iterator();
while (true) {
if (!it2.hasNext()) {
z = false;
break;
}
ReadJson.PlanBean next = it2.next();
if (next.getType() == planBean.getType()) {
z = true;
next.setEnd_time(planBean.getEnd_time());
break;
}
}
if (!z) {
this.plan.add(planBean);
}
initVipType(this);
}
public void setPlan(List<ReadJson.PlanBean> list) {
this.plan = list;
initVipType(this);
}
public List<Notice> getNotice() {
return this.notice;
}
public void setNotice(List<Notice> list) {
this.notice = list;
}
public List<Online> getOnline() {
return this.online;
}
public void setOnline(List<Online> list) {
this.online = list;
}
public List<Version> getVersion() {
return this.version;
}
public void setVersion(List<Version> list) {
this.version = list;
}
public static class Notice {
private String all_times;
private String begin_time;
private String content;
private String day_times;
private String end_time;
private String id;
private String lastTime;
private int nCount;
private String title;
private int todayCount;
private String type;
private String url;
public int getnCount() {
return this.nCount;
}
public void setnCount(int i) {
this.nCount = i;
}
public int getTodayCount() {
return this.todayCount;
}
public void setTodayCount(int i) {
this.todayCount = i;
}
public String getLastTime() {
return this.lastTime;
}
public void setLastTime(String str) {
this.lastTime = str;
}
public String getAll_times() {
return this.all_times;
}
public void setAll_times(String str) {
this.all_times = str;
}
public String getBegin_time() {
return this.begin_time;
}
public void setBegin_time(String str) {
this.begin_time = str;
}
public String getContent() {
return this.content;
}
public void setContent(String str) {
this.content = str;
}
public String getDay_times() {
return this.day_times;
}
public void setDay_times(String str) {
this.day_times = str;
}
public String getEnd_time() {
return this.end_time;
}
public void setEnd_time(String str) {
this.end_time = str;
}
public String getTitle() {
return this.title;
}
public void setTitle(String str) {
this.title = str;
}
public String getType() {
return this.type;
}
public void setType(String str) {
this.type = str;
}
public String getUrl() {
return this.url;
}
public void setUrl(String str) {
this.url = str;
}
public String getId() {
return this.id;
}
public void setId(String str) {
this.id = str;
}
public static List<Notice> stringToListObject(String str) {
if (str == null || str.isEmpty()) {
return null;
}
return (List) GsonUtil.getInstance().json2List(str, new TypeToken<List<Notice>>() {
}.getType());
}
public String toString() {
return "{nCount=" + this.nCount + ", todayCount=" + this.todayCount + ", lastTime='" + this.lastTime + "', all_times='" + this.all_times + "', begin_time='" + this.begin_time + "', content='" + this.content + "', day_times='" + this.day_times + "', end_time='" + this.end_time + "', title='" + this.title + "', type='" + this.type + "', url='" + this.url + "', id='" + this.id + "'}";
}
}
public static class Online {
private String mid;
private String name;
private String type;
public String getMid() {
return this.mid;
}
public void setMid(String str) {
this.mid = str;
}
public String getName() {
return this.name;
}
public void setName(String str) {
this.name = str;
}
public String getType() {
return this.type;
}
public void setType(String str) {
this.type = str;
}
}
public static class Version {
private String info;
private String name;
private String pack_size;
private String sha256;
private String type;
private String version;
private String version_old;
public String getName() {
return this.name;
}
public void setName(String str) {
this.name = str;
}
public String getVersionName() {
return this.name;
}
public String getSha256() {
return this.sha256;
}
public void setSha256(String str) {
this.sha256 = str;
}
public String getType() {
return this.type;
}
public void setType(String str) {
this.type = str;
}
public String getVersion() {
return this.version;
}
public void setVersion(String str) {
this.version = str;
}
public String getVersion_old() {
return this.version_old;
}
public void setVersion_old(String str) {
this.version_old = str;
}
public String getInfo() {
return this.info;
}
public void setInfo(String str) {
this.info = str;
}
public String getPack_size() {
return this.pack_size;
}
public void setPack_size(String str) {
this.pack_size = str;
}
}
public static class AdvertisementInfo {
private static String TAG = "AdvertisementInfo";
private static AdvertisementInfo instance;
@SerializedName("show_time")
@Expose
int adShowTime;
@SerializedName("skip_time")
@Expose
int adSkipTime;
@SerializedName("every_day")
@Expose
String days;
@SerializedName("end_time")
@Expose
String endTime;
@SerializedName("image_name")
@Expose
String imageURL;
@SerializedName("jump_url")
@Expose
String redirectURL;
@SerializedName("begin_time")
@Expose
String startTime;
public static AdvertisementInfo getInstance() {
return instance;
}
public AdvertisementInfo getTestingObject() {
this.days = "1,2,3,4";
this.startTime = "2019-10-10 00:00:00";
this.endTime = "2021-10-10 00:00:00";
this.adShowTime = 10;
this.adSkipTime = 3;
this.redirectURL = "https://www.google.com";
this.imageURL = "https://wallpapercave.com/wp/wp5893437.jpg";
return this;
}
public String getDays() {
return this.days;
}
public void setDays(String str) {
this.days = str;
}
public String getStartTime() {
return this.startTime;
}
public void setStartTime(String str) {
this.startTime = str;
}
public String getEndTime() {
return this.endTime;
}
public void setEndTime(String str) {
this.endTime = str;
}
public int getAdShowTime() {
return this.adShowTime;
}
public void setAdShowTime(int i) {
this.adShowTime = i;
}
public int getAdSkipTime() {
return this.adSkipTime;
}
public void setAdSkipTime(int i) {
this.adSkipTime = i;
}
public String getRedirectURL() {
return this.redirectURL;
}
public void setRedirectURL(String str) {
this.redirectURL = str;
}
public String getImageURL() {
return this.imageURL;
}
public void setImageURL(String str) {
this.imageURL = str;
}
public static AdvertisementInfo stringToObject(String str) {
if (str == null || str.isEmpty()) {
return null;
}
LogUtils.dLog(TAG, "[stringToObject]: [value]:" + str);
AdvertisementInfo advertisementInfo = (AdvertisementInfo) GsonUtil.getInstance().json2Bean(str, AdvertisementInfo.class);
instance = advertisementInfo;
return advertisementInfo;
}
}
public static UserInfo stringToObject(String str) {
if (str == null || str.isEmpty()) {
return null;
}
LogUtils.dLog("UserInfo", "[stringToObject]:" + str);
UserInfo userInfo = (UserInfo) GsonUtil.getInstance().json2Bean(str, UserInfo.class);
ourInstance = userInfo;
userInfo.init(userInfo);
return ourInstance;
}
public String toString() {
List<ReadJson.PlanBean> list = this.plan;
if (list != null && !list.isEmpty()) {
GsonUtil.getInstance().toJson(this.plan);
}
return "{connect=" + this.connect + ", connectdata='" + this.connectdata + "', context='" + this.context + "', keepalive='" + this.keepalive + "', pass='" + this.pass + "', plan='" + this.plan + "', title='" + this.titleList + "', ret=" + this.ret + ", time='" + this.time + "', username='" + this.username + "', version=" + this.version + ", vpn='" + this.vpn + "', user_type='" + this.user_type + "', country='" + this.country + "', interval_test_delay='" + this.interval_test_delay + "', interval_get_node='" + this.interval_get_node + "', interval_get_node_pings='" + this.interval_get_node_pings + "'}";
}
}