2019-10-11 21:55:41 +00:00
|
|
|
.class final 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-10-11 21:55:41 +00:00
|
|
|
accessFlags = 0x10
|
2019-07-24 11:27:29 +00:00
|
|
|
name = "AutoNightModeManager"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-10-11 21:55:41 +00:00
|
|
|
.field private mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
|
|
|
|
|
|
|
.field private mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
|
|
|
|
|
|
|
.field private mIsNight:Z
|
|
|
|
|
|
|
|
.field private mTwilightManager:Landroidx/appcompat/app/TwilightManager;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
.field final synthetic this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-10-11 21:55:41 +00:00
|
|
|
.method constructor <init>(Landroidx/appcompat/app/AppCompatDelegateImpl;Landroidx/appcompat/app/TwilightManager;)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
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object p2, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mTwilightManager:Landroidx/appcompat/app/TwilightManager;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/appcompat/app/TwilightManager;->isNight()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mIsNight:Z
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-10-11 21:55:41 +00:00
|
|
|
.method final cleanup()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_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;
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method final dispatchTimeChanged()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mTwilightManager:Landroidx/appcompat/app/TwilightManager;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/app/TwilightManager;->isNight()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget-boolean v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mIsNight:Z
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mIsNight:Z
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->this$0:Landroidx/appcompat/app/AppCompatDelegateImpl;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/app/AppCompatDelegateImpl;->applyDayNight()Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method final getApplyableNightMode()I
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mTwilightManager:Landroidx/appcompat/app/TwilightManager;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/app/TwilightManager;->isNight()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mIsNight:Z
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mIsNight:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
const/4 v0, 0x2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
2019-10-11 21:55:41 +00:00
|
|
|
const/4 v0, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method final setup()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->cleanup()V
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
if-nez v0, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
new-instance v0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-direct {v0, p0}, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager$1;-><init>(Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
if-nez v0, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
new-instance v0, Landroid/content/IntentFilter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
const-string v1, "android.intent.action.TIME_SET"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
|
|
|
|
|
|
|
const-string v1, "android.intent.action.TIMEZONE_CHANGED"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
|
|
|
|
|
|
|
const-string v1, "android.intent.action.TIME_TICK"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_1
|
2019-10-11 21:55:41 +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-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v1, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiver:Landroid/content/BroadcastReceiver;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v2, p0, Landroidx/appcompat/app/AppCompatDelegateImpl$AutoNightModeManager;->mAutoTimeChangeReceiverFilter:Landroid/content/IntentFilter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|