得物.apk(点击下载) / SettingActivity.java


package com.shizhuang.duapp.modules.user.setting.common.ui;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.afollestad.materialdialogs.MaterialDialog;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.ui.BaseLeftBackActivity;
import com.shizhuang.duapp.modules.pay.R$styleable;
import com.shizhuang.duapp.modules.user.setting.common.ui.IdAuthActivity;
import com.shizhuang.duapp.modules.user.setting.common.ui.MessageNotifyActivity;
import com.shizhuang.duapp.modules.user.setting.user.view.LogoutView;
import com.shizhuang.duapp.modules.userv2.setting.user.view.ResponsiveNestedScrollView;
import com.shizhuang.dudatastatistics.factory.PoizonAnalyzeFactory;
import ee.h;
import fd.z;
import ij.h0;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import jn.b;
import qc.f;
import u.d0;
import uc1.e;

@Route(path = "/account/setting")
public class SettingActivity extends BaseLeftBackActivity implements LogoutView {
    public static ChangeQuickRedirect changeQuickRedirect;

    /* renamed from: c  reason: collision with root package name */
    public DuExposureHelper f25459c;
    @BindView(4803)
    public LinearLayout container;
    public final List<RelativeLayout> d = new ArrayList();
    public final List<Boolean> e = new ArrayList();
    public final List<String> f = new ArrayList();

