2020-11-12 02:11:44 +00:00
|
|
|
.class public Landroidx/room/MultiInstanceInvalidationClient;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "MultiInstanceInvalidationClient.java"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final mAppContext:Landroid/content/Context;
|
|
|
|
|
|
|
|
.field public final mCallback:Landroidx/room/IMultiInstanceInvalidationCallback;
|
|
|
|
|
|
|
|
.field public mClientId:I
|
|
|
|
|
|
|
|
.field public final mExecutor:Ljava/util/concurrent/Executor;
|
|
|
|
|
|
|
|
.field public final mInvalidationTracker:Landroidx/room/InvalidationTracker;
|
|
|
|
|
|
|
|
.field public final mName:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final mObserver:Landroidx/room/InvalidationTracker$Observer;
|
|
|
|
|
|
|
|
.field public final mRemoveObserverRunnable:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
.field public mService:Landroidx/room/IMultiInstanceInvalidationService;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final mServiceConnection:Landroid/content/ServiceConnection;
|
|
|
|
|
|
|
|
.field public final mSetUpRunnable:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
.field public final mStopped:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
.field private final mTearDownRunnable:Ljava/lang/Runnable;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Landroidx/room/InvalidationTracker;Ljava/util/concurrent/Executor;)V
|
2020-11-21 22:11:07 +00:00
|
|
|
.locals 3
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/room/MultiInstanceInvalidationClient$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Landroidx/room/MultiInstanceInvalidationClient$1;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/room/MultiInstanceInvalidationClient;->mCallback:Landroidx/room/IMultiInstanceInvalidationCallback;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/room/MultiInstanceInvalidationClient;->mStopped:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/room/MultiInstanceInvalidationClient$2;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Landroidx/room/MultiInstanceInvalidationClient$2;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/room/MultiInstanceInvalidationClient;->mServiceConnection:Landroid/content/ServiceConnection;
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$3;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$3;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mSetUpRunnable:Ljava/lang/Runnable;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$4;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$4;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mRemoveObserverRunnable:Ljava/lang/Runnable;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$5;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$5;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mTearDownRunnable:Ljava/lang/Runnable;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/room/MultiInstanceInvalidationClient;->mAppContext:Landroid/content/Context;
|
|
|
|
|
|
|
|
iput-object p2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mName:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object p3, p0, Landroidx/room/MultiInstanceInvalidationClient;->mInvalidationTracker:Landroidx/room/InvalidationTracker;
|
|
|
|
|
|
|
|
iput-object p4, p0, Landroidx/room/MultiInstanceInvalidationClient;->mExecutor:Ljava/util/concurrent/Executor;
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iget-object p2, p3, Landroidx/room/InvalidationTracker;->mTableIdLookup:Ljava/util/HashMap;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-virtual {p2}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
move-result-object p2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-instance p3, Landroidx/room/MultiInstanceInvalidationClient$6;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-array p4, v1, [Ljava/lang/String;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-interface {p2, p4}, Ljava/util/Set;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
move-result-object p2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
check-cast p2, [Ljava/lang/String;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-direct {p3, p0, p2}, Landroidx/room/MultiInstanceInvalidationClient$6;-><init>(Landroidx/room/MultiInstanceInvalidationClient;[Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
iput-object p3, p0, Landroidx/room/MultiInstanceInvalidationClient;->mObserver:Landroidx/room/InvalidationTracker$Observer;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
new-instance p2, Landroid/content/Intent;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
const-class p3, Landroidx/room/MultiInstanceInvalidationService;
|
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-direct {p2, p1, p3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
const/4 p3, 0x1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 22:11:07 +00:00
|
|
|
invoke-virtual {p1, p2, v0, p3}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public stop()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/room/MultiInstanceInvalidationClient;->mStopped:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/room/MultiInstanceInvalidationClient;->mExecutor:Ljava/util/concurrent/Executor;
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/room/MultiInstanceInvalidationClient;->mTearDownRunnable:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|