115 lines
2.7 KiB
Smali
115 lines
2.7 KiB
Smali
.class public final Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock$proximityWakeLock$2;
|
|
.super Lx/u/b/k;
|
|
.source "VoiceEngineForegroundService.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock;-><init>(Landroid/app/Application;)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lx/u/b/k;",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Landroid/os/PowerManager$WakeLock;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $context:Landroid/app/Application;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/app/Application;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock$proximityWakeLock$2;->$context:Landroid/app/Application;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
invoke-direct {p0, p1}, Lx/u/b/k;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final invoke()Landroid/os/PowerManager$WakeLock;
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock$proximityWakeLock$2;->$context:Landroid/app/Application;
|
|
|
|
const-string v1, "power"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/app/Application;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast v0, Landroid/os/PowerManager;
|
|
|
|
const/16 v1, 0x20
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/PowerManager;->isWakeLockLevelSupported(I)Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v2, v3, :cond_0
|
|
|
|
const-string v2, "discord:TAG_PROXIMITY"
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-nez v2, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_1
|
|
new-instance v0, Lx/g;
|
|
|
|
invoke-direct {v0}, Lx/g;-><init>()V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
new-instance v0, Lx/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type android.os.PowerManager"
|
|
|
|
invoke-direct {v0, v1}, Lx/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public bridge synthetic invoke()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/voice/VoiceEngineForegroundService$WakeLock$proximityWakeLock$2;->invoke()Landroid/os/PowerManager$WakeLock;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|