    /* renamed from: g  reason: collision with root package name */
    public e f25460g;
    @BindView(5401)
    public ImageView ivUpdateNew;
    @BindView(5882)
    public RelativeLayout rlAccountsAndSecurity;
    @BindView(5995)
    public ResponsiveNestedScrollView scrollView;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@Nullable SettingActivity settingActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{settingActivity, bundle}, null, changeQuickRedirect, true, 326360, new Class[]{SettingActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                b bVar = b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                SettingActivity.e(settingActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (settingActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.user.setting.common.ui.SettingActivity")) {
                    bVar.activityOnCreateMethod(settingActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(SettingActivity settingActivity) {
            if (!PatchProxy.proxy(new Object[]{settingActivity}, null, changeQuickRedirect, true, 326359, new Class[]{SettingActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                SettingActivity.d(settingActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (settingActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.user.setting.common.ui.SettingActivity")) {
                    b.f34396a.activityOnResumeMethod(settingActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(SettingActivity settingActivity) {
            if (!PatchProxy.proxy(new Object[]{settingActivity}, null, changeQuickRedirect, true, 326361, new Class[]{SettingActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                SettingActivity.f(settingActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (settingActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.user.setting.common.ui.SettingActivity")) {
                    b.f34396a.activityOnStartMethod(settingActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    public class a implements ResponsiveNestedScrollView.OnScrollChangedListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a() {
        }

        @Override // com.shizhuang.duapp.modules.userv2.setting.user.view.ResponsiveNestedScrollView.OnScrollChangedListener
        public void onScrollChanged(int i, int i3, int i12, int i13) {
            Object[] objArr = {new Integer(i), new Integer(i3), new Integer(i12), new Integer(i13)};
            ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
            Class cls = Integer.TYPE;
            boolean z = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 326357, new Class[]{cls, cls, cls, cls}, Void.TYPE).isSupported;
        }

        @Override // com.shizhuang.duapp.modules.userv2.setting.user.view.ResponsiveNestedScrollView.OnScrollChangedListener
        public void onStateChanged(@NonNull ResponsiveNestedScrollView.ScrollState scrollState) {
            if (!PatchProxy.proxy(new Object[]{scrollState}, this, changeQuickRedirect, false, 326358, new Class[]{ResponsiveNestedScrollView.ScrollState.class}, Void.TYPE).isSupported && scrollState == ResponsiveNestedScrollView.ScrollState.IDLE) {
                SettingActivity settingActivity = SettingActivity.this;
                ChangeQuickRedirect changeQuickRedirect2 = SettingActivity.changeQuickRedirect;
                settingActivity.g();
            }
        }
    }

    public static void d(SettingActivity settingActivity) {
        if (!PatchProxy.proxy(new Object[0], settingActivity, changeQuickRedirect, false, 326342, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
            if (!PatchProxy.proxy(new Object[0], settingActivity, changeQuickRedirect, false, 326345, new Class[0], Void.TYPE).isSupported) {
                if (!h.b().d) {
                    settingActivity.ivUpdateNew.setVisibility(8);
                } else {
                    settingActivity.ivUpdateNew.setVisibility(0);
                }
            }
            if (!PatchProxy.proxy(new Object[0], h0.f33464a, h0.changeQuickRedirect, false, 21039, new Class[0], Void.TYPE).isSupported) {
                PoizonAnalyzeFactory.a().track("trade_common_pageview", gy.a.n("current_page", "1723"));
            }
            settingActivity.scrollView.post(new d0(settingActivity, 11));
        }
    }

    public static void e(SettingActivity settingActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, settingActivity, changeQuickRedirect, false, 326350, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
            ButterKnife.bind(settingActivity);
        }
    }

    public static void f(SettingActivity settingActivity) {
        if (!PatchProxy.proxy(new Object[0], settingActivity, changeQuickRedirect, false, 326356, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    @OnClick({5883})
    public void clickApplicationPermissions() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326334, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, f.c() + "hybird/h5other/app-permissions");
            h0.f33464a.c("应用权限", "12");
        }
    }

    @OnClick({5887})
    public void clickCollectionList() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326335, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, f.c() + "hybird/h5other/personal-info-collections");
            h0.f33464a.c("个人信息收集清单", "13");
        }
    }

    @OnClick({5912})
    public void clickprivacyNew() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326336, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, "https://fast.dewu.com/nezha-plus/detail/61bc63b5c46b913798fe532c?duWebviewBg=%23ffffff");
            h0.f33464a.c("隐私政策", "15");
        }
    }

    public final void g() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326339, new Class[0], Void.TYPE).isSupported) {
            for (int i = 0; i < this.d.size(); i++) {
                if (!this.f25459c.p(this.scrollView, this.d.get(i))) {
                    this.e.set(i, Boolean.FALSE);
                } else if (!this.e.get(i).booleanValue()) {
                    h0 h0Var = h0.f33464a;
                    String str = this.f.get(i);
                    String str2 = (i + 1) + "";
                    boolean z = true;
                    if (!PatchProxy.proxy(new Object[]{str, str2}, h0Var, h0.changeQuickRedirect, false, 21034, new Class[]{String.class, String.class}, Void.TYPE).isSupported) {
                        HashMap j = a01.a.j("current_page", "1723", "block_type", "2878");
                        if (str != null) {
                            if (str.length() > 0) {
                                j.put("block_content_title", str);
                            }
                        }
                        if (str2 != null) {
                            if (str2.length() <= 0) {
                                z = false;
                            }
                            if (z) {
                                j.put("block_content_position", str2);
                            }
                        }
                        PoizonAnalyzeFactory.a().track("trade_common_exposure", j);
                    }
                    this.e.set(i, Boolean.TRUE);
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326344, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_setting;
    }

    @OnClick({5888})
    public void goCommonSettingPage() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326329, new Class[0], Void.TYPE).isSupported) {
            ChangeQuickRedirect changeQuickRedirect2 = u91.e.changeQuickRedirect;
            if (!PatchProxy.proxy(new Object[]{this}, null, u91.e.changeQuickRedirect, true, 313839, new Class[]{Context.class}, Void.TYPE).isSupported) {
                ARouter.getInstance().build("/account/common/setting").navigation(this);
            }
            h0.f33464a.c("通用设置", "8");
        }
    }

    @OnClick({5516})
    public void goComplaint() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326332, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, f.c() + "mdu/company.html#/complaint");
            h0.f33464a.c("投诉维权", "11");
        }
    }

    @OnClick({5895})
    public void goIdAuth() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326333, new Class[0], Void.TYPE).isSupported) {
            if (!PatchProxy.proxy(new Object[]{this}, null, IdAuthActivity.changeQuickRedirect, true, 326068, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                if (!PatchProxy.proxy(new Object[]{this}, IdAuthActivity.d, IdAuthActivity.a.changeQuickRedirect, false, 326075, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                    startActivity(new Intent(this, IdAuthActivity.class));
                }
            }
            h0.f33464a.c("身份认证", PushConstants.PUSH_FLYME_3_CHANGE_VERSION_START);
        }
    }

    @OnClick({5905})
    public void goPaySetting() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326331, new Class[0], Void.TYPE).isSupported) {
            ARouter.getInstance().build("/account/PaySetting").navigation(this);
            h0.f33464a.c("支付设置", PushConstants.PUSH_TYPE_UPLOAD_LOG);
        }
    }

