discord-jadx/app/src/main/java/b/a/a/h.java

142 lines
5.7 KiB
Java
Raw Normal View History

2021-12-21 23:37:30 +00:00
package b.a.a;
2021-06-27 20:44:35 +00:00
import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
2021-08-10 21:50:53 +00:00
import androidx.fragment.app.FragmentViewModelLazyKt;
2021-12-21 23:37:30 +00:00
import b.a.d.f;
2022-04-04 20:51:55 +00:00
import b.a.d.g0;
import b.a.d.i0;
import com.discord.R;
2021-06-27 20:44:35 +00:00
import com.discord.app.AppDialog;
2021-08-10 21:50:53 +00:00
import com.discord.utilities.rx.ObservableExtensionsKt;
2021-06-27 20:44:35 +00:00
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
2021-08-10 21:50:53 +00:00
import com.google.android.material.button.MaterialButton;
2021-11-08 18:25:28 +00:00
import d0.z.d.a0;
import d0.z.d.k;
import d0.z.d.m;
import d0.z.d.o;
2021-08-10 21:50:53 +00:00
import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
2021-06-27 20:44:35 +00:00
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.reflect.KProperty;
2021-08-10 21:50:53 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes.dex */
2021-06-27 20:44:35 +00:00
public final class h extends AppDialog {
2022-03-30 16:43:10 +00:00
public static final /* synthetic */ KProperty[] j = {b.d.b.a.a.b0(h.class, "binding", "getBinding()Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0)};
2021-12-17 22:03:14 +00:00
public static final b k = new b(null);
public final FragmentViewBindingDelegate l = FragmentViewBindingDelegateKt.viewBinding$default(this, c.j, null, 2, null);
public final Lazy m;
2021-06-27 20:44:35 +00:00
/* compiled from: java-style lambda group */
2022-04-04 20:51:55 +00:00
/* loaded from: classes2.dex */
2021-06-27 20:44:35 +00:00
public static final class a implements View.OnClickListener {
2021-12-17 22:03:14 +00:00
public final /* synthetic */ int j;
public final /* synthetic */ Object k;
2021-06-27 20:44:35 +00:00
2021-08-10 21:50:53 +00:00
public a(int i, Object obj) {
2021-12-17 22:03:14 +00:00
this.j = i;
this.k = obj;
2021-06-27 20:44:35 +00:00
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
2021-12-17 22:03:14 +00:00
int i = this.j;
2021-06-27 20:44:35 +00:00
if (i == 0) {
2021-12-17 22:03:14 +00:00
h.g((h) this.k, false);
2021-06-27 20:44:35 +00:00
} else if (i == 1) {
2021-12-17 22:03:14 +00:00
h.g((h) this.k, true);
2021-06-27 20:44:35 +00:00
} else {
throw null;
}
}
}
2021-08-10 21:50:53 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes.dex */
2021-06-27 20:44:35 +00:00
public static final class b {
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
}
2021-08-10 21:50:53 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes.dex */
2021-12-21 23:37:30 +00:00
public static final /* synthetic */ class c extends k implements Function1<View, b.a.i.a> {
2021-12-17 22:03:14 +00:00
public static final c j = new c();
2021-06-27 20:44:35 +00:00
public c() {
2021-12-21 23:37:30 +00:00
super(1, b.a.i.a.class, "bind", "bind(Landroid/view/View;)Lcom/discord/databinding/AllowAccessibilityDetectionDialogBinding;", 0);
2021-06-27 20:44:35 +00:00
}
@Override // kotlin.jvm.functions.Function1
2021-12-21 23:37:30 +00:00
public b.a.i.a invoke(View view) {
2021-06-27 20:44:35 +00:00
View view2 = view;
m.checkNotNullParameter(view2, "p1");
2021-12-17 22:03:14 +00:00
int i = R.id.accessibility_detection_body_text;
2021-08-10 21:50:53 +00:00
TextView textView = (TextView) view2.findViewById(R.id.accessibility_detection_body_text);
2021-06-27 20:44:35 +00:00
if (textView != null) {
2021-12-17 22:03:14 +00:00
i = R.id.accessibility_detection_disable;
2021-08-10 21:50:53 +00:00
MaterialButton materialButton = (MaterialButton) view2.findViewById(R.id.accessibility_detection_disable);
if (materialButton != null) {
2021-12-17 22:03:14 +00:00
i = R.id.accessibility_detection_enable;
2021-08-10 21:50:53 +00:00
MaterialButton materialButton2 = (MaterialButton) view2.findViewById(R.id.accessibility_detection_enable);
if (materialButton2 != null) {
2021-12-17 22:03:14 +00:00
i = R.id.view_dialog_confirmation_header;
2021-08-10 21:50:53 +00:00
TextView textView2 = (TextView) view2.findViewById(R.id.view_dialog_confirmation_header);
if (textView2 != null) {
2021-12-21 23:37:30 +00:00
return new b.a.i.a((LinearLayout) view2, textView, materialButton, materialButton2, textView2);
2021-08-10 21:50:53 +00:00
}
2021-06-27 20:44:35 +00:00
}
}
}
2021-12-17 22:03:14 +00:00
throw new NullPointerException("Missing required view with ID: ".concat(view2.getResources().getResourceName(i)));
2021-06-27 20:44:35 +00:00
}
}
2021-08-10 21:50:53 +00:00
/* compiled from: WidgetAccessibilityDetectionDialog.kt */
2022-03-02 20:59:20 +00:00
/* loaded from: classes.dex */
2022-04-04 20:51:55 +00:00
public static final class d extends o implements Function0<p> {
2021-12-17 22:03:14 +00:00
public static final d j = new d();
2021-08-10 21:50:53 +00:00
public d() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
2022-04-04 20:51:55 +00:00
public p invoke() {
2021-08-10 21:50:53 +00:00
return new p(null, null, 3);
}
}
2021-06-27 20:44:35 +00:00
public h() {
2021-08-10 21:50:53 +00:00
super(R.layout.allow_accessibility_detection_dialog);
2021-12-17 22:03:14 +00:00
d dVar = d.j;
2022-04-04 20:51:55 +00:00
g0 g0Var = new g0(this);
this.m = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(p.class), new k(0, g0Var), new i0(dVar));
2021-06-27 20:44:35 +00:00
}
2021-08-10 21:50:53 +00:00
public static final void g(h hVar, boolean z2) {
2021-12-17 22:03:14 +00:00
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.restSubscribeOn$default(((p) hVar.m.getValue()).j.setIsAccessibilityDetectionAllowed(z2), false, 1, null), p.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, q.j, 62, (Object) null);
2021-08-10 21:50:53 +00:00
hVar.dismiss();
}
2021-12-21 23:37:30 +00:00
public final b.a.i.a h() {
return (b.a.i.a) this.l.getValue((Fragment) this, j[0]);
2021-06-27 20:44:35 +00:00
}
@Override // com.discord.app.AppDialog
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
2021-12-21 23:37:30 +00:00
h().c.setOnClickListener(new a(0, this));
2021-08-10 21:50:53 +00:00
h().d.setOnClickListener(new a(1, this));
2021-12-21 23:37:30 +00:00
TextView textView = h().f72b;
2021-08-10 21:50:53 +00:00
m.checkNotNullExpressionValue(textView, "binding.accessibilityDetectionBodyText");
2021-12-21 23:37:30 +00:00
b.a.k.b.n(textView, R.string.accessibility_detection_modal_body, new Object[]{f.a.a(360035966492L, null)}, null, 4);
2021-06-27 20:44:35 +00:00
}
}