54 lines
2.1 KiB
Java
54 lines
2.1 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.rtcconnection.audio.DiscordAudioManager;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import java.util.List;
|
|
import java.util.ListIterator;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: StoreAudioManagerV2.kt */
|
|
public final class StoreAudioManagerV2$toggleSpeakerOutput$1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ StoreAudioManagerV2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public StoreAudioManagerV2$toggleSpeakerOutput$1(StoreAudioManagerV2 storeAudioManagerV2) {
|
|
super(0);
|
|
this.this$0 = storeAudioManagerV2;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
Object obj;
|
|
boolean z2;
|
|
if (this.this$0.getState$app_productionBetaRelease().getActiveAudioDevice().ordinal() != 2) {
|
|
this.this$0.selectOutputDevice(DiscordAudioManager.DeviceTypes.SPEAKERPHONE);
|
|
return;
|
|
}
|
|
DiscordAudioManager discordAudioManager = DiscordAudioManager.d;
|
|
List<? extends DiscordAudioManager.DeviceTypes> list = DiscordAudioManager.d().D;
|
|
ListIterator<? extends DiscordAudioManager.DeviceTypes> listIterator = list.listIterator(list.size());
|
|
while (true) {
|
|
if (!listIterator.hasPrevious()) {
|
|
obj = null;
|
|
break;
|
|
}
|
|
obj = listIterator.previous();
|
|
DiscordAudioManager.DeviceTypes deviceTypes = (DiscordAudioManager.DeviceTypes) obj;
|
|
if (deviceTypes == DiscordAudioManager.DeviceTypes.SPEAKERPHONE || !this.this$0.getState$app_productionBetaRelease().getAudioDevices().get(deviceTypes.getValue()).b) {
|
|
z2 = false;
|
|
continue;
|
|
} else {
|
|
z2 = true;
|
|
continue;
|
|
}
|
|
if (z2) {
|
|
break;
|
|
}
|
|
}
|
|
m.checkNotNull(obj);
|
|
this.this$0.selectOutputDevice((DiscordAudioManager.DeviceTypes) obj);
|
|
}
|
|
}
|