MD5 校验值:66bdc43743bbe9109f1c82a63c9f5e2f
ReportActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package eu.thedarken.sdm.tools.bugs.reporter; import android.annotation.SuppressLint; import android.net.Uri; import android.os.Bundle; import android.text.Editable; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import android.widget.RadioGroup; import android.widget.TextView; import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; import eu.thedarken.sdm.R; import fa.n0; import fa.p; import fd.g; import ic.n; import java.util.Arrays; import java.util.Locale; import na.b; import p4.a; import p4.f; import p4.h; public final class ReportActivity extends n implements b.InterfaceC0182b { public static final int B = 0; public b.a A; @BindView public EditText comment; @BindView public EditText primary; @BindView public TextView primaryCaption; @BindView public TextView primaryLabel; @BindView public EditText secondary; @BindView public TextView secondaryCaption; @BindView public TextView secondaryLabel; @BindView public EditText tertiary; @BindView public TextView tertiaryCaption; @BindView public TextView tertiaryLabel; @BindView public EditText title; @BindView public TextView titleCaption; @BindView public Toolbar toolbar; @BindView public RadioGroup typeGroup; public na.b f4848x; public final f y = new f(); public boolean f4849z; public static final class a extends n0 { public a() { } @Override public final void afterTextChanged(Editable editable) { g.f(editable, "s"); na.b H1 = ReportActivity.this.H1(); String obj = editable.toString(); g.f(obj, "title"); H1.f7899g = obj; H1.f(new na.g(H1)); int length = 8 - editable.length(); if (length > 0) { TextView textView = ReportActivity.this.titleCaption; if (textView != null) { String format = String.format(Locale.getDefault(), "%d characters required", Arrays.copyOf(new Object[]{Integer.valueOf(length)}, 1)); g.e(format, "format(locale, format, *args)"); textView.setText(format); TextView textView2 = ReportActivity.this.titleCaption; if (textView2 != null) { textView2.setVisibility(0); return; } else { g.k("titleCaption"); throw null; } } g.k("titleCaption"); throw null; } TextView textView3 = ReportActivity.this.titleCaption; if (textView3 != null) { textView3.setVisibility(4); } else { g.k("titleCaption"); throw null; } } } public static final class b extends n0 { public b() { } @Override public final void afterTextChanged(Editable editable) { g.f(editable, "s"); na.b H1 = ReportActivity.this.H1(); String obj = editable.toString(); g.f(obj, "primary"); H1.h = obj; H1.f(new na.g(H1)); int length = 32 - editable.length(); if (length > 0) { TextView textView = ReportActivity.this.primaryCaption; if (textView != null) { String format = String.format(Locale.getDefault(), "%d characters required", Arrays.copyOf(new Object[]{Integer.valueOf(length)}, 1)); g.e(format, "format(locale, format, *args)"); textView.setText(format); TextView textView2 = ReportActivity.this.primaryCaption; if (textView2 != null) { textView2.setVisibility(0); return; } else { g.k("primaryCaption"); throw null; } } g.k("primaryCaption"); throw null; } TextView textView3 = ReportActivity.this.primaryCaption; if (textView3 != null) { textView3.setVisibility(4); } else { g.k("primaryCaption"); throw null; } } } public static final class c extends n0 { public c() { } @Override public final void afterTextChanged(Editable editable) { g.f(editable, "s"); na.b H1 = ReportActivity.this.H1(); String obj = editable.toString(); g.f(obj, "secondary"); H1.f7900i = obj; H1.f(new na.g(H1)); int length = 32 - editable.length(); if (length > 0) { TextView textView = ReportActivity.this.secondaryCaption; if (textView != null) { String format = String.format(Locale.getDefault(), "%d characters required", Arrays.copyOf(new Object[]{Integer.valueOf(length)}, 1)); g.e(format, "format(locale, format, *args)"); textView.setText(format); TextView textView2 = ReportActivity.this.secondaryCaption; if (textView2 != null) { textView2.setVisibility(0); return; } else { g.k("secondaryCaption"); throw null; } } g.k("secondaryCaption"); throw null; } TextView textView3 = ReportActivity.this.secondaryCaption; if (textView3 != null) { textView3.setVisibility(4); } else { g.k("secondaryCaption"); throw null; } } } public static final class d extends n0 { public d() { } @Override public final void afterTextChanged(Editable editable) { g.f(editable, "s"); na.b H1 = ReportActivity.this.H1(); String obj = editable.toString(); g.f(obj, "tertiary"); H1.f7901j = obj; H1.f(new na.g(H1)); int length = 32 - editable.length(); if (length > 0) { ReportActivity reportActivity = ReportActivity.this; if (reportActivity.A == b.a.BUG) { TextView K1 = reportActivity.K1(); String format = String.format(Locale.getDefault(), "%d characters required", Arrays.copyOf(new Object[]{Integer.valueOf(length)}, 1)); g.e(format, "format(locale, format, *args)"); K1.setText(format); ReportActivity.this.K1().setVisibility(0); return; } } ReportActivity.this.K1().setVisibility(4); } } public static final class e extends n0 { public e() { } @Override public final void afterTextChanged(Editable editable) { g.f(editable, "s"); na.b H1 = ReportActivity.this.H1(); String obj = editable.toString(); g.f(obj, "comment"); H1.f7902k = obj; H1.f(new na.g(H1)); } } @Override @SuppressLint({"SetTextI18n"}) public final void C1(b.a aVar) { g.f(aVar, "type"); this.A = aVar; int ordinal = aVar.ordinal(); if (ordinal != 0) { if (ordinal == 1) { TextView textView = this.primaryLabel; if (textView != null) { textView.setText("What should the feature do?"); EditText editText = this.primary; if (editText != null) { editText.setHint("e.g. Make coffee when the make coffee button is pressed..."); TextView textView2 = this.secondaryLabel; if (textView2 != null) { textView2.setText("When would you use it?"); EditText editText2 = this.secondary; if (editText2 != null) { editText2.setHint("Daily, I need at least one coffee in the morning."); TextView textView3 = this.tertiaryLabel; if (textView3 != null) { textView3.setText("How would you implement it?"); EditText editText3 = this.tertiary; if (editText3 != null) { editText3.setHint("Just share your thoughts, I'm not looking for programming advice, just ideas :)."); K1().setVisibility(8); RadioGroup radioGroup = this.typeGroup; if (radioGroup != null) { radioGroup.check(R.id.type_request); return; } else { g.k("typeGroup"); throw null; } } g.k("tertiary"); throw null; } g.k("tertiaryLabel"); throw null; } g.k("secondary"); throw null; } g.k("secondaryLabel"); throw null; } g.k("primary"); throw null; } g.k("primaryLabel"); throw null; } return; } TextView textView4 = this.primaryLabel; if (textView4 != null) { textView4.setText("What happened?"); EditText editText4 = this.primary; if (editText4 != null) { editText4.setHint("Did you press something and the app closed?"); TextView textView5 = this.secondaryLabel; if (textView5 != null) { textView5.setText("What did you expect to happen?"); EditText editText5 = this.secondary; if (editText5 != null) { editText5.setHint("How does the outcome deviate from your expectations?"); TextView textView6 = this.tertiaryLabel; if (textView6 != null) { textView6.setText("How can I reproduce the issue?"); EditText editText6 = this.tertiary; if (editText6 != null) { editText6.setHint("What do I need to press and do to cause it. A step by step guide would be great."); K1().setVisibility(0); RadioGroup radioGroup2 = this.typeGroup; if (radioGroup2 != null) { radioGroup2.check(R.id.type_bug); return; } else { g.k("typeGroup"); throw null; } } g.k("tertiary"); throw null; } g.k("tertiaryLabel"); throw null; } g.k("secondary"); throw null; } g.k("secondaryLabel"); throw null; } g.k("primary"); throw null; } g.k("primaryLabel"); throw null; } public final na.b H1() { na.b bVar = this.f4848x; if (bVar != null) { return bVar; } g.k("presenter"); throw null; } @Override public final void J(String str, String str2, String str3, String str4, String str5) { EditText editText = this.title; if (editText != null) { editText.setText(str); EditText editText2 = this.primary; if (editText2 != null) { editText2.setText(str2); EditText editText3 = this.secondary; if (editText3 != null) { editText3.setText(str3); EditText editText4 = this.tertiary; if (editText4 != null) { editText4.setText(str4); EditText editText5 = this.comment; if (editText5 != null) { editText5.setText(str5); return; } else { g.k("comment"); throw null; } } g.k("tertiary"); throw null; } g.k("secondary"); throw null; } g.k("primary"); throw null; } g.k("title"); throw null; } public final TextView K1() { TextView textView = this.tertiaryCaption; if (textView != null) { return textView; } g.k("tertiaryCaption"); throw null; } @Override public final void M(Uri uri) { p.d d10 = new p(this).d(String.valueOf(uri)); d10.d = this; d10.f5274e = true; d10.c(); finish(); } @Override public final void o1(boolean z10) { this.f4849z = z10; r1(); } @Override public final void onCreate(Bundle bundle) { a.C0191a c0191a = new a.C0191a(); c0191a.d.add(new q4.e(this)); c0191a.f8156b = new h(this); c0191a.f8155a = new q4.c(this); c0191a.a(this); super.onCreate(bundle); setContentView(R.layout.core_bugreport_activity); ButterKnife.b(this); Toolbar toolbar = this.toolbar; if (toolbar != null) { B1(toolbar); this.y.a(bundle); RadioGroup radioGroup = this.typeGroup; if (radioGroup != null) { radioGroup.setOnCheckedChangeListener(new t8.d(1, this)); EditText editText = this.title; if (editText != null) { editText.addTextChangedListener(new a()); EditText editText2 = this.primary; if (editText2 != null) { editText2.addTextChangedListener(new b()); EditText editText3 = this.secondary; if (editText3 != null) { editText3.addTextChangedListener(new c()); EditText editText4 = this.tertiary; if (editText4 != null) { editText4.addTextChangedListener(new d()); EditText editText5 = this.comment; if (editText5 != null) { editText5.addTextChangedListener(new e()); return; } else { g.k("comment"); throw null; } } g.k("tertiary"); throw null; } g.k("secondary"); throw null; } g.k("primary"); throw null; } g.k("title"); throw null; } g.k("typeGroup"); throw null; } g.k("toolbar"); throw null; } @Override public final boolean onCreateOptionsMenu(Menu menu) { g.f(menu, "menu"); getMenuInflater().inflate(R.menu.bugreporter_menu, menu); return super.onCreateOptionsMenu(menu); } @Override public final boolean onOptionsItemSelected(MenuItem menuItem) { g.f(menuItem, "item"); if (menuItem.getItemId() == R.id.menu_send) { na.b H1 = H1(); new io.reactivex.rxjava3.internal.operators.single.b(new na.a(H1)).l(io.reactivex.rxjava3.schedulers.a.f6735b).i(io.reactivex.rxjava3.android.schedulers.b.a()).a(new io.reactivex.rxjava3.internal.observers.d(new na.a(H1))); return true; } if (menuItem.getItemId() == R.id.menu_github) { p.d d10 = new p(this).d("https://sdmaid.darken.eu/issues"); d10.d = this; d10.f5274e = true; d10.c(); return true; } if (menuItem.getItemId() == R.id.menu_help) { p.d d11 = new p(this).d("https://github.com/d4rken/sdmaid-public/wiki/Reporting-a-bug"); d11.d = this; d11.f5274e = true; d11.c(); return true; } if (menuItem.getItemId() == 16908332) { finish(); return true; } return super.onOptionsItemSelected(menuItem); } @Override public final boolean onPrepareOptionsMenu(Menu menu) { g.f(menu, "menu"); menu.findItem(R.id.menu_send).setVisible(this.f4849z); return super.onPrepareOptionsMenu(menu); } @Override public final void onSaveInstanceState(Bundle bundle) { g.f(bundle, "outState"); this.y.b(bundle); super.onSaveInstanceState(bundle); } }