正在查看: Tarjeta Transporte v3.0.29 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tarjeta Transporte v3.0.29 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.crtm.recarga.ui;
import android.app.PendingIntent;
import android.content.Intent;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.nfc.NfcAdapter;
import android.nfc.NfcManager;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.FileProvider;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Cbreak;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Cthrows;
import com.crtm.recarga.ui.MainActivity;
import com.google.android.material.navigation.NavigationView;
import com.itextpdf.text.pdf.ColumnText;
import com.itextpdf.text.pdf.PdfObject;
import com.itextpdf.text.xml.xmp.DublinCoreProperties;
import com.sgcr.ak0;
import com.sgcr.bk0;
import com.sgcr.br0;
import com.sgcr.e60;
import com.sgcr.e70;
import com.sgcr.f0;
import com.sgcr.g0;
import com.sgcr.g60;
import com.sgcr.hd0;
import com.sgcr.jq0;
import com.sgcr.kq0;
import com.sgcr.mq1;
import com.sgcr.nd;
import com.sgcr.rq0;
import com.sgcr.s2;
import com.sgcr.td1;
import com.sgcr.v60;
import com.sgcr.vn0;
import com.sgcr.wg0;
import com.sgcr.x61;
import com.sgcr.ys0;
import java.io.File;
import java.util.Set;
public final class MainActivity extends AppCompatActivity {
public nd f;
public s2 g;
public PendingIntent h;
public androidx.navigation.Ctry i;
public DrawerLayout j;
public Toolbar k;
public bk0 l;
public Menu m;
public boolean n;
public static final class Ccase extends wg0 implements g60 {
public Ccase() {
super(1);
}
public final void m3329if(Boolean bool) {
hd0.m9597new(bool);
if (bool.booleanValue()) {
ActionBar supportActionBar = MainActivity.this.getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.mo155package();
return;
}
return;
}
ActionBar supportActionBar2 = MainActivity.this.getSupportActionBar();
if (supportActionBar2 != null) {
supportActionBar2.mo147const();
}
}
@Override
public Object invoke(Object obj) {
m3329if((Boolean) obj);
return mq1.f11727if;
}
}
public static final class Celse implements ys0, e70 {
public final g60 f3595if;
public Celse(g60 g60Var) {
hd0.m9590else(g60Var, "function");
this.f3595if = g60Var;
}
public final boolean equals(Object obj) {
if ((obj instanceof ys0) && (obj instanceof e70)) {
return hd0.m9594if(mo2196if(), ((e70) obj).mo2196if());
}
return false;
}
@Override
public final void mo2195for(Object obj) {
this.f3595if.invoke(obj);
}
public final int hashCode() {
return mo2196if().hashCode();
}
@Override
public final v60 mo2196if() {
return this.f3595if;
}
}
public static final class Cfor implements DrawerLayout.Ccase {
public final TextView f3596for;
public Cfor(TextView textView) {
this.f3596for = textView;
}
@Override
public void mo1422for(View view, float f) {
hd0.m9590else(view, "drawerView");
}
@Override
public void mo1423if(int i) {
}
@Override
public void mo1424new(View view) {
hd0.m9590else(view, "drawerView");
int m17296for = vn0.m17296for(MainActivity.this.getBaseContext());
this.f3596for.setVisibility(m17296for > 0 ? 0 : 8);
this.f3596for.setText(String.valueOf(m17296for));
}
@Override
public void mo1425try(View view) {
hd0.m9590else(view, "drawerView");
}
}
public static final class Cif extends wg0 implements e60 {
public static final Cif f3598if = new Cif();
public Cif() {
super(0);
}
@Override
public final Boolean invoke() {
return Boolean.FALSE;
}
}
public static final class Cnew extends wg0 implements g60 {
public Cnew() {
super(1);
}
public final void m3331if(Boolean bool) {
MainActivity mainActivity = MainActivity.this;
hd0.m9597new(bool);
mainActivity.m3328volatile(bool.booleanValue());
}
@Override
public Object invoke(Object obj) {
m3331if((Boolean) obj);
return mq1.f11727if;
}
}
public static final class Ctry extends wg0 implements g60 {
public Ctry() {
super(1);
}
public final void m3332if(String str) {
((TextView) MainActivity.this.findViewById(2131296913)).setText(str);
}
@Override
public Object invoke(Object obj) {
m3332if((String) obj);
return mq1.f11727if;
}
}
public static final void m3321continue() {
}
public final void m3324abstract() {
DrawerLayout drawerLayout = this.j;
bk0 bk0Var = null;
if (drawerLayout == null) {
hd0.m9598public("drawerLayout");
drawerLayout = null;
}
drawerLayout.setDrawerLockMode(1);
Toolbar toolbar = this.k;
if (toolbar == null) {
hd0.m9598public("toolbar");
toolbar = null;
}
toolbar.setNavigationIcon((Drawable) null);
bk0 bk0Var2 = this.l;
if (bk0Var2 == null) {
hd0.m9598public("mainViewModel");
} else {
bk0Var = bk0Var2;
}
bk0Var.m6081final(false);
}
public final void m3325interface(String str, String str2, boolean z, kq0 kq0Var) {
hd0.m9590else(str, "message");
hd0.m9590else(str2, DublinCoreProperties.DESCRIPTION);
hd0.m9590else(kq0Var, "direction");
onPostResume();
x61 m18148if = x61.H.m18148if(str, str2, z);
m18148if.h1(false);
Cbreak m1644super = getSupportFragmentManager().m1644super();
hd0.m9586case(m1644super, "beginTransaction(...)");
m1644super.m1701try(m18148if, "snooze_dialog");
m1644super.mo1699this();
rq0.m15154for(this, 2131296701).f(kq0Var);
}
@Override
public void onBackPressed() {
bk0 bk0Var = this.l;
if (bk0Var == null) {
hd0.m9598public("mainViewModel");
bk0Var = null;
}
if (!bk0Var.m6082goto() || this.n) {
return;
}
super.onBackPressed();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2131492894);
this.l = (bk0) new Cthrows(this).m1941for(bk0.class);
this.f = (nd) new Cthrows(this).m1941for(nd.class);
View findViewById = findViewById(2131296987);
hd0.m9586case(findViewById, "findViewById(...)");
Toolbar toolbar = (Toolbar) findViewById;
this.k = toolbar;
bk0 bk0Var = null;
if (toolbar == null) {
hd0.m9598public("toolbar");
toolbar = null;
}
setSupportActionBar(toolbar);
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.mo159static(ColumnText.GLOBAL_SPACE_CHAR_RATIO);
}
View findViewById2 = findViewById(2131296710);
hd0.m9586case(findViewById2, "findViewById(...)");
NavigationView navigationView = (NavigationView) findViewById2;
this.i = g0.m8583if(this, 2131296701);
Menu menu = navigationView.getMenu();
hd0.m9586case(menu, "getMenu(...)");
this.m = menu;
View actionView = navigationView.getMenu().findItem(2131296703).getActionView();
hd0.m9602try(actionView, "null cannot be cast to non-null type android.widget.TextView");
TextView textView = (TextView) actionView;
textView.setGravity(16);
textView.setTypeface(Typeface.DEFAULT_BOLD);
View findViewById3 = findViewById(2131296466);
hd0.m9586case(findViewById3, "findViewById(...)");
DrawerLayout drawerLayout = (DrawerLayout) findViewById3;
this.j = drawerLayout;
if (drawerLayout == null) {
hd0.m9598public("drawerLayout");
drawerLayout = null;
}
drawerLayout.m1397if(new Cfor(textView));
Set m15950try = td1.m15950try(2131296707, 2131296704, 2131296706, 2131296692, 2131296698, 2131296696, 2131296703);
DrawerLayout drawerLayout2 = this.j;
if (drawerLayout2 == null) {
hd0.m9598public("drawerLayout");
drawerLayout2 = null;
}
this.g = new s2.Cif(m15950try).m15317new(drawerLayout2).m15315for(new ak0(Cif.f3598if)).m15316if();
androidx.navigation.Ctry ctry = this.i;
if (ctry == null) {
hd0.m9598public("navController");
ctry = null;
}
s2 s2Var = this.g;
if (s2Var == null) {
hd0.m9598public("appBarConfiguration");
s2Var = null;
}
f0.m7970if(this, ctry, s2Var);
androidx.navigation.Ctry ctry2 = this.i;
if (ctry2 == null) {
hd0.m9598public("navController");
ctry2 = null;
}
br0.m6147if(navigationView, ctry2);
Object systemService = getSystemService("nfc");
hd0.m9602try(systemService, "null cannot be cast to non-null type android.nfc.NfcManager");
if (((NfcManager) systemService).getDefaultAdapter() != null) {
PendingIntent activity = Build.VERSION.SDK_INT < 31 ? PendingIntent.getActivity(this, 0, new Intent(this, (Class<?>) MainActivity.class).addFlags(536870912), 0) : PendingIntent.getActivity(this, 0, new Intent(this, (Class<?>) MainActivity.class).addFlags(536870912), 167772160);
hd0.m9586case(activity, "getActivity(...)");
this.h = activity;
}
bk0 bk0Var2 = (bk0) new Cthrows(this).m1941for(bk0.class);
bk0Var2.m6084this().m1876else(this, new Celse(new Cnew()));
bk0Var2.m6077catch().m1876else(this, new Celse(new Ctry()));
bk0Var2.m6076break().m1876else(this, new Celse(new Ccase()));
getSupportFragmentManager().m1623catch(new FragmentManager.Cclass() {
@Override
public final void mo1662for() {
MainActivity.m3321continue();
}
});
bk0 bk0Var3 = this.l;
if (bk0Var3 == null) {
hd0.m9598public("mainViewModel");
} else {
bk0Var = bk0Var3;
}
bk0Var.m6080else();
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
nd ndVar = null;
if ("android.nfc.action.TAG_DISCOVERED".equals(intent != null ? intent.getAction() : null)) {
androidx.navigation.Ctry ctry = this.i;
if (ctry == null) {
hd0.m9598public("navController");
ctry = null;
}
androidx.navigation.Cbreak m2338continue = ctry.m2338continue();
if (m2338continue != null && m2338continue.m2041native() == 2131296706) {
nd ndVar2 = this.f;
if (ndVar2 == null) {
hd0.m9598public("cardSession");
} else {
ndVar = ndVar2;
}
ndVar.m13072public(intent);
return;
}
androidx.navigation.Ctry ctry2 = this.i;
if (ctry2 == null) {
hd0.m9598public("navController");
ctry2 = null;
}
androidx.navigation.Cbreak m2338continue2 = ctry2.m2338continue();
if (m2338continue2 != null && m2338continue2.m2041native() == 2131296695) {
nd ndVar3 = this.f;
if (ndVar3 == null) {
hd0.m9598public("cardSession");
} else {
ndVar = ndVar3;
}
ndVar.m13064break(intent);
}
}
}
@Override
public void onResume() {
super.onResume();
Object systemService = getApplicationContext().getSystemService("nfc");
hd0.m9602try(systemService, "null cannot be cast to non-null type android.nfc.NfcManager");
NfcManager nfcManager = (NfcManager) systemService;
androidx.navigation.Ctry ctry = null;
if (nfcManager.getDefaultAdapter() != null && nfcManager.getDefaultAdapter().isEnabled()) {
m3326protected();
NfcAdapter defaultAdapter = nfcManager.getDefaultAdapter();
PendingIntent pendingIntent = this.h;
if (pendingIntent == null) {
hd0.m9598public("pendingIntent");
pendingIntent = null;
}
defaultAdapter.enableForegroundDispatch(this, pendingIntent, null, null);
return;
}
androidx.navigation.Ctry ctry2 = this.i;
if (ctry2 == null) {
hd0.m9598public("navController");
} else {
ctry = ctry2;
}
androidx.navigation.Cbreak m2338continue = ctry.m2338continue();
boolean z = false;
if (m2338continue != null && m2338continue.m2041native() == 2131296707) {
z = true;
}
if (z) {
m3324abstract();
rq0.m15154for(this, 2131296701).f(com.crtm.recarga.ui.start.Cif.f3658if.m3371if());
}
}
@Override
public boolean onSupportNavigateUp() {
androidx.navigation.Ctry m8583if = g0.m8583if(this, 2131296701);
s2 s2Var = this.g;
if (s2Var == null) {
hd0.m9598public("appBarConfiguration");
s2Var = null;
}
return jq0.m11001if(m8583if, s2Var) || super.onSupportNavigateUp();
}
public final void m3326protected() {
DrawerLayout drawerLayout = this.j;
bk0 bk0Var = null;
if (drawerLayout == null) {
hd0.m9598public("drawerLayout");
drawerLayout = null;
}
drawerLayout.setDrawerLockMode(0);
bk0 bk0Var2 = this.l;
if (bk0Var2 == null) {
hd0.m9598public("mainViewModel");
} else {
bk0Var = bk0Var2;
}
bk0Var.m6081final(true);
}
public final void m3327strictfp(String str) {
hd0.m9590else(str, "filename");
Intent intent = new Intent("android.intent.action.VIEW");
intent.setFlags(1073741824);
File file = new File(getApplicationContext().getExternalFilesDir(PdfObject.NOTHING), str);
intent.setFlags(1);
intent.setDataAndType(FileProvider.m1295this(getApplicationContext(), getPackageName() + ".service.GenericFileProvider", file), "application/pdf");
startActivity(intent);
}
public final void m3328volatile(boolean z) {
View findViewById = findViewById(2131296607);
this.n = z;
if (z) {
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.mo147const();
}
findViewById.setZ(1000.0f);
findViewById.setVisibility(0);
return;
}
ActionBar supportActionBar2 = getSupportActionBar();
if (supportActionBar2 != null) {
supportActionBar2.mo155package();
}
findViewById.setVisibility(8);
findViewById.setZ(-1000.0f);
}
}