导航菜单

页面标题

页面副标题

Crafto v9.3.3 - ProxyBillingActivity.java 源代码

正在查看: Crafto v9.3.3 应用的 ProxyBillingActivity.java JAVA 源代码文件

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


package com.android.billingclient.api;

import C5.B;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.os.ResultReceiver;
import androidx.activity.ComponentActivity;
import androidx.activity.result.IntentSenderRequest;
import androidx.annotation.NonNull;
import com.google.android.apps.common.proguard.UsedByReflection;
import com.google.android.gms.internal.play_billing.zzb;
import i.AbstractC1981c;
import j.C2018h;
import kotlin.jvm.internal.Intrinsics;

@UsedByReflection("PlatformActivityProxy")
public class ProxyBillingActivity extends ComponentActivity {

    public AbstractC1981c<IntentSenderRequest> f20299a;

    public ResultReceiver f20300b;

    public ResultReceiver f20301c;
    public ResultReceiver d;

    public boolean f20302e;

    public boolean f20303f;

    public final Intent C() {
        getApplicationContext().getPackageName();
        Intent intent = new Intent("com.android.vending.billing.PURCHASES_UPDATED");
        intent.setPackage(getApplicationContext().getPackageName());
        return intent;
    }

    @Override
    public final void onActivityResult(int r8, int r9, android.content.Intent r10) {
        throw new UnsupportedOperationException("Method not decompiled: com.android.billingclient.api.ProxyBillingActivity.onActivityResult(int, int, android.content.Intent):void");
    }

    @Override
    public final void onCreate(Bundle bundle) {
        PendingIntent pendingIntent;
        int i7;
        super.onCreate(bundle);
        this.f20299a = registerForActivityResult(new C2018h(), new B(this));
        if (bundle != null) {
            zzb.zzj("ProxyBillingActivity", "Launching Play Store billing flow from savedInstanceState");
            this.f20302e = bundle.getBoolean("send_cancelled_broadcast_if_finished", false);
            if (bundle.containsKey("result_receiver")) {
                this.f20300b = (ResultReceiver) bundle.getParcelable("result_receiver");
            } else if (bundle.containsKey("in_app_message_result_receiver")) {
                this.f20301c = (ResultReceiver) bundle.getParcelable("in_app_message_result_receiver");
            } else if (bundle.containsKey("alternative_billing_only_dialog_result_receiver")) {
                this.d = (ResultReceiver) bundle.getParcelable("alternative_billing_only_dialog_result_receiver");
            }
            this.f20303f = bundle.getBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false);
            return;
        }
        zzb.zzj("ProxyBillingActivity", "Launching Play Store billing flow");
        if (getIntent().hasExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT")) {
            PendingIntent pendingIntent2 = (PendingIntent) getIntent().getParcelableExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT");
            this.d = (ResultReceiver) getIntent().getParcelableExtra("alternative_billing_only_dialog_result_receiver");
            AbstractC1981c<IntentSenderRequest> abstractC1981c = this.f20299a;
            Intrinsics.checkNotNullParameter(pendingIntent2, "pendingIntent");
            IntentSender intentSender = pendingIntent2.getIntentSender();
            Intrinsics.checkNotNullExpressionValue(intentSender, "pendingIntent.intentSender");
            Intrinsics.checkNotNullParameter(intentSender, "intentSender");
            abstractC1981c.launch(new IntentSenderRequest(intentSender, null, 0, 0));
            return;
        }
        if (getIntent().hasExtra("BUY_INTENT")) {
            pendingIntent = (PendingIntent) getIntent().getParcelableExtra("BUY_INTENT");
            if (getIntent().hasExtra("IS_FLOW_FROM_FIRST_PARTY_CLIENT") && getIntent().getBooleanExtra("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false)) {
                this.f20303f = true;
                i7 = 110;
            }
            i7 = 100;
        } else {
            if (getIntent().hasExtra("SUBS_MANAGEMENT_INTENT")) {
                pendingIntent = (PendingIntent) getIntent().getParcelableExtra("SUBS_MANAGEMENT_INTENT");
                this.f20300b = (ResultReceiver) getIntent().getParcelableExtra("result_receiver");
            } else if (getIntent().hasExtra("IN_APP_MESSAGE_INTENT")) {
                pendingIntent = (PendingIntent) getIntent().getParcelableExtra("IN_APP_MESSAGE_INTENT");
                this.f20301c = (ResultReceiver) getIntent().getParcelableExtra("in_app_message_result_receiver");
                i7 = 101;
            } else {
                pendingIntent = null;
            }
            i7 = 100;
        }
        try {
            this.f20302e = true;
            startIntentSenderForResult(pendingIntent.getIntentSender(), i7, new Intent(), 0, 0, 0);
        } catch (IntentSender.SendIntentException e8) {
            zzb.zzl("ProxyBillingActivity", "Got exception while trying to start a purchase flow.", e8);
            ResultReceiver resultReceiver = this.f20300b;
            if (resultReceiver != null) {
                resultReceiver.send(6, null);
            } else {
                ResultReceiver resultReceiver2 = this.f20301c;
                if (resultReceiver2 != null) {
                    resultReceiver2.send(0, null);
                } else {
                    Intent C7 = C();
                    if (this.f20303f) {
                        C7.putExtra("IS_FIRST_PARTY_PURCHASE", true);
                    }
                    C7.putExtra("RESPONSE_CODE", 6);
                    C7.putExtra("DEBUG_MESSAGE", "An internal error occurred.");
                    sendBroadcast(C7);
                }
            }
            this.f20302e = false;
            finish();
        }
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        if (isFinishing() && this.f20302e) {
            Intent C7 = C();
            C7.putExtra("RESPONSE_CODE", 1);
            C7.putExtra("DEBUG_MESSAGE", "Billing dialog closed.");
            sendBroadcast(C7);
        }
    }

    @Override
    public final void onSaveInstanceState(@NonNull Bundle bundle) {
        super.onSaveInstanceState(bundle);
        ResultReceiver resultReceiver = this.f20300b;
        if (resultReceiver != null) {
            bundle.putParcelable("result_receiver", resultReceiver);
        }
        ResultReceiver resultReceiver2 = this.f20301c;
        if (resultReceiver2 != null) {
            bundle.putParcelable("in_app_message_result_receiver", resultReceiver2);
        }
        ResultReceiver resultReceiver3 = this.d;
        if (resultReceiver3 != null) {
            bundle.putParcelable("alternative_billing_only_dialog_result_receiver", resultReceiver3);
        }
        bundle.putBoolean("send_cancelled_broadcast_if_finished", this.f20302e);
        bundle.putBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", this.f20303f);
    }
}