得物.apk(点击下载) / ScreenShotShareDialog.java
package com.shizhuang.duapp.common.utils.screenshot;
import a.f;
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.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.ViewKt;
import cd.l;
import co.c;
import co.d;
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.libs.duimageloaderview.DuImageLoaderView;
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.r0;
import java.util.HashMap;
import jf.e;
import jf.j;
import jf.k;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.text.StringsKt__StringsKt;
import org.jetbrains.annotations.NotNull;
import pb1.i;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lcom/shizhuang/duapp/common/utils/screenshot/ScreenShotShareDialog;", "Lcom/shizhuang/duapp/common/dialog/BaseDialogFragment;", "<init>", "()V", "a", "du-screenshot_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ScreenShotShareDialog.kt */
public final class ScreenShotShareDialog extends BaseDialogFragment {
public static ChangeQuickRedirect changeQuickRedirect;
@NotNull
public static final a i = new a(null);
public String e = "";
public String f = "";
/* renamed from: g reason: collision with root package name */
public String f7875g = "";
/* renamed from: h reason: collision with root package name */
public HashMap f7876h;
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(ScreenShotShareDialog screenShotShareDialog, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{screenShotShareDialog, bundle}, null, changeQuickRedirect, true, 9468, new Class[]{ScreenShotShareDialog.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ScreenShotShareDialog.s(screenShotShareDialog, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (screenShotShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.common.utils.screenshot.ScreenShotShareDialog")) {
jn.b.f34396a.fragmentOnCreateMethod(screenShotShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull ScreenShotShareDialog screenShotShareDialog, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{screenShotShareDialog, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 9470, new Class[]{ScreenShotShareDialog.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View u4 = ScreenShotShareDialog.u(screenShotShareDialog, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (screenShotShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.common.utils.screenshot.ScreenShotShareDialog")) {
jn.b.f34396a.fragmentOnCreateViewMethod(screenShotShareDialog, 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(ScreenShotShareDialog screenShotShareDialog) {
if (!PatchProxy.proxy(new Object[]{screenShotShareDialog}, null, changeQuickRedirect, true, 9471, new Class[]{ScreenShotShareDialog.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ScreenShotShareDialog.v(screenShotShareDialog);
long currentTimeMillis2 = System.currentTimeMillis();
if (screenShotShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.common.utils.screenshot.ScreenShotShareDialog")) {
jn.b.f34396a.fragmentOnResumeMethod(screenShotShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(ScreenShotShareDialog screenShotShareDialog) {
if (!PatchProxy.proxy(new Object[]{screenShotShareDialog}, null, changeQuickRedirect, true, 9469, new Class[]{ScreenShotShareDialog.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ScreenShotShareDialog.t(screenShotShareDialog);
long currentTimeMillis2 = System.currentTimeMillis();
if (screenShotShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.common.utils.screenshot.ScreenShotShareDialog")) {
jn.b.f34396a.fragmentOnStartMethod(screenShotShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull ScreenShotShareDialog screenShotShareDialog, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{screenShotShareDialog, view, bundle}, null, changeQuickRedirect, true, 9472, new Class[]{ScreenShotShareDialog.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
ScreenShotShareDialog.w(screenShotShareDialog, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (screenShotShareDialog.getClass().getCanonicalName().equals("com.shizhuang.duapp.common.utils.screenshot.ScreenShotShareDialog")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(screenShotShareDialog, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: ScreenShotShareDialog.kt */
public static final class a {
public static ChangeQuickRedirect changeQuickRedirect;
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
}
/* compiled from: ScreenShotShareDialog.kt */
public static final class b implements DuShareListener {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ ScreenShotShareDialog f7877a;
/* JADX WARN: Incorrect args count in method signature: ()V */
public b(ScreenShotShareDialog screenShotShareDialog) {
this.f7877a = screenShotShareDialog;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onCancel(@org.jetbrains.annotations.Nullable SHARE_MEDIA share_media) {
boolean z = PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 9476, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onError(@org.jetbrains.annotations.Nullable SHARE_MEDIA share_media, @org.jetbrains.annotations.Nullable Throwable th2) {
boolean z = PatchProxy.proxy(new Object[]{share_media, th2}, this, changeQuickRedirect, false, 9477, new Class[]{SHARE_MEDIA.class, Throwable.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onResult(@org.jetbrains.annotations.Nullable SHARE_MEDIA share_media) {
boolean z = PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 9475, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported;
}
@Override // com.shizhuang.duapp.modules.share.callback.DuShareListener
public void onStart(@org.jetbrains.annotations.Nullable SHARE_MEDIA share_media) {
if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 9478, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported && l.c(this.f7877a)) {
pb1.l.b(this.f7877a.getActivity()).a();
this.f7877a.dismiss();
}
}
}
public static void s(ScreenShotShareDialog screenShotShareDialog, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, screenShotShareDialog, changeQuickRedirect, false, 9458, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void t(ScreenShotShareDialog screenShotShareDialog) {
if (!PatchProxy.proxy(new Object[0], screenShotShareDialog, changeQuickRedirect, false, 9460, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View u(ScreenShotShareDialog screenShotShareDialog, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, screenShotShareDialog, changeQuickRedirect, false, 9462, 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(ScreenShotShareDialog screenShotShareDialog) {
if (!PatchProxy.proxy(new Object[0], screenShotShareDialog, changeQuickRedirect, false, 9464, new Class[0], Void.TYPE).isSupported) {
super.onResume();
}
}
public static void w(ScreenShotShareDialog screenShotShareDialog, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, screenShotShareDialog, changeQuickRedirect, false, 9466, 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, 9454, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.f7876h == null) {
this.f7876h = new HashMap();
}
View view = (View) this.f7876h.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i3);
this.f7876h.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, 9449, 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, 9457, 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, 9461, 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, 9455, new Class[0], Void.TYPE).isSupported && (hashMap = this.f7876h) != 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, 9463, 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, 9459, 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, 9465, 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, 9448, 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, 9447, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.dialog_screen_shot_share;
}
@Override // com.shizhuang.duapp.common.dialog.BaseDialogFragment
public void r(@org.jetbrains.annotations.Nullable View view) {
boolean z = true;
if (!PatchProxy.proxy(new Object[]{view}, this, changeQuickRedirect, false, 9450, new Class[]{View.class}, Void.TYPE).isSupported) {
Bundle arguments = getArguments();
if (arguments != null) {
this.f = arguments.getString("key_path", "");
this.f7875g = arguments.getString("key_router_url", "");
this.e = arguments.getString("key_page", "");
StringBuilder h12 = f.h(this.f7875g);
h12.append(StringsKt__StringsKt.contains$default(this.f7875g, "?", false, 2, null) ? "&from=qrcode" : "?from=qrcode");
this.f7875g = h12.toString();
}
qf1.a.w("111111", MapsKt__MapsJVMKt.mapOf(new Pair("page", this.e)));
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) ((ConstraintLayout) _$_findCachedViewById(R.id.share_layout)).getLayoutParams();
layoutParams.setMargins(((ViewGroup.MarginLayoutParams) layoutParams).leftMargin, r0.i(getContext()), ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin, ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin);
((c) ((DuImageLoaderView) _$_findCachedViewById(R.id.screenImage)).i(this.f).y().v(new d((int) (((double) ((float) z1.a.c(getContext()))) * 0.53d), (int) (((double) ((float) z1.a.b(getContext()))) * 0.53d)))).x();
if (this.f7875g.length() != 0) {
z = false;
}
if (z) {
this.f7875g = "https://a.app.qq.com/o/simple.jsp?pkgname=com.shizhuang.duapp&fromcase=40002";
}
((ImageView) _$_findCachedViewById(R.id.ivQrCode)).setImageBitmap(e.a(this.f7875g, fi.b.b(43.0f)));
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 9452, new Class[0], Void.TYPE).isSupported) {
((ShareLightCommonView) _$_findCachedViewById(R.id.shareLightCommonView)).m.setOnClickListener(new ScreenShotShareDialog$initShareLayout$1(this));
((ShareLightCommonView) _$_findCachedViewById(R.id.shareLightCommonView)).a(new k(this));
}
}
}
public final Bitmap x() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 9451, new Class[0], Bitmap.class);
return proxy.isSupported ? (Bitmap) proxy.result : ViewKt.drawToBitmap$default((ConstraintLayout) _$_findCachedViewById(R.id.share_layout), null, 1, null);
}
/* JADX WARNING: Removed duplicated region for block: B:19:0x006f */
public final void y(SHARE_MEDIA share_media) {
int i3 = 1;
if (!PatchProxy.proxy(new Object[]{share_media}, this, changeQuickRedirect, false, 9453, new Class[]{SHARE_MEDIA.class}, Void.TYPE).isSupported && l.c(this)) {
int i12 = j.f34312a[share_media.ordinal()];
if (i12 != 1) {
if (i12 != 2) {
if (i12 == 3) {
i3 = 2;
} else if (i12 == 4) {
i3 = 3;
} else if (i12 == 5) {
i3 = 4;
}
}
HashMap hashMap = new HashMap();
hashMap.put("page", this.e);
hashMap.put("channelType", String.valueOf(i3));
qf1.a.A("111111", "1", "1", hashMap);
pb1.l b2 = 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;
b2.e(iVar).f(new b(this)).g(share_media);
}
i3 = 0;
HashMap hashMap2 = new HashMap();
hashMap2.put("page", this.e);
hashMap2.put("channelType", String.valueOf(i3));
qf1.a.A("111111", "1", "1", hashMap2);
pb1.l b22 = pb1.l.b(getActivity());
i iVar2 = new i();
if (share_media == SHARE_MEDIA.QQ) {
}
iVar2.r(x());
iVar2.w(false);
Unit unit2 = Unit.INSTANCE;
b22.e(iVar2).f(new b(this)).g(share_media);
}
}
}