导航菜单

页面标题

页面副标题

CallApp v2.226 - ProxyBillingActivity.java 源代码

正在查看: CallApp v2.226 应用的 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.google.android.apps.common.proguard.UsedByReflection;

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

    public ResultReceiver f7458a;

    public ResultReceiver f7459b;

    public boolean f7460c;

    public boolean f7461d;

    public int f7462e;

    public final Intent a() {
        Intent intent = new Intent("com.android.vending.billing.LOCAL_BROADCAST_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;
        super.onCreate(bundle);
        if (bundle != null) {
            com.google.android.gms.internal.play_billing.zze.zzk("ProxyBillingActivity", "Launching Play Store billing flow from savedInstanceState");
            this.f7460c = bundle.getBoolean("send_cancelled_broadcast_if_finished", false);
            if (bundle.containsKey("result_receiver")) {
                this.f7458a = (ResultReceiver) bundle.getParcelable("result_receiver");
            } else if (bundle.containsKey("in_app_message_result_receiver")) {
                this.f7459b = (ResultReceiver) bundle.getParcelable("in_app_message_result_receiver");
            }
            this.f7461d = bundle.getBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false);
            this.f7462e = bundle.getInt("activity_code", 100);
            return;
        }
        com.google.android.gms.internal.play_billing.zze.zzk("ProxyBillingActivity", "Launching Play Store billing flow");
        this.f7462e = 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.f7461d = true;
                this.f7462e = 110;
            }
        } else if (getIntent().hasExtra("SUBS_MANAGEMENT_INTENT")) {
            pendingIntent = (PendingIntent) getIntent().getParcelableExtra("SUBS_MANAGEMENT_INTENT");
            this.f7458a = (ResultReceiver) getIntent().getParcelableExtra("result_receiver");
        } else if (getIntent().hasExtra("IN_APP_MESSAGE_INTENT")) {
            pendingIntent = (PendingIntent) getIntent().getParcelableExtra("IN_APP_MESSAGE_INTENT");
            this.f7459b = (ResultReceiver) getIntent().getParcelableExtra("in_app_message_result_receiver");
            this.f7462e = 101;
        } else {
            pendingIntent = null;
        }
        try {
            this.f7460c = true;
            startIntentSenderForResult(pendingIntent.getIntentSender(), this.f7462e, new Intent(), 0, 0, 0);
        } catch (IntentSender.SendIntentException e6) {
            com.google.android.gms.internal.play_billing.zze.zzm("ProxyBillingActivity", "Got exception while trying to start a purchase flow.", e6);
            ResultReceiver resultReceiver = this.f7458a;
            if (resultReceiver != null) {
                resultReceiver.send(6, null);
            } else {
                ResultReceiver resultReceiver2 = this.f7459b;
                if (resultReceiver2 != null) {
                    resultReceiver2.send(0, null);
                } else {
                    Intent a8 = a();
                    if (this.f7461d) {
                        a8.putExtra("IS_FIRST_PARTY_PURCHASE", true);
                    }
                    a8.putExtra("RESPONSE_CODE", 6);
                    a8.putExtra("DEBUG_MESSAGE", "An internal error occurred.");
                    sendBroadcast(a8);
                }
            }
            this.f7460c = false;
            finish();
        }
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        if (isFinishing() && this.f7460c) {
            Intent a8 = a();
            a8.putExtra("RESPONSE_CODE", 1);
            a8.putExtra("DEBUG_MESSAGE", "Billing dialog closed.");
            int i8 = this.f7462e;
            if (i8 == 110 || i8 == 100) {
                a8.putExtra("INTENT_SOURCE", "LAUNCH_BILLING_FLOW");
            }
            sendBroadcast(a8);
        }
    }

    @Override
    public final void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        ResultReceiver resultReceiver = this.f7458a;
        if (resultReceiver != null) {
            bundle.putParcelable("result_receiver", resultReceiver);
        }
        ResultReceiver resultReceiver2 = this.f7459b;
        if (resultReceiver2 != null) {
            bundle.putParcelable("in_app_message_result_receiver", resultReceiver2);
        }
        bundle.putBoolean("send_cancelled_broadcast_if_finished", this.f7460c);
        bundle.putBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", this.f7461d);
        bundle.putInt("activity_code", this.f7462e);
    }
}