导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - a.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package vk;

import android.annotation.SuppressLint;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.widget.Toast;
import androidx.fragment.app.FragmentActivity;
import vj.h;

public final class a {
    public static final h a = new h("MarketHost");

    public static String a(int i, String str, String str2, String str3, String str4) {
        StringBuilder sb = new StringBuilder();
        android.support.v4.media.c.z(sb, i == 2 ? "https://play.google.com/store/apps/details?id=" : "market://details?id=", str, "&referrer=utm_source%3D", str2);
        return android.support.v4.media.c.k(sb, "%26utm_medium%3D", str3, "%26utm_campaign%3D", str4);
    }

    public static void b(FragmentActivity fragmentActivity, String str) {
        if (c(fragmentActivity, a(1, str, null, null, null)) || c(fragmentActivity, a(2, str, null, null, null))) {
            return;
        }
        Toast.makeText((Context) fragmentActivity, (CharSequence) fragmentActivity.getString(2131887777), 1).show();
    }

    @SuppressLint({"MissingPermission"})
    public static boolean c(FragmentActivity fragmentActivity, String str) {
        if (!(!TextUtils.isEmpty(str) && (str.startsWith("https://play.google.com/store/apps/details?id=") || str.startsWith("market://details?id=")))) {
            a.c(android.support.v4.media.b.l("Not market url. Url: ", str));
            return false;
        }
        Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
        String str2 = ml.b.p(fragmentActivity, "com.android.vending") ? "com.android.vending" : null;
        try {
            if (str2 == null) {
                fragmentActivity.startActivity(intent);
                return true;
            }
            intent.setPackage(str2);
            try {
                fragmentActivity.startActivity(intent);
                return true;
            } catch (ActivityNotFoundException unused) {
                fragmentActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
                return true;
            }
        } catch (ActivityNotFoundException unused2) {
            return false;
        }
    }
}