    @OnClick({5919})
    public void goTeensSettingPage() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326330, new Class[0], Void.TYPE).isSupported) {
            u91.e.s1(this, true);
            h0.f33464a.c("青少年模式", "9");
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326340, new Class[0], Void.TYPE).isSupported;
    }

    @Override // com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 326338, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.initView(bundle);
            this.f25459c = new DuExposureHelper(this, DuExposureHelper.ExposureStrategy.None, true);
            e eVar = new e();
            this.f25460g = eVar;
            registPresenter(eVar);
            int childCount = this.container.getChildCount();
            for (int i = 0; i < childCount; i++) {
                View childAt = this.container.getChildAt(i);
                if (childAt instanceof RelativeLayout) {
                    RelativeLayout relativeLayout = (RelativeLayout) childAt;
                    View childAt2 = relativeLayout.getChildAt(0);
                    if (childAt2 instanceof TextView) {
                        this.d.add(relativeLayout);
                        this.f.add(((TextView) childAt2).getText().toString());
                        this.e.add(Boolean.FALSE);
                    }
                }
            }
            this.scrollView.setOnScrollChangedListener(new a());
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.fragment.app.FragmentActivity
    public void onActivityResult(int i, int i3, @Nullable Intent intent) {
        Object[] objArr = {new Integer(i), new Integer(i3), intent};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Integer.TYPE;
        if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 326348, new Class[]{cls, cls, Intent.class}, Void.TYPE).isSupported) {
            super.onActivityResult(i, i3, intent);
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 326349, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // com.shizhuang.duapp.modules.user.setting.user.view.LogoutView
    public void onLogout(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 326346, new Class[]{String.class}, Void.TYPE).isSupported) {
            removeProgressDialog();
            z.a();
            u91.e.i0(this, "mall");
            finish();
        }
    }

    @Override // com.shizhuang.duapp.modules.user.setting.user.view.LogoutView
    public void onLogoutFail(String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 326347, new Class[]{String.class}, Void.TYPE).isSupported) {
            removeProgressDialog();
            z.a();
            u91.e.i0(this, "mall");
            finish();
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onPause() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326343, new Class[0], Void.TYPE).isSupported) {
            super.onPause();
            for (int i = 0; i < this.e.size(); i++) {
                this.e.set(i, Boolean.FALSE);
            }
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326341, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326355, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }

    @OnClick({5881})
    public void rlAbout() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326326, new Class[0], Void.TYPE).isSupported) {
            if (!PatchProxy.proxy(new Object[]{this}, null, MyAboutActivity.changeQuickRedirect, true, 326104, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                startActivity(new Intent(this, MyAboutActivity.class));
            }
            h0.f33464a.c("关于得物", "16");
        }
    }

    @OnClick({5882})
    public void rlAccountsAndSecurity() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326320, new Class[0], Void.TYPE).isSupported) {
            ChangeQuickRedirect changeQuickRedirect2 = u91.e.changeQuickRedirect;
            if (!PatchProxy.proxy(new Object[]{this}, null, u91.e.changeQuickRedirect, true, 313847, new Class[]{Context.class}, Void.TYPE).isSupported) {
                ARouter.getInstance().build("/account/UserSafePageV2").navigation(this);
            }
            h0.f33464a.c("账号安全", "1");
        }
    }

    @OnClick({5893})
    public void rlFeedBack() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326325, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, f.c() + "hybird/h5community/feedback-list");
            h0.f33464a.c("反馈与建议", "10");
        }
    }

    @OnClick({5899})
    public void rlManageAddress() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326323, new Class[0], Void.TYPE).isSupported) {
            ChangeQuickRedirect changeQuickRedirect2 = u91.e.changeQuickRedirect;
            Object[] objArr = {this, new Byte((byte) 0), new Integer(3), new Integer((int) R$styleable.AppCompatTheme_windowNoTitle)};
            ChangeQuickRedirect changeQuickRedirect3 = u91.e.changeQuickRedirect;
            Class cls = Integer.TYPE;
            if (!PatchProxy.proxy(objArr, null, changeQuickRedirect3, true, 313773, new Class[]{Activity.class, Boolean.TYPE, cls, cls}, Void.TYPE).isSupported) {
                u91.e.m1(this, false, null, null, null, 3, R$styleable.AppCompatTheme_windowNoTitle);
            }
            h0.f33464a.c("地址管理", PushConstants.PUSH_TYPE_WITHDRAW_NOTIFICATION);
        }
    }

    @OnClick({5903})
    public void rlMessageNotify() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326321, new Class[0], Void.TYPE).isSupported) {
            if (!PatchProxy.proxy(new Object[]{this}, null, MessageNotifyActivity.changeQuickRedirect, true, 326089, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                if (!PatchProxy.proxy(new Object[]{this}, MessageNotifyActivity.d, MessageNotifyActivity.a.changeQuickRedirect, false, 326094, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                    startActivity(new Intent(this, MessageNotifyActivity.class));
                }
            }
            h0.f33464a.c("消息设置", "7");
        }
    }

    @OnClick({5904})
    public void rlMySize() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326324, new Class[0], Void.TYPE).isSupported) {
            oc1.a.f36376a.b("common_block_content_click", "306", "", fn0.b.d);
            h0.f33464a.c("我的尺码", "5");
            u91.e.E0(this);
        }
    }

    @OnClick({5911})
    public void rlPrivacy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326322, new Class[0], Void.TYPE).isSupported) {
            ChangeQuickRedirect changeQuickRedirect2 = u91.e.changeQuickRedirect;
            if (!PatchProxy.proxy(new Object[]{this}, null, u91.e.changeQuickRedirect, true, 313875, new Class[]{Activity.class}, Void.TYPE).isSupported) {
                ARouter.getInstance().build("/account/PrivacyPage").navigation(this);
            }
            h0.f33464a.c("隐私设置", "6");
        }
    }

    @OnClick({5918})
    public void rlSignOut() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326328, new Class[0], Void.TYPE).isSupported) {
            MaterialDialog.b bVar = new MaterialDialog.b(this);
            bVar.b("是否退出登录");
            bVar.j(R.string.btn_commfire);
            bVar.h(R.string.btn_cancle);
            bVar.f2882u = new qa1.a(this, 1);
            bVar.f2883v = g00.a.b;
            bVar.l();
            h0.f33464a.c("退出登录", "17");
        }
    }

    @OnClick({5920})
    public void thirdSDkList() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 326327, new Class[0], Void.TYPE).isSupported) {
            u91.e.S(this, f.c() + "hybird/h5other/third-party-sdk-desc");
            h0.f33464a.c("第三方合作个人信息共享", "14");
        }
    }
}