导航菜单

页面标题

页面副标题

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

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

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


package com.showself.fragment;

import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import chat.entity.NotificationNumber;
import com.android.volley.toolbox.ImageLoader;
import com.mifeng.ui.R;
import com.showself.domain.LoginResultInfo;
import com.showself.resource.ResourceManager;
import com.showself.service.UpdateService;
import com.showself.ui.AdviceActivity;
import com.showself.ui.BindPhoneActivity;
import com.showself.ui.BlacklistActivity;
import com.showself.ui.HtmlDisplayActivity;
import com.showself.ui.NetWorkDiagnosisActivity;
import com.showself.ui.PrivacySetActivity;
import com.showself.ui.ServiceCenterActivity;
import com.showself.ui.ShowSelfApp;
import com.showself.ui.activity.ChangeAccountActivity;
import com.showself.ui.juvenile.activity.JuvenileStateActivity;
import com.showself.ui.login.FindPassGetIdentifyActivity;
import com.showself.utils.Utils;
import com.showself.utils.c0;
import com.showself.utils.e0;
import com.showself.utils.k0;
import com.showself.utils.r0;
import com.showself.utils.u0;
import com.showself.utils.v;
import com.showself.view.ImmersiveStatusBar;
import com.showself.view.SlipButton;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.tencent.smtt.sdk.WebView;
import java.util.HashMap;
import org.apache.commons.httpclient.cookie.CookieSpec;
import org.json.JSONObject;

public class SettingFragment extends BaseFragment {
    private String A;
    private String B;
    private String C;
    private View G;
    private boolean H;
    private com.showself.ui.c c;
    private Context d;

    private LinearLayout f2243e;

    private SlipButton f2244f;

    private SlipButton f2245g;

    private SlipButton f2246h;

    private SlipButton f2247i;

    private SlipButton f2248j;

    private SlipButton f2249k;
    private TextView l;
    private TextView m;
    private TextView n;
    private ImmersiveStatusBar o;
    private o p;
    private LoginResultInfo q;
    private k0 r;
    private Button s;
    private View t;
    private boolean u;
    private boolean v;
    private TextView x;
    private com.r.a.a y;
    private TextView z;
    private int w = 0;
    private Handler I = new c();

