.class public Lcom/alipay/sdk/util/PayHelper;
.super Ljava/lang/Object;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;
    }
.end annotation


# static fields
.field public static final BIND_FAILED:Ljava/lang/String; = "failed"


# instance fields
.field private isNeedChangeScreen:Z

.field private mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

.field private mAlixPay:Lcom/alipay/android/app/IAlixPay;

.field private mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

.field private mContext:Landroid/app/Activity;

.field private final mLock:Ljava/lang/Object;

.field private mServiceConnection:Landroid/content/ServiceConnection;


# direct methods
.method public constructor <init>(Landroid/app/Activity;Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;)V
    .locals 1

    .line 39
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 31
    const-class v0, Lcom/alipay/android/app/IAlixPay;

    iput-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mLock:Ljava/lang/Object;

    .line 44
    new-instance v0, Lcom/alipay/sdk/util/PayHelper$1;

    invoke-direct {v0, p0}, Lcom/alipay/sdk/util/PayHelper$1;-><init>(Lcom/alipay/sdk/util/PayHelper;)V

    iput-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    .line 180
    new-instance v0, Lcom/alipay/sdk/util/PayHelper$2;

    invoke-direct {v0, p0}, Lcom/alipay/sdk/util/PayHelper$2;-><init>(Lcom/alipay/sdk/util/PayHelper;)V

    iput-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    .line 40
    iput-object p1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    .line 41
    iput-object p2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    return-void
.end method

.method static synthetic access$002(Lcom/alipay/sdk/util/PayHelper;Lcom/alipay/android/app/IAlixPay;)Lcom/alipay/android/app/IAlixPay;
    .locals 0

    .line 21
    iput-object p1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    return-object p1
.end method

.method static synthetic access$100(Lcom/alipay/sdk/util/PayHelper;)Ljava/lang/Object;
    .locals 0

    .line 21
    iget-object p0, p0, Lcom/alipay/sdk/util/PayHelper;->mLock:Ljava/lang/Object;

    return-object p0
.end method

.method static synthetic access$200(Lcom/alipay/sdk/util/PayHelper;)Landroid/app/Activity;
    .locals 0

    .line 21
    iget-object p0, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    return-object p0
.end method

