导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - r0.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 r0.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.showself.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import chat.entity.NotificationNumber;
import com.enmoli.core.util.JsonUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.mobile.auth.gatewayauth.Constant;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.Md5Info;
import com.showself.domain.SystemInfo;
import com.showself.domain.UserAccountInfo;
import com.showself.resource.DefaultResourceProvider;
import com.showself.resource.ResourceManager;
import com.showself.ui.ShowSelfApp;
import com.tencent.connect.common.Constants;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class r0 {
    private static LoginResultInfo a;

    static class a extends TypeToken<List<UserAccountInfo>> {
        a() {
        }
    }

    public static int A() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("man_song_progress", 0).getInt("man_song_progress", 5);
    }

    public static void A0(String str) {
        LoginResultInfo y = y(ShowSelfApp.f());
        String str2 = "notifications";
        if (y != null) {
            str2 = y.getUserId() + "notifications";
        }
        SharedPreferences.Editor edit = ShowSelfApp.f().getApplicationContext().getSharedPreferences(str2, 0).edit();
        edit.putString("h5_notifications", str);
        edit.commit();
    }

    public static int B() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("man_voice_progress", 0).getInt("man_voice_progress", 5);
    }

    public static void B0(JSONArray jSONArray) {
        if (jSONArray != null) {
            SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).edit();
            edit.putString("picshare", jSONArray.toString());
            edit.commit();
        }
    }

    public static Md5Info C(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("md5_info", 0);
        Md5Info md5Info = new Md5Info();
        md5Info.setCheckResult(sharedPreferences.getBoolean("md5ChecktResult", true));
        md5Info.setCustomUrl(sharedPreferences.getString("md5Url", null));
        md5Info.setMsg(sharedPreferences.getString("md5Msg", null));
        return md5Info;
    }

    public static void C0(int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("music_status", 0).edit();
        edit.putInt("music_status", i2);
        edit.commit();
    }

    public static boolean D(int i2) {
        return ShowSelfApp.h().getSharedPreferences("settingfragment", 0).getBoolean("msg_notification_state_" + i2, true);
    }

    public static void D0(String str, Context context) {
        SharedPreferences.Editor edit = context.getSharedPreferences("system_info", 0).edit();
        edit.putString("play_url", str);
        edit.commit();
    }

    public static boolean E(int i2) {
        SharedPreferences sharedPreferences = ShowSelfApp.h().getSharedPreferences("settingfragment", 0);
        StringBuilder sb = new StringBuilder();
        sb.append("msgstate_");
        sb.append(i2);
        return sharedPreferences.getInt(sb.toString(), 0) == 1;
    }

    public static void E0(int i2, Context context) {
        SharedPreferences.Editor edit = context.getSharedPreferences("system_info", 0).edit();
        edit.putInt("play_uid", i2);
        edit.commit();
    }

    public static String F() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).getString("mylive", null);
    }

    public static void F0(Boolean bool) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("PrivacyInfo", 0).edit();
        edit.putBoolean("privacy_status", bool.booleanValue());
        edit.commit();
    }

    public static String G() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).getString("mywatch", null);
    }

    public static void G0(com.m.a.d.a aVar) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("prop_data", 0).edit();
        String str = "";
        edit.putString("prop_url", (aVar == null || aVar.c() == 0) ? "" : aVar.a()[0]);
        if (aVar != null && aVar.c() != 0) {
            str = aVar.b()[0];
        }
        edit.putString("prop_download_url", str);
        edit.commit();
    }

    public static long H() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("luckuser_info", 0).getLong("NearByDate", 0L);
    }

    public static void H0(int i2, int i3) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("public_msg_size", 0).edit();
        edit.putInt("public_msg_size_" + i2, i3);
        edit.commit();
    }

    public static long I(int i2) {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("luckuser_info", 0).getLong(i2 + "#notifi_time", 0L);
    }

    public static void I0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("help", 0).edit();
        edit.putBoolean("room_play_gift_help", z);
        edit.commit();
    }

    public static String J() {
        LoginResultInfo y = y(ShowSelfApp.f());
        String str = "notifications";
        if (y != null) {
            str = y.getUserId() + "notifications";
        }
        return ShowSelfApp.f().getApplicationContext().getSharedPreferences(str, 0).getString("h5_notifications", "");
    }

    public static void J0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("help", 0).edit();
        edit.putBoolean("room_play_help", z);
        edit.commit();
    }

    public static boolean K() {
        return ShowSelfApp.h().getSharedPreferences("rule_check_status", 0).getBoolean("onekey_rule_check_status", false);
    }

    public static void K0(List<String> list) {
        SharedPreferences sharedPreferences = ShowSelfApp.h().getApplicationContext().getSharedPreferences("SearchHistory", 0);
        JSONArray jSONArray = new JSONArray();
        if (list != null && list.size() > 0) {
            for (String str : list) {
                try {
                    JSONObject jSONObject = new JSONObject();
                    jSONObject.put("text", str);
                    jSONArray.put(jSONObject);
                } catch (JSONException e2) {
                    e2.printStackTrace();
                }
            }
        }
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putString("data", jSONArray.toString());
        edit.commit();
    }

    public static String L() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).getString("picshare", null);
    }

    public static void L0(Context context, String str) {
        SharedPreferences.Editor edit = context.getSharedPreferences("mifeng_search_switch", 0).edit();
        edit.putString("search_switch", str);
        edit.commit();
    }

    public static int M() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("music_status", 0).getInt("music_status", 1);
    }

    public static void M0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("msg_is_show_permissions", 0).edit();
        edit.putBoolean("msg_is_show_permissions", z);
        edit.commit();
    }

    public static boolean N() {
        return ShowSelfApp.h().getSharedPreferences("PrivacyInfo", 0).getBoolean("privacy_status", false);
    }

    public static void N0(int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("show_res", 0).edit();
        edit.putInt("res_ver", i2);
        edit.commit();
    }

    public static String O() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("prop_data", 0).getString("prop_url", "");
    }

    public static void O0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("msg_is_show_rule", 0).edit();
        edit.putBoolean("msg_is_show_rule", z);
        edit.commit();
    }

    public static int P(int i2) {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("public_msg_size", 0).getInt("public_msg_size_" + i2, 0);
    }

    public static void P0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("deviceId_update", 0).edit();
        edit.putBoolean("shumei", z);
        edit.commit();
    }

    public static boolean Q() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("help", 0).getBoolean("room_play_gift_help", true);
    }

    public static void Q0(ArrayList<d.a.a.a.d> arrayList) {
        JSONArray jSONArray = new JSONArray();
        for (int i2 = 0; i2 < arrayList.size(); i2++) {
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("songId", arrayList.get(i2).a);
                jSONObject.put("singer", arrayList.get(i2).b);
                jSONObject.put(Constant.PROTOCOL_WEBVIEW_NAME, arrayList.get(i2).c);
                jSONArray.put(jSONObject);
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
        }
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("song", 0).edit();
        edit.putString("song", jSONArray.toString());
        edit.commit();
    }

    public static boolean R() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("help", 0).getBoolean("room_play_help", true);
    }

    public static void R0(String str) {
        SharedPreferences.Editor edit = ShowSelfApp.f().getSharedPreferences("sp_device_id", 0).edit();
        edit.putString("sp_device_id", str);
        edit.commit();
    }

    public static int S(Context context, int i2) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("roomposterstate", 0);
        String str = Utils.O(context).versionName;
        if (!str.equals(sharedPreferences.getString("versionName", null))) {
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.putString("versionName", str);
            edit.putInt("poster_" + i2, 1);
            edit.commit();
        }
        return sharedPreferences.getInt("poster_" + i2, 1);
    }

    public static void S0(String str, String str2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("super_fly_msg", 0).edit();
        edit.putString(str, str2);
        edit.commit();
    }

    public static List<String> T() {
        ArrayList arrayList = new ArrayList();
        try {
            JSONArray jSONArray = new JSONArray(ShowSelfApp.h().getApplicationContext().getSharedPreferences("SearchHistory", 0).getString("data", ""));
            if (jSONArray.length() > 0) {
                for (int i2 = 0; i2 < jSONArray.length(); i2++) {
                    arrayList.add(jSONArray.optJSONObject(i2).optString("text"));
                }
            }
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
        return arrayList;
    }

    public static void T0(long j2) {
        SharedPreferences sharedPreferences = ShowSelfApp.h().getSharedPreferences("daily_downloads", 0);
        String e2 = q.e();
        long j3 = sharedPreferences.getLong(e2, 0L);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putLong(e2, j3 + j2);
        edit.apply();
    }

    public static boolean U() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("msg_is_show_permissions", 0).getBoolean("msg_is_show_permissions", false);
    }

    public static void U0(int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("imUnReadNum", 0).edit();
        edit.putInt("imUnReadNum", i2);
        edit.commit();
    }

    public static boolean V() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("msg_is_show_rule", 0).getBoolean("msg_is_show_rule", true);
    }

    public static void V0(int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("cardswitch", 0).edit();
        edit.putInt("switch", i2);
        edit.commit();
    }

    public static boolean W(Context context, String str) {
        return context.getSharedPreferences("lehai_other_switch", 0).getBoolean(str, false);
    }

    public static void W0(Context context, boolean z) {
        SharedPreferences.Editor edit = context.getSharedPreferences("settingfragment", 0).edit();
        edit.putBoolean("chatlimitstate", z);
        edit.commit();
    }

    public static boolean X() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("deviceId_update", 0).getBoolean("shumei", false);
    }

    public static void X0(boolean z, int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("settingfragment", 0).edit();
        edit.putBoolean("msg_notification_state_" + i2, z);
        edit.commit();
    }

    public static String Y() {
        return ShowSelfApp.f().getSharedPreferences("sp_device_id", 0).getString("sp_device_id", null);
    }

    public static void Y0(int i2, int i3) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("settingfragment", 0).edit();
        edit.putInt("msgstate_" + i3, i2);
        edit.commit();
    }

    public static String Z() {
        return ShowSelfApp.f().getSharedPreferences("sp_device_id", 0).getString("sp_uuid", null);
    }

    public static void Z0(boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("rule_check_status", 0).edit();
        edit.putBoolean("onekey_rule_check_status", z);
        edit.commit();
    }

    public static void a(Context context, String str) {
        SharedPreferences.Editor edit = context.getSharedPreferences("md5_info", 0).edit();
        edit.putString("md5", str);
        edit.commit();
    }

    public static String a0(String str) {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("super_fly_msg", 0).getString(str, "");
    }

    public static void a1(Context context, int i2, int i3) {
        SharedPreferences.Editor edit = context.getSharedPreferences("roomposterstate", 0).edit();
        edit.putInt("poster_" + i2, i3);
        edit.commit();
    }

    public static void b(Context context, LoginResultInfo loginResultInfo) {
        a = loginResultInfo;
        com.sjnet.b.h().o(loginResultInfo.getSessionId());
        SharedPreferences.Editor edit = context.getSharedPreferences(Constants.LOGIN_INFO, 0).edit();
        edit.putString("sessionId", a.getSessionId());
        edit.putString("userName", a.getUserName());
        edit.putInt("gender", a.getGender());
        edit.putInt("userId", a.getUserId());
        edit.putInt("showid", a.getShowid());
        edit.putString("email", a.getEmail());
        edit.putString("avatar", a.getAvatar());
        edit.putInt("photoNum", a.getPhotoNum());
        edit.putString("mobile", a.getMobile());
        edit.putString("accountString", a.getAccountString());
        edit.putInt("emailstatus", a.getEmailstatus());
        edit.putInt("mobilestatus", a.getMobilestatus());
        edit.putInt("notificationInterval", a.getNotificationInterval());
        edit.putInt("skyVersion", a.getSkyVersion());
        edit.putString("skey", a.getSkey());
        edit.putString("appVersion", a.getAppVersion());
        edit.putInt("alterpwd", a.getAlterpwd());
        edit.putString("appUrl", a.getAppUrl());
        edit.putInt("xmppPort", a.getXmppPort());
        edit.putString("xmppServer", a.getXmppServer());
        edit.putInt("client_timeout", a.getClient_timeout());
        edit.putInt("client_retry_times", a.getClient_retry_times());
        edit.putString("sinaWeiboId", a.getSinaWeiboId());
        edit.putString("wxOpenId", a.getWxOpenId());
        edit.putString("qqOpenId", a.getQqOpenId());
        edit.putString("renrenId", a.getRenrenId());
        edit.putInt("loginType", a.getLoginType());
        edit.putString("accessToken", a.getAccessToken());
        edit.putInt("partner", a.getPartner());
        edit.putInt("discover_index", a.discover_index);
        edit.putInt("homepage_index", a.homepage_index);
        edit.putInt("liveshow_index", a.liveshow_index);
        edit.putInt("messagebox_index", a.messagebox_index);
        edit.putString("intro", a.getIntro());
        edit.putInt("taskDef", a.getTaskDef());
        edit.putInt("pop_senconds", a.pop_senconds);
        edit.putInt("pop_times", a.pop_times);
        edit.putString("annoucement", a.annoucement);
        edit.putInt("priv_letter_upload_switch", a.getPriv_letter_upload_switch());
        edit.putInt("shall_public_talk_node", a.getShall_public_talk_node());
        edit.putLong("cr_hours", a.getCr_hours());
        edit.putInt("customer_level", a.getCustomerLevel());
        edit.putString("audience_pay_qq", a.getAudience_pay_qq());
        edit.putString("discover_pay_qq", a.getDiscover_pay_qq());
        edit.putInt("spvswitch", a.getSpvswitch());
        edit.putInt("credit_level", a.getCredit_level());
        edit.putBoolean("whiteUser", a.isWhiteUser());
        edit.commit();
    }

    public static SystemInfo b0(Context context) {
        SystemInfo shareSystem = SystemInfo.getShareSystem();
        SharedPreferences sharedPreferences = context.getSharedPreferences("system_info", 0);
        shareSystem.setsKeyString(sharedPreferences.getString("sKeyString", "aaaaaaaaaaaaaaaa"));
        shareSystem.setsKeyVersion(sharedPreferences.getInt("sKeyVersion", 5));
        shareSystem.setDefaultTimeOutSeconds(sharedPreferences.getInt("defaultTimeOutSeconds", 15));
        shareSystem.setRepeatRequestCount(sharedPreferences.getInt("repeatRequestCount", 1));
        return shareSystem;
    }

    public static void b1(Context context, int i2, String str) {
        boolean z;
        List<UserAccountInfo> w = w(context);
        if (w == null || w.size() <= 0) {
            return;
        }
        int i3 = 0;
        while (true) {
            if (i3 >= w.size()) {
                break;
            }
            if (i2 != w.get(i3).getUid()) {
                i3++;
            } else if (!w.get(i3).getPassword().equals(str)) {
                w.get(i3).setPassword(str);
                z = true;
            }
        }
        z = false;
        if (z) {
            SharedPreferences.Editor edit = context.getSharedPreferences("login_account_list", 0).edit();
            edit.putString("account_list", new Gson().toJson(w));
            edit.commit();
        }
    }

    public static void c(Context context, Md5Info md5Info) {
        SharedPreferences.Editor edit = context.getSharedPreferences("md5_info", 0).edit();
        edit.putBoolean("md5ChecktResult", md5Info.check_result);
        edit.putString("md5Msg", md5Info.msg);
        edit.putString("md5Url", md5Info.custom_url);
        edit.commit();
    }

    public static long c0() {
        return ShowSelfApp.h().getSharedPreferences("daily_downloads", 0).getLong(q.e(), 0L);
    }

    public static void c1(android.content.Context r4, int r5, java.lang.String r6, java.lang.String r7, java.lang.String r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.showself.utils.r0.c1(android.content.Context, int, java.lang.String, java.lang.String, java.lang.String):void");
    }

    public static void d(Context context, String str) {
        SharedPreferences.Editor edit = context.getSharedPreferences("lehai_other_switch", 0).edit();
        edit.putBoolean("reg_switch", false);
        edit.putBoolean("mission_switch", false);
        edit.putBoolean("song_switch", false);
        edit.putBoolean("goldingot_switch", false);
        if (!TextUtils.isEmpty(str)) {
            String[] split = str.split(com.xiaomi.mipush.sdk.Constants.ACCEPT_TIME_SEPARATOR_SP);
            for (int i2 = 0; i2 < split.length; i2++) {
                if (split[i2].equals("1")) {
                    edit.putBoolean("reg_switch", true);
                } else if (split[i2].equals("2")) {
                    edit.putBoolean("mission_switch", true);
                } else if (split[i2].equals("3")) {
                    edit.putBoolean("song_switch", true);
                } else if (split[i2].equals("4")) {
                    edit.putBoolean("goldingot_switch", true);
                } else if (split[i2].equals("5311")) {
                    edit.putBoolean("customer_service_switch", true);
                }
            }
        }
        edit.commit();
    }

    public static int d0() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("imUnReadNum", 0).getInt("imUnReadNum", 0);
    }

    public static void e(Context context, SystemInfo systemInfo) {
        SharedPreferences.Editor edit = context.getSharedPreferences("system_info", 0).edit();
        edit.putString("sKeyString", systemInfo.getsKeyString());
        edit.putInt("sKeyVersion", systemInfo.getsKeyVersion());
        edit.putInt("defaultTimeOutSeconds", systemInfo.getDefaultTimeOutSeconds());
        edit.putInt("repeatRequestCount", systemInfo.getRepeatRequestCount());
        edit.commit();
    }

    public static int e0() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("cardswitch", 0).getInt("switch", 0);
    }

    public static void f() {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("Cocos2dxPrefsFile", 0).edit();
        edit.clear();
        edit.apply();
    }

    public static boolean f0(int i2) {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("show_res", 0).getBoolean("isShowAlert" + i2, true);
    }

    public static void g() {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("SearchHistory", 0).edit();
        edit.putString("data", null);
        edit.commit();
    }

    public static void g0(Context context, String str) {
        SharedPreferences.Editor edit = context.getSharedPreferences("ad_path", 0).edit();
        edit.putString("ad_path", str);
        edit.commit();
    }

    public static void h(Context context) {
        context.getSharedPreferences(Constants.LOGIN_INFO, 0).edit().clear().commit();
        File file = new File("/data/data/" + context.getPackageName().toString() + "/shared_prefs", "login_info.xml");
        if (file.exists()) {
            file.delete();
        }
    }

    public static void h0(Boolean bool) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("PrivacyInfo", 0).edit();
        edit.putBoolean("agreement_status", bool.booleanValue());
        edit.commit();
    }

    public static void i(Context context, int i2) {
        List<UserAccountInfo> w = w(context);
        if (w == null || w.size() <= 0) {
            return;
        }
        int i3 = 0;
        while (true) {
            if (i3 >= w.size()) {
                i3 = -1;
                break;
            } else if (i2 == w.get(i3).getUid()) {
                break;
            } else {
                i3++;
            }
        }
        if (i3 != -1) {
            w.remove(i3);
            SharedPreferences.Editor edit = context.getSharedPreferences("login_account_list", 0).edit();
            edit.putString("account_list", new Gson().toJson(w));
            edit.commit();
        }
    }

    public static void i0(String str, String str2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("Cocos2dxPrefsFile", 0).edit();
        edit.putString(str, str2);
        edit.apply();
    }

    public static String j(Context context) {
        return context.getSharedPreferences("ad_path", 0).getString("ad_path", "");
    }

    public static void j0(String str) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("switchNum", 0).edit();
        edit.putString("switchNum", str);
        edit.commit();
    }

    public static boolean k() {
        return ShowSelfApp.h().getSharedPreferences("PrivacyInfo", 0).getBoolean("agreement_status", false);
    }

    public static void k0(String str, Context context) {
        SharedPreferences.Editor edit = context.getSharedPreferences("web_address", 0).edit();
        edit.putString("web_address", str);
        edit.commit();
    }

    public static Map<String, ?> l() {
        return ShowSelfApp.h().getSharedPreferences("Cocos2dxPrefsFile", 0).getAll();
    }

    public static void l0(int i2, Context context) {
        SharedPreferences.Editor edit = context.getSharedPreferences(Constants.LOGIN_INFO, 0).edit();
        edit.putInt("isHideGame", i2);
        edit.commit();
    }

    public static boolean m(Context context) {
        return context.getSharedPreferences("settingfragment", 0).getBoolean("chatlimitstate", false);
    }

    public static void m0(int i2, boolean z) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("msg_read_first", 0).edit();
        edit.putBoolean("msg_read_first" + i2, z);
        edit.commit();
    }

    public static JSONObject n(int i2) {
        List<Map<String, Object>> list;
        Map<String, List<Map<String, Object>>> dataLists = DefaultResourceProvider.getInstance().getResourceMap().getDataLists();
        if (dataLists != null && (list = dataLists.get(ResourceManager.GAME_RESOURCES)) != null) {
            try {
                JSONArray jSONArray = new JSONArray(JsonUtil.toJson(list));
                for (int i3 = 0; i3 < jSONArray.length(); i3++) {
                    JSONObject jSONObject = jSONArray.getJSONObject(i3);
                    if (i2 == jSONObject.optInt("code")) {
                        return jSONObject;
                    }
                }
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
        }
        return new JSONObject();
    }

    public static void n0(long j2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("LastUploadLogTime", 0).edit();
        edit.putLong("", j2);
        edit.commit();
    }

    public static String o(Context context) {
        return context.getSharedPreferences("web_address", 0).getString("web_address", "");
    }

    public static void o0() {
        SharedPreferences sharedPreferences = ShowSelfApp.h().getApplicationContext().getSharedPreferences("left_slide", 0);
        String str = Utils.O(ShowSelfApp.h()).versionName;
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putBoolean("state", false);
        edit.putString("versionName", str);
        edit.commit();
    }

    public static long p() {
        return ShowSelfApp.h().getSharedPreferences("LastUploadLogTime", 0).getLong("", 0L);
    }

    public static void p0(JSONArray jSONArray) {
        if (jSONArray != null) {
            SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).edit();
            edit.putString("liveend", jSONArray.toString());
            edit.commit();
        }
    }

    public static boolean q() {
        SharedPreferences sharedPreferences = ShowSelfApp.h().getApplicationContext().getSharedPreferences("left_slide", 0);
        String str = Utils.O(ShowSelfApp.h()).versionName;
        return sharedPreferences.getBoolean("state", true) || !str.equals(sharedPreferences.getString("versionName", str));
    }

    public static void q0(boolean z) {
        SharedPreferences.Editor edit = d.c.a.n().h().getSharedPreferences("sp_gift_tab", 0).edit();
        edit.putBoolean("is_send_packet_gift_live", z);
        edit.commit();
    }

    public static String r() {
        return ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).getString("liveend", null);
    }

    public static void r0(String str) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("sp_gift_tab", 0).edit();
        edit.putString("sp_gift_tab_live", str);
        edit.commit();
    }

    public static boolean s() {
        return d.c.a.n().h().getSharedPreferences("sp_gift_tab", 0).getBoolean("is_send_packet_gift_live", false);
    }

    public static void s0(String str) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("logName", 0).edit();
        edit.putString("logName", str);
        edit.commit();
    }

    public static String t() {
        return ShowSelfApp.h().getSharedPreferences("sp_gift_tab", 0).getString("sp_gift_tab_live", null);
    }

    public static void t0(Context context, UserAccountInfo userAccountInfo) {
        List<UserAccountInfo> w = w(context);
        if (w == null || w.size() <= 0) {
            w.add(userAccountInfo);
        } else {
            int i2 = -1;
            for (int i3 = 0; i3 < w.size(); i3++) {
                if (w.get(i3).getUid() == userAccountInfo.getUid()) {
                    i2 = i3;
                }
            }
            if (i2 != -1) {
                w.remove(i2);
                w.add(i2, userAccountInfo);
            } else {
                if (w.size() >= 10) {
                    w.remove(0);
                }
                w.add(userAccountInfo);
            }
        }
        SharedPreferences.Editor edit = context.getSharedPreferences("login_account_list", 0).edit();
        edit.putString("account_list", new Gson().toJson(w));
        edit.commit();
    }

    public static String u(Context context) {
        return context.getSharedPreferences("md5_info", 0).getString("md5", null);
    }

    public static void u0(int i2, int i3) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("luckuser_info", 0).edit();
        NotificationNumber.getShareNotificationNum().setLuckNum(i3);
        edit.putInt(i2 + "#luck_num", i3);
        edit.commit();
    }

    public static String v() {
        return ShowSelfApp.h().getSharedPreferences("logName", 0).getString("logName", "");
    }

    public static void v0(int i2, int i3) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getSharedPreferences("mallUpdate", 0).edit();
        edit.putInt("mallUpdate_" + i2, i3);
        edit.commit();
    }

    public static List<UserAccountInfo> w(Context context) {
        String string = context.getSharedPreferences("login_account_list", 0).getString("account_list", "");
        return !TextUtils.isEmpty(string) ? (List) new Gson().fromJson(string, new a().getType()) : new ArrayList();
    }

    public static void w0(JSONArray jSONArray) {
        if (jSONArray != null) {
            SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).edit();
            edit.putString("mylive", jSONArray.toString());
            edit.commit();
        }
    }

    public static LoginResultInfo x() {
        return y(ShowSelfApp.f());
    }

    public static void x0(JSONArray jSONArray) {
        if (jSONArray != null) {
            SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("share", 0).edit();
            edit.putString("mywatch", jSONArray.toString());
            edit.commit();
        }
    }

    public static LoginResultInfo y(Context context) {
        if (a == null) {
            a = new LoginResultInfo();
        }
        SharedPreferences sharedPreferences = context.getSharedPreferences(Constants.LOGIN_INFO, 0);
        a.setSessionId(sharedPreferences.getString("sessionId", null));
        a.setUserName(sharedPreferences.getString("userName", null));
        a.setGender(sharedPreferences.getInt("gender", 0));
        a.setUserId(sharedPreferences.getInt("userId", 0));
        a.setShowid(sharedPreferences.getInt("showid", 0));
        a.setAlterpwd(sharedPreferences.getInt("alterpwd", 0));
        a.setEmail(sharedPreferences.getString("email", null));
        a.setAvatar(sharedPreferences.getString("avatar", null));
        a.setPhotoNum(sharedPreferences.getInt("photoNum", 0));
        a.setMobile(sharedPreferences.getString("mobile", null));
        a.setAccountString(sharedPreferences.getString("accountString", null));
        a.setEmailstatus(sharedPreferences.getInt("emailstatus", 0));
        a.setMobilestatus(sharedPreferences.getInt("mobilestatus", 0));
        a.setNotificationInterval(sharedPreferences.getInt("notificationInterval", 0));
        a.setSkyVersion(sharedPreferences.getInt("skyVersion", 0));
        a.setSkey(sharedPreferences.getString("skey", null));
        a.setAppVersion(sharedPreferences.getString("appVersion", null));
        a.setAppUrl(sharedPreferences.getString("appUrl", null));
        a.setXmppPort(sharedPreferences.getInt("xmppPort", 0));
        a.setXmppServer(sharedPreferences.getString("xmppServer", null));
        a.setClient_timeout(sharedPreferences.getInt("client_timeout", 0));
        a.setClient_retry_times(sharedPreferences.getInt("client_retry_times", 0));
        a.setSinaWeiboId(sharedPreferences.getString("sinaWeiboId", null));
        a.setQqOpenId(sharedPreferences.getString("qqOpenId", null));
        a.setRenrenId(sharedPreferences.getString("renrenId", null));
        a.setLoginType(sharedPreferences.getInt("loginType", 0));
        a.setAccessToken(sharedPreferences.getString("accessToken", null));
        a.setPartner(sharedPreferences.getInt("partner", 0));
        a.discover_index = sharedPreferences.getInt("discover_index", 0);
        a.homepage_index = sharedPreferences.getInt("homepage_index", 0);
        a.liveshow_index = sharedPreferences.getInt("liveshow_index", 0);
        a.messagebox_index = sharedPreferences.getInt("messagebox_index", 0);
        a.setIntro(sharedPreferences.getString("intro", ""));
        a.setTaskDef(sharedPreferences.getInt("taskDef", 0));
        a.setCr_hours(sharedPreferences.getLong("cr_hours", 0L));
        a.setCustomerLevel(sharedPreferences.getInt("customer_level", 0));
        a.pop_senconds = sharedPreferences.getInt("pop_senconds", 0);
        a.pop_times = sharedPreferences.getInt("pop_times", 0);
        a.annoucement = sharedPreferences.getString("annoucement", null);
        a.setPriv_letter_upload_switch(sharedPreferences.getInt("priv_letter_upload_switch", 0));
        a.setShall_public_talk_node(sharedPreferences.getInt("shall_public_talk_node", 0));
        a.setAudience_pay_qq(sharedPreferences.getString("audience_pay_qq", ""));
        a.setDiscover_pay_qq(sharedPreferences.getString("discover_pay_qq", ""));
        a.setSpvswitch(sharedPreferences.getInt("spvswitch", 0));
        a.setCredit_level(sharedPreferences.getInt("credit_level", 0));
        a.setWhiteUser(sharedPreferences.getBoolean("whiteUser", false));
        return a;
    }

    public static void y0() {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("luckuser_info", 0).edit();
        edit.putLong("NearByDate", System.currentTimeMillis());
        edit.commit();
    }

    public static int z(int i2) {
        return ShowSelfApp.h().getSharedPreferences("mallUpdate", 0).getInt("mallUpdate_" + i2, 0);
    }

    public static void z0(int i2) {
        SharedPreferences.Editor edit = ShowSelfApp.h().getApplicationContext().getSharedPreferences("luckuser_info", 0).edit();
        edit.putLong(i2 + "#notifi_time", System.currentTimeMillis());
        edit.commit();
    }
}