apkfuckery/com.discord/smali/androidx/browser/customtabs/PostMessageServiceConnection.smali

215 lines
5.6 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public abstract Landroidx/browser/customtabs/PostMessageServiceConnection;
.super Ljava/lang/Object;
.source "PostMessageServiceConnection.java"
# interfaces
.implements Landroid/content/ServiceConnection;
# instance fields
.field private final mLock:Ljava/lang/Object;
.field private mService:Landroid/support/a/c;
.field private final mSessionBinder:Landroid/support/a/a;
# direct methods
.method public constructor <init>(Landroidx/browser/customtabs/CustomTabsSessionToken;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mLock:Ljava/lang/Object;
invoke-virtual {p1}, Landroidx/browser/customtabs/CustomTabsSessionToken;->getCallbackBinder()Landroid/os/IBinder;
move-result-object p1
invoke-static {p1}, Landroid/support/a/a$a;->asInterface(Landroid/os/IBinder;)Landroid/support/a/a;
move-result-object p1
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Landroid/support/a/a;
return-void
.end method
# virtual methods
.method public bindSessionToPostMessageService(Landroid/content/Context;Ljava/lang/String;)Z
.locals 2
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
const-class v1, Landroidx/browser/customtabs/PostMessageService;
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, p2, v1}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/4 p2, 0x1
invoke-virtual {p1, v0, p0, p2}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
return p1
.end method
.method public final notifyMessageChannelReady(Landroid/os/Bundle;)Z
.locals 4
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Landroid/support/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:Landroid/support/a/c;
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Landroid/support/a/a;
invoke-interface {v2, v3, p1}, Landroid/support/a/c;->onMessageChannelReady(Landroid/support/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
.method public onPostMessageServiceConnected()V
.locals 0
return-void
.end method
.method public onPostMessageServiceDisconnected()V
.locals 0
return-void
.end method
.method public final onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
.locals 0
invoke-static {p2}, Landroid/support/a/c$a;->asInterface(Landroid/os/IBinder;)Landroid/support/a/c;
move-result-object p1
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Landroid/support/a/c;
invoke-virtual {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->onPostMessageServiceConnected()V
return-void
.end method
.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
.locals 0
const/4 p1, 0x0
iput-object p1, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Landroid/support/a/c;
invoke-virtual {p0}, Landroidx/browser/customtabs/PostMessageServiceConnection;->onPostMessageServiceDisconnected()V
return-void
.end method
.method public final postMessage(Ljava/lang/String;Landroid/os/Bundle;)Z
.locals 4
iget-object v0, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mService:Landroid/support/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:Landroid/support/a/c;
iget-object v3, p0, Landroidx/browser/customtabs/PostMessageServiceConnection;->mSessionBinder:Landroid/support/a/a;
invoke-interface {v2, v3, p1, p2}, Landroid/support/a/c;->onPostMessage(Landroid/support/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
: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
.method public unbindFromContext(Landroid/content/Context;)V
.locals 0
invoke-virtual {p1, p0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
return-void
.end method