Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 h.java 源代码,内容仅作参考
package n91;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.telephony.TelephonyManager;
import androidx.fragment.app.Fragment;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import sinet.startup.inDriver.data.OrdersData;
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\n\u0010\u0001\u001a\u00020\u0000*\u00020\u0000\u001a\u0012\u0010\u0005\u001a\u00020\u0004*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0000\u001a\u001e\u0010\u0007\u001a\u00020\u0004*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00002\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u0000\u001a\n\u0010\t\u001a\u00020\u0004*\u00020\b¨\u0006\n"}, d2 = {"", "a", "Landroidx/fragment/app/Fragment;", OrdersData.SCHEME_PHONE, "", "c", "message", "d", "Landroid/content/Context;", "b", "common_release"}, k = 2, mv = {1, 8, 0})
public final class h {
@NotNull
public static final String a(@NotNull String str) {
if (str.length() != 0) {
return "+" + str;
}
return str;
}
public static final boolean b(@NotNull Context context) {
TelephonyManager telephonyManager;
Object systemService = context.getSystemService(OrdersData.SCHEME_PHONE);
if (systemService instanceof TelephonyManager) {
telephonyManager = (TelephonyManager) systemService;
} else {
telephonyManager = null;
}
boolean z15 = false;
if (telephonyManager != null && telephonyManager.getPhoneType() == 0) {
z15 = true;
}
return !z15;
}
public static final boolean c(@NotNull Fragment fragment, @NotNull String str) {
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("https://wa.me/:" + str));
intent.setFlags(268435456);
fragment.startActivity(intent);
return true;
} catch (Exception e15) {
ud4.a.INSTANCE.e(e15, "Ошибка при попытке звонка", new Object[0]);
return false;
}
}
public static final boolean d(@NotNull Fragment fragment, @NotNull String str, String str2) {
try {
Intent intent = new Intent("android.intent.action.VIEW");
Uri.Builder buildUpon = Uri.parse("https://api.whatsapp.com/send").buildUpon();
buildUpon.appendQueryParameter(OrdersData.SCHEME_PHONE, str);
if (str2 != null) {
buildUpon.appendQueryParameter("text", str2);
}
intent.setData(buildUpon.build());
fragment.startActivity(intent);
return true;
} catch (Exception e15) {
ud4.a.INSTANCE.e(e15, "Ошибка при попытке открыть WhatsApp", new Object[0]);
return false;
}
}
public static boolean e(Fragment fragment, String str, String str2, int i15, Object obj) {
if ((i15 & 2) != 0) {
str2 = null;
}
return d(fragment, str, str2);
}
}