apkfuckery/com.discord/smali/androidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager.smali

142 lines
4.3 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public abstract Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
.source "AppCompatDelegateImpl.java"
# annotations
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
.annotation build Landroidx/annotation/VisibleForTesting;
.end annotation
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/appcompat/app/AppCompatDelegateImpl;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x401
2019-07-24 11:27:29 +00:00
name = "AutoNightModeManager"
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final synthetic this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(Landroidx/appcompat/app/AppCompatDelegateImpl;)V
2019-07-24 11:27:29 +00:00
.locals 0
iput-object p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public cleanup()V
2019-07-24 11:27:29 +00:00
.locals 2
2019-11-15 02:21:15 +00:00
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
2019-11-15 02:21:15 +00:00
:try_start_0
2019-12-06 03:29:40 +00:00
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
iget-object v1, v1, Landroidx/appcompat/app/AppCompatDelegateImpl;->mContext:Landroid/content/Context;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {v1, v0}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
2019-11-15 02:21:15 +00:00
:try_end_0
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
:catch_0
2019-07-24 11:27:29 +00:00
const/4 v0, 0x0
2019-11-15 02:21:15 +00:00
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public abstract createIntentFilterForBroadcastReceiver()Landroid/content/IntentFilter;
.annotation build Landroidx/annotation/Nullable;
.end annotation
2019-11-15 02:21:15 +00:00
.end method
2019-11-14 21:08:15 +00:00
2019-12-06 03:29:40 +00:00
.method public abstract getApplyableNightMode()I
2019-07-24 11:27:29 +00:00
.end method
2019-12-06 03:29:40 +00:00
.method public isListening()Z
2019-07-24 11:27:29 +00:00
.locals 1
2019-11-15 02:21:15 +00:00
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
if-eqz v0, :cond_0
2019-11-15 02:21:15 +00:00
const/4 v0, 0x1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
2019-11-15 02:21:15 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public abstract onChange()V
2019-11-15 02:21:15 +00:00
.end method
2019-12-06 03:29:40 +00:00
.method public setup()V
2019-07-24 11:27:29 +00:00
.locals 3
invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->cleanup()V
2019-11-15 02:21:15 +00:00
invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->createIntentFilterForBroadcastReceiver()Landroid/content/IntentFilter;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
if-eqz v0, :cond_2
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
invoke-virtual {v0}, Landroid/content/IntentFilter;->countActions()I
2019-10-11 21:55:41 +00:00
2019-11-15 02:21:15 +00:00
move-result v1
2019-10-11 21:55:41 +00:00
2019-11-15 02:21:15 +00:00
if-nez v1, :cond_0
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
goto :goto_0
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
:cond_0
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
if-nez v1, :cond_1
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
new-instance v1, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
invoke-direct {v1, p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;-><init>(Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;)V
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
iput-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
:cond_1
2019-11-15 02:21:15 +00:00
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
iget-object v1, v1, Landroidx/appcompat/app/AppCompatDelegateImpl;->mContext:Landroid/content/Context;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
iget-object v2, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
invoke-virtual {v1, v2, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
:cond_2
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method