131 lines
4.1 KiB
Smali
131 lines
4.1 KiB
Smali
.class abstract Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;
|
|
.super Ljava/lang/Object;
|
|
.source "AppCompatDelegateImpl.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x400
|
|
name = "AutoNightModeManager"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
.field final synthetic this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroidx/appcompat/app/AppCompatDelegateImpl;)V
|
|
.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
|
|
.method cleanup()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/app/AppCompatDelegateImpl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method abstract createIntentFilterForBroadcastReceiver()Landroid/content/IntentFilter;
|
|
.end method
|
|
|
|
.method abstract getApplyableNightMode()I
|
|
.end method
|
|
|
|
.method isListening()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method abstract onChange()V
|
|
.end method
|
|
|
|
.method setup()V
|
|
.locals 3
|
|
|
|
invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->cleanup()V
|
|
|
|
invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->createIntentFilterForBroadcastReceiver()Landroid/content/IntentFilter;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Landroid/content/IntentFilter;->countActions()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
new-instance v1, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;
|
|
|
|
invoke-direct {v1, p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;-><init>(Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;)V
|
|
|
|
iput-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
|
|
iget-object v1, v1, Landroidx/appcompat/app/AppCompatDelegateImpl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v2, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
invoke-virtual {v1, v2, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|