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


package com.shizhuang.duapp.modules.ai_measure.ui;

import a40.j;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.Nullable;
import androidx.core.widget.NestedScrollView;
import androidx.lifecycle.MutableLiveData;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
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.ui.BaseActivity;
import com.shizhuang.duapp.common.widget.dutoolbar.DuToolbar;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.ai_measure.AISOManager;
import com.shizhuang.duapp.modules.ai_measure.model.FootInfo;
import com.shizhuang.duapp.modules.ai_measure.model.FootMeasureSize;
import com.shizhuang.duapp.modules.ai_measure.model.MeasureFacade;
import com.shizhuang.duapp.modules.ai_measure.model.MeasureItemResult;
import com.shizhuang.duapp.modules.ai_measure.model.RecommendShoeInfo;
import com.shizhuang.duapp.modules.ai_measure.model.RoleInfo;
import com.shizhuang.duapp.modules.ai_measure.model.UserInfo;
import com.shizhuang.duapp.modules.ai_measure.ui.MeasureDialog;
import com.shizhuang.duapp.modules.ai_measure.ui.RoleEditDialog;
import com.shizhuang.dufootrender.FootGLSurfaceView;
import com.shizhuang.dufootrender.egl.DuGLRender;
import cw.c;
import df.h0;
import df.r0;
import df.u0;
import df.x0;
import dw.k;
import fd.i;
import fd.q;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Timer;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.ranges.RangesKt___RangesKt;
import kotlin.text.StringsKt__StringsJVMKt;
import rd.l;
import td.s;

@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/ai_measure/ui/AIMeasureReviewActivity;", "Lcom/shizhuang/duapp/common/ui/BaseActivity;", "<init>", "()V", "du_ai_measure_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AIMeasureReviewActivity.kt */
public final class AIMeasureReviewActivity extends BaseActivity {
    public static ChangeQuickRedirect changeQuickRedirect;
    public String A = "";
    public String B = "";
    public DuToolbar C;
    public Integer D = 0;
    public String E = "";
    public RoleViewModel F;
    public RoleEditDialog G;
    public RecordListDialog H;
    public boolean I;
    public HashMap J;

    /* renamed from: c  reason: collision with root package name */
    public final String f10984c = "FootMeasure";
    public final String d = "https://cdn-m.dewu.com/h5-growth/ar-size/home";
    public Context e;
    public String f = "";

    /* renamed from: g  reason: collision with root package name */
    public UserInfo f10985g = new UserInfo(null, null, null, 0, null, null, 0, null, 0, 0, 0, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, -1, 31, null);

    /* renamed from: h  reason: collision with root package name */
    public FootInfo f10986h = new FootInfo(0, null, null, null, 0, null, null, null, 0, null, null, null, 0, null, null, null, 65535, null);
    public int i;
    public int j;
    public int k;
    public MeasureDialog l;
    public final Lazy m = LazyKt__LazyJVMKt.lazy(AIMeasureReviewActivity$mRecommendShoeList$2.INSTANCE);
    public boolean n;
    public boolean o;
    public boolean p;

    /* renamed from: q  reason: collision with root package name */
    public boolean f10987q;
    public boolean r;
    public final Lazy s = LazyKt__LazyJVMKt.lazy(AIMeasureReviewActivity$mTimer$2.INSTANCE);
    public int t;

    /* renamed from: u  reason: collision with root package name */
    public int f10988u;

    /* renamed from: v  reason: collision with root package name */
    public int f10989v = 3;
    public DuGLRender w;
    public FootGLSurfaceView x;
    public int y;
    public String z = "";

    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 AIMeasureReviewActivity aIMeasureReviewActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{aIMeasureReviewActivity, bundle}, null, changeQuickRedirect, true, 66209, new Class[]{AIMeasureReviewActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                jn.b bVar = jn.b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                AIMeasureReviewActivity.e(aIMeasureReviewActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (aIMeasureReviewActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.ai_measure.ui.AIMeasureReviewActivity")) {
                    bVar.activityOnCreateMethod(aIMeasureReviewActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

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

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

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class a implements ValueAnimator.AnimatorUpdateListener {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ View b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ int f10990c;
        public final /* synthetic */ int d;

        public a(View view, int i, int i3) {
            this.b = view;
            this.f10990c = i;
            this.d = i3;
        }

        public final void onAnimationUpdate(ValueAnimator valueAnimator) {
            float f;
            float f12;
            if (!PatchProxy.proxy(new Object[]{valueAnimator}, this, changeQuickRedirect, false, 66211, new Class[]{ValueAnimator.class}, Void.TYPE).isSupported) {
                int intValue = ((Integer) (valueAnimator != null ? valueAnimator.getAnimatedValue() : null)).intValue();
                ViewGroup.LayoutParams layoutParams = this.b.getLayoutParams();
                layoutParams.width = intValue;
                this.b.setLayoutParams(layoutParams);
                int i = this.f10990c;
                int i3 = this.d;
                if (i < i3) {
                    f = ((float) (intValue - i)) * 255.0f;
                    f12 = (float) (i3 - i);
                } else {
                    f = ((float) (intValue - i3)) * 255.0f;
                    f12 = (float) (i - i3);
                }
                ((TextView) this.b).setTextColor(Color.argb((int) (f / f12), 0, 0, 0));
            }
        }
    }

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class b implements Runnable {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ AIMeasureReviewActivity b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ int f10991c;
        public final /* synthetic */ int d;

        /* compiled from: AIMeasureReviewActivity.kt */
        public static final class a implements Runnable {
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ Ref.IntRef b;

            /* renamed from: c  reason: collision with root package name */
            public final /* synthetic */ RecommendShoeInfo f10992c;

            public a(Ref.IntRef intRef, RecommendShoeInfo recommendShoeInfo) {
                this.b = intRef;
                this.f10992c = recommendShoeInfo;
            }

            public final void run() {
                if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66213, new Class[0], Void.TYPE).isSupported) {
                    i60.a aVar = i60.a.f33292a;
                    Integer valueOf = Integer.valueOf(this.b.element + 1);
                    String mShoeId = this.f10992c.getMShoeId();
                    if (!PatchProxy.proxy(new Object[]{"尺码预测", valueOf, mShoeId}, aVar, i60.a.changeQuickRedirect, false, 125191, new Class[]{Object.class, Object.class, Object.class}, Void.TYPE).isSupported) {
                        i60.b bVar = i60.b.f33293a;
                        ArrayMap b2 = a.f.b(8, "block_content_title", "尺码预测", "block_content_position", valueOf);
                        b2.put("spu_id", mShoeId);
                        bVar.b("trade_ar_footmeasure_product_exposure", "1465", "35", b2);
                    }
                }
            }
        }

        public b(AIMeasureReviewActivity aIMeasureReviewActivity, int i, int i3) {
            this.b = aIMeasureReviewActivity;
            this.f10991c = i;
            this.d = i3;
        }

        public final void run() {
            int i = 0;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66212, new Class[0], Void.TYPE).isSupported) {
                int i3 = this.f10991c;
                if (i3 > 0) {
                    i = i3;
                }
                int size = this.b.o().size();
                int i12 = this.d;
                if (i12 < size) {
                    size = i12;
                }
                if (i < size) {
                    Ref.IntRef intRef = new Ref.IntRef();
                    intRef.element = i;
                    while (intRef.element < size) {
                        RecommendShoeInfo recommendShoeInfo = this.b.o().get(intRef.element);
                        if (recommendShoeInfo.getMExposure()) {
                            intRef.element++;
                        } else {
                            recommendShoeInfo.setMExposure(true);
                            q.a(new a(intRef, recommendShoeInfo));
                            intRef.element++;
                        }
                    }
                }
            }
        }
    }

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class c extends s<String> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ AIMeasureReviewActivity b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ Drawable f10993c;
        public final /* synthetic */ int d;
        public final /* synthetic */ AIMeasureReviewActivity$freshUIView$timerTask$1 e;

        public c(AIMeasureReviewActivity aIMeasureReviewActivity, Drawable drawable, int i, AIMeasureReviewActivity$freshUIView$timerTask$1 aIMeasureReviewActivity$freshUIView$timerTask$1) {
            this.b = aIMeasureReviewActivity;
            this.f10993c = drawable;
            this.d = i;
            this.e = aIMeasureReviewActivity$freshUIView$timerTask$1;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(@org.jetbrains.annotations.Nullable l<String> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 66251, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                AIMeasureReviewActivity aIMeasureReviewActivity = this.b;
                u0.d(aIMeasureReviewActivity.e, aIMeasureReviewActivity.getString(R.string.network_request_error));
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            String str = (String) obj;
            if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 66250, new Class[]{String.class}, Void.TYPE).isSupported) {
                super.onSuccess(str);
                q.a(new AIMeasureReviewActivity$freshUIView$11$onSuccess$1(this, str));
            }
        }
    }

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class d extends s<String> {
        public static ChangeQuickRedirect changeQuickRedirect;
        public final /* synthetic */ AIMeasureReviewActivity b;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public d(AIMeasureReviewActivity aIMeasureReviewActivity) {
            this.b = aIMeasureReviewActivity;
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
        public void onBzError(@org.jetbrains.annotations.Nullable l<String> lVar) {
            if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 66217, new Class[]{l.class}, Void.TYPE).isSupported) {
                super.onBzError(lVar);
                fo.a.i(this.b.f10984c + " getFootMeasureInfo failed, error=" + lVar, new Object[0]);
                ((RelativeLayout) this.b._$_findCachedViewById(R.id.layout_foot_shape)).setVisibility(8);
                ((RelativeLayout) this.b._$_findCachedViewById(R.id.layout_foot_width)).setVisibility(8);
                ((LinearLayout) this.b._$_findCachedViewById(R.id.layout_buy_advice)).setVisibility(8);
            }
        }

        @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
        public void onSuccess(Object obj) {
            String str = (String) obj;
            if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 66216, new Class[]{String.class}, Void.TYPE).isSupported) {
                super.onSuccess(str);
                if (str != null) {
                    q.a(new AIMeasureReviewActivity$freshUIView$1$onSuccess$1(this, str));
                }
            }
        }
    }

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class e implements MeasureDialog.OnMeasureDialogListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AIMeasureReviewActivity f10994a;

        /* compiled from: AIMeasureReviewActivity.kt */
        public static final class a extends s<String> {
            public static ChangeQuickRedirect changeQuickRedirect;
            public final /* synthetic */ e b;

            /* JADX WARN: Incorrect args count in method signature: ()V */
            public a(e eVar) {
                this.b = eVar;
            }

            @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.s, td.a
            public void onBzError(@org.jetbrains.annotations.Nullable l<String> lVar) {
                if (!PatchProxy.proxy(new Object[]{lVar}, this, changeQuickRedirect, false, 66264, new Class[]{l.class}, Void.TYPE).isSupported) {
                    super.onBzError(lVar);
                }
            }

            @Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
            public void onSuccess(Object obj) {
                String str = (String) obj;
                if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 66265, new Class[]{String.class}, Void.TYPE).isSupported) {
                    super.onSuccess(str);
                    fo.a.i(a01.a.i(new StringBuilder(), this.b.f10994a.f10984c, "  postMeasureFootSize success data = ", str), new Object[0]);
                    AIMeasureReviewActivity aIMeasureReviewActivity = this.b.f10994a;
                    u0.d(aIMeasureReviewActivity.e, aIMeasureReviewActivity.B);
                }
            }
        }

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public e(AIMeasureReviewActivity aIMeasureReviewActivity) {
            this.f10994a = aIMeasureReviewActivity;
        }

        @Override // com.shizhuang.duapp.modules.ai_measure.ui.MeasureDialog.OnMeasureDialogListener
        public void cancel(int i) {
            if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 66263, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                MeasureDialog measureDialog = this.f10994a.l;
                String a5 = measureDialog != null ? measureDialog.a() : null;
                if (a5 != null) {
                    i60.a.f33292a.F(a5, "取消");
                }
                MeasureDialog measureDialog2 = this.f10994a.l;
                if (measureDialog2 != null) {
                    measureDialog2.dismiss();
                }
            }
        }

        @Override // com.shizhuang.duapp.modules.ai_measure.ui.MeasureDialog.OnMeasureDialogListener
        public void confirm(int i) {
            if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 66262, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                MeasureDialog measureDialog = this.f10994a.l;
                String a5 = measureDialog != null ? measureDialog.a() : null;
                if (a5 != null) {
                    i60.a.f33292a.F(a5, "确定");
                }
                if (i == 0) {
                    ArrayList arrayList = new ArrayList();
                    arrayList.add(new FootMeasureSize("footLength", j.h("", (int) RangesKt___RangesKt.coerceAtLeast(this.f10994a.f10985g.getMLeftFootLength(), this.f10994a.f10985g.getMRightFootLength()))));
                    arrayList.add(new FootMeasureSize("footWidth", j.h("", (int) RangesKt___RangesKt.coerceAtLeast(this.f10994a.f10985g.getMLeftFootWidth(), this.f10994a.f10985g.getMRightFootWidth()))));
                    arrayList.add(new FootMeasureSize("archHeight", j.h("", (int) RangesKt___RangesKt.coerceAtLeast(this.f10994a.f10985g.getMLeftFootWidth(), this.f10994a.f10985g.getMRightArchHeight()))));
                    MeasureFacade.postMeasureFootSize(cd.c.b(TuplesKt.to("unitList", arrayList)), new a(this));
                    MeasureDialog measureDialog2 = this.f10994a.l;
                    if (measureDialog2 != null) {
                        measureDialog2.dismiss();
                        return;
                    }
                    return;
                }
                Intent intent = new Intent(this.f10994a.e, AIMeasureFootActivity.class);
                intent.putExtra("fromPage", "PageViewPage");
                intent.putExtra("roleId", this.f10994a.f10985g.getMRole());
                intent.putExtra("roleName", this.f10994a.f10985g.getMRoleName());
                intent.putExtra("roleSex", this.f10994a.f10985g.getMRoleSex());
                intent.putExtra("dataId", this.f10994a.f10985g.getMModifyId());
                intent.putExtra("reportId", this.f10994a.f10985g.getMReportId());
                this.f10994a.startActivity(intent);
                this.f10994a.finish();
            }
        }
    }

    /* compiled from: AIMeasureReviewActivity.kt */
    public static final class f implements AISOManager.ISoLoaderListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ AIMeasureReviewActivity f10995a;

        /* JADX WARN: Incorrect args count in method signature: ()V */
        public f(AIMeasureReviewActivity aIMeasureReviewActivity) {
            this.f10995a = aIMeasureReviewActivity;
        }

        @Override // com.shizhuang.duapp.modules.ai_measure.AISOManager.ISoLoaderListener
        public void onFailed() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66285, new Class[0], Void.TYPE).isSupported) {
                fo.a.m("AISOManager.loadAISo failed", new Object[0]);
                u0.d(this.f10995a.e, "so加载异常");
            }
        }

        @Override // com.shizhuang.duapp.modules.ai_measure.AISOManager.ISoLoaderListener
        public void onSuccess() {
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66286, new Class[0], Void.TYPE).isSupported) {
                this.f10995a.q();
            }
        }
    }

    public static void d(AIMeasureReviewActivity aIMeasureReviewActivity) {
        if (!PatchProxy.proxy(new Object[0], aIMeasureReviewActivity, changeQuickRedirect, false, 66188, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
            AISOManager.a(aIMeasureReviewActivity.getApplicationContext(), new f(aIMeasureReviewActivity));
        }
    }

    public static void e(AIMeasureReviewActivity aIMeasureReviewActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, aIMeasureReviewActivity, changeQuickRedirect, false, 66205, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void f(AIMeasureReviewActivity aIMeasureReviewActivity) {
        if (!PatchProxy.proxy(new Object[0], aIMeasureReviewActivity, changeQuickRedirect, false, 66207, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
        }
    }

    public static final /* synthetic */ RoleViewModel g(AIMeasureReviewActivity aIMeasureReviewActivity) {
        RoleViewModel roleViewModel = aIMeasureReviewActivity.F;
        if (roleViewModel == null) {
            Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
        }
        return roleViewModel;
    }

    public View _$_findCachedViewById(int i3) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 66202, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.J == null) {
            this.J = new HashMap();
        }
        View view = (View) this.J.get(Integer.valueOf(i3));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i3);
        this.J.put(Integer.valueOf(i3), findViewById);
        return findViewById;
    }

    @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, 66166, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_measure_review;
    }

    public final void h(TextView textView, Drawable drawable) {
        if (!PatchProxy.proxy(new Object[]{textView, drawable}, this, changeQuickRedirect, false, 66181, new Class[]{TextView.class, Drawable.class}, Void.TYPE).isSupported) {
            drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
            textView.setCompoundDrawables(null, null, null, drawable);
            textView.setCompoundDrawablePadding(8);
        }
    }

    public final ValueAnimator i(View view, int i3, int i12) {
        Object[] objArr = {view, new Integer(i3), new Integer(i12)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Integer.TYPE;
        PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 66183, new Class[]{View.class, cls, cls}, ValueAnimator.class);
        if (proxy.isSupported) {
            return (ValueAnimator) proxy.result;
        }
        ValueAnimator ofInt = ValueAnimator.ofInt(i3, i12);
        ofInt.addUpdateListener(new a(view, i3, i12));
        return ofInt;
    }

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

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initStatusBar() {
        Menu menu;
        MenuItem findItem;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66168, new Class[0], Void.TYPE).isSupported) {
            super.initStatusBar();
            DuToolbar duToolbar = (DuToolbar) _$_findCachedViewById(R.id.ll_tool_bar).findViewById(R.id.toolbar);
            this.C = duToolbar;
            if (duToolbar != null) {
                duToolbar.setBackgroundColor(0);
            }
            r0.x(this, 0, this.C);
            setSupportActionBar(this.C);
            DuToolbar duToolbar2 = this.C;
            if (duToolbar2 != null) {
                duToolbar2.setTitle(getString(R.string.ar_measure_result));
            }
            DuToolbar duToolbar3 = this.C;
            if (!(duToolbar3 == null || (menu = duToolbar3.getMenu()) == null || (findItem = menu.findItem(R.id.item_measure_result)) == null)) {
                findItem.setVisible(true);
            }
            DuToolbar duToolbar4 = this.C;
            if (duToolbar4 != null) {
                duToolbar4.setNavigationOnClickListener(new AIMeasureReviewActivity$initStatusBar$1(this));
            }
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
        Object obj;
        Object obj2;
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 66176, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            this.e = this;
            Bundle extras = getIntent().getExtras();
            Object obj3 = null;
            this.f = (String) (extras != null ? extras.get("resourcePath") : null);
            Bundle extras2 = getIntent().getExtras();
            String str = (String) (extras2 != null ? extras2.get("fromPage") : null);
            this.E = str;
            String str2 = "报告";
            if (Intrinsics.areEqual("FootPage", str)) {
                if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66170, new Class[0], Void.TYPE).isSupported) {
                    Bundle bundleExtra = getIntent().getBundleExtra("userInfo");
                    if (bundleExtra == null || (obj2 = bundleExtra.get("userInfo")) == null) {
                        obj2 = new UserInfo(null, null, null, 0, null, null, 0, null, 0, 0, 0, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, -1, 31, null);
                    }
                    this.f10985g = (UserInfo) obj2;
                    Bundle extras3 = getIntent().getExtras();
                    this.y = ((Integer) (extras3 != null ? extras3.get("reportId") : null)).intValue();
                    fo.a.m(this.f10984c + " from FootPage reportId=" + this.y, new Object[0]);
                    Bundle extras4 = getIntent().getExtras();
                    List<MeasureItemResult> list = (List) (extras4 != null ? extras4.get("leftFootResult") : null);
                    Bundle extras5 = getIntent().getExtras();
                    if (extras5 != null) {
                        obj3 = extras5.get("rightFootResult");
                    }
                    List<MeasureItemResult> list2 = (List) obj3;
                    fo.a.m(this.f10984c + " left measure size=" + list.size() + ", right measure size=" + list2.size(), new Object[0]);
                    int i3 = this.y;
                    if (!PatchProxy.proxy(new Object[]{new Integer(i3), list, list2}, this, changeQuickRedirect, false, 66180, new Class[]{Integer.TYPE, List.class, List.class}, Void.TYPE).isSupported) {
                        ArrayList arrayList = new ArrayList();
                        CollectionsKt___CollectionsKt.toMutableList((Collection) arrayList);
                        for (MeasureItemResult measureItemResult : list) {
                            arrayList.add(measureItemResult.getMImagePath());
                        }
                        ArrayList arrayList2 = new ArrayList();
                        CollectionsKt___CollectionsKt.toMutableList((Collection) arrayList2);
                        for (MeasureItemResult measureItemResult2 : list2) {
                            arrayList2.add(measureItemResult2.getMImagePath());
                        }
                        cw.a b2 = cw.a.b();
                        Context context = this.e;
                        if (!PatchProxy.proxy(new Object[]{context, new Integer(i3), arrayList, arrayList2}, b2, cw.a.changeQuickRedirect, false, 65534, new Class[]{Context.class, Integer.TYPE, List.class, List.class}, Void.TYPE).isSupported && arrayList.size() == 7 && arrayList2.size() == 7) {
                            ArrayList arrayList3 = new ArrayList();
                            Iterator it2 = arrayList.iterator();
                            while (it2.hasNext()) {
                                String str3 = (String) it2.next();
                                if (!TextUtils.isEmpty(str3) && i.t(str3)) {
                                    arrayList3.add(str3);
                                }
                            }
                            Iterator it3 = arrayList2.iterator();
                            while (it3.hasNext()) {
                                String str4 = (String) it3.next();
                                if (!TextUtils.isEmpty(str4) && i.t(str4)) {
                                    arrayList3.add(str4);
                                }
                            }
                            if (arrayList3.size() == 14) {
                                x0.j(context, false, arrayList3, "/arfoot/", new cw.b(b2, i3, arrayList3));
                            }
                        }
                    }
                    m();
                    MeasureFacade.getRoleLeastReport(this.y, new dw.j(this));
                }
                str2 = "测量完成";
            } else if (Intrinsics.areEqual("GenderPage", str)) {
                n();
            } else if (!Intrinsics.areEqual("PageViewPage", str)) {
                n();
                str2 = "尺码管理";
            } else if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66171, new Class[0], Void.TYPE).isSupported) {
                if (getIntent().hasExtra("source")) {
                    getIntent().getStringExtra("source");
                }
                Bundle bundleExtra2 = getIntent().getBundleExtra("userInfo");
                if (bundleExtra2 == null || (obj = bundleExtra2.get("userInfo")) == null) {
                    obj = new UserInfo(null, null, null, 0, null, null, 0, null, 0, 0, 0, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, false, 0.0d, 0.0d, 0, 0, 0.0d, 0.0d, 0.0d, 0.0d, 0, null, 0, null, -1, 31, null);
                }
                this.f10985g = (UserInfo) obj;
                Bundle extras6 = getIntent().getExtras();
                this.y = ((Integer) (extras6 != null ? extras6.get("reportId") : null)).intValue();
                Bundle extras7 = getIntent().getExtras();
                if (extras7 != null) {
                    obj3 = extras7.get("roleSex");
                }
                this.D = (Integer) obj3;
                fo.a.m(this.f10984c + " from GenderPage reportId=" + this.y, new Object[0]);
                l();
                MeasureFacade.getRoleLeastReport(this.y, new k(this));
            }
            i60.a aVar = i60.a.f33292a;
            if (!PatchProxy.proxy(new Object[]{str2}, aVar, i60.a.changeQuickRedirect, false, 125179, new Class[]{Object.class}, Void.TYPE).isSupported) {
                i60.b.f33293a.b("trade_ar_footmeasure_pageview", "1465", "", j.e(8, "source_name", str2));
            }
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66169, new Class[0], Void.TYPE).isSupported) {
                aVar.R("返回", "");
                aVar.R("重测", "");
                aVar.R("分享", "1");
                aVar.R("切换人物", "");
            }
            RoleViewModel roleViewModel = new RoleViewModel();
            this.F = roleViewModel;
            roleViewModel.a();
        }
    }

    public final void j() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66190, new Class[0], Void.TYPE).isSupported) {
            DuGLRender duGLRender = this.w;
            if (duGLRender != null) {
                duGLRender.unInit();
            }
            ((FrameLayout) _$_findCachedViewById(R.id.fl_model_render)).removeAllViews();
            this.I = false;
        }
    }

    public final void k(int i3, int i12) {
        Object[] objArr = {new Integer(i3), new Integer(i12)};
        ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
        Class cls = Integer.TYPE;
        if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 66184, new Class[]{cls, cls}, Void.TYPE).isSupported) {
            q.a(new b(this, i3, i12));
        }
    }

    public final void l() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66193, new Class[0], Void.TYPE).isSupported) {
            StringBuilder sb2 = new StringBuilder();
            sb2.append(this.f);
            File file = new File(a.f.g(sb2, File.separator, "frames"));
            if (file.exists()) {
                File[] listFiles = file.listFiles();
                ArrayList arrayList = new ArrayList();
                CollectionsKt___CollectionsKt.toMutableList((Collection) arrayList);
                for (File file2 : listFiles) {
                    if (StringsKt__StringsJVMKt.endsWith(file2.getAbsolutePath(), ".jpg", false)) {
                        arrayList.add(file2.getAbsolutePath());
                    }
                }
                if (arrayList.size() == 14) {
                    cw.a.b().c(this.e, this.y, arrayList);
                } else {
                    cw.a.b().a(arrayList);
                }
            }
        }
    }

    public final void m() {
        co.c cVar;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66175, new Class[0], Void.TYPE).isSupported) {
            this.i = RangesKt___RangesKt.coerceAtLeast((int) this.f10985g.getMLeftFootLength(), (int) this.f10985g.getMRightFootLength());
            this.j = this.f10985g.getMSexInt();
            if (this.f10985g.getMRoleSex() == 1) {
                ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setImageResource(R.mipmap.icon_male);
            } else if (this.f10985g.getMRoleSex() == 2) {
                ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setImageResource(R.mipmap.icon_female);
            } else if (this.f10985g.getMSexInt() == 2) {
                ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setImageResource(R.mipmap.icon_female);
            } else {
                ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setImageResource(R.mipmap.icon_male);
            }
            int i3 = fi.b.f32351a;
            int l12 = fi.b.l(this);
            String str = this.d;
            c.a aVar = cw.c.f31260c;
            ((ImageView) _$_findCachedViewById(R.id.image_scan_code)).setImageBitmap(h0.a(str, aVar.c(138.0f, i3)));
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_shape)).setVisibility(8);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_width)).setVisibility(8);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_arch)).setVisibility(8);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_arch_shape)).setVisibility(8);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_root_shape)).setVisibility(8);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_buy_advice)).setVisibility(8);
            Drawable drawable = getDrawable(R.mipmap.measure_info_bg);
            ((TextView) _$_findCachedViewById(R.id.tv_person_name)).setText(this.f10985g.getMRoleName());
            MeasureFacade.getFootMeasureInfo(this.y, new d(this));
            i60.a.f33292a.Q("部位", "");
            i.r(a.f.h(""), (int) this.f10985g.getMLeftFootLength(), "mm", (TextView) _$_findCachedViewById(R.id.text_left_foot_length));
            i.r(a.f.h(""), (int) this.f10985g.getMLeftFootWidth(), "mm", (TextView) _$_findCachedViewById(R.id.text_left_foot_width));
            i.r(a.f.h(""), (int) this.f10985g.getMRightFootLength(), "mm", (TextView) _$_findCachedViewById(R.id.text_right_foot_length));
            i.r(a.f.h(""), (int) this.f10985g.getMRightFootWidth(), "mm", (TextView) _$_findCachedViewById(R.id.text_right_foot_width));
            i.r(a.f.h(""), (int) this.f10985g.getMLeftArchHeight(), "mm", (TextView) _$_findCachedViewById(R.id.text_left_foot_arch));
            i.r(a.f.h(""), (int) this.f10985g.getMRightArchHeight(), "mm", (TextView) _$_findCachedViewById(R.id.text_right_foot_arch));
            String mMeasureTime = this.f10985g.getMMeasureTime();
            if (mMeasureTime.length() == 0) {
                ((TextView) _$_findCachedViewById(R.id.tv_person_info)).setText(jo.a.b(new Date(), "yyyy.MM.dd HH:mm:ss"));
            } else {
                ((TextView) _$_findCachedViewById(R.id.tv_person_info)).setText(mMeasureTime);
            }
            UserAvatar userAvatar = (UserAvatar) _$_findCachedViewById(R.id.iv_person_avatar);
            String mIcon = this.f10985g.getMIcon();
            int c5 = aVar.c(60.0f, i3);
            ChangeQuickRedirect changeQuickRedirect2 = UserAvatar.changeQuickRedirect;
            Object[] objArr = {mIcon, new Integer(c5), new Integer(-1), new Float((float) o5.i.f36333a)};
            ChangeQuickRedirect changeQuickRedirect3 = UserAvatar.changeQuickRedirect;
            Class cls = Integer.TYPE;
            if (!PatchProxy.proxy(objArr, userAvatar, changeQuickRedirect3, false, 66565, new Class[]{String.class, cls, cls, Float.TYPE}, Void.TYPE).isSupported) {
                co.c Y = ((DuImageLoaderView) userAvatar.a(R.id.ivAvatar)).i(mIcon).X(-1).Y(o5.i.f36333a);
                PatchProxyResult proxy = PatchProxy.proxy(new Object[]{Y}, userAvatar, UserAvatar.changeQuickRedirect, false, 66568, new Class[]{co.c.class}, co.c.class);
                if (proxy.isSupported) {
                    cVar = (co.c) proxy.result;
                } else {
                    cVar = Y.o0(true).j0(userAvatar.getContext(), R.mipmap.ic_user_icon).b0(userAvatar.getContext(), Integer.valueOf((int) R.mipmap.ic_user_icon)).p0(DuScaleType.CENTER_CROP);
                }
                if (!PatchProxy.proxy(new Object[]{cVar, new Integer(c5)}, userAvatar, UserAvatar.changeQuickRedirect, false, 66566, new Class[]{co.c.class, cls}, Void.TYPE).isSupported) {
                    DuImageLoaderView duImageLoaderView = (DuImageLoaderView) userAvatar.a(R.id.ivAvatar);
                    if (!PatchProxy.proxy(new Object[]{duImageLoaderView, new Integer(c5), new Integer(c5)}, userAvatar, UserAvatar.changeQuickRedirect, false, 66567, new Class[]{View.class, cls, cls}, Void.TYPE).isSupported) {
                        ViewGroup.LayoutParams layoutParams = duImageLoaderView.getLayoutParams();
                        layoutParams.width = c5;
                        layoutParams.height = c5;
                        Unit unit = Unit.INSTANCE;
                        duImageLoaderView.setLayoutParams(layoutParams);
                    }
                    cVar.x();
                }
            }
            ViewGroup.LayoutParams layoutParams2 = ((LinearLayout) _$_findCachedViewById(R.id.layout_parent_render)).getLayoutParams();
            layoutParams2.width = i3;
            layoutParams2.height = i3;
            ((LinearLayout) _$_findCachedViewById(R.id.layout_parent_render)).setLayoutParams(layoutParams2);
            ViewGroup.LayoutParams layoutParams3 = ((FrameLayout) _$_findCachedViewById(R.id.fl_model_render)).getLayoutParams();
            layoutParams3.width = i3;
            layoutParams3.height = i3;
            ((FrameLayout) _$_findCachedViewById(R.id.fl_model_render)).setLayoutParams(layoutParams3);
            BottomSheetBehavior.from((FrameLayout) _$_findCachedViewById(R.id.fl_bottom_sheet)).setPeekHeight(l12 - i3);
            ViewGroup.LayoutParams layoutParams4 = ((FrameLayout) _$_findCachedViewById(R.id.fl_bottom_sheet)).getLayoutParams();
            layoutParams4.height = (int) (((double) l12) * 0.8d);
            ((FrameLayout) _$_findCachedViewById(R.id.fl_bottom_sheet)).setLayoutParams(layoutParams4);
            ViewGroup.LayoutParams layoutParams5 = ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_shape)).getLayoutParams();
            layoutParams5.height = aVar.b(180.0f, l12);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_shape)).setLayoutParams(layoutParams5);
            ViewGroup.LayoutParams layoutParams6 = ((TextView) _$_findCachedViewById(R.id.text_foot_shape_desc)).getLayoutParams();
            layoutParams6.width = aVar.c(200.0f, i3);
            ((TextView) _$_findCachedViewById(R.id.text_foot_shape_desc)).setLayoutParams(layoutParams6);
            ViewGroup.LayoutParams layoutParams7 = ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_shape_desc)).getLayoutParams();
            layoutParams7.width = aVar.c(250.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_shape_desc)).setLayoutParams(layoutParams7);
            ViewGroup.LayoutParams layoutParams8 = ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_shape)).getLayoutParams();
            int c12 = aVar.c(138.0f, i3);
            layoutParams8.width = c12;
            layoutParams8.height = c12;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_shape)).setLayoutParams(layoutParams8);
            ViewGroup.LayoutParams layoutParams9 = ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_width)).getLayoutParams();
            layoutParams9.height = aVar.b(180.0f, l12);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_width)).setLayoutParams(layoutParams9);
            ViewGroup.LayoutParams layoutParams10 = ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_width_kind)).getLayoutParams();
            layoutParams10.width = aVar.c(200.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_width_kind)).setLayoutParams(layoutParams10);
            ViewGroup.LayoutParams layoutParams11 = ((TextView) _$_findCachedViewById(R.id.text_foot_width_desc)).getLayoutParams();
            layoutParams11.width = aVar.c(200.0f, i3);
            ((TextView) _$_findCachedViewById(R.id.text_foot_width_desc)).setLayoutParams(layoutParams11);
            ViewGroup.LayoutParams layoutParams12 = ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_width_desc)).getLayoutParams();
            layoutParams12.width = aVar.c(250.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_width_desc)).setLayoutParams(layoutParams12);
            ViewGroup.LayoutParams layoutParams13 = ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_width)).getLayoutParams();
            int c13 = aVar.c(138.0f, i3);
            layoutParams13.width = c13;
            layoutParams13.height = c13;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_width)).setLayoutParams(layoutParams13);
            ViewGroup.LayoutParams layoutParams14 = ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_arch)).getLayoutParams();
            layoutParams14.height = aVar.b(180.0f, l12);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_foot_arch)).setLayoutParams(layoutParams14);
            ViewGroup.LayoutParams layoutParams15 = ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_arch_kind)).getLayoutParams();
            layoutParams15.width = aVar.c(200.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_arch_kind)).setLayoutParams(layoutParams15);
            ViewGroup.LayoutParams layoutParams16 = ((TextView) _$_findCachedViewById(R.id.text_foot_arch_desc)).getLayoutParams();
            layoutParams16.width = aVar.c(200.0f, i3);
            ((TextView) _$_findCachedViewById(R.id.text_foot_arch_desc)).setLayoutParams(layoutParams16);
            ViewGroup.LayoutParams layoutParams17 = ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_arch_desc)).getLayoutParams();
            layoutParams17.width = aVar.c(250.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_foot_arch_desc)).setLayoutParams(layoutParams17);
            ViewGroup.LayoutParams layoutParams18 = ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_arch)).getLayoutParams();
            int c14 = aVar.c(138.0f, i3);
            layoutParams18.width = c14;
            layoutParams18.height = c14;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.image_foot_arch)).setLayoutParams(layoutParams18);
            ViewGroup.LayoutParams layoutParams19 = ((RelativeLayout) _$_findCachedViewById(R.id.layout_arch_shape)).getLayoutParams();
            layoutParams19.height = aVar.b(180.0f, l12);
            ((RelativeLayout) _$_findCachedViewById(R.id.layout_arch_shape)).setLayoutParams(layoutParams19);
            ViewGroup.LayoutParams layoutParams20 = ((LinearLayout) _$_findCachedViewById(R.id.layout_arch_shape_desc)).getLayoutParams();
            layoutParams20.width = aVar.c(250.0f, i3);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_arch_shape_desc)).setLayoutParams(layoutParams20);
            ViewGroup.LayoutParams layoutParams21 = ((DuImageLoaderView) _$_findCachedViewById(R.id.image_arch_shape)).getLayoutParams();
            int c15 = aVar.c(138.0f, i3);
            layoutParams21.width = c15;
            layoutParams21.height = c15;
            ((DuImageLoaderView) _$_findCachedViewById(R.id.image_arch_shape)).setLayoutParams(layoutParams21);
            ViewGroup.LayoutParams layoutParams22 = ((TextView) _$_findCachedViewById(R.id.tv_sync_measure_result_enter)).getLayoutParams();
            int c16 = aVar.c(15.0f, i3);
            layoutParams22.width = c16;
            layoutParams22.height = c16;
            ((TextView) _$_findCachedViewById(R.id.tv_sync_measure_result_enter)).setLayoutParams(layoutParams22);
            Drawable drawable2 = getDrawable(R.drawable.foot_width_background);
            if (drawable2 != null) {
                h((TextView) _$_findCachedViewById(R.id.tv_foot_width_1), drawable2);
                h((TextView) _$_findCachedViewById(R.id.tv_foot_width_2), drawable2);
                h((TextView) _$_findCachedViewById(R.id.tv_foot_width_3), drawable2);
            }
            StringBuilder sb2 = new StringBuilder();
            sb2.append(this.f);
            ((LinearLayout) _$_findCachedViewById(R.id.layout_parent_render)).setBackground(Drawable.createFromPath(a.f.g(sb2, File.separator, "ar_footscan_report_bg.png")));
            if (!Intrinsics.areEqual(this.E, "MySize")) {
                q();
            }
            ((TextView) _$_findCachedViewById(R.id.tv_measure_feedback)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$2(this));
            ((TextView) _$_findCachedViewById(R.id.callback)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$3(this));
            ((TextView) _$_findCachedViewById(R.id.share_button)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$4(this));
            ((TextView) _$_findCachedViewById(R.id.tv_choice_role)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$5(this));
            MeasureDialog measureDialog = new MeasureDialog(this);
            this.l = measureDialog;
            measureDialog.c(new e(this));
            ((TextView) _$_findCachedViewById(R.id.tv_sync_measure_result)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$7(this));
            ((TextView) _$_findCachedViewById(R.id.tv_sync_measure_result_enter)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$8(this));
            ((TextView) _$_findCachedViewById(R.id.tv_jump_to_size_page)).setOnClickListener(new AIMeasureReviewActivity$freshUIView$9(this));
            AIMeasureReviewActivity$freshUIView$timerTask$1 aIMeasureReviewActivity$freshUIView$timerTask$1 = new AIMeasureReviewActivity$freshUIView$timerTask$1(this, l12);
            ((NestedScrollView) _$_findCachedViewById(R.id.scrollview_nested)).setOnScrollChangeListener(new AIMeasureReviewActivity$freshUIView$10(this, l12));
            ((LinearLayout) _$_findCachedViewById(R.id.layout_recommend)).setVisibility(8);
            MeasureFacade.getRecommendShoes(this.i, this.j, new c(this, drawable, l12, aIMeasureReviewActivity$freshUIView$timerTask$1));
        }
    }

    public final void n() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66173, new Class[0], Void.TYPE).isSupported) {
            Bundle extras = getIntent().getExtras();
            try {
                JsonObject jsonObject = (JsonObject) new Gson().fromJson((String) (extras != null ? extras.get("dataJson") : null), JsonObject.class);
                this.f10985g.setMUserName(jsonObject.get("userName").getAsString());
                this.f10985g.setMIcon(jsonObject.get("userAvatar").getAsString());
                this.f10985g.setMSurveyH5(jsonObject.get("surveyH5").getAsString());
                this.f10985g.setMRoleName(jsonObject.get("roleName").getAsString());
                this.f10985g.setMRole(jsonObject.get("role").getAsInt());
                JsonObject asJsonObject = jsonObject.get(PushConstants.CONTENT).getAsJsonObject();
                this.y = asJsonObject.get("reportId").getAsInt();
                this.f10985g.setMRoleSex(asJsonObject.get("gender").getAsInt());
                if (this.f10985g.getMRoleSex() == 1) {
                    this.f10985g.setMSexStr("男");
                } else {
                    this.f10985g.setMSexStr("女");
                }
                fo.a.m(this.f10984c + " from mRoleSexType mRoleSexType=" + this.D, new Object[0]);
                if (this.f10985g.getMRoleSex() == 1) {
                    ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setBackgroundResource(R.mipmap.icon_male);
                } else {
                    ((ImageView) _$_findCachedViewById(R.id.sex_img_icon)).setBackgroundResource(R.mipmap.icon_female);
                }
                this.f10985g.setMMeasureTime(asJsonObject.get("measureTime").getAsString());
                JsonObject asJsonObject2 = asJsonObject.get("left").getAsJsonObject();
                this.f10985g.setMLeftFootLength(asJsonObject2.get("length").getAsDouble());
                this.f10985g.setMLeftFootWidth(asJsonObject2.get("width").getAsDouble());
                this.f10985g.setMLeftShapeType(asJsonObject2.get("shapeType").getAsInt());
                this.f10985g.setMLeftArchHeight(asJsonObject2.get("archHeight").getAsDouble());
                JsonObject asJsonObject3 = asJsonObject.get("right").getAsJsonObject();
                this.f10985g.setMRightFootLength(asJsonObject3.get("length").getAsDouble());
                this.f10985g.setMRightFootWidth(asJsonObject3.get("width").getAsDouble());
                this.f10985g.setMRightShapeType(asJsonObject3.get("shapeType").getAsInt());
                this.f10985g.setMRightArchHeight(asJsonObject3.get("archHeight").getAsDouble());
            } catch (Exception e6) {
                fo.a.i(this.f10984c + " parseUserInfo failed, e=" + e6.getMessage(), new Object[0]);
            }
            m();
        }
    }

    public final ArrayList<RecommendShoeInfo> o() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66164, new Class[0], ArrayList.class);
        return (ArrayList) (proxy.isSupported ? proxy.result : this.m.getValue());
    }

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

    public boolean onCreateOptionsMenu(@org.jetbrains.annotations.Nullable Menu menu) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{menu}, this, changeQuickRedirect, false, 66177, new Class[]{Menu.class}, Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        getMenuInflater().inflate(R.menu.menu_ai_measure_result, menu);
        View view = null;
        MenuItem findItem = menu != null ? menu.findItem(R.id.item_measure_result) : null;
        if (findItem != null) {
            view = findItem.getActionView();
        }
        if (view != null) {
            ((TextView) view.findViewById(R.id.tv_measure_result_again)).setOnClickListener(new AIMeasureReviewActivity$onCreateOptionsMenu$1(this));
        }
        return true;
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66185, new Class[0], Void.TYPE).isSupported) {
            DuGLRender duGLRender = this.w;
            if (duGLRender != null) {
                duGLRender.unInit();
            }
            Timer p12 = p();
            if (p12 != null) {
                p12.cancel();
            }
            super.onDestroy();
        }
    }

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

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

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

    public final Timer p() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66165, new Class[0], Timer.class);
        return (Timer) (proxy.isSupported ? proxy.result : this.s.getValue());
    }

    public final void q() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66191, new Class[0], Void.TYPE).isSupported && !this.I) {
            fo.a.m(a.f.g(new StringBuilder(), this.f10984c, "  renderFootModel"), new Object[0]);
            this.I = true;
            StringBuilder sb2 = new StringBuilder();
            sb2.append(this.f);
            String str = File.separator;
            String g3 = a.f.g(sb2, str, "ar_footscan_report_bg.png");
            int i3 = fi.b.f32351a;
            int l12 = fi.b.l(this);
            if (i.t(g3)) {
                fo.a.m(a.f.g(new StringBuilder(), this.f10984c, "  renderFootModel into flush"), new Object[0]);
                String i12 = a01.a.i(new StringBuilder(), this.f, str, "foot/foot_1433.obj");
                if (i.t(i12)) {
                    fo.a.m(a.f.g(new StringBuilder(), this.f10984c, "  ARSOManager.loadArSo onSuccess"), new Object[0]);
                    DuGLRender duGLRender = new DuGLRender(getContext());
                    this.w = duGLRender;
                    duGLRender.loadObj(i12);
                    DuGLRender duGLRender2 = this.w;
                    if (duGLRender2 != null) {
                        duGLRender2.setBackGround(g3);
                    }
                    DuGLRender duGLRender3 = this.w;
                    if (duGLRender3 != null) {
                        duGLRender3.setFootSize((int) this.f10985g.getMLeftFootLength(), (int) this.f10985g.getMLeftFootWidth(), (int) this.f10985g.getMRightFootLength(), (int) this.f10985g.getMRightFootWidth(), (int) this.f10985g.getMLeftArchHeight(), (int) this.f10985g.getMRightArchHeight());
                    }
                    this.x = new FootGLSurfaceView(getContext(), this.w);
                    DuGLRender duGLRender4 = this.w;
                    if (duGLRender4 != null) {
                        duGLRender4.setScreenshot(true);
                    }
                    ((FrameLayout) _$_findCachedViewById(R.id.fl_model_render)).addView(this.x);
                    return;
                }
                String i13 = a01.a.i(new StringBuilder(), this.f, str, "foot_measure_logo.png");
                if (i.t(i13)) {
                    ImageView imageView = new ImageView(this);
                    FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(100, 100);
                    c.a aVar = cw.c.f31260c;
                    layoutParams.width = aVar.c(215.0f, i3);
                    layoutParams.height = aVar.b(244.0f, l12);
                    layoutParams.gravity = 17;
                    imageView.setLayoutParams(layoutParams);
                    imageView.setImageBitmap(BitmapFactory.decodeFile(i13));
                    ((FrameLayout) _$_findCachedViewById(R.id.fl_model_render)).addView(imageView);
                }
            }
        }
    }

    public final void r(int i3) {
        MutableLiveData<Integer> e6;
        if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 66197, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
            if (i3 == 0) {
                RoleViewModel roleViewModel = this.F;
                if (roleViewModel == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
                }
                List<RoleInfo> value = roleViewModel.l().getValue();
                if ((value != null ? value.size() : 0) >= roleViewModel.f()) {
                    if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 66201, new Class[0], Void.TYPE).isSupported) {
                        Context context = this.e;
                        RoleViewModel roleViewModel2 = this.F;
                        if (roleViewModel2 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
                        }
                        TipsDialog tipsDialog = new TipsDialog(context, 1, roleViewModel2.f());
                        tipsDialog.show();
                        tipsDialog.a(new dw.l(tipsDialog));
                        return;
                    }
                    return;
                }
            }
            RoleViewModel roleViewModel3 = this.F;
            if (roleViewModel3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
            }
            roleViewModel3.p(i3);
            RoleViewModel roleViewModel4 = this.F;
            if (roleViewModel4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
            }
            if (!(roleViewModel4 == null || (e6 = roleViewModel4.e()) == null)) {
                e6.observe(this, new AIMeasureReviewActivity$showEditDialog$2(this));
            }
            if (this.G == null) {
                RoleEditDialog.a aVar = RoleEditDialog.f;
                RoleViewModel roleViewModel5 = this.F;
                if (roleViewModel5 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("roleViewModel");
                }
                this.G = aVar.a(roleViewModel5);
            }
            RoleEditDialog roleEditDialog = this.G;
            if (roleEditDialog != null) {
                roleEditDialog.i(this);
            }
        }
    }

    public final void s(TextView textView, boolean z4) {
        ValueAnimator valueAnimator;
        if (!PatchProxy.proxy(new Object[]{textView, new Byte(z4 ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 66182, new Class[]{TextView.class, Boolean.TYPE}, Void.TYPE).isSupported) {
            if (z4) {
                i60.a.f33292a.P(getString(R.string.tv_measure_feedback), "0");
            }
            textView.setVisibility(0);
            textView.setText(getString(R.string.tv_measure_feedback));
            int i3 = fi.b.f32351a;
            int l12 = fi.b.l(this);
            c.a aVar = cw.c.f31260c;
            aVar.b(38.0f, l12);
            if (z4) {
                valueAnimator = i(textView, 0, aVar.c(105.0f, i3));
            } else {
                valueAnimator = i(textView, aVar.c(105.0f, i3), aVar.c(38.0f, i3));
            }
            if (valueAnimator != null) {
                valueAnimator.setDuration(500L);
            }
            if (valueAnimator != null) {
                valueAnimator.addListener(new AIMeasureReviewActivity$showFeedbackAnimation$1(this, z4, l12, textView));
            }
            if (valueAnimator != null) {
                valueAnimator.start();
            }
        }
    }

    public final void t(String str, String str2) {
        if (!PatchProxy.proxy(new Object[]{str, str2}, this, changeQuickRedirect, false, 66178, new Class[]{String.class, String.class}, Void.TYPE).isSupported) {
            i60.a aVar = i60.a.f33292a;
            aVar.I("尺码管理", "同步数据");
            MeasureDialog measureDialog = this.l;
            if (measureDialog != null) {
                measureDialog.b(0, str);
            }
            MeasureDialog measureDialog2 = this.l;
            if (measureDialog2 != null) {
                measureDialog2.show();
            }
            aVar.O(str);
        }
    }
}