88 lines
2.7 KiB
Java
88 lines
2.7 KiB
Java
package c.a.q.k0;
|
|
|
|
import android.content.Context;
|
|
import android.os.Process;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: AudioPermissions.kt */
|
|
public final class b {
|
|
public static final a a = new a(null);
|
|
public final boolean b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final boolean f212c;
|
|
public final boolean d;
|
|
|
|
/* compiled from: AudioPermissions.kt */
|
|
public static final class a {
|
|
public a(DefaultConstructorMarker defaultConstructorMarker) {
|
|
}
|
|
}
|
|
|
|
public b(Context context) {
|
|
m.checkNotNullParameter(context, "context");
|
|
boolean z2 = true;
|
|
boolean z3 = context.checkPermission("android.permission.MODIFY_AUDIO_SETTINGS", Process.myPid(), Process.myUid()) == 0;
|
|
boolean z4 = context.checkPermission("android.permission.RECORD_AUDIO", Process.myPid(), Process.myUid()) == 0;
|
|
z2 = context.checkPermission("android.permission.BLUETOOTH", Process.myPid(), Process.myUid()) != 0 ? false : z2;
|
|
this.b = z3;
|
|
this.f212c = z4;
|
|
this.d = z2;
|
|
if (!z3) {
|
|
AnimatableValueParser.H1("AudioPermissions", "MODIFY_AUDIO_SETTINGS permission is missing");
|
|
}
|
|
if (!z4) {
|
|
AnimatableValueParser.H1("AudioPermissions", "RECORD_AUDIO permission is missing");
|
|
}
|
|
if (!z2) {
|
|
AnimatableValueParser.H1("AudioPermissions", "BLUETOOTH permission is missing");
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof b)) {
|
|
return false;
|
|
}
|
|
b bVar = (b) obj;
|
|
return this.b == bVar.b && this.f212c == bVar.f212c && this.d == bVar.d;
|
|
}
|
|
|
|
public int hashCode() {
|
|
boolean z2 = this.b;
|
|
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.f212c;
|
|
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.d;
|
|
if (!z4) {
|
|
i = z4 ? 1 : 0;
|
|
}
|
|
return i9 + i;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = c.d.b.a.a.L("AudioPermissions(hasModifyAudioSettingsPermission=");
|
|
L.append(this.b);
|
|
L.append(", hasRecordAudioPermission=");
|
|
L.append(this.f212c);
|
|
L.append(", hasBluetoothPermission=");
|
|
return c.d.b.a.a.G(L, this.d, ")");
|
|
}
|
|
}
|