TikTok.apk(点击下载) / FPP.java


package X;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.widget.Toast;
import com.bytedance.covode.number.Covode;
import com.snapchat.kit.sdk.core.metrics.MetricQueue;
import com.snapchat.kit.sdk.core.metrics.model.KitPluginType;
import com.snapchat.kit.sdk.core.metrics.model.ServerEvent;
import com.snapchat.kit.sdk.creative.a.a;
import com.snapchat.kit.sdk.creative.internal.SnapCreativeShareResultHandler;
import com.zhiliaoapp.musically.R;

public class FPP {
    public final Context LIZ;
    public final String LIZIZ;
    public FPO LIZJ;
    public final MetricQueue<ServerEvent> LIZLLL;
    public final a LJ;
    public String LJFF;
    public KitPluginType LJI;
    public boolean LJII;

    static {
        Covode.recordClassIndex(41024);
    }

    public FPP(Context context, String str, String str2, FPO fpo, MetricQueue<ServerEvent> metricQueue, a aVar, KitPluginType kitPluginType, boolean z) {
        this.LIZ = context;
        this.LIZIZ = str;
        this.LJFF = str2;
        this.LIZJ = fpo;
        this.LIZLLL = metricQueue;
        this.LJ = aVar;
        this.LJI = kitPluginType;
        this.LJII = z;
    }

    public static void LIZ(Context context, Intent intent) {
        C21280sv.LIZ(intent, context);
        context.startActivity(intent);
    }

    public static void LIZ(Toast toast) {
        if (Build.VERSION.SDK_INT == 25) {
            C29861Gd.LIZ(toast);
        }
        toast.show();
    }

    public final void LIZ(AbstractC69642oj r11) {
        long currentTimeMillis = System.currentTimeMillis();
        com.snapchat.kit.sdk.creative.internal.a aVar = new com.snapchat.kit.sdk.creative.internal.a(this.LIZIZ, r11);
        String str = FPN.LIZ;
        PackageManager packageManager = this.LIZ.getPackageManager();
        if (!C69622oh.LIZ(packageManager, str)) {
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(AnonymousClass0EJ.LIZ("https://play.google.com/store/apps/details?id=%s", new Object[]{str})));
            intent.setFlags(268435456);
            LIZ(this.LIZ, intent);
            this.LIZJ.LIZ("sendToPlayStore");
            return;
        }
        this.LIZJ.LIZ("sendIntentToApp");
        Intent LIZ2 = aVar.LIZ(this.LIZ, this.LJI, this.LJII);
        LIZ2.setPackage(str);
        LIZ2.putExtra("CLIENT_ID", this.LIZIZ);
        LIZ2.putExtra("KIT_VERSION", "1.12.0");
        LIZ2.putExtra("KIT_VERSION_CODE", 40);
        LIZ2.putExtra("deep_link_intent", true);
        if (!TextUtils.isEmpty(this.LJFF)) {
            LIZ2.putExtra("KIT_REDIRECT_URL", this.LJFF);
        }
        LIZ2.putExtra("RESULT_INTENT", PendingIntent.getBroadcast(this.LIZ, 17, new Intent(this.LIZ, SnapCreativeShareResultHandler.class), 1073741824));
        LIZ2.setFlags(335544320);
        if (LIZ2.resolveActivity(packageManager) != null) {
            this.LIZLLL.push(this.LJ.LIZ());
            LIZ(this.LIZ, LIZ2);
            this.LIZJ.LIZ("sendLatency", System.currentTimeMillis() - currentTimeMillis);
            return;
        }
        this.LIZJ.LIZ("cannotShareContent");
        LIZ(Toast.makeText(this.LIZ, (int) R.string.hc5, 0));
    }
}