得物.apk(点击下载) / FootMeasureShareDialog.java
package com.shizhuang.duapp.modules.productv2.foot.fragment;
import android.app.Dialog;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewKt;
import cd.l;
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.shizhuang.duapp.R;
import com.shizhuang.duapp.common.dialog.BaseDialogFragment;
import com.shizhuang.duapp.modules.share.callback.DuShareListener;
import com.shizhuang.duapp.modules.share.constance.SHARE_MEDIA;
import com.shizhuang.duapp.modules.share.view.ShareLightCommonView;
import df.h0;
import df.r0;
import java.util.HashMap;
import jn.b;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import org.jetbrains.annotations.Nullable;
import pb1.i;
@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/productv2/foot/fragment/FootMeasureShareDialog;", "Lcom/shizhuang/duapp/common/dialog/BaseDialogFragment;", "<init>", "()V", "du_product_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: FootMeasureShareDialog.kt */
public final class FootMeasureShareDialog extends BaseDialogFragment {
public static ChangeQuickRedirect changeQuickRedirect;
@Nullable
public View e;
@Nullable
public View f;
@Nullable
/* renamed from: g reason: collision with root package name */
public View f23809g;
/* renamed from: h reason: collision with root package name */
public final String f23810h = "https://fast.dewu.com/nezha-plus/detail/608122b0ca1b4e579866774b";
public HashMap i;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(FootMeasureShareDialog footMeasureShareDialog, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{footMeasureShareDialog, bundle}, null, changeQuickRedirect, true, 296928, new Class[]{FootMeasureShareDialog.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
FootMeasureShareDialog.s(footMeasureShareDialog, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (footMeasureShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.foot.fragment.FootMeasureShareDialog")) {
b.f34396a.fragmentOnCreateMethod(footMeasureShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull FootMeasureShareDialog footMeasureShareDialog, @androidx.annotation.Nullable LayoutInflater layoutInflater, @androidx.annotation.Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{footMeasureShareDialog, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 296930, new Class[]{FootMeasureShareDialog.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View u4 = FootMeasureShareDialog.u(footMeasureShareDialog, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (footMeasureShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.foot.fragment.FootMeasureShareDialog")) {
b.f34396a.fragmentOnCreateViewMethod(footMeasureShareDialog, currentTimeMillis, currentTimeMillis2);
}
return u4;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(FootMeasureShareDialog footMeasureShareDialog) {
if (!PatchProxy.proxy(new Object[]{footMeasureShareDialog}, null, changeQuickRedirect, true, 296931, new Class[]{FootMeasureShareDialog.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
FootMeasureShareDialog.v(footMeasureShareDialog);
long currentTimeMillis2 = System.currentTimeMillis();
if (footMeasureShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.foot.fragment.FootMeasureShareDialog")) {
b.f34396a.fragmentOnResumeMethod(footMeasureShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(FootMeasureShareDialog footMeasureShareDialog) {
if (!PatchProxy.proxy(new Object[]{footMeasureShareDialog}, null, changeQuickRedirect, true, 296929, new Class[]{FootMeasureShareDialog.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
FootMeasureShareDialog.t(footMeasureShareDialog);
long currentTimeMillis2 = System.currentTimeMillis();
if (footMeasureShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.foot.fragment.FootMeasureShareDialog")) {
b.f34396a.fragmentOnStartMethod(footMeasureShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull FootMeasureShareDialog footMeasureShareDialog, @androidx.annotation.Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{footMeasureShareDialog, view, bundle}, null, changeQuickRedirect, true, 296932, new Class[]{FootMeasureShareDialog.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
FootMeasureShareDialog.w(footMeasureShareDialog, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (footMeasureShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.productv2.foot.fragment.FootMeasureShareDialog")) {
b.f34396a.fragmentOnViewCreatedMethod(footMeasureShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: FootMeasureShareDialog.kt */
public static final class a implements DuShareListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ FootMeasureShareDialog f23811a;
/* JADX WARN: Incorrect args count in method signature: ()V */
public a(FootMeasureShareDialog footMeasureShareDialog) {
this.f23811a = footMeasureShareDialog;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onCancel(@Nullable SHARE_MEDIA share_media) {
boolean z = PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 296936, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onError(@Nullable SHARE_MEDIA share_media, @Nullable Throwable th2) {
boolean z = PatchProxy.proxy(new Object[]{share_media, th2}, this, changeQuickRedirect, false, 296937, new Class[]{SHARE_MEDIA.class, Throwable.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onResult(@Nullable SHARE_MEDIA share_media) {
boolean z = PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 296935, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onStart(@Nullable SHARE_MEDIA share_media) {
if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 296938, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported && l.c(this.f23811a)) {
this.f23811a.dismiss();
}
}
}
public static void s(FootMeasureShareDialog footMeasureShareDialog, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, footMeasureShareDialog, changeQuickRedirect, false, 296919, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void t(FootMeasureShareDialog footMeasureShareDialog) {
if (!PatchProxy.proxy(new Object[0], footMeasureShareDialog, changeQuickRedirect, false, 296921, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View u(FootMeasureShareDialog footMeasureShareDialog, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, footMeasureShareDialog, changeQuickRedirect, false, 296923, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void v(FootMeasureShareDialog footMeasureShareDialog) {
if (!PatchProxy.proxy(new Object[0], footMeasureShareDialog, changeQuickRedirect, false, 296925, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void w(FootMeasureShareDialog footMeasureShareDialog, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, footMeasureShareDialog, changeQuickRedirect, false, 296927, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 296916, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.i == null) {
this.i = new HashMap();
}
View view = (View) this.i.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i3);
this.i.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment
public void g() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296911, new Class[0], Void.TYPE).isSupported) {
super.g();
Dialog dialog = getDialog();
if (dialog != null) {
dialog.setCanceledOnTouchOutside(true);
dialog.setCancelable(true);
}
Dialog dialog2 = getDialog();
Window window = dialog2 != null ? dialog2.getWindow() : null;
if (window != null) {
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.width = -1;
attributes.height = -1;
window.setAttributes(attributes);
}
}
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 296918, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 296922, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public void onDestroyView() {
HashMap hashMap;
super.onDestroyView();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296917, new Class[0], Void.TYPE).isSupported && (hashMap = this.i) != null) {
hashMap.clear();
}
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296924, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296920, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.dialog.DuDialogFragment, androidx.appcompat.app.AppCompatDialogFragment, androidx.fragment.app.Fragment, com.shizhuang.duapp.common.dialog.BaseDialogFragment, androidx.fragment.app.DialogFragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 296926, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
@Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
public int p() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296910, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.style.ShareScreenShot;
}
@Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
public int q() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296909, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.dialog_foot_measure_share;
}
@Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
public void r(@Nullable View view) {
Bitmap bitmap;
Bitmap drawToBitmap$default;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 296912, new Class[]{View.class}, Void.TYPE).isSupported) {
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) ((ConstraintLayout) _$_findCachedViewById(R.id.shareView)).getLayoutParams();
layoutParams.setMargins(((ViewGroup.MarginLayoutParams) layoutParams).leftMargin, r0.i(getContext()), ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin, ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin);
try {
Result.Companion companion = Result.Companion;
AppCompatImageView appCompatImageView = (AppCompatImageView) _$_findCachedViewById(R.id.headImg);
View view2 = this.e;
Bitmap bitmap2 = null;
if (view2 == null || (drawToBitmap$default = ViewKt.drawToBitmap$default(view2, null, 1, null)) == null) {
bitmap = null;
} else {
int b = fi.b.b((float) 45);
bitmap = Bitmap.createBitmap(drawToBitmap$default, 0, b, drawToBitmap$default.getWidth(), drawToBitmap$default.getHeight() - b);
}
appCompatImageView.setImageBitmap(bitmap);
AppCompatImageView appCompatImageView2 = (AppCompatImageView) _$_findCachedViewById(R.id.typeImg);
View view3 = this.f;
appCompatImageView2.setImageBitmap(view3 != null ? ViewKt.drawToBitmap$default(view3, null, 1, null) : null);
AppCompatImageView appCompatImageView3 = (AppCompatImageView) _$_findCachedViewById(R.id.adviceImg);
View view4 = this.f23809g;
if (view4 != null) {
bitmap2 = ViewKt.drawToBitmap$default(view4, null, 1, null);
}
appCompatImageView3.setImageBitmap(bitmap2);
Result.m822constructorimpl(Unit.INSTANCE);
} catch (Throwable th2) {
Result.Companion companion2 = Result.Companion;
Result.m822constructorimpl(ResultKt.createFailure(th2));
}
((ImageView) _$_findCachedViewById(R.id.ivQrCode)).setImageBitmap(h0.a(this.f23810h, fi.b.b(43.0f)));
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296914, new Class[0], Void.TYPE).isSupported) {
((ShareLightCommonView) _$_findCachedViewById(R.id.shareLightCommonView)).m.setOnClickListener(new FootMeasureShareDialog$initShareLayout$1(this));
((ShareLightCommonView) _$_findCachedViewById(R.id.shareLightCommonView)).a(new w51.a(this));
}
}
}
public final Bitmap x() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 296913, new Class[0], Bitmap.class);
return proxy.isSupported ? (Bitmap) proxy.result : ViewKt.drawToBitmap$default((ConstraintLayout) _$_findCachedViewById(R.id.shareView), null, 1, null);
}
public final void y(SHARE_MEDIA share_media) {
if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 296915, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported && l.c(this) && ViewCompat.isLaidOut((ConstraintLayout) _$_findCachedViewById(R.id.shareView))) {
pb1.l b = pb1.l.b(getActivity());
i iVar = new i();
if (share_media == SHARE_MEDIA.QQ) {
iVar.t(Bitmap.CompressFormat.PNG);
}
iVar.r(x());
iVar.w(false);
Unit unit = Unit.INSTANCE;
b.e(iVar).f(new a(this)).g(share_media);
}
}
}