151 lines
5.6 KiB
Smali
151 lines
5.6 KiB
Smali
.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;
|
|
|
|
.field private final mTearDownRunnable:Ljava/lang/Runnable;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Landroidx/room/InvalidationTracker;Ljava/util/concurrent/Executor;)V
|
|
.locals 3
|
|
|
|
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;
|
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$3;
|
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$3;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mSetUpRunnable:Ljava/lang/Runnable;
|
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$4;
|
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$4;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mRemoveObserverRunnable:Ljava/lang/Runnable;
|
|
|
|
new-instance v2, Landroidx/room/MultiInstanceInvalidationClient$5;
|
|
|
|
invoke-direct {v2, p0}, Landroidx/room/MultiInstanceInvalidationClient$5;-><init>(Landroidx/room/MultiInstanceInvalidationClient;)V
|
|
|
|
iput-object v2, p0, Landroidx/room/MultiInstanceInvalidationClient;->mTearDownRunnable:Ljava/lang/Runnable;
|
|
|
|
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;
|
|
|
|
iget-object p2, p3, Landroidx/room/InvalidationTracker;->mTableIdLookup:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {p2}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance p3, Landroidx/room/MultiInstanceInvalidationClient$6;
|
|
|
|
new-array p4, v1, [Ljava/lang/String;
|
|
|
|
invoke-interface {p2, p4}, Ljava/util/Set;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, [Ljava/lang/String;
|
|
|
|
invoke-direct {p3, p0, p2}, Landroidx/room/MultiInstanceInvalidationClient$6;-><init>(Landroidx/room/MultiInstanceInvalidationClient;[Ljava/lang/String;)V
|
|
|
|
iput-object p3, p0, Landroidx/room/MultiInstanceInvalidationClient;->mObserver:Landroidx/room/InvalidationTracker$Observer;
|
|
|
|
new-instance p2, Landroid/content/Intent;
|
|
|
|
const-class p3, Landroidx/room/MultiInstanceInvalidationService;
|
|
|
|
invoke-direct {p2, p1, p3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
const/4 p3, 0x1
|
|
|
|
invoke-virtual {p1, p2, v0, p3}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
|
|
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
|