2019-02-04 20:05:16 +00:00
|
|
|
.class public Lcom/miguelgaeta/backgrounded/Backgrounded;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "Backgrounded.java"
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final emitter:Lrx/subjects/SerializedSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/subjects/SerializedSubject<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field private static lifecycle:Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lrx/subjects/SerializedSubject;
|
|
|
|
|
2019-05-28 22:16:26 +00:00
|
|
|
invoke-static {}, Lrx/subjects/BehaviorSubject;->GV()Lrx/subjects/BehaviorSubject;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->emitter:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static synthetic access$000()Lrx/subjects/SerializedSubject;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->emitter:Lrx/subjects/SerializedSubject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static checkInitialized()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->lifecycle:Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:05:16 +00:00
|
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
|
|
|
|
const-string v1, "Backgrounded utility is not initialized."
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static destroy(Landroid/app/Application;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->lifecycle:Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroid/app/Application;->unregisterActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static get()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
2019-02-04 20:08:30 +00:00
|
|
|
"Lrx/Observable<",
|
2019-02-04 20:05:16 +00:00
|
|
|
"Ljava/lang/Boolean;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/miguelgaeta/backgrounded/Backgrounded;->checkInitialized()V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->emitter:Lrx/subjects/SerializedSubject;
|
|
|
|
|
2019-05-28 22:16:26 +00:00
|
|
|
invoke-virtual {v0}, Lrx/subjects/SerializedSubject;->Fo()Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static init(Landroid/app/Application;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->lifecycle:Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->lifecycle:Lcom/miguelgaeta/backgrounded/Backgrounded$Lifecycle;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroid/app/Application;->registerActivityLifecycleCallbacks(Landroid/app/Application$ActivityLifecycleCallbacks;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static isBackgrounded()Z
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 3
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
invoke-static {}, Lcom/miguelgaeta/backgrounded/Backgrounded;->checkInitialized()V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/miguelgaeta/backgrounded/Backgrounded;->emitter:Lrx/subjects/SerializedSubject;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {v0}, Lrx/b/a;->g(Lrx/Observable;)Lrx/b/a;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object v1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-06-01 02:00:00 +00:00
|
|
|
iget-object v0, v0, Lrx/b/a;->bLw:Lrx/Observable;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v2, Lrx/internal/a/b$1;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-direct {v2, v1, v0}, Lrx/internal/a/b$1;-><init>(Ljava/lang/Object;Lrx/Observable;)V
|
2019-02-04 20:05:16 +00:00
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2019-02-04 20:05:16 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|