Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 TrustAndSafetyPopupCreator.java 源代码,内容仅作参考
package com.picsart.auth.impl.legacy.growth.presenter.reg.regutil;
import android.content.Context;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.picsart.koin.PAKoinHolder;
import com.picsart.studio.R;
import com.picsart.studio.apiv3.model.onboarding.OnBoardingComponent;
import com.picsart.studio.common.constants.EventParam;
import com.picsart.studio.common.constants.SourceParam;
import kotlin.LazyThreadSafetyMode;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.a;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.ik2.h;
import myobfuscated.qd0.c;
import myobfuscated.r31.f;
import myobfuscated.rp2.b;
import myobfuscated.tw.d;
import myobfuscated.tw.g;
import myobfuscated.xk2.q;
import org.jetbrains.annotations.NotNull;
public final class TrustAndSafetyPopupCreator implements c {
@NotNull
public static final h a;
static {
final ?? obj = new Object();
a = a.a(LazyThreadSafetyMode.SYNCHRONIZED, new Function0<d>() {
{
super(0);
}
@Override
@NotNull
public final d invoke() {
myobfuscated.rp2.a aVar = myobfuscated.rp2.a.this;
myobfuscated.yp2.a aVar2 = r2;
return (aVar instanceof b ? ((b) aVar).x() : aVar.getKoin().a.d).b(r3, q.a.b(d.class), aVar2);
}
});
}
public static final void a(String str) {
((d) a.getValue()).a(new g("popup_action", kotlin.collections.d.i(new Pair(EventParam.ACTION.getValue(), "secondary_button"), new Pair(EventParam.TIP_SID.getValue(), str))));
}
public static void b(androidx.fragment.app.h hVar, @NotNull String sessionId, @NotNull f removalParams, @NotNull final Function1 openWebViewCallback) {
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
Intrinsics.checkNotNullParameter(removalParams, "removalParams");
Intrinsics.checkNotNullParameter(openWebViewCallback, "openWebViewCallback");
if (hVar == null) {
return;
}
String string = hVar.getString(R.color.blue_007AFF);
Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
String string2 = hVar.getString(R.color.gray_20);
Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
OnBoardingComponent newInstance = OnBoardingComponent.newInstance();
newInstance.getView().setActionButtonColor(string);
newInstance.getView().setTitleColor(string2);
View inflate = View.inflate(hVar, R.layout.layout_trust_and_safety, null);
View findViewById = inflate.findViewById(R.id.description);
Intrinsics.checkNotNullExpressionValue(findViewById, "findViewById(...)");
TextView textView = (TextView) findViewById;
int color = myobfuscated.b3.a.getColor(hVar, R.color.gray_8);
final String d = myobfuscated.a0.a.d("toString(...)");
textView.setText(myobfuscated.b00.f.a(removalParams.getDescription(), removalParams.c(), removalParams.b(), color, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
h hVar2 = TrustAndSafetyPopupCreator.a;
TrustAndSafetyPopupCreator.a(d);
String str = myobfuscated.wn1.b.a;
openWebViewCallback.invoke("https://picsart.com/community-guidelines?app=1");
}
}, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
h hVar2 = TrustAndSafetyPopupCreator.a;
TrustAndSafetyPopupCreator.a(d);
openWebViewCallback.invoke(com.appsflyer.internal.c.n(myobfuscated.wn1.b.c(), "?app=1"));
}
}));
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setHighlightColor(0);
myobfuscated.qz1.d dVar = new myobfuscated.qz1.d(hVar, 0, newInstance, SourceParam.LOGIN.getValue(), sessionId, d, true);
dVar.l(removalParams.getTitle());
dVar.e(hVar.getString(R.string.growth_dismiss));
dVar.v = "account_termination";
dVar.j(true);
RelativeLayout relativeLayout = dVar.o;
relativeLayout.removeAllViews();
relativeLayout.addView(inflate);
ViewGroup.LayoutParams layoutParams = inflate.getLayoutParams();
if (layoutParams == null) {
throw new NullPointerException("null cannot be cast to non-null type android.view.ViewGroup.LayoutParams");
}
layoutParams.width = -1;
inflate.setLayoutParams(layoutParams);
dVar.m();
}
@Override
public final myobfuscated.qp2.a getKoin() {
return PAKoinHolder.e(provideContext());
}
@Override
public final Context provideContext() {
return myobfuscated.qd0.a.a();
}
}