2020-11-12 02:11:44 +00:00
|
|
|
.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
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private static final DEBUG:Z = false
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
.field public static final MSG_EXEC_PENDING_BROADCASTS:I = 0x1
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private static final TAG:Ljava/lang/String; = "LocalBroadcastManager"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private static mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private static final mLock:Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private final mActions:Ljava/util/HashMap;
|
2020-11-12 02:11:44 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashMap<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/ArrayList<",
|
|
|
|
"Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;",
|
|
|
|
">;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private final mAppContext:Landroid/content/Context;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private final mHandler:Landroid/os/Handler;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private final mPendingBroadcasts:Ljava/util/ArrayList;
|
2020-11-12 02:11:44 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/ArrayList<",
|
|
|
|
"Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.field private final mReceivers:Ljava/util/HashMap;
|
2020-11-12 02:11:44 +00:00
|
|
|
.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 public static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
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
|
|
|
|
.param p0 # Landroid/content/Context;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mLock:Ljava/lang/Object;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
sget-object v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mInstance:Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public executePendingBroadcasts()V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v1, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-gtz v1, :cond_1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-array v2, v1, [Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Ljava/util/ArrayList;->clear()V
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v3, v1, :cond_0
|
|
|
|
|
|
|
|
aget-object v4, v2, v3
|
|
|
|
|
|
|
|
iget-object v5, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;->receivers:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-ge v6, v5, :cond_3
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
iget-boolean v8, v7, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
|
|
|
|
if-nez v8, :cond_2
|
|
|
|
|
|
|
|
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 v1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)V
|
|
|
|
.locals 6
|
|
|
|
.param p1 # Landroid/content/BroadcastReceiver;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Landroid/content/IntentFilter;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
: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;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
invoke-virtual {v4, p1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p2}, Landroid/content/IntentFilter;->countActions()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-ge p1, v2, :cond_2
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
invoke-virtual {v5, v2, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v4, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public sendBroadcast(Landroid/content/Intent;)Z
|
|
|
|
.locals 21
|
|
|
|
.param p1 # Landroid/content/Intent;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
|
|
|
|
iget-object v2, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
monitor-enter v2
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v10
|
|
|
|
|
|
|
|
iget-object v3, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mAppContext:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v3}, Landroid/content/Intent;->resolveTypeIfNeeded(Landroid/content/ContentResolver;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v11
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object v12
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getScheme()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v13
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getCategories()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v14
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
and-int/lit8 v3, v3, 0x8
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
const/16 v16, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v16, :cond_1
|
|
|
|
|
|
|
|
const-string v3, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v5, "Resolving type "
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v5, " scheme "
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v5, " of intent "
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v3, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mActions:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual/range {p1 .. p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
move-object v8, v3
|
|
|
|
|
|
|
|
check-cast v8, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
if-eqz v8, :cond_11
|
|
|
|
|
|
|
|
if-eqz v16, :cond_2
|
|
|
|
|
|
|
|
const-string v3, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v5, "Action list: "
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
move-object v7, v3
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {v8}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-ge v6, v3, :cond_e
|
|
|
|
|
|
|
|
invoke-virtual {v8, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
move-object v5, v3
|
|
|
|
|
|
|
|
check-cast v5, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
|
|
|
|
if-eqz v16, :cond_3
|
|
|
|
|
|
|
|
const-string v3, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v9, "Matching against filter "
|
|
|
|
|
|
|
|
invoke-virtual {v4, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v9, v5, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
|
|
|
|
invoke-virtual {v4, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget-boolean v3, v5, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
|
|
|
|
if-eqz v16, :cond_4
|
|
|
|
|
|
|
|
const-string v3, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
const-string v4, " Filter\'s target already added"
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
move/from16 v17, v6
|
|
|
|
|
|
|
|
move-object/from16 v19, v8
|
|
|
|
|
|
|
|
move-object/from16 v18, v10
|
|
|
|
|
|
|
|
move-object/from16 v20, v11
|
|
|
|
|
|
|
|
const/4 v11, 0x1
|
|
|
|
|
|
|
|
move-object v10, v7
|
|
|
|
|
|
|
|
goto/16 :goto_4
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
iget-object v3, v5, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->filter:Landroid/content/IntentFilter;
|
|
|
|
|
|
|
|
const-string v9, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
move-object v4, v10
|
|
|
|
|
|
|
|
move-object v15, v5
|
|
|
|
|
|
|
|
move-object v5, v11
|
|
|
|
|
|
|
|
move/from16 v17, v6
|
|
|
|
|
|
|
|
move-object v6, v13
|
|
|
|
|
|
|
|
move-object/from16 v18, v10
|
|
|
|
|
|
|
|
move-object v10, v7
|
|
|
|
|
|
|
|
move-object v7, v12
|
|
|
|
|
|
|
|
move-object/from16 v19, v8
|
|
|
|
|
|
|
|
move-object v8, v14
|
|
|
|
|
|
|
|
move-object/from16 v20, v11
|
|
|
|
|
|
|
|
const/4 v11, 0x1
|
|
|
|
|
|
|
|
invoke-virtual/range {v3 .. v9}, 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 v3
|
|
|
|
|
|
|
|
if-ltz v3, :cond_8
|
|
|
|
|
|
|
|
if-eqz v16, :cond_6
|
|
|
|
|
|
|
|
const-string v4, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v6, " Filter matched! match=0x"
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-static {v4, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
if-nez v10, :cond_7
|
|
|
|
|
|
|
|
new-instance v7, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v7}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
move-object v7, v10
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-virtual {v7, v15}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
iput-boolean v11, v15, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
|
|
|
|
goto :goto_5
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
if-eqz v16, :cond_d
|
|
|
|
|
|
|
|
const/4 v4, -0x4
|
|
|
|
|
|
|
|
if-eq v3, v4, :cond_c
|
|
|
|
|
|
|
|
const/4 v4, -0x3
|
|
|
|
|
|
|
|
if-eq v3, v4, :cond_b
|
|
|
|
|
|
|
|
const/4 v4, -0x2
|
|
|
|
|
|
|
|
if-eq v3, v4, :cond_a
|
|
|
|
|
|
|
|
const/4 v4, -0x1
|
|
|
|
|
|
|
|
if-eq v3, v4, :cond_9
|
|
|
|
|
|
|
|
const-string/jumbo v3, "unknown reason"
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
const-string/jumbo v3, "type"
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_a
|
|
|
|
const-string v3, "data"
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_b
|
|
|
|
const-string v3, "action"
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_c
|
|
|
|
const-string v3, "category"
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
const-string v4, "LocalBroadcastManager"
|
|
|
|
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v6, " Filter did not match: "
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-static {v4, v3}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_d
|
|
|
|
:goto_4
|
|
|
|
move-object v7, v10
|
|
|
|
|
|
|
|
:goto_5
|
|
|
|
add-int/lit8 v6, v17, 0x1
|
|
|
|
|
|
|
|
move-object/from16 v10, v18
|
|
|
|
|
|
|
|
move-object/from16 v8, v19
|
|
|
|
|
|
|
|
move-object/from16 v11, v20
|
|
|
|
|
|
|
|
goto/16 :goto_1
|
|
|
|
|
|
|
|
:cond_e
|
|
|
|
move-object v10, v7
|
|
|
|
|
|
|
|
const/4 v11, 0x1
|
|
|
|
|
|
|
|
if-eqz v10, :cond_11
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_6
|
|
|
|
invoke-virtual {v10}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-ge v3, v4, :cond_f
|
|
|
|
|
|
|
|
invoke-virtual {v10, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
iput-boolean v5, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->broadcasting:Z
|
|
|
|
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_6
|
|
|
|
|
|
|
|
:cond_f
|
|
|
|
iget-object v3, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mPendingBroadcasts:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
new-instance v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;
|
|
|
|
|
|
|
|
invoke-direct {v4, v0, v10}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$BroadcastRecord;-><init>(Landroid/content/Intent;Ljava/util/ArrayList;)V
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
iget-object v0, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mHandler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v11}, Landroid/os/Handler;->hasMessages(I)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_10
|
|
|
|
|
|
|
|
iget-object v0, v1, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mHandler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v11}, Landroid/os/Handler;->sendEmptyMessage(I)Z
|
|
|
|
|
|
|
|
:cond_10
|
|
|
|
monitor-exit v2
|
|
|
|
|
|
|
|
return v11
|
|
|
|
|
|
|
|
:cond_11
|
|
|
|
monitor-exit v2
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
monitor-exit v2
|
|
|
|
: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
|
|
|
|
.param p1 # Landroid/content/Intent;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->executePendingBroadcasts()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public unregisterReceiver(Landroid/content/BroadcastReceiver;)V
|
|
|
|
.locals 11
|
|
|
|
.param p1 # Landroid/content/BroadcastReceiver;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v1, p0, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->mReceivers:Ljava/util/HashMap;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
: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
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
|
|
|
|
iput-boolean v3, v4, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
: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
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-virtual {v7}, Ljava/util/ArrayList;->size()I
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
sub-int/2addr v8, v3
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-ltz v8, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v7, v8}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
check-cast v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;
|
|
|
|
|
|
|
|
iget-object v10, v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->receiver:Landroid/content/BroadcastReceiver;
|
|
|
|
|
|
|
|
if-ne v10, p1, :cond_1
|
|
|
|
|
|
|
|
iput-boolean v3, v9, Landroidx/localbroadcastmanager/content/LocalBroadcastManager$ReceiverRecord;->dead:Z
|
|
|
|
|
|
|
|
invoke-virtual {v7, v8}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
add-int/lit8 v8, v8, -0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
: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;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|