SD Maid v5.6.3版本的 MD5 值为:b283f6effbd880c54f4e4da72852de99
以下内容为反编译后的 SetupActivity.java 源代码,内容仅作参考
package eu.thedarken.sdm.setup.core.ui;
import a5.a;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.Toast;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.a0;
import b5.b;
import b5.e;
import butterknife.BindView;
import butterknife.ButterKnife;
import eu.thedarken.sdm.App;
import eu.thedarken.sdm.R;
import g9.h;
import h9.a;
import io.reactivex.rxjava3.internal.operators.observable.p;
import io.reactivex.rxjava3.internal.operators.observable.w0;
import m5.k;
import qd.c;
import ta.p;
import uc.t;
import z.c;
public final class SetupActivity extends t implements a.InterfaceC0109a, e5.a {
public static final int f4677z = 0;
@BindView
public Button next;
@BindView
public Toolbar toolbar;
public b<Fragment> f4678x;
public a y;
static {
App.d("Setup", "Activity");
}
public final Toolbar I1() {
Toolbar toolbar = this.toolbar;
if (toolbar != null) {
return toolbar;
}
c.k("toolbar");
throw null;
}
@Override
public final void N1() {
finish();
}
@Override
public final b U() {
b<Fragment> bVar = this.f4678x;
if (bVar != null) {
return bVar;
}
c.k("fragmentComponentSource");
throw null;
}
@Override
public final void X(h hVar) {
c.f("step", hVar);
a0 Y0 = Y0();
c.e("supportFragmentManager", Y0);
Fragment C = Y0.C(R.id.content_frame);
if (c.a(hVar.a(), C != null ? C.getClass() : null)) {
return;
}
Fragment D = Y0.D(hVar.a().getName());
if (D == null) {
D = Fragment.V2(this, hVar.a().getName(), null);
}
if (isFinishing()) {
return;
}
androidx.fragment.app.a aVar = new androidx.fragment.app.a(Y0);
aVar.f(R.id.content_frame, D, null);
aVar.i();
}
@Override
public final void n2(int i10, boolean z4) {
Button button = this.next;
if (button == null) {
c.k("next");
throw null;
}
button.setEnabled(z4);
Button button2 = this.next;
if (button2 != null) {
button2.setText(i10);
} else {
c.k("next");
throw null;
}
}
@Override
public final void onBackPressed() {
a aVar = this.y;
if (aVar == null) {
c.k("presenter");
throw null;
}
int i10 = aVar.f5948g;
if (i10 <= 0) {
aVar.f5947f.d(true);
return;
}
aVar.f5948g = i10 - 1;
aVar.j();
}
@Override
public final void onCreate(Bundle bundle) {
a.C0005a c0005a = new a.C0005a();
c0005a.a(new e(this));
c0005a.f190b = new a5.h(this);
c0005a.f189a = new b5.c(this);
c0005a.b(this);
super.onCreate(bundle);
setContentView(R.layout.setup_activity);
ButterKnife.b(this);
setFinishOnTouchOutside(false);
z1(I1());
Button button = this.next;
if (button != null) {
button.setOnClickListener(new k(17, this));
} else {
c.k("next");
throw null;
}
}
@Override
public final boolean onCreateOptionsMenu(Menu menu) {
c.f("menu", menu);
getMenuInflater().inflate(R.menu.setup_activity_menu, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public final void onDestroy() {
if (isFinishing()) {
h9.a aVar = this.y;
if (aVar == null) {
c.k("presenter");
throw null;
}
new p(new w0(aVar.f5947f.c().q(io.reactivex.rxjava3.schedulers.a.f7050c)), new x8.b(11)).o(new g5.a(1, aVar), io.reactivex.rxjava3.internal.functions.a.f6369e, io.reactivex.rxjava3.internal.functions.a.f6368c);
}
super.onDestroy();
}
@Override
public final boolean onOptionsItemSelected(MenuItem menuItem) {
c.f("item", menuItem);
int itemId = menuItem.getItemId();
if (itemId != 16908332) {
if (itemId != R.id.menu_help) {
return super.onOptionsItemSelected(menuItem);
}
p.d d = new ta.p(this).d("https://sdmaid.darken.eu/help/setup");
d.d = this;
d.f9767e = true;
d.c();
return true;
}
return true;
}
@Override
public final void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
c.f("permissions", strArr);
c.f("grantResults", iArr);
Fragment C = Y0().C(R.id.content_frame);
c.d("null cannot be cast to non-null type eu.thedarken.sdm.setup.core.ui.SetupFragment", C);
if (((h9.c) C) instanceof c.a) {
Fragment C2 = Y0().C(R.id.content_frame);
qd.c.d("null cannot be cast to non-null type eu.thedarken.sdm.setup.core.ui.SetupFragment", C2);
((h9.c) C2).onRequestPermissionsResult(i10, strArr, iArr);
}
super.onRequestPermissionsResult(i10, strArr, iArr);
}
@Override
public final void u() {
Toast.makeText(this, (int) R.string.please_restart_sdmaid, 1).show();
}
@Override
public final void u2(h hVar) {
qd.c.f("step", hVar);
e.a x12 = x1();
qd.c.c(x12);
x12.r(hVar.getLabel());
}
}