导航菜单

页面标题

页面副标题

Aisle v12.32 - ProxyBillingActivity.java 源代码

正在查看: Aisle v12.32 应用的 ProxyBillingActivity.java JAVA 源代码文件

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


package com.android.billingclient.api;

import android.app.Activity;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.os.ResultReceiver;
import com.android.billingclient.api.C1538d;
import com.google.android.apps.common.proguard.UsedByReflection;
import com.google.android.gms.internal.play_billing.zzc;
import com.google.android.gms.internal.play_billing.zzie;
import com.google.android.gms.internal.play_billing.zzil;

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

    private ResultReceiver f22375a;

    private boolean f22376b;

    private boolean f22377c;

    private int f22378d;

    private long f22379e;

    private boolean f22380f;

    private zzie a(int i5) {
        return i5 != -1 ? i5 != 0 ? i5 != 3 ? i5 != 4 ? i5 != 5 ? zzie.zzbm : zzie.zzbn : zzie.zzbl : zzie.zzbk : zzie.zzbj : zzie.zzbi;
    }

    private Intent b(String str) {
        Intent intent = new Intent("com.android.vending.billing.ALTERNATIVE_BILLING");
        intent.setPackage(getApplicationContext().getPackageName());
        intent.putExtra("ALTERNATIVE_BILLING_USER_CHOICE_DATA", str);
        return intent;
    }

    private Intent c(zzie zzieVar, long j5) {
        Intent d5 = d();
        d5.putExtra("RESPONSE_CODE", 6);
        d5.putExtra("DEBUG_MESSAGE", "An internal error occurred.");
        C1538d.a d6 = C1538d.d();
        d6.d(6);
        d6.b("An internal error occurred.");
        C1538d a5 = d6.a();
        int i5 = N.f22341a;
        d5.putExtra("FAILURE_LOGGING_PAYLOAD", N.b(zzieVar, 2, a5, null, zzil.zza).zzM());
        d5.putExtra("INTENT_SOURCE", "LAUNCH_BILLING_FLOW");
        d5.putExtra("billingClientTransactionId", j5);
        d5.putExtra("wasServiceAutoReconnected", this.f22380f);
        return d5;
    }

    private Intent d() {
        Intent intent = new Intent("com.android.vending.billing.LOCAL_BROADCAST_PURCHASES_UPDATED");
        intent.setPackage(getApplicationContext().getPackageName());
        return intent;
    }

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

    @Override
    protected void onCreate(Bundle bundle) {
        PendingIntent pendingIntent;
        super.onCreate(bundle);
        if (bundle != null) {
            zzc.zzm("ProxyBillingActivity", "Launching Play Store billing flow from savedInstanceState");
            this.f22376b = bundle.getBoolean("send_cancelled_broadcast_if_finished", false);
            if (bundle.containsKey("in_app_message_result_receiver")) {
                this.f22375a = (ResultReceiver) bundle.getParcelable("in_app_message_result_receiver");
            }
            this.f22377c = bundle.getBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false);
            this.f22378d = bundle.getInt("activity_code", 100);
            if (bundle.containsKey("billingClientTransactionId")) {
                this.f22379e = bundle.getLong("billingClientTransactionId");
            }
            if (bundle.containsKey("wasServiceAutoReconnected")) {
                this.f22380f = bundle.getBoolean("wasServiceAutoReconnected");
                return;
            }
            return;
        }
        zzc.zzm("ProxyBillingActivity", "Launching Play Store billing flow");
        this.f22378d = 100;
        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.f22377c = true;
                this.f22378d = 110;
            }
        } else if (getIntent().hasExtra("IN_APP_MESSAGE_INTENT")) {
            pendingIntent = (PendingIntent) getIntent().getParcelableExtra("IN_APP_MESSAGE_INTENT");
            this.f22375a = (ResultReceiver) getIntent().getParcelableExtra("in_app_message_result_receiver");
            this.f22378d = 101;
        } else {
            pendingIntent = null;
        }
        if (getIntent().hasExtra("billingClientTransactionId")) {
            this.f22379e = getIntent().getLongExtra("billingClientTransactionId", 0L);
        }
        if (getIntent().hasExtra("wasServiceAutoReconnected")) {
            this.f22380f = getIntent().getBooleanExtra("wasServiceAutoReconnected", false);
        }
        try {
            this.f22376b = true;
            startIntentSenderForResult(pendingIntent.getIntentSender(), this.f22378d, new Intent(), 0, 0, 0);
        } catch (IntentSender.SendIntentException e5) {
            zzc.zzo("ProxyBillingActivity", "Got exception while trying to start a purchase flow.", e5);
            ResultReceiver resultReceiver = this.f22375a;
            if (resultReceiver != null) {
                resultReceiver.send(0, null);
            } else {
                Intent c5 = c(zzie.zzbG, this.f22379e);
                if (this.f22377c) {
                    c5.putExtra("IS_FIRST_PARTY_PURCHASE", true);
                }
                sendBroadcast(c5);
            }
            this.f22376b = false;
            finish();
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (isFinishing() && this.f22376b) {
            Intent d5 = d();
            d5.putExtra("RESPONSE_CODE", 1);
            d5.putExtra("DEBUG_MESSAGE", "Billing dialog closed.");
            if (this.f22377c) {
                d5.putExtra("IS_FIRST_PARTY_PURCHASE", true);
            }
            int i5 = this.f22378d;
            if (i5 == 110 || i5 == 100) {
                d5.putExtra("INTENT_SOURCE", "LAUNCH_BILLING_FLOW");
                d5.putExtra("billingClientTransactionId", this.f22379e);
            }
            sendBroadcast(d5);
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        ResultReceiver resultReceiver = this.f22375a;
        if (resultReceiver != null) {
            bundle.putParcelable("in_app_message_result_receiver", resultReceiver);
        }
        bundle.putBoolean("send_cancelled_broadcast_if_finished", this.f22376b);
        bundle.putBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", this.f22377c);
        bundle.putInt("activity_code", this.f22378d);
        bundle.putLong("billingClientTransactionId", this.f22379e);
        bundle.putBoolean("wasServiceAutoReconnected", this.f22380f);
    }
}