287 lines
6.5 KiB
Smali
287 lines
6.5 KiB
Smali
.class public Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;
|
|
.super Landroidx/work/impl/constraints/trackers/BroadcastReceiverConstraintTracker;
|
|
.source "StorageNotLowTracker.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/work/impl/constraints/trackers/BroadcastReceiverConstraintTracker<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final TAG:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "StorageNotLowTracker"
|
|
|
|
invoke-static {v0}, Landroidx/work/Logger;->tagWithPrefix(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->TAG:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Landroidx/work/impl/constraints/trackers/BroadcastReceiverConstraintTracker;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getInitialState()Ljava/lang/Boolean;
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->mAppContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {p0}, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->getIntentFilter()Landroid/content/IntentFilter;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v3
|
|
|
|
const v4, -0x46671f94
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-eq v3, v4, :cond_2
|
|
|
|
const v4, -0x2b8fb65c
|
|
|
|
if-eq v3, v4, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v3, "android.intent.action.DEVICE_STORAGE_OK"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-string v3, "android.intent.action.DEVICE_STORAGE_LOW"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
if-eqz v1, :cond_5
|
|
|
|
if-eq v1, v5, :cond_4
|
|
|
|
return-object v2
|
|
|
|
:cond_4
|
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
return-object v0
|
|
|
|
:cond_5
|
|
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
return-object v0
|
|
|
|
:cond_6
|
|
:goto_1
|
|
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public bridge synthetic getInitialState()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->getInitialState()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getIntentFilter()Landroid/content/IntentFilter;
|
|
.locals 2
|
|
|
|
new-instance v0, Landroid/content/IntentFilter;
|
|
|
|
invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V
|
|
|
|
const-string v1, "android.intent.action.DEVICE_STORAGE_OK"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
|
|
|
|
const-string v1, "android.intent.action.DEVICE_STORAGE_LOW"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onBroadcastReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 5
|
|
.param p2 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->TAG:Ljava/lang/String;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v2, v1, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
aput-object v3, v2, v4
|
|
|
|
const-string v3, "Received %s"
|
|
|
|
invoke-static {v3, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-array v3, v4, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p1, v0, v2, v3}, Landroidx/work/Logger;->debug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, -0x1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const v2, -0x46671f94
|
|
|
|
if-eq v0, v2, :cond_2
|
|
|
|
const v2, -0x2b8fb65c
|
|
|
|
if-eq v0, v2, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string v0, "android.intent.action.DEVICE_STORAGE_OK"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-string v0, "android.intent.action.DEVICE_STORAGE_LOW"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/4 p2, 0x1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
if-eqz p2, :cond_5
|
|
|
|
if-eq p2, v1, :cond_4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
sget-object p1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->setState(Ljava/lang/Object;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_5
|
|
sget-object p1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/work/impl/constraints/trackers/StorageNotLowTracker;->setState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|