    class a implements com.r.c.d {
        a() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            Utils.n(SettingFragment.this.getActivity());
            if (obj instanceof JSONObject) {
                int optInt = ((JSONObject) obj).optInt("statuscode");
                boolean m = r0.m(SettingFragment.this.getActivity());
                if (optInt != 0) {
                    SettingFragment.this.f2246h.setState(m);
                } else {
                    SettingFragment.this.f2246h.setState(!m);
                    r0.W0(SettingFragment.this.d, !m);
                }
            }
        }
    }

    class b implements com.r.c.d {
        b() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            if (obj instanceof JSONObject) {
                JSONObject jSONObject = (JSONObject) obj;
                if (jSONObject.optInt("statuscode") != 0 || jSONObject.optJSONObject("data") == null) {
                    return;
                }
                boolean optBoolean = jSONObject.optJSONObject("data").optBoolean("success", false);
                SettingFragment.this.f2246h.setState(optBoolean);
                r0.W0(SettingFragment.this.d, optBoolean);
            }
        }
    }

    class c extends Handler {
        c() {
        }

        @Override
        public void handleMessage(Message message) {
            if (SettingFragment.this.I == null) {
                return;
            }
            SettingFragment.this.X(Integer.valueOf(message.what), message.obj, Integer.valueOf(message.arg1));
        }
    }

    class d implements com.r.c.d {
        d() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            Utils.n(SettingFragment.this.getActivity());
            if (obj instanceof JSONObject) {
                JSONObject jSONObject = (JSONObject) obj;
                if (jSONObject.optInt("statuscode") != 0 || jSONObject.optJSONObject("data") == null) {
                    return;
                }
                SettingFragment.this.u = jSONObject.optJSONObject("data").optBoolean("success", false);
                SettingFragment.this.f2245g.setState(SettingFragment.this.u);
                if (SettingFragment.this.u) {
                    SettingFragment.this.w = 2;
                } else {
                    SettingFragment.this.w = 1;
                }
            }
        }
    }

    class e implements com.r.c.d {

        class a implements com.showself.utils.l {
            a() {
            }

            @Override
            public void a(boolean z) {
                if (z) {
                    SettingFragment.this.f2245g.setState(true);
                    SettingFragment.this.w = 2;
                }
            }
        }

        e() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            Utils.n(SettingFragment.this.getActivity());
            if (obj instanceof JSONObject) {
                JSONObject jSONObject = (JSONObject) obj;
                int optInt = jSONObject.optInt("statuscode");
                String optString = jSONObject.optString("message");
                if (optInt != 0) {
                    SettingFragment settingFragment = SettingFragment.this;
                    settingFragment.u = true ^ settingFragment.u;
                    SettingFragment.this.f2245g.setState(SettingFragment.this.u);
                    Utils.Q0(SettingFragment.this.getActivity(), null, optString, null, 0, "确定", SettingFragment.this.getResources().getColor(2131099758), null, false);
                    return;
                }
                if (SettingFragment.this.w == 1) {
                    Utils.Q0(SettingFragment.this.getActivity(), null, SettingFragment.this.getString(R.string.hider_state_txt), null, 0, "确定", SettingFragment.this.getResources().getColor(2131099758), new a(), false);
                } else {
                    SettingFragment.this.f2245g.setState(false);
                    SettingFragment.this.w = 1;
                }
            }
        }
    }

    class f implements com.showself.utils.l {
        f() {
        }

        @Override
        public void a(boolean z) {
            if (z) {
                SettingFragment.this.c.addTask(new com.showself.service.f(10128, new HashMap()), SettingFragment.this.d, null);
                com.showself.provider.f.h().d();
                r0.i(SettingFragment.this.getActivity(), SettingFragment.this.q.getUserId());
                Utils.A0();
            }
        }
    }

    class g implements com.r.a.b {
        g() {
        }

        @Override
        public void a() {
            Intent intent = new Intent((Context) SettingFragment.this.c, (Class<?>) UpdateService.class);
            intent.putExtra("Key_App_Name", SettingFragment.this.c.getResources().getString(2131689532));
            intent.putExtra("Key_Down_Url", SettingFragment.this.B);
            SettingFragment.this.c.startService(intent);
            Utils.X0(R.string.download_update_package_prompt);
        }

        @Override
        public void b(String str) {
            new com.r.a.c(SettingFragment.this.c).d(str);
        }
    }

    class h implements com.r.a.b {
        h() {
        }

        @Override
        public void a() {
            Intent intent = new Intent();
            intent.setClass(SettingFragment.this.d, NetWorkDiagnosisActivity.class);
            intent.putExtra("title", "网络诊断");
            SettingFragment.this.startActivity(intent);
        }

        @Override
        public void b(String str) {
        }
    }

    class i implements SlipButton.a {
        i() {
        }

        @Override
        public void a(boolean z) {
            SettingFragment.this.V(z);
        }
    }

    class j implements SlipButton.a {
        j() {
        }

        @Override
        public void a(boolean z) {
            if (z != SettingFragment.this.u) {
                SettingFragment.this.u = z;
                SettingFragment settingFragment = SettingFragment.this;
                settingFragment.Q(settingFragment.w);
            }
        }
    }

    class k implements SlipButton.a {
        k() {
        }

        @Override
        public void a(boolean z) {
            SettingFragment settingFragment = SettingFragment.this;
            settingFragment.c0(settingFragment.f2249k.getState());
            boolean state = SettingFragment.this.f2249k.getState();
            r0.Y0(state ? 1 : 0, SettingFragment.this.q.getUserId());
        }
    }

    class l implements SlipButton.a {
        l() {
        }

        @Override
        public void a(boolean z) {
            ShowSelfApp.u(z);
            SettingFragment.this.r.W(z, SettingFragment.this.q.getUserId());
        }
    }

    class m implements SlipButton.a {
        m() {
        }

        @Override
        public void a(boolean z) {
            ShowSelfApp.v(Boolean.valueOf(z));
            SettingFragment.this.r.X(z);
        }
    }

    class n implements View.OnClickListener {
        n() {
        }

        @Override
        public void onClick(View view) {
            SettingFragment.this.U();
        }
    }

    private class o implements View.OnClickListener {

        class a extends Thread {
            final ProgressDialog a;

            class RunnableC0062a implements Runnable {
                RunnableC0062a() {
                }

                @Override
                public void run() {
                    Utils.Z0(SettingFragment.this.d, "清除图片缓存成功");
                }
            }

            a(ProgressDialog progressDialog) {
                this.a = progressDialog;
            }

            @Override
            public void run() {
                ImageLoader.getInstance(SettingFragment.this.c).clearDiscCache(SettingFragment.this.c);
                v.d();
                v.e();
                this.a.dismiss();
                SettingFragment.this.c.runOnUiThread(new RunnableC0062a());
            }
        }

        class b extends Thread {
            final ProgressDialog a;

            class a implements Runnable {
                a() {
                }

                @Override
                public void run() {
                    Utils.Z0(SettingFragment.this.d, "清除多媒体缓存成功");
                }
            }

            b(ProgressDialog progressDialog) {
                this.a = progressDialog;
            }

            @Override
            public void run() {
                Utils.j();
                SettingFragment.this.N();
                this.a.dismiss();
                SettingFragment.this.c.runOnUiThread(new a());
            }
        }

        class c implements com.showself.utils.l {
            c() {
            }

            @Override
            public void a(boolean z) {
                if (z) {
                    SettingFragment.this.b0();
                }
            }
        }

        private o() {
        }

        @Override
        public void onClick(View view) {
            int id = view.getId();
            switch (id) {
                case R.id.btn_nav_left:
                    SettingFragment.this.c.finish();
                    break;
                case R.id.setting_about:
                    Intent intent = new Intent();
                    intent.setClass(SettingFragment.this.d, ServiceCenterActivity.class);
                    intent.putExtra("title", "关于");
                    intent.putExtra("url", com.showself.net.j.f2325i + e0.c);
                    SettingFragment.this.startActivity(intent);
                    break;
                case R.id.setting_idea_back:
                    int constantsInt = ResourceManager.getConstantsInt("h5.user.feedback.enabled");
                    Intent intent2 = new Intent();
                    if (constantsInt != 1) {
                        intent2.putExtra("type", 1);
                        intent2.setClass(SettingFragment.this.d, AdviceActivity.class);
                        SettingFragment.this.startActivity(intent2);
                        break;
                    } else {
                        String constantsString = ResourceManager.getConstantsString("h5.user.feedback");
                        if (!TextUtils.isEmpty(constantsString)) {
                            intent2.setClass(SettingFragment.this.d, HtmlDisplayActivity.class);
                            intent2.putExtra("type", 2);
                            intent2.putExtra("url", constantsString);
                            intent2.putExtra("noTitleBar", true);
                            SettingFragment.this.startActivity(intent2);
                            break;
                        }
                    }
                    break;
                case R.id.setting_juvenile_mode:
                    SettingFragment.this.startActivity(new Intent((Context) SettingFragment.this.c, (Class<?>) JuvenileStateActivity.class));
                    break;
                default:
                    switch (id) {
                        case R.id.setting_bind_phone:
                            Intent intent3 = new Intent(SettingFragment.this.d, (Class<?>) BindPhoneActivity.class);
                            if (SettingFragment.this.q.getMobilestatus() == 1) {
                                intent3.putExtra("bindPhoneStatus", 1);
                            } else {
                                intent3.putExtra("bindPhoneStatus", 0);
                            }
                            SettingFragment.this.startActivity(intent3);
                            break;
                        case R.id.setting_black_name:
                            Intent intent4 = new Intent();
                            intent4.setClass(SettingFragment.this.d, BlacklistActivity.class);
                            SettingFragment.this.startActivity(intent4);
                            break;
                        case R.id.setting_change_account:
                            com.r.n.g j2 = com.r.n.g.j();
                            com.r.n.d c2 = com.r.n.d.c();
                            c2.e("Me");
                            c2.f("Setting");
                            c2.d("SwitchAccount");
                            c2.h(com.r.n.e.View);
                            j2.u(c2.b());
                            Intent intent5 = new Intent((Context) SettingFragment.this.c, (Class<?>) ChangeAccountActivity.class);
                            intent5.putExtra("showAddAccount", true);
                            SettingFragment.this.startActivity(intent5);
                            break;
                        case R.id.setting_clause:
                            Intent intent6 = new Intent();
                            intent6.setClass(SettingFragment.this.d, HtmlDisplayActivity.class);
                            intent6.putExtra("title", "条款");
                            intent6.putExtra("currentType", 2);
                            intent6.putExtra("url", "https://pics.beeshow.tv/mobile/clause.html");
                            SettingFragment.this.startActivity(intent6);
                            break;
                        case R.id.setting_delete_image:
                            ProgressDialog progressDialog = new ProgressDialog(SettingFragment.this.c);
                            progressDialog.setMessage("正在清除缓存...");
                            progressDialog.setCancelable(false);
                            progressDialog.setCanceledOnTouchOutside(false);
                            progressDialog.show();
                            new a(progressDialog).start();
                            break;
                        case R.id.setting_delete_media:
                            ProgressDialog progressDialog2 = new ProgressDialog(SettingFragment.this.c);
                            progressDialog2.setMessage("正在清除缓存...");
                            progressDialog2.setCancelable(false);
                            progressDialog2.setCanceledOnTouchOutside(false);
                            progressDialog2.show();
                            new b(progressDialog2).start();
                            break;
                        default:
                            switch (id) {
                                case R.id.setting_modification_password:
                                    Intent intent7 = new Intent();
                                    intent7.setClass(SettingFragment.this.d, FindPassGetIdentifyActivity.class);
                                    intent7.putExtra("fastLogin", true);
                                    SettingFragment.this.startActivity(intent7);
                                    break;
                                case R.id.setting_network_diagnosis:
                                    SettingFragment.this.a0();
                                    break;
                                case R.id.setting_privacy_set:
                                    SettingFragment.this.startActivity(new Intent((Context) SettingFragment.this.c, (Class<?>) PrivacySetActivity.class));
                                    break;
                                case R.id.setting_soft_update:
                                    if (!SettingFragment.this.H) {
                                        Utils.X0(R.string.already_newest_versions);
                                        break;
                                    } else {
                                        Utils.Q0(SettingFragment.this.c, null, "您的版本号为" + SettingFragment.this.C + ", 当前最新版本" + SettingFragment.this.A, Utils.a0(R.string.negative), Color.parseColor("#a3a3a3"), "更新", Color.parseColor("#007aff"), new c(), true);
                                        break;
                                    }
                            }
                    }
            }
        }

        o(SettingFragment settingFragment, f fVar) {
            this();
        }
    }

    public void N() {
        com.r.m.d.a0.c.c();
        r0.f();
        ShowSelfApp.h().f2866h = true;
    }

    private void O() {
        new com.r.c.c(com.r.c.c.k(String.format(com.showself.net.e.u1, Integer.valueOf(r0.y(getActivity()).getUserId())), 1), new com.r.c.a(), new com.r.c.b(1), getActivity()).v(new b());
    }

    private void P() {
        if (Utils.o0()) {
            return;
        }
        Utils.V0(getActivity(), null, false, false);
        new com.r.c.c(com.r.c.c.k(String.format(com.showself.net.e.w1, Integer.valueOf(r0.y(getActivity()).getUserId())), 1), new com.r.c.a(), new com.r.c.b(1), getActivity()).v(new d());
    }

    public void Q(int i2) {
        if (Utils.o0()) {
            return;
        }
        Utils.V0(getActivity(), null, false, false);
        new com.r.c.c(com.r.c.c.k(String.format(com.showself.net.e.w1, Integer.valueOf(r0.y(getActivity()).getUserId())) + CookieSpec.PATH_DELIM + i2, 1), new com.r.c.a(), new com.r.c.b(1), getActivity()).w(new e());
    }

    public void T(boolean z) {
        r0.X0(this.f2247i.getState(), this.q.getUserId());
        c0.c();
    }

    public void V(boolean z) {
        if (Utils.o0()) {
            return;
        }
        Utils.V0(getActivity(), null, false, false);
        com.r.c.a aVar = new com.r.c.a();
        aVar.e("status", "true");
        aVar.b(Oauth2AccessToken.KEY_UID, r0.y(getActivity()).getUserId());
        aVar.e("accessToken", r0.y(getActivity()).getSessionId());
        com.r.c.b bVar = new com.r.c.b(1);
        HashMap hashMap = new HashMap();
        hashMap.put("status", Boolean.valueOf(z));
        hashMap.put(Oauth2AccessToken.KEY_UID, Integer.valueOf(r0.y(getActivity()).getUserId()));
        new com.r.c.c(com.r.c.c.l(String.format(com.showself.net.e.v1, Integer.valueOf(r0.y(getActivity()).getUserId())), 1, hashMap), aVar, bVar, getActivity()).y(new a());
    }

    private void W() {
        this.f2248j.setState(this.r.p(this.q.getUserId()));
        this.f2244f.setState(this.r.q());
        this.f2249k.setState(r0.E(this.q.getUserId()));
        if (k0.k().m() != 0) {
            this.t.setVisibility(8);
            e(R.id.modification_password_line).setVisibility(8);
        } else {
            this.t.setVisibility(0);
            e(R.id.modification_password_line).setVisibility(0);
        }
        P();
        O();
    }

    public void X(Object... objArr) {
        JSONObject jSONObject;
        Utils.n(null);
        int intValue = ((Integer) objArr[0]).intValue();
        HashMap hashMap = (HashMap) objArr[1];
        if (hashMap != null) {
            int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            if (intValue == 10032 && intValue2 == 0 && (jSONObject = (JSONObject) hashMap.get("data")) != null) {
                this.C = jSONObject.optString("currentVersion");
                this.A = jSONObject.optString("latestVersion");
                this.B = jSONObject.optString("downloadUrl");
                boolean optBoolean = jSONObject.optBoolean("needUpdate");
                this.H = optBoolean;
                if (optBoolean) {
                    SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder("当前版本:");
                    spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#af41cf")), 0, 5, 33);
                    spannableStringBuilder.append((CharSequence) (this.C + "(可升级)"));
                    spannableStringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor("#af41cf")), 5, spannableStringBuilder.length(), 33);
                    this.z.setText(spannableStringBuilder);
                } else {
                    this.z.setTextColor(Color.parseColor("#5ccc11"));
                    this.z.setText("当前版本:" + this.C);
                }
                this.z.setVisibility(0);
                this.G.setClickable(true);
            }
        }
    }

    private void Y() {
        View e2 = e(R.id.set_notification);
        this.v = r0.D(this.q.getUserId());
        ((SlipButton) e2.findViewById(R.id.slipbutton_telephone)).setState(this.v);
    }

    public void a0() {
        if (this.y == null) {
            this.y = new com.r.a.a(getActivity());
        }
        this.y.d(this, new String[]{"android.permission.READ_PHONE_STATE"}, new h());
    }

    public void b0() {
        if (this.y == null) {
            this.y = new com.r.a.a(this.c);
        }
        this.y.d(this, new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, new g());
    }

    public void c0(boolean z) {
        com.r.n.g j2 = com.r.n.g.j();
        com.r.n.d c2 = com.r.n.d.c();
        c2.e("Me");
        c2.f("Setting");
        c2.d("Display");
        c2.h(com.r.n.e.Click);
        c2.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.q.getUserId()));
        c2.a("status", Boolean.valueOf(z));
        j2.u(c2.b());
    }

    public void R() {
        HashMap hashMap = new HashMap();
        hashMap.put("nt", 2);
        hashMap.put(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.q.getUserId()));
        hashMap.put("version_str", Utils.O(this.c).versionName);
        com.showself.service.f fVar = new com.showself.service.f(10032, hashMap);
        ?? r0 = this.c;
        r0.addTask(fVar, r0, this.I);
    }

    public void U() {
        Utils.Q0(this.c, "退出登录", "退出后你将无法收到别人的信息,别人也无法找到你,正在上传的视频也将取消,是否继续?", getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new f(), true);
    }

    public void Z() {
        if (this.o != null) {
            u0.i(getActivity(), this.o, R.color.navigationbar_bg, true);
        }
    }

    @Override
    protected void h() {
        int i2;
        int m2 = k0.k().m();
        this.q = r0.y(this.d);
        ImageLoader.getInstance(this.c);
        this.r = k0.k();
        this.f2243e = (LinearLayout) e(R.id.ll_setting_content);
        View e2 = e(R.id.telephone);
        View e3 = e(R.id.setting_change_account);
        View e4 = e(R.id.setting_message_manage);
        View e5 = e(R.id.setting_message_reminder);
        View e6 = e(R.id.setting_delete_image);
        View e7 = e(R.id.setting_delete_media);
        View e8 = e(R.id.setting_privacy_set);
        View e9 = e(R.id.setting_juvenile_mode);
        View e10 = e(R.id.setting_login_name);
        View e11 = e(R.id.setting_black_name);
        View e12 = e(R.id.setting_bind_phone);
        View e13 = e(R.id.setting_bind_email);
        View e14 = e(R.id.setting_idea_back);
        View e15 = e(R.id.setting_clause);
        View e16 = e(R.id.setting_about);
        View e17 = e(R.id.setting_network_diagnosis);
        this.G = e(R.id.setting_soft_update);
        e2.setVisibility(0);
        e10.setVisibility(8);
        e2.findViewById(R.id.slipbutton_telephone).setVisibility(0);
        e2.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        ((TextView) e2.findViewById(R.id.tv_text)).setText("开启听筒模式");
        View e18 = e(R.id.set_chat_limit);
        ((TextView) e18.findViewById(R.id.tv_text)).setText("只接受我关注的人私信");
        this.f2246h = (SlipButton) e18.findViewById(R.id.slipbutton_telephone);
        e18.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        this.f2246h.setOnChangedListener(new i());
        View e19 = e(R.id.set_hider);
        ((TextView) e19.findViewById(R.id.tv_text)).setText("隐身进房间");
        this.f2245g = (SlipButton) e19.findViewById(R.id.slipbutton_telephone);
        e19.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        this.f2245g.setOnChangedListener(new j());
        View e20 = e(R.id.set_notification);
        ((TextView) e20.findViewById(R.id.tv_text)).setText("推送消息开关");
        e20.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        this.v = r0.D(this.q.getUserId());
        SlipButton slipButton = (SlipButton) e20.findViewById(R.id.slipbutton_telephone);
        this.f2247i = slipButton;
        slipButton.setState(this.v);
        this.f2247i.setOnChangedListener(new SlipButton.a() {
            @Override
            public final void a(boolean z) {
                SettingFragment.this.T(z);
            }
        });
        e4.findViewById(R.id.slipbutton_telephone).setVisibility(0);
        e4.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        ((TextView) e4.findViewById(R.id.tv_text)).setText("通知显示消息详情");
        e5.findViewById(R.id.slipbutton_telephone).setVisibility(0);
        e5.findViewById(R.id.ll_setting_arrows).setVisibility(8);
        ((TextView) e5.findViewById(R.id.tv_text)).setText("消息提示音");
        e6.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e6.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e6.findViewById(R.id.tv_text)).setText("清除图片缓存");
        e7.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e7.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e7.findViewById(R.id.tv_text)).setText("清除多媒体缓存");
        e8.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e8.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e8.findViewById(R.id.tv_text)).setText("隐私设置");
        e9.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e9.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e9.findViewById(R.id.tv_text)).setText(R.string.juvenile_mode);
        TextView textView = (TextView) e9.findViewById(R.id.tv_setting_item_username);
        this.x = textView;
        textView.setVisibility(0);
        if (com.showself.ui.juvenile.a.c.h()) {
            i2 = 8;
        } else {
            i2 = 8;
            e(R.id.setting_juvenile_divider_line).setVisibility(8);
            e9.setVisibility(8);
        }
        e10.findViewById(R.id.slipbutton_telephone).setVisibility(i2);
        e10.findViewById(R.id.ll_setting_arrows).setVisibility(i2);
        ((TextView) e10.findViewById(R.id.tv_text)).setText("登录名");
        e11.findViewById(R.id.slipbutton_telephone).setVisibility(i2);
        e11.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e11.findViewById(R.id.tv_text)).setText("黑名单");
        View e21 = e(R.id.setting_modification_password);
        this.t = e21;
        ((TextView) e21.findViewById(R.id.tv_text)).setText("设置新密码");
        e12.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e12.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e12.findViewById(R.id.tv_text)).setText("绑定手机号");
        TextView textView2 = (TextView) e12.findViewById(R.id.tv_setting_item_username);
        this.n = textView2;
        textView2.setVisibility(0);
        e3.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e3.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e3.findViewById(R.id.tv_text)).setText("账号切换");
        e14.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e14.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e14.findViewById(R.id.tv_text)).setText("意见反馈");
        this.G.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        this.G.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        TextView textView3 = (TextView) this.G.findViewById(R.id.tv_text);
        this.z = (TextView) this.G.findViewById(R.id.tv_setting_item_username);
        this.G.setClickable(false);
        textView3.setText("软件更新");
        R();
        this.t.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        this.t.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        e15.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e15.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e15.findViewById(R.id.tv_text)).setText("条款");
        e16.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e16.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e16.findViewById(R.id.tv_text)).setText("关于");
        e17.findViewById(R.id.slipbutton_telephone).setVisibility(8);
        e17.findViewById(R.id.ll_setting_arrows).setVisibility(0);
        ((TextView) e17.findViewById(R.id.tv_text)).setText("网络诊断");
        Button button = (Button) e(R.id.btn_nav_left);
        ((TextView) e(R.id.tv_nav_title)).setText("设置");
        this.l = (TextView) e(2131299307);
        this.p = new o(this, null);
        SlipButton slipButton2 = (SlipButton) e4.findViewById(R.id.slipbutton_telephone);
        this.f2249k = slipButton2;
        slipButton2.setOnChangedListener(new k());
        this.f2249k.setState(r0.E(this.q.getUserId()));
        this.f2248j = (SlipButton) e5.findViewById(R.id.slipbutton_telephone);
        this.f2244f = (SlipButton) e2.findViewById(R.id.slipbutton_telephone);
        this.f2248j.setOnChangedListener(new l());
        this.f2248j.setState(this.r.p(this.q.getUserId()));
        this.f2244f.setOnChangedListener(new m());
        this.f2244f.setState(this.r.q());
        button.setOnClickListener(this.p);
        e16.setOnClickListener(this.p);
        e15.setOnClickListener(this.p);
        e17.setOnClickListener(this.p);
        e14.setOnClickListener(this.p);
        e6.setOnClickListener(this.p);
        e7.setOnClickListener(this.p);
        e8.setOnClickListener(this.p);
        e9.setOnClickListener(this.p);
        e11.setOnClickListener(this.p);
        e4.setOnClickListener(this.p);
        e12.setOnClickListener(this.p);
        e13.setOnClickListener(this.p);
        e3.setOnClickListener(this.p);
        this.t.setOnClickListener(this.p);
        this.G.setOnClickListener(this.p);
        TextView textView4 = (TextView) e10.findViewById(R.id.tv_setting_item_username);
        this.m = textView4;
        textView4.setVisibility(0);
        Button button2 = (Button) e(R.id.btn_setting_logout);
        this.s = button2;
        button2.setOnClickListener(new n());
        if (m2 != 0) {
            this.t.setVisibility(8);
            e(R.id.modification_password_line).setVisibility(8);
        }
        this.o = (ImmersiveStatusBar) e(2131298726);
        Z();
        P();
        O();
    }

    @Override
    protected View j() {
        return LayoutInflater.from(this.d).inflate(R.layout.setting_content, (ViewGroup) null);
    }

    @Override
    public void k() {
        String totalNum = NotificationNumber.getShareNotificationNum().getTotalNum();
        if (totalNum == null) {
            this.l.setVisibility(8);
        } else {
            this.l.setVisibility(0);
            this.l.setText(totalNum);
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        ?? r0 = (com.showself.ui.c) getActivity();
        this.c = r0;
        this.d = r0.getApplicationContext();
        super.onCreate(bundle);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
        super.onRequestPermissionsResult(i2, strArr, iArr);
        if (this.y.e(i2, strArr, iArr)) {
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        this.f2243e.setVisibility(0);
        LoginResultInfo loginResultInfo = this.q;
        int userId = loginResultInfo != null ? loginResultInfo.getUserId() : 0;
        this.q = r0.y(this.d);
        k0 k2 = k0.k();
        this.r = k2;
        int m2 = k2.m();
        if (userId != this.q.getUserId()) {
            W();
            Y();
        }
        if (this.q.getMobilestatus() == 1) {
            this.n.setText(this.q.getMobile());
            this.n.setTextColor(WebView.NIGHT_MODE_COLOR);
        } else {
            this.n.setText(R.string.not_bind);
            this.n.setTextColor(-65536);
        }
        if (this.q.getSpvswitch() == 1) {
            this.x.setText(R.string.juvenile_mode_open);
            this.x.setTextColor(WebView.NIGHT_MODE_COLOR);
        } else {
            this.x.setText(R.string.juvenile_mode_closed);
            this.x.setTextColor(-65536);
        }
        if (m2 == 0) {
            this.m.setText(this.q.getAccountString());
            return;
        }
        if (m2 == 1) {
            this.m.setText("@新浪微博");
        } else if (m2 == 2) {
            this.m.setText("QQ空间");
        } else {
            if (m2 != 5) {
                return;
            }
            this.m.setText("微信登录");
        }
    }
}