175 lines
6 KiB
Java
175 lines
6 KiB
Java
package com.discord.utilities.media;
|
|
|
|
import c.d.b.a.a;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: AudioOutputMonitor.kt */
|
|
public final class AudioOutputState {
|
|
private final String bluetoothDeviceName;
|
|
private final boolean canBluetoothScoStart;
|
|
private final boolean isBluetoothAdapterDisabled;
|
|
private final boolean isBluetoothHeadsetDisconnected;
|
|
private final boolean isBluetoothOutputConnected;
|
|
private final boolean isBluetoothScoDisconnected;
|
|
private final boolean isExternalAudioOutputConnected;
|
|
private final boolean isHeadsetUnplugged;
|
|
|
|
public AudioOutputState() {
|
|
this(false, false, false, false, null, 31, null);
|
|
}
|
|
|
|
public AudioOutputState(boolean z2, boolean z3, boolean z4, boolean z5, String str) {
|
|
this.isBluetoothAdapterDisabled = z2;
|
|
this.isBluetoothHeadsetDisconnected = z3;
|
|
this.isBluetoothScoDisconnected = z4;
|
|
this.isHeadsetUnplugged = z5;
|
|
this.bluetoothDeviceName = str;
|
|
boolean z6 = true;
|
|
boolean z7 = !z2 && !z3;
|
|
this.isBluetoothOutputConnected = z7;
|
|
this.canBluetoothScoStart = z7 && z4;
|
|
if (!z7 && z5) {
|
|
z6 = false;
|
|
}
|
|
this.isExternalAudioOutputConnected = z6;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ AudioOutputState(boolean z2, boolean z3, boolean z4, boolean z5, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this((i & 1) != 0 ? true : z2, (i & 2) != 0 ? true : z3, (i & 4) != 0 ? true : z4, (i & 8) == 0 ? z5 : true, (i & 16) != 0 ? null : str);
|
|
}
|
|
|
|
public static /* synthetic */ AudioOutputState copy$default(AudioOutputState audioOutputState, boolean z2, boolean z3, boolean z4, boolean z5, String str, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
z2 = audioOutputState.isBluetoothAdapterDisabled;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
z3 = audioOutputState.isBluetoothHeadsetDisconnected;
|
|
}
|
|
if ((i & 4) != 0) {
|
|
z4 = audioOutputState.isBluetoothScoDisconnected;
|
|
}
|
|
if ((i & 8) != 0) {
|
|
z5 = audioOutputState.isHeadsetUnplugged;
|
|
}
|
|
if ((i & 16) != 0) {
|
|
str = audioOutputState.bluetoothDeviceName;
|
|
}
|
|
return audioOutputState.copy(z2, z3, z4, z5, str);
|
|
}
|
|
|
|
public final boolean component1() {
|
|
return this.isBluetoothAdapterDisabled;
|
|
}
|
|
|
|
public final boolean component2() {
|
|
return this.isBluetoothHeadsetDisconnected;
|
|
}
|
|
|
|
public final boolean component3() {
|
|
return this.isBluetoothScoDisconnected;
|
|
}
|
|
|
|
public final boolean component4() {
|
|
return this.isHeadsetUnplugged;
|
|
}
|
|
|
|
public final String component5() {
|
|
return this.bluetoothDeviceName;
|
|
}
|
|
|
|
public final AudioOutputState copy(boolean z2, boolean z3, boolean z4, boolean z5, String str) {
|
|
return new AudioOutputState(z2, z3, z4, z5, str);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof AudioOutputState)) {
|
|
return false;
|
|
}
|
|
AudioOutputState audioOutputState = (AudioOutputState) obj;
|
|
return this.isBluetoothAdapterDisabled == audioOutputState.isBluetoothAdapterDisabled && this.isBluetoothHeadsetDisconnected == audioOutputState.isBluetoothHeadsetDisconnected && this.isBluetoothScoDisconnected == audioOutputState.isBluetoothScoDisconnected && this.isHeadsetUnplugged == audioOutputState.isHeadsetUnplugged && m.areEqual(this.bluetoothDeviceName, audioOutputState.bluetoothDeviceName);
|
|
}
|
|
|
|
public final String getBluetoothDeviceName() {
|
|
return this.bluetoothDeviceName;
|
|
}
|
|
|
|
public final boolean getCanBluetoothScoStart() {
|
|
return this.canBluetoothScoStart;
|
|
}
|
|
|
|
public int hashCode() {
|
|
boolean z2 = this.isBluetoothAdapterDisabled;
|
|
int i = 1;
|
|
if (z2) {
|
|
z2 = true;
|
|
}
|
|
int i2 = z2 ? 1 : 0;
|
|
int i3 = z2 ? 1 : 0;
|
|
int i4 = z2 ? 1 : 0;
|
|
int i5 = i2 * 31;
|
|
boolean z3 = this.isBluetoothHeadsetDisconnected;
|
|
if (z3) {
|
|
z3 = true;
|
|
}
|
|
int i6 = z3 ? 1 : 0;
|
|
int i7 = z3 ? 1 : 0;
|
|
int i8 = z3 ? 1 : 0;
|
|
int i9 = (i5 + i6) * 31;
|
|
boolean z4 = this.isBluetoothScoDisconnected;
|
|
if (z4) {
|
|
z4 = true;
|
|
}
|
|
int i10 = z4 ? 1 : 0;
|
|
int i11 = z4 ? 1 : 0;
|
|
int i12 = z4 ? 1 : 0;
|
|
int i13 = (i9 + i10) * 31;
|
|
boolean z5 = this.isHeadsetUnplugged;
|
|
if (!z5) {
|
|
i = z5 ? 1 : 0;
|
|
}
|
|
int i14 = (i13 + i) * 31;
|
|
String str = this.bluetoothDeviceName;
|
|
return i14 + (str != null ? str.hashCode() : 0);
|
|
}
|
|
|
|
public final boolean isBluetoothAdapterDisabled() {
|
|
return this.isBluetoothAdapterDisabled;
|
|
}
|
|
|
|
public final boolean isBluetoothHeadsetDisconnected() {
|
|
return this.isBluetoothHeadsetDisconnected;
|
|
}
|
|
|
|
public final boolean isBluetoothOutputConnected() {
|
|
return this.isBluetoothOutputConnected;
|
|
}
|
|
|
|
public final boolean isBluetoothScoDisconnected() {
|
|
return this.isBluetoothScoDisconnected;
|
|
}
|
|
|
|
public final boolean isExternalAudioOutputConnected() {
|
|
return this.isExternalAudioOutputConnected;
|
|
}
|
|
|
|
public final boolean isHeadsetUnplugged() {
|
|
return this.isHeadsetUnplugged;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("AudioOutputState(isBluetoothAdapterDisabled=");
|
|
L.append(this.isBluetoothAdapterDisabled);
|
|
L.append(", isBluetoothHeadsetDisconnected=");
|
|
L.append(this.isBluetoothHeadsetDisconnected);
|
|
L.append(", isBluetoothScoDisconnected=");
|
|
L.append(this.isBluetoothScoDisconnected);
|
|
L.append(", isHeadsetUnplugged=");
|
|
L.append(this.isHeadsetUnplugged);
|
|
L.append(", bluetoothDeviceName=");
|
|
return a.D(L, this.bluetoothDeviceName, ")");
|
|
}
|
|
}
|