Fast Orange v3.5.3版本的 MD5 值为:33b91aba50c566533dfd683a85f79158
以下内容为反编译后的 ShareCodeDialog.java 源代码,内容仅作参考
package com.free.vpn.proxy.hotspot.ui.components.dialog;
import android.app.Dialog;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.DialogFragment;
import com.free.vpn.proxy.hotspot.a9;
import com.free.vpn.proxy.hotspot.databinding.ShareCodeDialogBinding;
import com.free.vpn.proxy.hotspot.jf2;
import com.free.vpn.proxy.hotspot.to;
import com.free.vpn.proxy.hotspot.u80;
import com.free.vpn.proxy.hotspot.ui.components.dialog.ShareCodeDialog;
import com.free.vpn.proxy.hotspot.zs4;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
import web.accelerator.p003new.util.R;
@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0007\u0018\u00002\u00020\u0001B7\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005\u0012\u0012\u0010\b\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\u0002\u0010\tJ\b\u0010\u0016\u001a\u00020\u0006H\u0002J\u0012\u0010\u0017\u001a\u00020\u00072\b\u0010\u0018\u001a\u0004\u0018\u00010\u0019H\u0016J&\u0010\u001a\u001a\u0004\u0018\u00010\u001b2\u0006\u0010\u001c\u001a\u00020\u001d2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001f2\b\u0010\u0018\u001a\u0004\u0018\u00010\u0019H\u0016J\b\u0010 \u001a\u00020\u0007H\u0016J\b\u0010!\u001a\u00020\u0007H\u0016J\u001a\u0010\"\u001a\u00020\u00072\u0006\u0010#\u001a\u00020\u001b2\b\u0010\u0018\u001a\u0004\u0018\u00010\u0019H\u0016R\u0010\u0010\n\u001a\u0004\u0018\u00010\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u001d\u0010\b\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u001d\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00070\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u000fR\u0015\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\n\n\u0002\u0010\u0013\u001a\u0004\b\u0011\u0010\u0012R\u000e\u0010\u0014\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006$"}, d2 = {"Lcom/free/vpn/proxy/hotspot/ui/components/dialog/ShareCodeDialog;", "Landroidx/fragment/app/DialogFragment;", "shareCode", "", "onShareClicked", "Lkotlin/Function1;", "", "", "onCopyTextClicked", "(Ljava/lang/Long;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V", "binding", "Lcom/free/vpn/proxy/hotspot/databinding/ShareCodeDialogBinding;", "layoutResId", "", "getOnCopyTextClicked", "()Lkotlin/jvm/functions/Function1;", "getOnShareClicked", "getShareCode", "()Ljava/lang/Long;", "Ljava/lang/Long;", "shareLinkDisplay", "shareLinkFull", "createCopyText", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onCreateView", "Landroid/view/View;", "inflater", "Landroid/view/LayoutInflater;", "container", "Landroid/view/ViewGroup;", "onDestroyView", "onResume", "onViewCreated", "view", "app_chinaSeoDirectBlackRelease"}, k = 1, mv = {1, 8, 0}, xi = ConstraintLayout.LayoutParams.Table.LAYOUT_CONSTRAINT_VERTICAL_CHAINSTYLE)
public final class ShareCodeDialog extends DialogFragment {
public static final int $stable = 8;
private ShareCodeDialogBinding binding;
private final int layoutResId;
private final Function1 onCopyTextClicked;
private final Function1 onShareClicked;
private final Long shareCode;
private final String shareLinkDisplay;
private final String shareLinkFull;
public ShareCodeDialog(Long l, Function1 function1, Function1 function12) {
boolean z;
zs4.o(function1, "onShareClicked");
zs4.o(function12, "onCopyTextClicked");
this.shareCode = l;
this.onShareClicked = function1;
this.onCopyTextClicked = function12;
this.layoutResId = R.layout.share_code_dialog;
StringBuilder sb = new StringBuilder();
SharedPreferences sharedPreferences = a9.a;
SharedPreferences sharedPreferences2 = a9.a;
if (sharedPreferences2 != null) {
String string = sharedPreferences2.getString("invite_link", "https://factsshare.zhaiyiyou.com/preland/registration_reward");
sb.append(string == null ? "https://invisshare.51jiasuqi.com/preland/registration_reward" : string);
if (l == null || l.longValue() != 0) {
z = true;
} else {
z = false;
}
String str = Boolean.valueOf(z).booleanValue() ? l : null;
sb.append("?inviteCode=" + (str == null ? "" : str));
String sb2 = sb.toString();
zs4.n(sb2, "toString(...)");
this.shareLinkDisplay = sb2;
this.shareLinkFull = jf2.C(sb2, "&source=Referral&platform=Android");
return;
}
zs4.s0("prefs");
throw null;
}
private final String createCopyText() {
AppCompatTextView appCompatTextView;
AppCompatTextView appCompatTextView2;
StringBuilder sb = new StringBuilder();
ShareCodeDialogBinding shareCodeDialogBinding = this.binding;
CharSequence charSequence = null;
sb.append(String.valueOf((shareCodeDialogBinding == null || (appCompatTextView2 = shareCodeDialogBinding.subtitle1) == null) ? null : appCompatTextView2.getText()));
sb.append("\n\n");
sb.append(this.shareLinkFull);
sb.append("\n\n");
ShareCodeDialogBinding shareCodeDialogBinding2 = this.binding;
if (shareCodeDialogBinding2 != null && (appCompatTextView = shareCodeDialogBinding2.subtitle3) != null) {
charSequence = appCompatTextView.getText();
}
sb.append(String.valueOf(charSequence));
String sb2 = sb.toString();
zs4.n(sb2, "toString(...)");
return sb2;
}
public static final void onViewCreated$lambda$6$lambda$3(ShareCodeDialog shareCodeDialog, View view) {
zs4.o(shareCodeDialog, "this$0");
shareCodeDialog.dismiss();
}
public static final void onViewCreated$lambda$6$lambda$4(ShareCodeDialog shareCodeDialog, View view) {
zs4.o(shareCodeDialog, "this$0");
shareCodeDialog.onShareClicked.invoke(shareCodeDialog.shareLinkFull);
shareCodeDialog.dismiss();
}
public static final void onViewCreated$lambda$6$lambda$5(ShareCodeDialog shareCodeDialog, View view) {
zs4.o(shareCodeDialog, "this$0");
shareCodeDialog.onCopyTextClicked.invoke(shareCodeDialog.createCopyText());
shareCodeDialog.dismiss();
}
public final Function1 getOnCopyTextClicked() {
return this.onCopyTextClicked;
}
public final Function1 getOnShareClicked() {
return this.onShareClicked;
}
public final Long getShareCode() {
return this.shareCode;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(1, R.style.AppDialogTheme);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
zs4.o(inflater, "inflater");
ShareCodeDialogBinding inflate = ShareCodeDialogBinding.inflate(inflater, container, false);
this.binding = inflate;
if (inflate != null) {
return inflate.getRoot();
}
return null;
}
@Override
public void onDestroyView() {
super.onDestroyView();
this.binding = null;
}
@Override
public void onResume() {
Window window;
Dialog dialog = getDialog();
if (dialog != null && (window = dialog.getWindow()) != null) {
window.setLayout(u80.k(360), -2);
}
Dialog dialog2 = getDialog();
if (dialog2 != null) {
dialog2.setCancelable(false);
}
Dialog dialog3 = getDialog();
if (dialog3 != null) {
dialog3.setCanceledOnTouchOutside(false);
}
super.onResume();
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
boolean z;
zs4.o(view, "view");
super.onViewCreated(view, savedInstanceState);
ShareCodeDialogBinding shareCodeDialogBinding = this.binding;
zs4.l(shareCodeDialogBinding);
Long l = this.shareCode;
final int i = 0;
final int i2 = 1;
String str = null;
if (l != null) {
if (l.longValue() > 0) {
z = true;
} else {
z = false;
}
if (!z) {
l = null;
}
if (l != null) {
str = l.toString();
}
}
if (str == null) {
str = "";
}
String p = jf2.p(getString(R.string.register_code_subtitle), " ", str);
AppCompatTextView appCompatTextView = shareCodeDialogBinding.subtitle1;
zs4.n(appCompatTextView, "subtitle1");
to.k(appCompatTextView, p, str);
shareCodeDialogBinding.subtitle2.setText(this.shareLinkDisplay);
shareCodeDialogBinding.btnClose.setOnClickListener(new View.OnClickListener(this) {
public final ShareCodeDialog b;
{
this.b = this;
}
@Override
public final void onClick(View view2) {
int i3 = i;
ShareCodeDialog shareCodeDialog = this.b;
switch (i3) {
case 0:
ShareCodeDialog.onViewCreated$lambda$6$lambda$3(shareCodeDialog, view2);
return;
case 1:
ShareCodeDialog.onViewCreated$lambda$6$lambda$4(shareCodeDialog, view2);
return;
default:
ShareCodeDialog.onViewCreated$lambda$6$lambda$5(shareCodeDialog, view2);
return;
}
}
});
shareCodeDialogBinding.btnShare.setOnClickListener(new View.OnClickListener(this) {
public final ShareCodeDialog b;
{
this.b = this;
}
@Override
public final void onClick(View view2) {
int i3 = i2;
ShareCodeDialog shareCodeDialog = this.b;
switch (i3) {
case 0:
ShareCodeDialog.onViewCreated$lambda$6$lambda$3(shareCodeDialog, view2);
return;
case 1:
ShareCodeDialog.onViewCreated$lambda$6$lambda$4(shareCodeDialog, view2);
return;
default:
ShareCodeDialog.onViewCreated$lambda$6$lambda$5(shareCodeDialog, view2);
return;
}
}
});
final int i3 = 2;
shareCodeDialogBinding.btnCopy.setOnClickListener(new View.OnClickListener(this) {
public final ShareCodeDialog b;
{
this.b = this;
}
@Override
public final void onClick(View view2) {
int i32 = i3;
ShareCodeDialog shareCodeDialog = this.b;
switch (i32) {
case 0:
ShareCodeDialog.onViewCreated$lambda$6$lambda$3(shareCodeDialog, view2);
return;
case 1:
ShareCodeDialog.onViewCreated$lambda$6$lambda$4(shareCodeDialog, view2);
return;
default:
ShareCodeDialog.onViewCreated$lambda$6$lambda$5(shareCodeDialog, view2);
return;
}
}
});
}
}