导航菜单

页面标题

页面副标题

Chaupal v3.2 - ProxyBillingActivityV2.java 源代码

正在查看: Chaupal v3.2 应用的 ProxyBillingActivityV2.java JAVA 源代码文件

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


package com.android.billingclient.api;

import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.os.ResultReceiver;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
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;

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

    private androidx.activity.result.b f7100a;

    private androidx.activity.result.b f7101c;

    private ResultReceiver f7102d;

    private ResultReceiver f7103e;

    final void P(ActivityResult activityResult) {
        Intent a7 = activityResult.a();
        int b7 = zzb.zze(a7, "ProxyBillingActivityV2").b();
        ResultReceiver resultReceiver = this.f7102d;
        if (resultReceiver != null) {
            resultReceiver.send(b7, a7 == null ? null : a7.getExtras());
        }
        if (activityResult.b() != -1 || b7 != 0) {
            zzb.zzk("ProxyBillingActivityV2", "Alternative billing only dialog finished with resultCode " + activityResult.b() + " and billing's responseCode: " + b7);
        }
        finish();
    }

    final void Q(ActivityResult activityResult) {
        Intent a7 = activityResult.a();
        int b7 = zzb.zze(a7, "ProxyBillingActivityV2").b();
        ResultReceiver resultReceiver = this.f7103e;
        if (resultReceiver != null) {
            resultReceiver.send(b7, a7 == null ? null : a7.getExtras());
        }
        if (activityResult.b() != -1 || b7 != 0) {
            zzb.zzk("ProxyBillingActivityV2", String.format("External offer dialog finished with resultCode: %s and billing's responseCode: %s", Integer.valueOf(activityResult.b()), Integer.valueOf(b7)));
        }
        finish();
    }

    @Override
    protected final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.f7100a = registerForActivityResult(new c.e(), new androidx.activity.result.a() {
            @Override
            public final void a(Object obj) {
                ProxyBillingActivityV2.this.P((ActivityResult) obj);
            }
        });
        this.f7101c = registerForActivityResult(new c.e(), new androidx.activity.result.a() {
            @Override
            public final void a(Object obj) {
                ProxyBillingActivityV2.this.Q((ActivityResult) obj);
            }
        });
        if (bundle != null) {
            if (bundle.containsKey("alternative_billing_only_dialog_result_receiver")) {
                this.f7102d = (ResultReceiver) bundle.getParcelable("alternative_billing_only_dialog_result_receiver");
                return;
            } else {
                if (bundle.containsKey("external_payment_dialog_result_receiver")) {
                    this.f7103e = (ResultReceiver) bundle.getParcelable("external_payment_dialog_result_receiver");
                    return;
                }
                return;
            }
        }
        zzb.zzj("ProxyBillingActivityV2", "Launching Play Store billing dialog");
        if (getIntent().hasExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT")) {
            PendingIntent pendingIntent = (PendingIntent) getIntent().getParcelableExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT");
            this.f7102d = (ResultReceiver) getIntent().getParcelableExtra("alternative_billing_only_dialog_result_receiver");
            this.f7100a.a(new IntentSenderRequest.b(pendingIntent).a());
        } else if (getIntent().hasExtra("external_payment_dialog_pending_intent")) {
            PendingIntent pendingIntent2 = (PendingIntent) getIntent().getParcelableExtra("external_payment_dialog_pending_intent");
            this.f7103e = (ResultReceiver) getIntent().getParcelableExtra("external_payment_dialog_result_receiver");
            this.f7101c.a(new IntentSenderRequest.b(pendingIntent2).a());
        }
    }

    @Override
    protected final void onSaveInstanceState(@NonNull Bundle bundle) {
        super.onSaveInstanceState(bundle);
        ResultReceiver resultReceiver = this.f7102d;
        if (resultReceiver != null) {
            bundle.putParcelable("alternative_billing_only_dialog_result_receiver", resultReceiver);
        }
        ResultReceiver resultReceiver2 = this.f7103e;
        if (resultReceiver2 != null) {
            bundle.putParcelable("external_payment_dialog_result_receiver", resultReceiver2);
        }
    }
}