mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 09:32:27 -06:00
1009 lines
26 KiB
Smali
1009 lines
26 KiB
Smali
.class public final Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
.super Ljava/lang/Object;
|
|
.source "LocalBroadcastManager.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;,
|
|
Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final DEBUG:Z = false
|
|
|
|
.field static final MSG_EXEC_PENDING_BROADCASTS:I = 0x1
|
|
|
|
.field private static final TAG:Ljava/lang/String; = "LocalBroadcastManager"
|
|
|
|
.field private static mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
.field private static final mLock:Ljava/lang/Object;
|
|
|
|
|
|
# instance fields
|
|
.field private final mActions:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final mAppContext:Landroid/content/Context;
|
|
|
|
.field private final mHandler:Landroid/os/Handler;
|
|
|
|
.field private final mPendingBroadcasts:Ljava/util/ArrayList;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final mReceivers:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Landroid/content/BroadcastReceiver;",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 100
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mLock:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 113
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 90
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 92
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 94
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
iput-object p1, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mAppContext:Landroid/content/Context;
|
|
|
|
.line 115
|
|
new-instance v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$1;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p0, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$1;-><init>(Landroidx/localbroadcastmanager/content/LocalBroadcastManager;Landroid/os/Looper;)V
|
|
|
|
iput-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mHandler:Landroid/os/Handler;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
.locals 2
|
|
|
|
sget-object v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mLock:Ljava/lang/Object;
|
|
|
|
.line 105
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
sget-object v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 107
|
|
new-instance v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v1, p0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;-><init>(Landroid/content/Context;)V
|
|
|
|
sput-object v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
:cond_0
|
|
sget-object p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
.line 109
|
|
monitor-exit v0
|
|
|
|
return-object p0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
.line 110
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method executePendingBroadcasts()V
|
|
.locals 10
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 298
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
.line 299
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v1
|
|
|
|
if-gtz v1, :cond_1
|
|
|
|
.line 301
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
.line 303
|
|
:cond_1
|
|
new-array v2, v1, [Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;
|
|
|
|
iget-object v3, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
.line 304
|
|
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
iget-object v3, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
.line 305
|
|
invoke-virtual {v3}, Ljava/util/ArrayList;->clear()V
|
|
|
|
.line 306
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move v3, v0
|
|
|
|
:goto_0
|
|
if-ge v3, v1, :cond_0
|
|
|
|
.line 308
|
|
aget-object v4, v2, v3
|
|
|
|
.line 309
|
|
iget-object v5, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;->receivers:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v5
|
|
|
|
move v6, v0
|
|
|
|
:goto_1
|
|
if-ge v6, v5, :cond_3
|
|
|
|
.line 311
|
|
iget-object v7, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;->receivers:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v7, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
.line 312
|
|
iget-boolean v8, v7, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
if-nez v8, :cond_2
|
|
|
|
.line 313
|
|
iget-object v7, v7, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->receiver:Landroid/content/BroadcastReceiver;
|
|
|
|
iget-object v8, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mAppContext:Landroid/content/Context;
|
|
|
|
iget-object v9, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;->intent:Landroid/content/Intent;
|
|
|
|
invoke-virtual {v7, v8, v9}, Landroid/content/BroadcastReceiver;->onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
|
|
:cond_2
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
.line 306
|
|
:try_start_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)V
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 140
|
|
monitor-enter v0
|
|
|
|
.line 141
|
|
:try_start_0
|
|
new-instance v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
invoke-direct {v1, p2, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;-><init>(Landroid/content/IntentFilter;Landroid/content/BroadcastReceiver;)V
|
|
|
|
iget-object v2, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 142
|
|
invoke-virtual {v2, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/ArrayList;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 144
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
iget-object v4, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 145
|
|
invoke-virtual {v4, p1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 147
|
|
:cond_0
|
|
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 148
|
|
:goto_0
|
|
invoke-virtual {p2}, Landroid/content/IntentFilter;->countActions()I
|
|
|
|
move-result v2
|
|
|
|
if-ge p1, v2, :cond_2
|
|
|
|
.line 149
|
|
invoke-virtual {p2, p1}, Landroid/content/IntentFilter;->getAction(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v4, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 150
|
|
invoke-virtual {v4, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/util/ArrayList;
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
.line 152
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v4, v3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
iget-object v5, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 153
|
|
invoke-virtual {v5, v2, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 155
|
|
:cond_1
|
|
invoke-virtual {v4, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 157
|
|
:cond_2
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public sendBroadcast(Landroid/content/Intent;)Z
|
|
.locals 22
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
const-string v2, "Action list: "
|
|
|
|
const-string v3, "Resolving type "
|
|
|
|
iget-object v4, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 213
|
|
monitor-enter v4
|
|
|
|
.line 214
|
|
:try_start_0
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
iget-object v5, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mAppContext:Landroid/content/Context;
|
|
|
|
.line 216
|
|
invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object v5
|
|
|
|
.line 215
|
|
invoke-virtual {v1, v5}, Landroid/content/Intent;->resolveTypeIfNeeded(Landroid/content/ContentResolver;)Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
.line 217
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
move-result-object v14
|
|
|
|
.line 218
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getScheme()Ljava/lang/String;
|
|
|
|
move-result-object v15
|
|
|
|
.line 219
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getCategories()Ljava/util/Set;
|
|
|
|
move-result-object v16
|
|
|
|
.line 222
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
move-result v5
|
|
|
|
and-int/lit8 v5, v5, 0x8
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v10, 0x1
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
move/from16 v17, v10
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move/from16 v17, v11
|
|
|
|
:goto_0
|
|
if-eqz v17, :cond_1
|
|
|
|
const-string v5, "LocalBroadcastManager"
|
|
|
|
.line 223
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v6, " scheme "
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v6, " of intent "
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v5, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_1
|
|
iget-object v3, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 227
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v3, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/ArrayList;
|
|
|
|
if-eqz v3, :cond_12
|
|
|
|
if-eqz v17, :cond_2
|
|
|
|
const-string v5, "LocalBroadcastManager"
|
|
|
|
.line 229
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v5, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_2
|
|
const/4 v2, 0x0
|
|
|
|
move v9, v11
|
|
|
|
.line 232
|
|
:goto_1
|
|
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v5
|
|
|
|
if-ge v9, v5, :cond_e
|
|
|
|
.line 233
|
|
invoke-virtual {v3, v9}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v8, v5
|
|
|
|
check-cast v8, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
if-eqz v17, :cond_3
|
|
|
|
const-string v5, "LocalBroadcastManager"
|
|
|
|
.line 234
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "Matching against filter "
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v7, v8, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v5, v6}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 236
|
|
:cond_3
|
|
iget-boolean v5, v8, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
if-eqz v17, :cond_4
|
|
|
|
const-string v5, "LocalBroadcastManager"
|
|
|
|
const-string v6, " Filter\'s target already added"
|
|
|
|
.line 238
|
|
invoke-static {v5, v6}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_4
|
|
move-object/from16 v19, v3
|
|
|
|
move/from16 v20, v9
|
|
|
|
move-object/from16 v21, v12
|
|
|
|
move v12, v10
|
|
|
|
goto/16 :goto_3
|
|
|
|
.line 243
|
|
:cond_5
|
|
iget-object v5, v8, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
const-string v18, "LocalBroadcastManager"
|
|
|
|
move-object v6, v12
|
|
|
|
move-object v7, v13
|
|
|
|
move-object/from16 v19, v3
|
|
|
|
move-object v3, v8
|
|
|
|
move-object v8, v15
|
|
|
|
move/from16 v20, v9
|
|
|
|
move-object v9, v14
|
|
|
|
move-object/from16 v21, v12
|
|
|
|
move v12, v10
|
|
|
|
move-object/from16 v10, v16
|
|
|
|
move-object/from16 v11, v18
|
|
|
|
invoke-virtual/range {v5 .. v11}, Landroid/content/IntentFilter;->match(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/util/Set;Ljava/lang/String;)I
|
|
|
|
move-result v5
|
|
|
|
if-ltz v5, :cond_8
|
|
|
|
if-eqz v17, :cond_6
|
|
|
|
const-string v6, "LocalBroadcastManager"
|
|
|
|
.line 246
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, " Filter matched! match=0x"
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v7
|
|
|
|
.line 247
|
|
invoke-static {v5}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
.line 246
|
|
invoke-static {v6, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_6
|
|
if-nez v2, :cond_7
|
|
|
|
.line 249
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 251
|
|
:cond_7
|
|
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 252
|
|
iput-boolean v12, v3, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
goto :goto_3
|
|
|
|
:cond_8
|
|
if-eqz v17, :cond_d
|
|
|
|
const/4 v3, -0x4
|
|
|
|
if-eq v5, v3, :cond_c
|
|
|
|
const/4 v3, -0x3
|
|
|
|
if-eq v5, v3, :cond_b
|
|
|
|
const/4 v3, -0x2
|
|
|
|
if-eq v5, v3, :cond_a
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v5, v3, :cond_9
|
|
|
|
const-string v3, "unknown reason"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_9
|
|
const-string v3, "type"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_a
|
|
const-string v3, "data"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_b
|
|
const-string v3, "action"
|
|
|
|
goto :goto_2
|
|
|
|
:cond_c
|
|
const-string v3, "category"
|
|
|
|
:goto_2
|
|
const-string v5, "LocalBroadcastManager"
|
|
|
|
.line 263
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, " Filter did not match: "
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v5, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_d
|
|
:goto_3
|
|
add-int/lit8 v9, v20, 0x1
|
|
|
|
move v10, v12
|
|
|
|
move-object/from16 v3, v19
|
|
|
|
move-object/from16 v12, v21
|
|
|
|
const/4 v11, 0x0
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_e
|
|
move v12, v10
|
|
|
|
if-eqz v2, :cond_11
|
|
|
|
const/4 v11, 0x0
|
|
|
|
.line 269
|
|
:goto_4
|
|
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-ge v11, v3, :cond_f
|
|
|
|
.line 270
|
|
invoke-virtual {v2, v11}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
iput-boolean v5, v3, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_f
|
|
iget-object v3, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
.line 272
|
|
new-instance v5, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;
|
|
|
|
invoke-direct {v5, v1, v2}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;-><init>(Landroid/content/Intent;Ljava/util/ArrayList;)V
|
|
|
|
invoke-virtual {v3, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
iget-object v1, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mHandler:Landroid/os/Handler;
|
|
|
|
.line 273
|
|
invoke-virtual {v1, v12}, Landroid/os/Handler;->hasMessages(I)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_10
|
|
|
|
iget-object v0, v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mHandler:Landroid/os/Handler;
|
|
|
|
.line 274
|
|
invoke-virtual {v0, v12}, Landroid/os/Handler;->sendEmptyMessage(I)Z
|
|
|
|
.line 276
|
|
:cond_10
|
|
monitor-exit v4
|
|
|
|
return v12
|
|
|
|
:cond_11
|
|
const/4 v5, 0x0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_12
|
|
move v5, v11
|
|
|
|
.line 279
|
|
:goto_5
|
|
monitor-exit v4
|
|
|
|
return v5
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v4
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public sendBroadcastSync(Landroid/content/Intent;)V
|
|
.locals 0
|
|
|
|
.line 289
|
|
invoke-virtual {p0, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 290
|
|
invoke-virtual {p0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->executePendingBroadcasts()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public unregisterReceiver(Landroid/content/BroadcastReceiver;)V
|
|
.locals 11
|
|
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 170
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
.line 171
|
|
invoke-virtual {v1, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/ArrayList;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 173
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
.line 175
|
|
:cond_0
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
:goto_0
|
|
if-ltz v2, :cond_5
|
|
|
|
.line 176
|
|
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
.line 177
|
|
iput-boolean v3, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
const/4 v5, 0x0
|
|
|
|
.line 178
|
|
:goto_1
|
|
iget-object v6, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
invoke-virtual {v6}, Landroid/content/IntentFilter;->countActions()I
|
|
|
|
move-result v6
|
|
|
|
if-ge v5, v6, :cond_4
|
|
|
|
.line 179
|
|
iget-object v6, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
invoke-virtual {v6, v5}, Landroid/content/IntentFilter;->getAction(I)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
iget-object v7, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 180
|
|
invoke-virtual {v7, v6}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
check-cast v7, Ljava/util/ArrayList;
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
.line 182
|
|
invoke-virtual {v7}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v8
|
|
|
|
sub-int/2addr v8, v3
|
|
|
|
:goto_2
|
|
if-ltz v8, :cond_2
|
|
|
|
.line 183
|
|
invoke-virtual {v7, v8}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v9
|
|
|
|
check-cast v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
.line 184
|
|
iget-object v10, v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->receiver:Landroid/content/BroadcastReceiver;
|
|
|
|
if-ne v10, p1, :cond_1
|
|
|
|
.line 185
|
|
iput-boolean v3, v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
.line 186
|
|
invoke-virtual {v7, v8}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
|
|
|
|
:cond_1
|
|
add-int/lit8 v8, v8, -0x1
|
|
|
|
goto :goto_2
|
|
|
|
.line 189
|
|
:cond_2
|
|
invoke-virtual {v7}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v7
|
|
|
|
if-gtz v7, :cond_3
|
|
|
|
iget-object v7, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
.line 190
|
|
invoke-virtual {v7, v6}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_3
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 195
|
|
:cond_5
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|