discord-jadx/app/src/main/java/c/a/a/f/a/d.java

144 lines
5.5 KiB
Java

package c.a.a.f.a;
import android.content.Context;
import com.discord.app.AppViewModel;
import com.discord.rtcconnection.audio.DiscordAudioManager;
import com.discord.stores.StoreAudioManagerV2;
import com.discord.stores.StoreStream;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.m;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable;
/* compiled from: AudioOutputSelectionDialogViewModel.kt */
public final class d extends AppViewModel<a> {
public final StoreAudioManagerV2 i;
/* compiled from: AudioOutputSelectionDialogViewModel.kt */
public static abstract class a {
/* compiled from: AudioOutputSelectionDialogViewModel.kt */
/* renamed from: c.a.a.f.a.d$a$a reason: collision with other inner class name */
public static final class C0017a extends a {
public final DiscordAudioManager.DeviceTypes a;
public final boolean b;
/* renamed from: c reason: collision with root package name */
public final String f38c;
public final boolean d;
public final boolean e;
public final boolean f;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public C0017a(DiscordAudioManager.DeviceTypes deviceTypes, boolean z2, String str, boolean z3, boolean z4, boolean z5) {
super(null);
m.checkNotNullParameter(deviceTypes, "selectedAudioOutput");
this.a = deviceTypes;
this.b = z2;
this.f38c = str;
this.d = z3;
this.e = z4;
this.f = z5;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof C0017a)) {
return false;
}
C0017a aVar = (C0017a) obj;
return m.areEqual(this.a, aVar.a) && this.b == aVar.b && m.areEqual(this.f38c, aVar.f38c) && this.d == aVar.d && this.e == aVar.e && this.f == aVar.f;
}
public int hashCode() {
DiscordAudioManager.DeviceTypes deviceTypes = this.a;
int i = 0;
int hashCode = (deviceTypes != null ? deviceTypes.hashCode() : 0) * 31;
boolean z2 = this.b;
int i2 = 1;
if (z2) {
z2 = true;
}
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = z2 ? 1 : 0;
int i6 = (hashCode + i3) * 31;
String str = this.f38c;
if (str != null) {
i = str.hashCode();
}
int i7 = (i6 + i) * 31;
boolean z3 = this.d;
if (z3) {
z3 = true;
}
int i8 = z3 ? 1 : 0;
int i9 = z3 ? 1 : 0;
int i10 = z3 ? 1 : 0;
int i11 = (i7 + i8) * 31;
boolean z4 = this.e;
if (z4) {
z4 = true;
}
int i12 = z4 ? 1 : 0;
int i13 = z4 ? 1 : 0;
int i14 = z4 ? 1 : 0;
int i15 = (i11 + i12) * 31;
boolean z5 = this.f;
if (!z5) {
i2 = z5 ? 1 : 0;
}
return i15 + i2;
}
public String toString() {
StringBuilder K = c.d.b.a.a.K("Loaded(selectedAudioOutput=");
K.append(this.a);
K.append(", showBluetoothItem=");
K.append(this.b);
K.append(", bluetoothDeviceName=");
K.append(this.f38c);
K.append(", showSpeakerItem=");
K.append(this.d);
K.append(", showWiredItem=");
K.append(this.e);
K.append(", showEarpieceItem=");
return c.d.b.a.a.F(K, this.f, ")");
}
}
/* compiled from: AudioOutputSelectionDialogViewModel.kt */
public static final class b extends a {
public static final b a = new b();
public b() {
super(null);
}
}
public a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
}
}
public d() {
this(null, null, 3);
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public d(StoreAudioManagerV2 storeAudioManagerV2, Observable observable, int i) {
super(a.b.a);
StoreAudioManagerV2 audioManagerV2 = (i & 1) != 0 ? StoreStream.Companion.getAudioManagerV2() : null;
Observable<StoreAudioManagerV2.State> observeAudioManagerState = (i & 2) != 0 ? audioManagerV2.observeAudioManagerState() : null;
m.checkNotNullParameter(audioManagerV2, "storeAudioManager");
m.checkNotNullParameter(observeAudioManagerState, "storeStateObservable");
this.i = audioManagerV2;
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observeAudioManagerState), this, null, 2, null), d.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new c(this), 62, (Object) null);
}
}