166 lines
5.4 KiB
Smali
166 lines
5.4 KiB
Smali
.class public Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;
|
|
.super Landroid/content/BroadcastReceiver;
|
|
.source "ConstraintProxyUpdateReceiver.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final ACTION:Ljava/lang/String; = "androidx.work.impl.background.systemalarm.UpdateProxies"
|
|
|
|
.field public static final KEY_BATTERY_CHARGING_PROXY_ENABLED:Ljava/lang/String; = "KEY_BATTERY_CHARGING_PROXY_ENABLED"
|
|
|
|
.field public static final KEY_BATTERY_NOT_LOW_PROXY_ENABLED:Ljava/lang/String; = "KEY_BATTERY_NOT_LOW_PROXY_ENABLED"
|
|
|
|
.field public static final KEY_NETWORK_STATE_PROXY_ENABLED:Ljava/lang/String; = "KEY_NETWORK_STATE_PROXY_ENABLED"
|
|
|
|
.field public static final KEY_STORAGE_NOT_LOW_PROXY_ENABLED:Ljava/lang/String; = "KEY_STORAGE_NOT_LOW_PROXY_ENABLED"
|
|
|
|
.field public static final TAG:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "ConstrntProxyUpdtRecvr"
|
|
|
|
invoke-static {v0}, Landroidx/work/Logger;->tagWithPrefix(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;->TAG:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static newConstraintProxyUpdateIntent(Landroid/content/Context;ZZZZ)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "androidx.work.impl.background.systemalarm.UpdateProxies"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
new-instance v1, Landroid/content/ComponentName;
|
|
|
|
const-class v2, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;
|
|
|
|
invoke-direct {v1, p0, v2}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
const-string p0, "KEY_BATTERY_NOT_LOW_PROXY_ENABLED"
|
|
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "KEY_BATTERY_CHARGING_PROXY_ENABLED"
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "KEY_STORAGE_NOT_LOW_PROXY_ENABLED"
|
|
|
|
invoke-virtual {p0, p1, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "KEY_NETWORK_STATE_PROXY_ENABLED"
|
|
|
|
invoke-virtual {p0, p1, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 3
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
const-string v1, "androidx.work.impl.background.systemalarm.UpdateProxies"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
invoke-static {}, Landroidx/work/Logger;->get()Landroidx/work/Logger;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;->TAG:Ljava/lang/String;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
const-string v0, "Ignoring unknown action %s"
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
new-array v1, v2, [Ljava/lang/Throwable;
|
|
|
|
invoke-virtual {p1, p2, v0, v1}, Landroidx/work/Logger;->debug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroid/content/BroadcastReceiver;->goAsync()Landroid/content/BroadcastReceiver$PendingResult;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Landroidx/work/impl/WorkManagerImpl;->getInstance(Landroid/content/Context;)Landroidx/work/impl/WorkManagerImpl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroidx/work/impl/WorkManagerImpl;->getWorkTaskExecutor()Landroidx/work/impl/utils/taskexecutor/TaskExecutor;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver$1;
|
|
|
|
invoke-direct {v2, p0, p2, p1, v0}, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver$1;-><init>(Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;Landroid/content/Intent;Landroid/content/Context;Landroid/content/BroadcastReceiver$PendingResult;)V
|
|
|
|
invoke-interface {v1, v2}, Landroidx/work/impl/utils/taskexecutor/TaskExecutor;->executeOnBackgroundThread(Ljava/lang/Runnable;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|