正在查看: Crafto v9.3.3 应用的 C8441z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 C8441z.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package tb;
import X9.n0;
import ab.C3606a;
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.clevertap.android.sdk.Constants;
import com.crafto.android.R;
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.DialogC6836b;
import mb.n;
import org.jetbrains.annotations.NotNull;
import qb.C7505A;
import t7.C8178le;
import t7.De;
import tb.C8441z;
@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 C8441z {
@NotNull
public final Y f91811a;
@NotNull
public final d0 f91812b;
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 C8441z(@NotNull c0 viewUtil, @NotNull Y stringUtil, @NotNull d0 whatsappUtil, @NotNull C intentRedirectUtil) {
Intrinsics.checkNotNullParameter(viewUtil, "viewUtil");
Intrinsics.checkNotNullParameter(stringUtil, "stringUtil");
Intrinsics.checkNotNullParameter(whatsappUtil, "whatsappUtil");
Intrinsics.checkNotNullParameter(intentRedirectUtil, "intentRedirectUtil");
this.f91811a = stringUtil;
this.f91812b = whatsappUtil;
}
public static boolean a() {
String MANUFACTURER = Build.MANUFACTURER;
Intrinsics.checkNotNullExpressionValue(MANUFACTURER, "MANUFACTURER");
Locale US = Locale.US;
if (!StringsKt.C(T3.k.b(US, "US", MANUFACTURER, US, "toLowerCase(...)"), "redmi", false)) {
String BRAND = Build.BRAND;
Intrinsics.checkNotNullExpressionValue(BRAND, "BRAND");
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase = BRAND.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
if (!StringsKt.C(lowerCase, "redmi", false)) {
String PRODUCT = Build.PRODUCT;
Intrinsics.checkNotNullExpressionValue(PRODUCT, "PRODUCT");
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase2 = PRODUCT.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase2, "toLowerCase(...)");
if (!StringsKt.C(lowerCase2, "redmi", false)) {
Intrinsics.checkNotNullExpressionValue(MANUFACTURER, "MANUFACTURER");
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase3 = MANUFACTURER.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase3, "toLowerCase(...)");
if (!StringsKt.C(lowerCase3, "xiaomi", false)) {
Intrinsics.checkNotNullExpressionValue(BRAND, "BRAND");
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase4 = BRAND.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase4, "toLowerCase(...)");
if (!StringsKt.C(lowerCase4, "xiaomi", false)) {
Intrinsics.checkNotNullExpressionValue(PRODUCT, "PRODUCT");
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase5 = PRODUCT.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase5, "toLowerCase(...)");
if (!StringsKt.C(lowerCase5, "xiaomi", false)) {
return false;
}
}
}
}
}
}
return true;
}
public static void b(C8441z c8441z, FragmentActivity activity, DialogC6836b.a aVar, PostMedia postMedia, AppEnums.StoragePermissionResult storagePermissionResult) {
c8441z.getClass();
Intrinsics.checkNotNullParameter(storagePermissionResult, "storagePermissionResult");
if (activity != null) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(storagePermissionResult, "storagePermissionResult");
DialogC6836b dialogC6836b = new DialogC6836b(activity, R.style.QuotesDialogTheme);
dialogC6836b.f71084a = activity;
dialogC6836b.f71085b = aVar;
dialogC6836b.f71086c = postMedia;
dialogC6836b.f71087d = storagePermissionResult;
dialogC6836b.setCancelable(false);
dialogC6836b.show();
}
}
public static mb.n c(FragmentActivity activity, n.a aVar, @NotNull String screenName, String str, boolean z10) {
Intrinsics.checkNotNullParameter(screenName, "screenName");
if (activity == null) {
return null;
}
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(screenName, "screenName");
mb.n nVar = new mb.n(activity);
nVar.f71135a = activity;
nVar.f71136b = str;
nVar.f71137c = z10;
nVar.setCancelable(false);
nVar.show();
return nVar;
}
public static void d(@NotNull FragmentManager childFragmentManager, int i10, String selectedItemText, @NotNull Function2 onItemSelected) {
Intrinsics.checkNotNullParameter(childFragmentManager, "childFragmentManager");
Intrinsics.checkNotNullParameter(onItemSelected, "onSubmit");
if (selectedItemText == null) {
selectedItemText = "";
}
Intrinsics.checkNotNullParameter(selectedItemText, "selectedItemText");
Intrinsics.checkNotNullParameter(onItemSelected, "onItemSelected");
V9.g gVar = new V9.g(onItemSelected);
Bundle bundle = new Bundle();
bundle.putInt("Type", i10);
bundle.putString(Constants.KEY_TITLE, selectedItemText);
gVar.setArguments(bundle);
gVar.show(childFragmentManager, "Selection Sheet");
}
public static void e(@NotNull Context activity, String str, ArrayList arrayList, @NotNull n0.a listener) {
Intrinsics.checkNotNullParameter(activity, "context");
Intrinsics.checkNotNullParameter(listener, "listener");
Intrinsics.checkNotNullParameter(activity, "activity");
n0 n0Var = new n0(activity);
n0Var.f31280a = activity;
n0Var.f31281b = str;
n0Var.f31282c = arrayList;
n0Var.f31283d = listener;
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, R.style.AppBottomSheetDialogTheme);
View inflate = LayoutInflater.from(baseActivityUsa).inflate(R.layout.profile_edit_bottom_sheet_usa, (ViewGroup) null, false);
int i10 = R.id.addPhotoTV;
AppCompatTextView addPhotoTV = (AppCompatTextView) N4.e.b(R.id.addPhotoTV, inflate);
if (addPhotoTV != null) {
i10 = R.id.descriptionET;
TextInputEditText textInputEditText = (TextInputEditText) N4.e.b(R.id.descriptionET, inflate);
if (textInputEditText != null) {
i10 = R.id.nameET;
TextInputEditText textInputEditText2 = (TextInputEditText) N4.e.b(R.id.nameET, inflate);
if (textInputEditText2 != null) {
i10 = R.id.progressLayout;
if (((RelativeLayout) N4.e.b(R.id.progressLayout, inflate)) != null) {
i10 = R.id.registerProfileIV;
ImageView registerProfileIV = (ImageView) N4.e.b(R.id.registerProfileIV, inflate);
if (registerProfileIV != null) {
i10 = R.id.submitBtn;
CardView submitBtn = (CardView) N4.e.b(R.id.submitBtn, inflate);
if (submitBtn != null) {
NestedScrollView nestedScrollView = (NestedScrollView) inflate;
final C8178le c8178le = new C8178le(nestedScrollView, addPhotoTV, textInputEditText, textInputEditText2, registerProfileIV, submitBtn);
Intrinsics.checkNotNullExpressionValue(c8178le, "inflate(...)");
if (userUsa != null && (firstName = userUsa.getFirstName()) != null) {
textInputEditText2.setText(firstName);
}
if (userUsa != null && (description = userUsa.getDescription()) != null) {
textInputEditText.setText(description);
}
if (userUsa != null && (profileImageUrl = userUsa.getProfileImageUrl()) != null) {
Intrinsics.checkNotNullExpressionValue(registerProfileIV, "registerProfileIV");
C7505A.q(registerProfileIV, profileImageUrl, null, null, 0, 0, 0, 0, null, 510);
}
Intrinsics.checkNotNullExpressionValue(submitBtn, "submitBtn");
C7505A.A(submitBtn, false, 0, new Function1() {
@Override
public final Object invoke(Object obj) {
View it = (View) obj;
C8178le binding = c8178le;
Intrinsics.checkNotNullParameter(binding, "$binding");
com.google.android.material.bottomsheet.h dialog = hVar;
Intrinsics.checkNotNullParameter(dialog, "$dialog");
Intrinsics.checkNotNullParameter(it, "it");
UserUsa userUsa2 = UserUsa.this;
if (userUsa2 != null) {
Editable text = binding.f87424c.getText();
userUsa2.setFirstName(text != null ? text.toString() : null);
}
if (userUsa2 != null) {
Editable text2 = binding.f87423b.getText();
userUsa2.setDescription(text2 != null ? text2.toString() : null);
}
C8441z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.e(userUsa2);
}
dialog.dismiss();
return Unit.f69574a;
}
}, 3);
Intrinsics.checkNotNullExpressionValue(addPhotoTV, "addPhotoTV");
C7505A.A(addPhotoTV, false, 0, new C3606a(1, aVar, hVar), 3);
hVar.setContentView(nestedScrollView);
hVar.show();
return;
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i10)));
}
}
public final void g(final FragmentActivity fragmentActivity, final QuotesSupportData quotesSupportData, @NotNull PreferencesHelperUsa preferencesHelper, final a aVar, @NotNull Fragment fragment) {
Intrinsics.checkNotNullParameter(preferencesHelper, "preferencesHelper");
Intrinsics.checkNotNullParameter(fragment, "fragment");
if (fragmentActivity != null) {
try {
De a10 = De.a(LayoutInflater.from(fragmentActivity));
Intrinsics.checkNotNullExpressionValue(a10, "inflate(...)");
final com.google.android.material.bottomsheet.h hVar = new com.google.android.material.bottomsheet.h(fragmentActivity, R.style.AppBottomSheetDialogTheme);
hVar.getBehavior().w(3);
boolean z10 = preferencesHelper.f53320a.getBoolean("whatsapp_flag", false);
LinearLayout linearLayout = a10.f79275d;
if (!z10 && linearLayout != null) {
C7505A.c(linearLayout);
}
boolean z11 = preferencesHelper.f53320a.getBoolean("fb_messenger_flag", false);
LinearLayout linearLayout2 = a10.f79274c;
if (!z11 && linearLayout2 != null) {
C7505A.c(linearLayout2);
}
if (linearLayout != null) {
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String contactNo;
String str;
com.google.android.material.bottomsheet.h dialog = hVar;
Intrinsics.checkNotNullParameter(dialog, "$dialog");
C8441z this$0 = this;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Activity ctx = fragmentActivity;
Intrinsics.checkNotNullParameter(ctx, "$ctx");
QuotesSupportData quotesSupportData2 = QuotesSupportData.this;
if (quotesSupportData2 != null && (contactNo = quotesSupportData2.getWhatsapp()) != null) {
this$0.f91812b.getClass();
Intrinsics.checkNotNullParameter(contactNo, "contactNo");
try {
if (contactNo.length() > 10) {
str = "https://api.whatsapp.com/send?phone=" + contactNo + "&text=" + URLEncoder.encode("", "UTF-8");
} else {
str = "https://api.whatsapp.com/send?phone=+91" + contactNo + "&text=" + URLEncoder.encode("", "UTF-8");
}
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
if (ctx != null) {
ctx.startActivity(intent);
}
} catch (Exception e10) {
p003do.a.f61810a.e(e10);
}
}
C8441z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.d();
}
dialog.dismiss();
}
});
}
if (linearLayout2 != null) {
linearLayout2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
String messenger;
com.google.android.material.bottomsheet.h dialog = hVar;
Intrinsics.checkNotNullParameter(dialog, "$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);
C8441z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.f();
}
}
dialog.dismiss();
}
});
}
LinearLayout linearLayout3 = a10.f79273b;
if (linearLayout3 != null) {
linearLayout3.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
com.google.android.material.bottomsheet.h dialog = hVar;
Intrinsics.checkNotNullParameter(dialog, "$dialog");
QuotesSupportData quotesSupportData2 = quotesSupportData;
if (quotesSupportData2 != null && quotesSupportData2.getEmail() != null) {
int i10 = SupportActivityUsa.f53286o;
Activity context = fragmentActivity;
Intrinsics.checkNotNullParameter(context, "context");
Intent intent = new Intent(context, (Class<?>) SupportActivityUsa.class);
Bundle bundle = new Bundle();
bundle.putSerializable("extra_user", null);
intent.putExtras(bundle);
context.startActivity(intent);
}
C8441z.a aVar2 = aVar;
if (aVar2 != null) {
aVar2.b();
}
dialog.dismiss();
}
});
}
hVar.setContentView(a10.f79272a);
hVar.show();
} catch (Exception e10) {
p003do.a.f61810a.e(e10);
}
}
}
}