apkfuckery/com.discord/smali/androidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask.smali

145 lines
4.8 KiB
Smali
Raw Normal View History

2020-07-08 16:44:49 +00:00
.class public Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;
.super Landroid/os/AsyncTask;
.source "TrustedWebActivityServiceConnectionPool.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "BindToServiceAsyncTask"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroid/os/AsyncTask<",
"Ljava/lang/Void;",
"Ljava/lang/Void;",
"Ljava/lang/Exception;",
">;"
}
.end annotation
# instance fields
.field public final mAppContext:Landroid/content/Context;
.field public final mConnection:Landroidx/browser/trusted/ConnectionHolder;
.field public final mIntent:Landroid/content/Intent;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/content/Intent;Landroidx/browser/trusted/ConnectionHolder;)V
.locals 0
invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object p1
iput-object p1, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mAppContext:Landroid/content/Context;
iput-object p2, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mIntent:Landroid/content/Intent;
iput-object p3, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mConnection:Landroidx/browser/trusted/ConnectionHolder;
return-void
.end method
# virtual methods
.method public varargs doInBackground([Ljava/lang/Void;)Ljava/lang/Exception;
.locals 3
.annotation build Landroidx/annotation/Nullable;
.end annotation
:try_start_0
iget-object p1, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mAppContext:Landroid/content/Context;
iget-object v0, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mIntent:Landroid/content/Intent;
iget-object v1, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mConnection:Landroidx/browser/trusted/ConnectionHolder;
const/4 v2, 0x1
invoke-virtual {p1, v0, v1, v2}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
if-eqz p1, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
iget-object p1, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mAppContext:Landroid/content/Context;
iget-object v0, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mConnection:Landroidx/browser/trusted/ConnectionHolder;
invoke-virtual {p1, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Could not bind to the service"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
:try_end_0
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception p1
const-string v0, "TWAConnectionPool"
const-string v1, "SecurityException while binding."
invoke-static {v0, v1, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return-object p1
.end method
.method public bridge synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.annotation build Landroidx/annotation/Nullable;
.end annotation
check-cast p1, [Ljava/lang/Void;
invoke-virtual {p0, p1}, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->doInBackground([Ljava/lang/Void;)Ljava/lang/Exception;
move-result-object p1
return-object p1
.end method
.method public onPostExecute(Ljava/lang/Exception;)V
.locals 1
if-eqz p1, :cond_0
iget-object v0, p0, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->mConnection:Landroidx/browser/trusted/ConnectionHolder;
invoke-virtual {v0, p1}, Landroidx/browser/trusted/ConnectionHolder;->cancel(Ljava/lang/Exception;)V
:cond_0
return-void
.end method
.method public bridge synthetic onPostExecute(Ljava/lang/Object;)V
.locals 0
check-cast p1, Ljava/lang/Exception;
invoke-virtual {p0, p1}, Landroidx/browser/trusted/TrustedWebActivityServiceConnectionPool$BindToServiceAsyncTask;->onPostExecute(Ljava/lang/Exception;)V
return-void
.end method