正在查看: Crafto v9.3.3 应用的 C2546z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 C2546z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package tb;
import X9.n0;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.cardview.widget.CardView;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import com.crafto.android.usa.data.model.PostMedia;
import com.crafto.android.usa.data.model.QuotesSupportData;
import com.crafto.android.usa.data.model.UserUsa;
import com.crafto.android.usa.ui.base.BaseActivityUsa;
import com.crafto.android.usa.ui.support.SupportActivityUsa;
import com.crafto.android.usa.utility.PreferencesHelperUsa;
import com.crafto.android.usa.utility.functional.AppEnums;
import com.google.android.material.textfield.TextInputEditText;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Locale;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.StringsKt;
import mb.DialogC2173b;
import mb.n;
import org.jetbrains.annotations.NotNull;
import t7.De;
import t7.le;
import tb.C2546z;
@SourceDebugExtension({"SMAP\nDialogUtil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DialogUtil.kt\ncom/crafto/android/usa/utility/helper_utils/DialogUtil\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,544:1\n1863#2,2:545\n1872#2,3:547\n*S KotlinDebug\n*F\n+ 1 DialogUtil.kt\ncom/crafto/android/usa/utility/helper_utils/DialogUtil\n*L\n342#1:545,2\n362#1:547,3\n*E\n"})
public final class C2546z {
@NotNull
public final Y f26754a;
@NotNull
public final d0 f26755b;
public interface a {
void a();
void b();
void c(@NotNull View view, @NotNull com.google.android.material.bottomsheet.h hVar);
void d();
void e(UserUsa userUsa);
void f();
}
public C2546z(@NotNull c0 c0Var, @NotNull Y y7, @NotNull d0 d0Var, @NotNull C c8) {
Intrinsics.checkNotNullParameter(c0Var, "viewUtil");
Intrinsics.checkNotNullParameter(y7, "stringUtil");
Intrinsics.checkNotNullParameter(d0Var, "whatsappUtil");
Intrinsics.checkNotNullParameter(c8, "intentRedirectUtil");
this.f26754a = y7;
this.f26755b = d0Var;
}
public static boolean a() {
String str = Build.MANUFACTURER;
Intrinsics.checkNotNullExpressionValue(str, "MANUFACTURER");
Locale locale = Locale.US;
if (!StringsKt.C(T3.k.b(locale, "US", str, locale, "toLowerCase(...)"), "redmi", false)) {
String str2 = Build.BRAND;
Intrinsics.checkNotNullExpressionValue(str2, "BRAND");
Intrinsics.checkNotNullExpressionValue(locale, "US");
String lowerCase = str2.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
if (!StringsKt.C(lowerCase, "redmi", false)) {
String str3 = Build.PRODUCT;
Intrinsics.checkNotNullExpressionValue(str3, "PRODUCT");
Intrinsics.checkNotNullExpressionValue(locale, "US");
String lowerCase2 = str3.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase2, "toLowerCase(...)");
if (!StringsKt.C(lowerCase2, "redmi", false)) {
Intrinsics.checkNotNullExpressionValue(str, "MANUFACTURER");
Intrinsics.checkNotNullExpressionValue(locale, "US");
String lowerCase3 = str.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase3, "toLowerCase(...)");
if (!StringsKt.C(lowerCase3, "xiaomi", false)) {
Intrinsics.checkNotNullExpressionValue(str2, "BRAND");
Intrinsics.checkNotNullExpressionValue(locale, "US");
String lowerCase4 = str2.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase4, "toLowerCase(...)");
if (!StringsKt.C(lowerCase4, "xiaomi", false)) {
Intrinsics.checkNotNullExpressionValue(str3, "PRODUCT");
Intrinsics.checkNotNullExpressionValue(locale, "US");
String lowerCase5 = str3.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase5, "toLowerCase(...)");
if (!StringsKt.C(lowerCase5, "xiaomi", false)) {
return false;
}
}
}
}
}
}
return true;
}
public static void b(C2546z c2546z, FragmentActivity fragmentActivity, DialogC2173b.a aVar, PostMedia postMedia, AppEnums.StoragePermissionResult storagePermissionResult) {
c2546z.getClass();
Intrinsics.checkNotNullParameter(storagePermissionResult, "storagePermissionResult");
if (fragmentActivity != null) {
Intrinsics.checkNotNullParameter(fragmentActivity, "activity");
Intrinsics.checkNotNullParameter(storagePermissionResult, "storagePermissionResult");
DialogC2173b dialogC2173b = new DialogC2173b(fragmentActivity, 2132083237);
dialogC2173b.f24305a = fragmentActivity;
dialogC2173b.f24306b = aVar;
dialogC2173b.f24307c = postMedia;
dialogC2173b.d = storagePermissionResult;
dialogC2173b.setCancelable(false);
dialogC2173b.show();
}
}
public static mb.n c(FragmentActivity fragmentActivity, n.a aVar, @NotNull String str, String str2, boolean z7) {
Intrinsics.checkNotNullParameter(str, "screenName");
if (fragmentActivity == null) {
return null;
}
Intrinsics.checkNotNullParameter(fragmentActivity, "activity");
Intrinsics.checkNotNullParameter(str, "screenName");
mb.n nVar = new mb.n(fragmentActivity);
nVar.f24347a = fragmentActivity;
nVar.f24348b = str2;
nVar.f24349c = z7;
nVar.setCancelable(false);
nVar.show();
return nVar;
}
public static void d(@NotNull FragmentManager fragmentManager, int i7, String str, @NotNull Function2 function2) {
Intrinsics.checkNotNullParameter(fragmentManager, "childFragmentManager");
Intrinsics.checkNotNullParameter(function2, "onSubmit");
if (str == null) {
str = "";
}
Intrinsics.checkNotNullParameter(str, "selectedItemText");
Intrinsics.checkNotNullParameter(function2, "onItemSelected");
V9.g gVar = new V9.g(function2);
Bundle bundle = new Bundle();
bundle.putInt("Type", i7);
bundle.putString("title", str);
gVar.setArguments(bundle);
gVar.show(fragmentManager, "Selection Sheet");
}
public static void e(@NotNull Context context, String str, ArrayList arrayList, @NotNull n0.a aVar) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(aVar, "listener");
Intrinsics.checkNotNullParameter(context, "activity");
n0 n0Var = new n0(context);
n0Var.a = context;
n0Var.b = str;
n0Var.c = arrayList;
n0Var.d = aVar;
n0Var.setCancelable(true);
n0Var.show();
}
public static void f(BaseActivityUsa baseActivityUsa, final UserUsa userUsa, final a aVar) {
String profileImageUrl;
String description;
String firstName;
if (baseActivityUsa != null) {
final com.google.android.material.bottomsheet.h hVar = new com.google.android.material.bottomsheet.h(baseActivityUsa, 2132082703);
View inflate = LayoutInflater.from(baseActivityUsa).inflate(2131559644, (ViewGroup) null, false);
int i7 = 2131361906;
AppCompatTextView appCompatTextView = (AppCompatTextView) N4.e.b(2131361906, inflate);
if (appCompatTextView != null) {
i7 = 2131362646;
TextInputEditText b8 = N4.e.b(2131362646, inflate);
if (b8 != null) {
i7 = 2131363794;
TextInputEditText b9 = N4.e.b(2131363794, inflate);
if (b9 != null) {
i7 = 2131364174;
if (((RelativeLayout) N4.e.b(2131364174, inflate)) != null) {
i7 = 2131364271;
ImageView imageView = (ImageView) N4.e.b(2131364271, inflate);
if (imageView != null) {
i7 = 2131364610;
CardView cardView = (CardView) N4.e.b(2131364610, inflate);
if (cardView != null) {
NestedScrollView nestedScrollView = (NestedScrollView) inflate;
final le leVar = new le(nestedScrollView, appCompatTextView, b8, b9, imageView, cardView);
Intrinsics.checkNotNullExpressionValue(leVar, "inflate(...)");
if (userUsa != null && (firstName = userUsa.getFirstName()) != null) {
b9.setText(firstName);
}
if (userUsa != null && (description = userUsa.getDescription()) != null) {
b8.setText(description);
}
if (userUsa != null && (profileImageUrl = userUsa.getProfileImageUrl()) != null) {
Intrinsics.checkNotNullExpressionValue(imageView, "registerProfileIV");
qb.A.q(imageView, profileImageUrl, null, null, 0, 0, 0, 0, null, 510);
}
Intrinsics.checkNotNullExpressionValue(cardView, "submitBtn");
qb.A.A(cardView, false, 0, new Function1() {
public final Object invoke(Object obj) {
le leVar2 = leVar;
Intrinsics.checkNotNullParameter(leVar2, "$binding");
com.google.android.material.bottomsheet.h hVar2 = hVar;
Intrinsics.checkNotNullParameter(hVar2, "$dialog");
Intrinsics.checkNotNullParameter((View) obj, "it");
UserUsa userUsa2 = userUsa;
if (userUsa2 != null) {
Editable text = leVar2.c.getText();
userUsa2.setFirstName(text != null ? text.toString() : null);
}
if (userUsa2 != null) {
Editable text2 = leVar2.b.getText();
userUsa2.setDescription(text2 != null ? text2.toString() : null);
}
C2546z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.e(userUsa2);
}
hVar2.dismiss();
return Unit.a;
}
}, 3);
Intrinsics.checkNotNullExpressionValue(appCompatTextView, "addPhotoTV");
qb.A.A(appCompatTextView, false, 0, new ab.a(1, aVar, hVar), 3);
hVar.setContentView(nestedScrollView);
hVar.show();
return;
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i7)));
}
}
public final void g(final FragmentActivity fragmentActivity, final QuotesSupportData quotesSupportData, @NotNull PreferencesHelperUsa preferencesHelperUsa, final a aVar, @NotNull Fragment fragment) {
Intrinsics.checkNotNullParameter(preferencesHelperUsa, "preferencesHelper");
Intrinsics.checkNotNullParameter(fragment, "fragment");
if (fragmentActivity != null) {
try {
De a8 = De.a(LayoutInflater.from(fragmentActivity));
Intrinsics.checkNotNullExpressionValue(a8, "inflate(...)");
final com.google.android.material.bottomsheet.h hVar = new com.google.android.material.bottomsheet.h(fragmentActivity, 2132082703);
hVar.getBehavior().w(3);
boolean z7 = preferencesHelperUsa.f21088a.getBoolean("whatsapp_flag", false);
LinearLayout linearLayout = a8.d;
if (!z7 && linearLayout != null) {
qb.A.c(linearLayout);
}
boolean z8 = preferencesHelperUsa.f21088a.getBoolean("fb_messenger_flag", false);
LinearLayout linearLayout2 = a8.c;
if (!z8 && linearLayout2 != null) {
qb.A.c(linearLayout2);
}
if (linearLayout != null) {
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String whatsapp;
String str;
com.google.android.material.bottomsheet.h hVar2 = hVar;
Intrinsics.checkNotNullParameter(hVar2, "$dialog");
C2546z c2546z = this;
Intrinsics.checkNotNullParameter(c2546z, "this$0");
Activity activity = fragmentActivity;
Intrinsics.checkNotNullParameter(activity, "$ctx");
QuotesSupportData quotesSupportData2 = quotesSupportData;
if (quotesSupportData2 != null && (whatsapp = quotesSupportData2.getWhatsapp()) != null) {
c2546z.f26755b.getClass();
Intrinsics.checkNotNullParameter(whatsapp, "contactNo");
try {
if (whatsapp.length() > 10) {
str = "https://api.whatsapp.com/send?phone=" + whatsapp + "&text=" + URLEncoder.encode("", "UTF-8");
} else {
str = "https://api.whatsapp.com/send?phone=+91" + whatsapp + "&text=" + URLEncoder.encode("", "UTF-8");
}
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
if (activity != null) {
activity.startActivity(intent);
}
} catch (Exception e8) {
do.a.a.e(e8);
}
}
C2546z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.d();
}
hVar2.dismiss();
}
});
}
if (linearLayout2 != null) {
linearLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String messenger;
com.google.android.material.bottomsheet.h hVar2 = hVar;
Intrinsics.checkNotNullParameter(hVar2, "$dialog");
QuotesSupportData quotesSupportData2 = quotesSupportData;
if (quotesSupportData2 != null && (messenger = quotesSupportData2.getMessenger()) != null) {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(messenger));
intent.setFlags(0);
fragmentActivity.startActivity(intent);
C2546z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.f();
}
}
hVar2.dismiss();
}
});
}
LinearLayout linearLayout3 = a8.b;
if (linearLayout3 != null) {
linearLayout3.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.google.android.material.bottomsheet.h hVar2 = hVar;
Intrinsics.checkNotNullParameter(hVar2, "$dialog");
QuotesSupportData quotesSupportData2 = quotesSupportData;
if (quotesSupportData2 != null && quotesSupportData2.getEmail() != null) {
int i7 = SupportActivityUsa.f21055o;
Activity activity = fragmentActivity;
Intrinsics.checkNotNullParameter(activity, "context");
Intent intent = new Intent(activity, (Class<?>) SupportActivityUsa.class);
Bundle bundle = new Bundle();
bundle.putSerializable("extra_user", null);
intent.putExtras(bundle);
activity.startActivity(intent);
}
C2546z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.b();
}
hVar2.dismiss();
}
});
}
hVar.setContentView(a8.a);
hVar.show();
} catch (Exception e8) {
do.a.a.e(e8);
}
}
}
}