apkfuckery/com.discord/smali/n.smali

1142 lines
28 KiB
Smali
Raw Normal View History

2020-07-23 01:06:17 +00:00
.class public final Ln;
.super Ljava/lang/Object;
.source "MediaEngineLegacy.kt"
# interfaces
.implements Lcom/discord/rtcconnection/mediaengine/MediaEngine;
# static fields
2020-08-04 06:02:43 +00:00
.field public static final j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
# instance fields
.field public final a:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;",
">;"
}
.end annotation
.end field
.field public b:Lcom/hammerandchisel/libdiscord/Discord;
.field public final c:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;",
">;"
}
.end annotation
.end field
.field public d:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lf/a/h/r/a;",
">;"
}
.end annotation
.end field
.field public final e:Landroid/content/Context;
.field public final f:Ljava/util/concurrent/ExecutorService;
.field public final g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
.field public final h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
.field public final i:Ljava/util/HashSet;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashSet<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
2020-07-23 01:06:17 +00:00
# direct methods
.method public static constructor <clinit>()V
.locals 2
const-class v0, Ln;
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v0
const-string v1, "MediaEngineLegacy::class.java.simpleName"
2020-07-25 00:57:58 +00:00
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
2020-08-04 06:02:43 +00:00
sput-object v0, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
return-void
.end method
2020-08-04 06:02:43 +00:00
.method public constructor <init>(Landroid/content/Context;Ljava/util/concurrent/ExecutorService;Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;Lcom/discord/utilities/logging/Logger;Ljava/util/HashSet;I)V
.locals 6
and-int/lit8 p5, p6, 0x10
const/4 p6, 0x0
if-eqz p5, :cond_0
const-string v0, "Pixel"
const-string v1, "Pixel XL"
const-string v2, "Pixel 3a"
const-string v3, "Pixel 3a XL"
const-string v4, "Pixel 4"
const-string v5, "Pixel 4 XL"
filled-new-array/range {v0 .. v5}, [Ljava/lang/String;
move-result-object p5
invoke-static {p5}, Lf/n/a/k/a;->hashSetOf([Ljava/lang/Object;)Ljava/util/HashSet;
move-result-object p5
goto :goto_0
:cond_0
move-object p5, p6
:goto_0
if-eqz p5, :cond_1
2020-07-23 01:06:17 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Ln;->e:Landroid/content/Context;
iput-object p2, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
iput-object p3, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
iput-object p4, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
iput-object p5, p0, Ln;->i:Ljava/util/HashSet;
2020-07-23 01:06:17 +00:00
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Ln;->a:Ljava/util/ArrayList;
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Ln;->c:Ljava/util/ArrayList;
return-void
2020-08-04 06:02:43 +00:00
:cond_1
const-string p1, "defaultUseOpenSL"
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
throw p6
2020-07-23 01:06:17 +00:00
.end method
.method public static final n(Ln;[Ljava/lang/String;)Ljava/util/List;
.locals 10
const/4 v0, 0x0
if-eqz p0, :cond_4
new-instance p0, Ljava/util/ArrayList;
array-length v1, p1
invoke-direct {p0, v1}, Ljava/util/ArrayList;-><init>(I)V
array-length v1, p1
const/4 v2, 0x0
const/4 v3, 0x0
:goto_0
if-ge v3, v1, :cond_1
aget-object v4, p1, v3
sget-object v5, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
const-string v6, "Locale.ROOT"
2020-07-25 00:57:58 +00:00
invoke-static {v5, v6}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
if-eqz v4, :cond_0
invoke-virtual {v4, v5}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
move-result-object v4
const-string v5, "(this as java.lang.String).toUpperCase(locale)"
2020-07-25 00:57:58 +00:00
invoke-static {v4, v5}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
invoke-virtual {p0, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_0
new-instance p0, Lkotlin/TypeCastException;
const-string p1, "null cannot be cast to non-null type java.lang.String"
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
new-instance p1, Lo;
invoke-direct {p1}, Lo;-><init>()V
2020-07-25 00:57:58 +00:00
invoke-static {p0, p1}, Lj0/i/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
2020-07-23 01:06:17 +00:00
move-result-object p0
new-instance p1, Ljava/util/ArrayList;
const/16 v1, 0xa
2020-07-25 02:57:47 +00:00
invoke-static {p0, v1}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
2020-07-23 01:06:17 +00:00
move-result v1
invoke-direct {p1, v1}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_1
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_3
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
add-int/lit8 v9, v2, 0x1
if-ltz v2, :cond_2
move-object v4, v1
check-cast v4, Ljava/lang/String;
mul-int/lit8 v2, v2, 0x2
add-int/lit8 v7, v2, 0x65
new-instance v1, Lf/a/h/r/a;
add-int/lit8 v2, v7, 0x1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v8
2020-08-10 21:02:22 +00:00
const-string v6, "video"
2020-07-23 01:06:17 +00:00
move-object v3, v1
move v5, v9
invoke-direct/range {v3 .. v8}, Lf/a/h/r/a;-><init>(Ljava/lang/String;ILjava/lang/String;ILjava/lang/Integer;)V
invoke-virtual {p1, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move v2, v9
goto :goto_1
:cond_2
2020-07-25 02:57:47 +00:00
invoke-static {}, Lf/n/a/k/a;->throwIndexOverflow()V
2020-07-23 01:06:17 +00:00
throw v0
:cond_3
return-object p1
:cond_4
throw v0
.end method
.method public static final o(Ln;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
:cond_0
iget-object v0, p0, Ln;->a:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public static final p(Ln;Lkotlin/jvm/functions/Function0;)Ljava/util/concurrent/Future;
.locals 1
iget-object p0, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
new-instance v0, Lt;
invoke-direct {v0, p1}, Lt;-><init>(Lkotlin/jvm/functions/Function0;)V
invoke-interface {p0, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public a()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lkotlin/Unit;",
">;"
}
.end annotation
iget-object v0, p0, Ln;->d:Ljava/util/List;
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
new-instance v1, Lr0/l/e/j;
invoke-direct {v1, v0}, Lr0/l/e/j;-><init>(Ljava/lang/Object;)V
const-string v0, "Observable.just(Unit)"
2020-07-25 00:57:58 +00:00
invoke-static {v1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
return-object v1
:cond_1
invoke-virtual {p0}, Ln;->r()V
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-nez v0, :cond_2
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Failed to initialize native media engine"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
2020-08-04 06:02:43 +00:00
invoke-static {v0}, Lrx/Observable;->v(Ljava/lang/Throwable;)Lrx/Observable;
2020-07-23 01:06:17 +00:00
move-result-object v0
const-string v1, "Observable.error(Illegal\u2026ze native media engine\"))"
2020-07-25 00:57:58 +00:00
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
return-object v0
:cond_2
new-instance v0, Lr;
invoke-direct {v0, p0}, Lr;-><init>(Ln;)V
sget-object v1, Lrx/Emitter$BackpressureMode;->d:Lrx/Emitter$BackpressureMode;
invoke-static {v0, v1}, Lrx/Observable;->n(Lrx/functions/Action1;Lrx/Emitter$BackpressureMode;)Lrx/Observable;
move-result-object v0
const-string v1, "Observable.create({ emit\u2026er.BackpressureMode.NONE)"
2020-07-25 00:57:58 +00:00
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
new-instance v1, Ln$d;
invoke-direct {v1, p0}, Ln$d;-><init>(Ln;)V
2020-08-04 06:02:43 +00:00
invoke-virtual {v0, v1}, Lrx/Observable;->t(Lrx/functions/Action1;)Lrx/Observable;
2020-07-23 01:06:17 +00:00
move-result-object v0
sget-object v1, Ln$e;->d:Ln$e;
2020-08-04 06:02:43 +00:00
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
2020-07-23 01:06:17 +00:00
move-result-object v0
const-string v1, "getSupportedVideoCodecs(\u2026s }\n .map { Unit }"
2020-07-25 00:57:58 +00:00
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
return-object v0
.end method
.method public b(Z)V
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setEchoCancellation(Z)V
:cond_0
return-void
.end method
.method public c(Z)V
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setNoiseCancellation(Z)V
:cond_0
return-void
.end method
.method public d()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$AudioInfo;",
">;"
}
.end annotation
new-instance v0, Ln$c;
invoke-direct {v0, p0}, Ln$c;-><init>(Ln;)V
sget-object v1, Lrx/Emitter$BackpressureMode;->h:Lrx/Emitter$BackpressureMode;
invoke-static {v0, v1}, Lrx/Observable;->n(Lrx/functions/Action1;Lrx/Emitter$BackpressureMode;)Lrx/Observable;
move-result-object v0
const-string v1, "Observable.create({ emit\u2026.BackpressureMode.LATEST)"
2020-07-25 00:57:58 +00:00
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
return-object v0
.end method
.method public e(I)V
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setVideoInputDevice(I)V
:cond_0
return-void
.end method
.method public declared-synchronized f(JLcom/discord/rtcconnection/mediaengine/MediaEngine$a;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;Lkotlin/jvm/functions/Function1;)Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
.locals 19
.annotation system Ldalvik/annotation/Signature;
value = {
"(J",
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/Exception;",
"Lkotlin/Unit;",
">;)",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;"
}
.end annotation
move-object/from16 v7, p0
monitor-enter p0
:try_start_0
const-string v0, "connectionType"
const/4 v8, 0x0
if-eqz p4, :cond_5
iget-object v0, v7, Ln;->d:Ljava/util/List;
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_1
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "connect called on unprepared media engine."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
move-object/from16 v1, p5
invoke-interface {v1, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v8
:cond_1
:try_start_1
iget-object v12, v7, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v12, :cond_3
iget-object v0, v7, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v1, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Connecting with options: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-object/from16 v15, p3
invoke-virtual {v2, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
const/4 v4, 0x4
const/4 v5, 0x0
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
new-instance v0, Ln$a;
move-object v1, v0
move-object/from16 v2, p0
move-object/from16 v3, p3
move-object/from16 v4, p4
move-wide/from16 v5, p1
invoke-direct/range {v1 .. v6}, Ln$a;-><init>(Ln;Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;J)V
new-instance v1, Lf/a/h/r/b/e;
iget-object v10, v7, Ln;->f:Ljava/util/concurrent/ExecutorService;
iget-object v11, v7, Ln;->h:Lcom/discord/utilities/logging/Logger;
iget-object v13, v7, Ln;->d:Ljava/util/List;
if-eqz v13, :cond_2
2020-07-25 02:57:47 +00:00
invoke-static {v0}, Lf/n/a/k/a;->listOf(Ljava/lang/Object;)Ljava/util/List;
2020-07-23 01:06:17 +00:00
move-result-object v18
move-object v9, v1
move-object/from16 v14, p4
move-wide/from16 v15, p1
move-object/from16 v17, p3
invoke-direct/range {v9 .. v18}, Lf/a/h/r/b/e;-><init>(Ljava/util/concurrent/ExecutorService;Lcom/discord/utilities/logging/Logger;Lcom/hammerandchisel/libdiscord/Discord;Ljava/util/List;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;JLcom/discord/rtcconnection/mediaengine/MediaEngine$a;Ljava/util/List;)V
move-object v8, v1
goto :goto_1
:cond_2
const-string v0, "supportedVideoCodecs"
2020-07-25 00:57:58 +00:00
invoke-static {v0}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v8
:cond_3
:goto_1
if-eqz v8, :cond_4
:try_start_2
iget-object v0, v7, Ln;->a:Ljava/util/ArrayList;
invoke-virtual {v0, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
new-instance v0, Ln$b;
invoke-direct {v0, v8}, Ln$b;-><init>(Lf/a/h/r/b/e;)V
invoke-virtual {v7, v0}, Ln;->q(Lkotlin/jvm/functions/Function1;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:cond_4
monitor-exit p0
return-object v8
:cond_5
:try_start_3
2020-07-25 00:57:58 +00:00
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
2020-07-23 01:06:17 +00:00
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw v8
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public g(F)V
.locals 3
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
const/high16 v1, 0x43960000 # 300.0f
const/4 v2, 0x0
invoke-static {v2, p1}, Ljava/lang/Math;->max(FF)F
move-result p1
invoke-static {v1, p1}, Ljava/lang/Math;->min(FF)F
move-result p1
const/high16 v1, 0x42c80000 # 100.0f
div-float/2addr p1, v1
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setSpeakerVolume(F)V
:cond_0
return-void
.end method
.method public declared-synchronized getConnections()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;",
">;"
}
.end annotation
monitor-enter p0
:try_start_0
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Ln;->a:Ljava/util/ArrayList;
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public h(Z)V
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setNoiseSuppression(Z)V
:cond_0
return-void
.end method
.method public i()Lcom/hammerandchisel/libdiscord/Discord;
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
return-object v0
.end method
.method public j(Lkotlin/jvm/functions/Function1;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function1<",
"-[",
"Lco/discord/media_engine/VideoInputDeviceDescription;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
invoke-virtual {p0}, Ln;->r()V
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
new-instance v1, Ls;
invoke-direct {v1, p1}, Ls;-><init>(Lkotlin/jvm/functions/Function1;)V
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->getVideoInputDevices(Lcom/hammerandchisel/libdiscord/Discord$GetVideoInputDevicesCallback;)V
:cond_0
return-void
.end method
.method public k()Ljava/util/concurrent/ExecutorService;
.locals 1
iget-object v0, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method public l(Z)V
.locals 1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setAutomaticGainControl(Z)V
:cond_0
return-void
.end method
.method public m(Lkotlin/jvm/functions/Function1;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function1<",
"-",
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
if-eqz p1, :cond_0
invoke-virtual {p0}, Ln;->r()V
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_1
new-instance v1, Ln$f;
invoke-direct {v1, p1}, Ln$f;-><init>(Lkotlin/jvm/functions/Function1;)V
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
goto :goto_0
:cond_0
iget-object p1, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz p1, :cond_1
const/4 v0, 0x0
invoke-virtual {p1, v0}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
:cond_1
:goto_0
return-void
.end method
.method public final q(Lkotlin/jvm/functions/Function1;)V
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function1<",
"-",
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
iget-object v0, p0, Ln;->c:Ljava/util/ArrayList;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;
:try_start_0
invoke-interface {p1, v1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v5
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v3, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
const/4 v6, 0x0
const/16 v7, 0x8
const/4 v8, 0x0
const-string v4, "Error in listener"
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
goto :goto_0
:cond_0
return-void
.end method
.method public final r()V
.locals 9
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
if-eqz v0, :cond_0
return-void
:cond_0
iget-object v1, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v2, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
const-string v0, "initializing voice engine. OpenSL ES: "
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget-object v3, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
const/4 v4, 0x0
const/4 v5, 0x4
const/4 v6, 0x0
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
iget-object v0, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
move-result v0
const/4 v1, 0x1
2020-08-04 06:02:43 +00:00
if-eqz v0, :cond_3
2020-07-23 01:06:17 +00:00
if-eq v0, v1, :cond_2
const/4 v2, 0x2
if-eq v0, v2, :cond_1
goto :goto_0
:cond_1
invoke-static {v1}, Lorg/webrtc/voiceengine/WebRtcAudioManager;->setBlacklistDeviceForOpenSLESUsage(Z)V
goto :goto_0
:cond_2
const/4 v0, 0x0
invoke-static {v0}, Lorg/webrtc/voiceengine/WebRtcAudioManager;->setBlacklistDeviceForOpenSLESUsage(Z)V
2020-08-04 06:02:43 +00:00
goto :goto_0
:cond_3
iget-object v0, p0, Ln;->i:Ljava/util/HashSet;
sget-object v2, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v0, v2}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
move-result v0
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
sget-object v3, Ln;->j:Ljava/lang/String;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "OpenSL ES default. enableOpenSL: "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
const-string v5, ", model: \'"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
sget-object v5, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v5, 0x27
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
const/4 v5, 0x0
const/4 v6, 0x4
const/4 v7, 0x0
invoke-static/range {v2 .. v7}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
xor-int/2addr v0, v1
invoke-static {v0}, Lorg/webrtc/voiceengine/WebRtcAudioManager;->setBlacklistDeviceForOpenSLESUsage(Z)V
2020-07-23 01:06:17 +00:00
:goto_0
new-instance v0, Ln$g;
invoke-direct {v0, p0}, Ln$g;-><init>(Ln;)V
sput-object v0, Lorg/webrtc/Logging;->externalReporter:Lorg/webrtc/Logging$ExternalReporter;
:try_start_0
new-instance v0, Lcom/hammerandchisel/libdiscord/Discord;
iget-object v2, p0, Ln;->e:Landroid/content/Context;
invoke-direct {v0, v2}, Lcom/hammerandchisel/libdiscord/Discord;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
:try_end_0
.catch Ljava/lang/ExceptionInInitializerError; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_1
:catchall_0
move-exception v0
move-object v5, v0
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v3, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
const/4 v6, 0x0
const/16 v7, 0x8
const/4 v8, 0x0
const-string v4, "Unable to initialize voice engine, new error discovered"
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
goto :goto_1
:catch_0
move-exception v0
move-object v5, v0
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v3, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
const/4 v6, 0x0
const/16 v7, 0x8
const/4 v8, 0x0
const-string v4, "Unable to initialize voice engine."
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
goto :goto_1
:catch_1
move-exception v0
move-object v5, v0
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
2020-08-04 06:02:43 +00:00
sget-object v3, Ln;->j:Ljava/lang/String;
2020-07-23 01:06:17 +00:00
const/4 v6, 0x0
const/16 v7, 0x8
const/4 v8, 0x0
const-string v4, "Unable to initialize voice engine."
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
:goto_1
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
2020-08-04 06:02:43 +00:00
if-eqz v0, :cond_4
2020-07-23 01:06:17 +00:00
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->enableBuiltInAEC(Z)V
2020-08-04 06:02:43 +00:00
:cond_4
2020-07-23 01:06:17 +00:00
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
2020-08-04 06:02:43 +00:00
if-eqz v0, :cond_5
2020-07-23 01:06:17 +00:00
sget-object v0, Ln$h;->d:Ln$h;
invoke-virtual {p0, v0}, Ln;->q(Lkotlin/jvm/functions/Function1;)V
2020-08-04 06:02:43 +00:00
:cond_5
2020-07-23 01:06:17 +00:00
return-void
.end method