apkfuckery/com.discord/smali/androidx/lifecycle/LifecycleDispatcher.smali

71 lines
1.8 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class Landroidx/lifecycle/LifecycleDispatcher;
.super Ljava/lang/Object;
.source "LifecycleDispatcher.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/lifecycle/LifecycleDispatcher$DispatcherActivityCallback;
}
.end annotation
# static fields
.field private static sInitialized:Ljava/util/concurrent/atomic/AtomicBoolean;
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x0
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
sput-object v0, Landroidx/lifecycle/LifecycleDispatcher;->sInitialized:Ljava/util/concurrent/atomic/AtomicBoolean;
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static init(Landroid/content/Context;)V
.locals 2
sget-object v0, Landroidx/lifecycle/LifecycleDispatcher;->sInitialized:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z
move-result v0
if-eqz v0, :cond_0
return-void
:cond_0
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object p0
check-cast p0, Landroid/app/Application;
new-instance v0, Landroidx/lifecycle/LifecycleDispatcher$DispatcherActivityCallback;
invoke-direct {v0}, Landroidx/lifecycle/LifecycleDispatcher$DispatcherActivityCallback;-><init>()V
invoke-virtual {p0, v0}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
return-void
.end method