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

132 lines
4.1 KiB
Smali
Raw Normal View History

2019-11-15 02:21:15 +00:00
.class abstract Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;
2019-07-24 11:27:29 +00:00
.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;
2019-11-15 02:21:15 +00:00
accessFlags = 0x400
2019-07-24 11:27:29 +00:00
name = "AutoNightModeManager"
.end annotation
# instance fields
2019-11-15 02:21:15 +00:00
.field private mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
.field final synthetic this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
# direct methods
2019-11-15 02:21:15 +00:00
.method 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-11-15 02:21:15 +00:00
.method 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-07-24 11:27:29 +00:00
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;
2019-11-15 02:21:15 +00:00
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mReceiver:Landroid/content/BroadcastReceiver;
2019-07-24 11:27:29 +00:00
invoke-virtual {v0, v1}, 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-11-15 02:21:15 +00:00
.method abstract createIntentFilterForBroadcastReceiver()Landroid/content/IntentFilter;
.end method
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
.method abstract getApplyableNightMode()I
2019-07-24 11:27:29 +00:00
.end method
2019-11-15 02:21:15 +00:00
.method 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
return v0
:cond_0
2019-11-15 02:21:15 +00:00
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
return v0
.end method
2019-11-15 02:21:15 +00:00
.method abstract onChange()V
.end method
.method 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