.method private pay(Ljava/lang/String;)Ljava/lang/String;
    .locals 7

    .line 94
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 95
    invoke-static {}, Lcom/alipay/sdk/util/Utils;->getAlipayPkgName()Ljava/lang/String;

    move-result-object v1

    .line 96
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 97
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, ".IAlixPay"

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 100
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-static {v1}, Lcom/alipay/sdk/util/Utils;->alipayRunningInfo(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    .line 103
    :try_start_0
    iget-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    const/4 v4, 0x1

    invoke-virtual {v2, v0, v3, v4}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z

    move-result v0
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_a

    if-eqz v0, :cond_7

    .line 111
    iget-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mLock:Ljava/lang/Object;

    monitor-enter v0

    .line 112
    :try_start_1
    iget-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    if-nez v2, :cond_0

    .line 114
    :try_start_2
    iget-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mLock:Ljava/lang/Object;

    invoke-static {}, Lcom/alipay/sdk/data/DynamicConfig;->getInstance()Lcom/alipay/sdk/data/DynamicConfig;

    move-result-object v3

    invoke-virtual {v3}, Lcom/alipay/sdk/data/DynamicConfig;->getJumpTimeout()I

    move-result v3

    int-to-long v5, v3

    invoke-virtual {v2, v5, v6}, Ljava/lang/Object;->wait(J)V
    :try_end_2
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    goto :goto_0

    :catch_0
    move-exception v2

    :try_start_3
    const-string v3, "biz"

    const-string v5, "BindWaitTimeoutEx"

    .line 116
    invoke-static {v3, v5, v2}, Lcom/alipay/sdk/app/statistic/StatisticManager;->putError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 119
    :cond_0
    :goto_0
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    const/4 v0, 0x0

    const/4 v2, 0x0

    .line 122
    :try_start_4
    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    if-nez v3, :cond_2

    .line 126
    iget-object p1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-static {p1}, Lcom/alipay/sdk/util/Utils;->alipayRunningInfo(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p1

    .line 127
    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-static {v3}, Lcom/alipay/sdk/util/Utils;->getUserInstalledApp(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v3

    const-string v4, "\u8fd9\u4e2a\u65e5\u5fd7\u4e3b\u8981\u662f\u4e3a\u4e86\u8bf4\u660e\uff1a\u4e0a\u884c\u8fd0\u884capp\u4fe1\u606f\u4ec5\u4ec5\u5728\u652f\u4ed8\u7ed1\u5b9a\u51fa\u73b0\u5f02\u5e38\u7684\u60c5\u51b5\u4e0b\uff0c\u652f\u4ed8\u5b9d\u9700\u8981\u91c7\u96c6\u5f53\u524d\u8fd0\u884c\u7684app\u4fe1\u606f\u8fd9\u4e9b\u4fe1\u606f\u4e3b\u8981\u662f\u4e3a\u4e86\u540e\u7aef\u5b89\u5168\u5206\u6790\uff0c\u5224\u65ad\u76ee\u524d\u90a3\u4e9b\u573a\u666f\u5bfc\u81f4\u652f\u4ed8\u7ed1\u5b9a\u5931\u8d25,\u4ec5\u6b64\u800c\u5df2"

    .line 128
    invoke-static {v4}, Lcom/alipay/sdk/util/LogUtils;->detail(Ljava/lang/String;)V

    const-string v4, "biz"

    const-string v5, "ClientBindFailed"

    .line 130
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "|"

    invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "|"

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v4, v5, p1}, Lcom/alipay/sdk/app/statistic/StatisticManager;->putError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "failed"
    :try_end_4
    .catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_5
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 152
    :try_start_5
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    invoke-interface {v1, v3}, Lcom/alipay/android/app/IAlixPay;->unregisterCallback(Lcom/alipay/android/app/IRemoteServiceCallback;)V
    :try_end_5
    .catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_5} :catch_1

    goto :goto_1

    :catch_1
    move-exception v1

    .line 154
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 158
    :goto_1
    :try_start_6
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    invoke-virtual {v1, v3}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
    :try_end_6
    .catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_6} :catch_2

    goto :goto_2

    :catch_2
    move-exception v1

    .line 160
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 163
    :goto_2
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    .line 164
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    .line 165
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    .line 166
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    .line 167
    iget-boolean v1, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    if-eqz v1, :cond_1

    .line 168
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 169
    iput-boolean v0, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    :cond_1
    return-object p1

    .line 135
    :cond_2
    :try_start_7
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    if-eqz v1, :cond_3

    .line 136
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    invoke-interface {v1}, Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;->onBinded()V

    .line 139
    :cond_3
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getRequestedOrientation()I

    move-result v1

    if-nez v1, :cond_4

    .line 140
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1, v4}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 141
    iput-boolean v4, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    .line 144
    :cond_4
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    invoke-interface {v1, v3}, Lcom/alipay/android/app/IAlixPay;->registerCallback(Lcom/alipay/android/app/IRemoteServiceCallback;)V

    .line 145
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    invoke-interface {v1, p1}, Lcom/alipay/android/app/IAlixPay;->Pay(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_7
    .catch Ljava/lang/Throwable; {:try_start_7 .. :try_end_7} :catch_5
    .catchall {:try_start_7 .. :try_end_7} :catchall_0

    .line 152
    :try_start_8
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    invoke-interface {v1, v3}, Lcom/alipay/android/app/IAlixPay;->unregisterCallback(Lcom/alipay/android/app/IRemoteServiceCallback;)V
    :try_end_8
    .catch Ljava/lang/Throwable; {:try_start_8 .. :try_end_8} :catch_3

    goto :goto_3

    :catch_3
    move-exception v1

    .line 154
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 158
    :goto_3
    :try_start_9
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    invoke-virtual {v1, v3}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
    :try_end_9
    .catch Ljava/lang/Throwable; {:try_start_9 .. :try_end_9} :catch_4

    goto :goto_4

    :catch_4
    move-exception v1

    .line 160
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 163
    :goto_4
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    .line 164
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    .line 165
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    .line 166
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    .line 167
    iget-boolean v1, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    if-eqz v1, :cond_5

    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    if-eqz v1, :cond_5

    .line 168
    :goto_5
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 169
    iput-boolean v0, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    goto :goto_8

    :catchall_0
    move-exception p1

    goto :goto_9

    :catch_5
    move-exception p1

    :try_start_a
    const-string v1, "biz"

    const-string v3, "ClientBindException"

    .line 148
    invoke-static {v1, v3, p1}, Lcom/alipay/sdk/app/statistic/StatisticManager;->putError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 149
    invoke-static {}, Lcom/alipay/sdk/app/Result;->getCancel()Ljava/lang/String;

    move-result-object p1
    :try_end_a
    .catchall {:try_start_a .. :try_end_a} :catchall_0

    .line 152
    :try_start_b
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    invoke-interface {v1, v3}, Lcom/alipay/android/app/IAlixPay;->unregisterCallback(Lcom/alipay/android/app/IRemoteServiceCallback;)V
    :try_end_b
    .catch Ljava/lang/Throwable; {:try_start_b .. :try_end_b} :catch_6

    goto :goto_6

    :catch_6
    move-exception v1

    .line 154
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 158
    :goto_6
    :try_start_c
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    invoke-virtual {v1, v3}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
    :try_end_c
    .catch Ljava/lang/Throwable; {:try_start_c .. :try_end_c} :catch_7

    goto :goto_7

    :catch_7
    move-exception v1

    .line 160
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 163
    :goto_7
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    .line 164
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    .line 165
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    .line 166
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    .line 167
    iget-boolean v1, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    if-eqz v1, :cond_5

    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    if-eqz v1, :cond_5

    goto :goto_5

    :cond_5
    :goto_8
    return-object p1

    .line 152
    :goto_9
    :try_start_d
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    invoke-interface {v1, v3}, Lcom/alipay/android/app/IAlixPay;->unregisterCallback(Lcom/alipay/android/app/IRemoteServiceCallback;)V
    :try_end_d
    .catch Ljava/lang/Throwable; {:try_start_d .. :try_end_d} :catch_8

    goto :goto_a

    :catch_8
    move-exception v1

    .line 154
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 158
    :goto_a
    :try_start_e
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    iget-object v3, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    invoke-virtual {v1, v3}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
    :try_end_e
    .catch Ljava/lang/Throwable; {:try_start_e .. :try_end_e} :catch_9

    goto :goto_b

    :catch_9
    move-exception v1

    .line 160
    invoke-static {v1}, Lcom/alipay/sdk/util/LogUtils;->printExceptionStackTrace(Ljava/lang/Object;)V

    .line 163
    :goto_b
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlipayBindListener:Lcom/alipay/sdk/util/PayHelper$IAlipayBindListener;

    .line 164
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mCallback:Lcom/alipay/android/app/IRemoteServiceCallback;

    .line 165
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mServiceConnection:Landroid/content/ServiceConnection;

    .line 166
    iput-object v2, p0, Lcom/alipay/sdk/util/PayHelper;->mAlixPay:Lcom/alipay/android/app/IAlixPay;

    .line 167
    iget-boolean v1, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    if-eqz v1, :cond_6

    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    if-eqz v1, :cond_6

    .line 168
    iget-object v1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {v1, v0}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 169
    iput-boolean v0, p0, Lcom/alipay/sdk/util/PayHelper;->isNeedChangeScreen:Z

    :cond_6
    throw p1

    :catchall_1
    move-exception p1

    .line 119
    :try_start_f
    monitor-exit v0
    :try_end_f
    .catchall {:try_start_f .. :try_end_f} :catchall_1

    throw p1

    .line 104
    :cond_7
    :try_start_10
    new-instance p1, Ljava/lang/Throwable;

    const-string v0, "bindService fail"

    invoke-direct {p1, v0}, Ljava/lang/Throwable;-><init>(Ljava/lang/String;)V

    throw p1
    :try_end_10
    .catch Ljava/lang/Throwable; {:try_start_10 .. :try_end_10} :catch_a

    :catch_a
    move-exception p1

    const-string v0, "biz"

    const-string v1, "ClientBindServiceFailed"

    .line 107
    invoke-static {v0, v1, p1}, Lcom/alipay/sdk/app/statistic/StatisticManager;->putError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    const-string p1, "failed"

    return-object p1
.end method

.method private startTransActivity(Lcom/alipay/sdk/util/Utils$AlipayPkg;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/InterruptedException;
        }
    .end annotation

    if-eqz p1, :cond_1

    .line 82
    iget p1, p1, Lcom/alipay/sdk/util/Utils$AlipayPkg;->versionCode:I

    const/16 v0, 0x4e

    if-gt p1, v0, :cond_0

    goto :goto_0

    .line 86
    :cond_0
    invoke-static {}, Lcom/alipay/sdk/util/Utils;->getAlipayPkgName()Ljava/lang/String;

    move-result-object p1

    .line 87
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "com.alipay.android.app.TransProcessPayActivity"

    .line 88
    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 89
    iget-object p1, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-virtual {p1, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    const-wide/16 v0, 0xc8

    .line 90
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V

    return-void

    :cond_1
    :goto_0
    return-void
.end method


# virtual methods
.method public clearContext()V
    .locals 1

    const/4 v0, 0x0

    .line 177
    iput-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    return-void
.end method

.method public pay4Client(Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    .line 69
    :try_start_0
    iget-object v0, p0, Lcom/alipay/sdk/util/PayHelper;->mContext:Landroid/app/Activity;

    invoke-static {v0}, Lcom/alipay/sdk/util/Utils;->getAlipayPkg(Landroid/content/Context;)Lcom/alipay/sdk/util/Utils$AlipayPkg;

    move-result-object v0

    .line 71
    invoke-virtual {v0}, Lcom/alipay/sdk/util/Utils$AlipayPkg;->isIllegal()Z

    move-result v1

    if-eqz v1, :cond_0

    const-string v0, "failed"

    return-object v0

    .line 74
    :cond_0
    invoke-direct {p0, v0}, Lcom/alipay/sdk/util/PayHelper;->startTransActivity(Lcom/alipay/sdk/util/Utils$AlipayPkg;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v1, "biz"

    const-string v2, "CheckClientSignEx"

    .line 76
    invoke-static {v1, v2, v0}, Lcom/alipay/sdk/app/statistic/StatisticManager;->putError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 78
    :goto_0
    invoke-direct {p0, p1}, Lcom/alipay/sdk/util/PayHelper;->pay(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method
