Changes of com.discord v1181
This commit is contained in:
parent
f52990c3c2
commit
5a8adcbf82
29917 changed files with 1840412 additions and 1765629 deletions
|
@ -3,20 +3,39 @@
|
|||
.source "PostMessageServiceConnection.java"
|
||||
|
||||
# interfaces
|
||||
.implements Landroidx/browser/customtabs/PostMessageBackend;
|
||||
.implements Landroid/content/ServiceConnection;
|
||||
|
||||
|
||||
# static fields
|
||||
.field public static final TAG:Ljava/lang/String; = "PostMessageServConn"
|
||||
|
||||
|
||||
# instance fields
|
||||
.field public final mLock:Ljava/lang/Object;
|
||||
|
||||
.field public mService:Ls/a/a/c;
|
||||
.field public mMessageChannelCreated:Z
|
||||
|
||||
.field public final mSessionBinder:Ls/a/a/a;
|
||||
.field public mPackageName:Ljava/lang/String;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end field
|
||||
|
||||
.field public mService:Ld0/a/a/c;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end field
|
||||
|
||||
.field public final mSessionBinder:Ld0/a/a/a;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(Landroidx/browser/customtabs/CustomTabsSessionToken;)V
|
||||
.locals 1
|
||||
.param p1 # Landroidx/browser/customtabs/CustomTabsSessionToken;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
|
@ -30,19 +49,143 @@
|
|||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Ls/a/a/a$a;->asInterface(Landroid/os/IBinder;)Ls/a/a/a;
|
||||
if-eqz p1, :cond_0
|
||||
|
||||
invoke-static {p1}, Ld0/a/a/a$a;->asInterface(Landroid/os/IBinder;)Ld0/a/a/a;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ls/a/a/a;
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ld0/a/a/a;
|
||||
|
||||
return-void
|
||||
|
||||
:cond_0
|
||||
new-instance p1, Ljava/lang/IllegalArgumentException;
|
||||
|
||||
const-string v0, "Provided session must have binder."
|
||||
|
||||
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
||||
|
||||
throw p1
|
||||
.end method
|
||||
|
||||
.method private isBoundToService()Z
|
||||
.locals 1
|
||||
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_0
|
||||
const/4 v0, 0x0
|
||||
|
||||
:goto_0
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method private notifyMessageChannelReadyInternal(Landroid/os/Bundle;)Z
|
||||
.locals 4
|
||||
.param p1 # Landroid/os/Bundle;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
const/4 v1, 0x0
|
||||
|
||||
if-nez v0, :cond_0
|
||||
|
||||
return v1
|
||||
|
||||
:cond_0
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mLock:Ljava/lang/Object;
|
||||
|
||||
monitor-enter v0
|
||||
|
||||
:try_start_0
|
||||
iget-object v2, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ld0/a/a/a;
|
||||
|
||||
invoke-interface {v2, v3, p1}, Ld0/a/a/c;->onMessageChannelReady(Ld0/a/a/a;Landroid/os/Bundle;)V
|
||||
:try_end_0
|
||||
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
:try_start_1
|
||||
monitor-exit v0
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:catchall_0
|
||||
move-exception p1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:catch_0
|
||||
monitor-exit v0
|
||||
|
||||
return v1
|
||||
|
||||
:goto_0
|
||||
monitor-exit v0
|
||||
:try_end_1
|
||||
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||||
|
||||
throw p1
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public bindSessionToPostMessageService(Landroid/content/Context;)Z
|
||||
.locals 1
|
||||
.param p1 # Landroid/content/Context;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mPackageName:Ljava/lang/String;
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
invoke-virtual {p0, p1, v0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->bindSessionToPostMessageService(Landroid/content/Context;Ljava/lang/String;)Z
|
||||
|
||||
move-result p1
|
||||
|
||||
return p1
|
||||
|
||||
:cond_0
|
||||
new-instance p1, Ljava/lang/IllegalStateException;
|
||||
|
||||
const-string v0, "setPackageName must be called before bindSessionToPostMessageService."
|
||||
|
||||
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||||
|
||||
throw p1
|
||||
.end method
|
||||
|
||||
.method public bindSessionToPostMessageService(Landroid/content/Context;Ljava/lang/String;)Z
|
||||
.locals 2
|
||||
.param p1 # Landroid/content/Context;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.param p2 # Ljava/lang/String;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
new-instance v0, Landroid/content/Intent;
|
||||
|
||||
|
@ -62,63 +205,131 @@
|
|||
|
||||
move-result p1
|
||||
|
||||
if-nez p1, :cond_0
|
||||
|
||||
const-string p2, "PostMessageServConn"
|
||||
|
||||
const-string v0, "Could not bind to PostMessageService in client."
|
||||
|
||||
invoke-static {p2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
||||
|
||||
:cond_0
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public cleanup(Landroid/content/Context;)V
|
||||
.locals 1
|
||||
.param p1 # Landroid/content/Context;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
invoke-direct {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->isBoundToService()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
invoke-virtual {p0, p1}, Landroidx/browser/customtabs/PostMessageServiceConnection;->unbindFromContext(Landroid/content/Context;)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public final notifyMessageChannelReady(Landroid/os/Bundle;)Z
|
||||
.locals 4
|
||||
.locals 1
|
||||
.param p1 # Landroid/os/Bundle;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
const/4 v0, 0x1
|
||||
|
||||
const/4 v1, 0x0
|
||||
iput-boolean v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mMessageChannelCreated:Z
|
||||
|
||||
if-nez v0, :cond_0
|
||||
invoke-direct {p0, p1}, Landroidx/browser/customtabs/PostMessageServiceConnection;->notifyMessageChannelReadyInternal(Landroid/os/Bundle;)Z
|
||||
|
||||
return v1
|
||||
|
||||
:cond_0
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mLock:Ljava/lang/Object;
|
||||
|
||||
monitor-enter v0
|
||||
|
||||
:try_start_0
|
||||
iget-object v2, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
|
||||
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ls/a/a/a;
|
||||
|
||||
invoke-interface {v2, v3, p1}, Ls/a/a/c;->onMessageChannelReady(Ls/a/a/a;Landroid/os/Bundle;)V
|
||||
:try_end_0
|
||||
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
||||
:try_start_1
|
||||
monitor-exit v0
|
||||
|
||||
const/4 p1, 0x1
|
||||
move-result p1
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
:catchall_0
|
||||
move-exception p1
|
||||
.method public onDisconnectChannel(Landroid/content/Context;)V
|
||||
.locals 0
|
||||
.param p1 # Landroid/content/Context;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
goto :goto_0
|
||||
invoke-virtual {p0, p1}, Landroidx/browser/customtabs/PostMessageServiceConnection;->unbindFromContext(Landroid/content/Context;)V
|
||||
|
||||
:catch_0
|
||||
monitor-exit v0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
return v1
|
||||
.method public final onNotifyMessageChannelReady(Landroid/os/Bundle;)Z
|
||||
.locals 0
|
||||
.param p1 # Landroid/os/Bundle;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
:goto_0
|
||||
monitor-exit v0
|
||||
:try_end_1
|
||||
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||||
invoke-virtual {p0, p1}, Landroidx/browser/customtabs/PostMessageServiceConnection;->notifyMessageChannelReady(Landroid/os/Bundle;)Z
|
||||
|
||||
throw p1
|
||||
move-result p1
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public final onPostMessage(Ljava/lang/String;Landroid/os/Bundle;)Z
|
||||
.locals 0
|
||||
.param p1 # Ljava/lang/String;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.param p2 # Landroid/os/Bundle;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
invoke-virtual {p0, p1, p2}, Landroidx/browser/customtabs/PostMessageServiceConnection;->postMessage(Ljava/lang/String;Landroid/os/Bundle;)Z
|
||||
|
||||
move-result p1
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public onPostMessageServiceConnected()V
|
||||
.locals 0
|
||||
.locals 1
|
||||
|
||||
iget-boolean v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mMessageChannelCreated:Z
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
invoke-direct {p0, v0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->notifyMessageChannelReadyInternal(Landroid/os/Bundle;)Z
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
@ -130,12 +341,20 @@
|
|||
|
||||
.method public final onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
|
||||
.locals 0
|
||||
.param p1 # Landroid/content/ComponentName;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.param p2 # Landroid/os/IBinder;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
invoke-static {p2}, Ls/a/a/c$a;->asInterface(Landroid/os/IBinder;)Ls/a/a/c;
|
||||
invoke-static {p2}, Ld0/a/a/c$a;->asInterface(Landroid/os/IBinder;)Ld0/a/a/c;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
invoke-virtual {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->onPostMessageServiceConnected()V
|
||||
|
||||
|
@ -144,10 +363,14 @@
|
|||
|
||||
.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
|
||||
.locals 0
|
||||
.param p1 # Landroid/content/ComponentName;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
const/4 p1, 0x0
|
||||
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
invoke-virtual {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->onPostMessageServiceDisconnected()V
|
||||
|
||||
|
@ -156,8 +379,16 @@
|
|||
|
||||
.method public final postMessage(Ljava/lang/String;Landroid/os/Bundle;)Z
|
||||
.locals 4
|
||||
.param p1 # Ljava/lang/String;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.param p2 # Landroid/os/Bundle;
|
||||
.annotation build Landroidx/annotation/Nullable;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
const/4 v1, 0x0
|
||||
|
||||
|
@ -171,11 +402,11 @@
|
|||
monitor-enter v0
|
||||
|
||||
:try_start_0
|
||||
iget-object v2, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ls/a/a/c;
|
||||
iget-object v2, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ls/a/a/a;
|
||||
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Ld0/a/a/a;
|
||||
|
||||
invoke-interface {v2, v3, p1, p2}, Ls/a/a/c;->onPostMessage(Ls/a/a/a;Ljava/lang/String;Landroid/os/Bundle;)V
|
||||
invoke-interface {v2, v3, p1, p2}, Ld0/a/a/c;->onPostMessage(Ld0/a/a/a;Ljava/lang/String;Landroid/os/Bundle;)V
|
||||
:try_end_0
|
||||
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
|
||||
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||||
|
@ -205,10 +436,42 @@
|
|||
throw p1
|
||||
.end method
|
||||
|
||||
.method public unbindFromContext(Landroid/content/Context;)V
|
||||
.method public setPackageName(Ljava/lang/String;)V
|
||||
.locals 0
|
||||
.param p1 # Ljava/lang/String;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
.annotation build Landroidx/annotation/RestrictTo;
|
||||
value = {
|
||||
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
||||
}
|
||||
.end annotation
|
||||
|
||||
invoke-virtual {p1, p0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mPackageName:Ljava/lang/String;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public unbindFromContext(Landroid/content/Context;)V
|
||||
.locals 1
|
||||
.param p1 # Landroid/content/Context;
|
||||
.annotation build Landroidx/annotation/NonNull;
|
||||
.end annotation
|
||||
.end param
|
||||
|
||||
invoke-direct {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->isBoundToService()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :cond_0
|
||||
|
||||
invoke-virtual {p1, p0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
||||
|
||||
const/4 p1, 0x0
|
||||
|
||||
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Ld0/a/a/c;
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue