正在查看: Share Any v2.1.7 应用的 HomeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Share Any v2.1.7 应用的 HomeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package net.shareany.app.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.TextView;
import androidx.activity.l;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import com.google.android.gms.ads.nativead.NativeAdView;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.navigation.NavigationView;
import com.sax.android.framework.widget.SaxActionMode;
import com.tencent.mmkv.MMKV;
import ed.e;
import f.d;
import g.c;
import g.v;
import m5.h;
import n5.k;
import net.shareany.app.activity.ProfileEditorActivity;
import net.shareany.app.activity.pc.WebShareActivity;
import oa.t;
import org.greenrobot.eventbus.ThreadMode;
public class HomeActivity extends ed.b implements NavigationView.a {
public static final int F = 0;
public Handler B = new Handler();
public k C;
public int D;
public s5.b E;
public class a extends DrawerLayout.g {
public a() {
}
public void b(View view) {
Intent intent;
?? r5 = HomeActivity.this;
int i = r5.D;
if (i != 0) {
if (2131296747 == i) {
d.d(h.a(new byte[]{11, -123, 14, -113, 60, -114, 17, -117, 20, -113, 17, -75, 20, -113, 1, -75, 16, -126, 2, -104, 6}, new byte[]{99, -22}));
intent = new Intent((Context) r5, (Class<?>) WebShareActivity.class);
} else if (2131296745 == i) {
d.d(h.a(new byte[]{61, -39, 56, -45, 10, -46, 39, -41, 34, -45, 39, -23, 38, -34, 52, -60, 48, -23, 52, -58, 37}, new byte[]{85, -74}));
new t5.h((Context) r5).h();
} else if (2131296746 == i) {
d.d(h.a(new byte[]{-107, 112, -112, 122, -94, 123, -113, 126, -118, 122, -113, 64, -114, 122, -119, 107, -108, 113, -102, 108}, new byte[]{-3, 31}));
intent = new Intent((Context) r5, (Class<?>) SettingsActivity.class);
}
r5.startActivity(intent);
}
r5.D = 0;
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
d.d(h.a(new byte[]{-59, 100, -64, 110, -14, 111, -33, 106, -38, 110, -33, 84, -35, 121, -62, 109, -60, 103, -56, 84, -56, 111, -60, Byte.MAX_VALUE}, new byte[]{-83, 11}));
HomeActivity.this.startActivity(new Intent((Context) HomeActivity.this, (Class<?>) ProfileEditorActivity.class).putExtra(ProfileEditorActivity.E, ProfileEditorActivity.b.b.toString()));
}
}
public void onBackPressed() {
k kVar = this.C;
if (kVar.d != null) {
View inflate = LayoutInflater.from(this).inflate(kVar.c, (ViewGroup) null);
NativeAdView findViewById = inflate.findViewById(2131296784);
View findViewById2 = inflate.findViewById(2131296925);
if (findViewById == null) {
inflate = null;
} else {
findViewById.setVisibility(0);
if (findViewById2 != null) {
findViewById2.setVisibility(8);
}
if (findViewById.findViewById(2131296373) != null) {
findViewById.setMediaView(findViewById.findViewById(2131296373));
findViewById.getMediaView().setMediaContent(kVar.d.getMediaContent());
}
findViewById.setHeadlineView(findViewById.findViewById(2131296371));
findViewById.setBodyView(findViewById.findViewById(2131296367));
findViewById.setCallToActionView(findViewById.findViewById(2131296368));
findViewById.setIconView(findViewById.findViewById(2131296366));
if (findViewById.findViewById(2131296375) != null) {
findViewById.setPriceView(findViewById.findViewById(2131296375));
}
if (findViewById.findViewById(2131296376) != null) {
findViewById.setStarRatingView(findViewById.findViewById(2131296376));
}
if (findViewById.findViewById(2131296377) != null) {
findViewById.setStoreView(findViewById.findViewById(2131296377));
}
if (findViewById.findViewById(2131296365) != null) {
findViewById.setAdvertiserView(findViewById.findViewById(2131296365));
}
if (findViewById.getHeadlineView() != null) {
((TextView) findViewById.getHeadlineView()).setText(kVar.d.getHeadline());
}
if (kVar.d.getBody() == null) {
findViewById.getBodyView().setVisibility(8);
} else {
findViewById.getBodyView().setVisibility(0);
((TextView) findViewById.getBodyView()).setText(kVar.d.getBody());
}
if (kVar.d.getCallToAction() == null) {
findViewById.getCallToActionView().setVisibility(8);
} else {
findViewById.getCallToActionView().setVisibility(0);
((TextView) findViewById.getCallToActionView()).setText(kVar.d.getCallToAction());
}
if (kVar.d.getIcon() == null) {
findViewById.getIconView().setVisibility(8);
} else {
((ImageView) findViewById.getIconView()).setImageDrawable(kVar.d.getIcon().getDrawable());
findViewById.getIconView().setVisibility(0);
}
if (findViewById.findViewById(2131296375) != null) {
if (kVar.d.getPrice() == null) {
findViewById.getPriceView().setVisibility(8);
} else {
findViewById.getPriceView().setVisibility(0);
((TextView) findViewById.getPriceView()).setText(kVar.d.getPrice());
}
}
if (findViewById.findViewById(2131296377) != null) {
if (kVar.d.getStore() == null) {
findViewById.getStoreView().setVisibility(8);
} else {
findViewById.getStoreView().setVisibility(0);
((TextView) findViewById.getStoreView()).setText(kVar.d.getStore());
}
}
if (findViewById.findViewById(2131296376) != null) {
if (kVar.d.getStarRating() == null) {
findViewById.getStarRatingView().setVisibility(8);
} else {
((RatingBar) findViewById.getStarRatingView()).setRating(kVar.d.getStarRating().floatValue());
findViewById.getStarRatingView().setVisibility(0);
}
}
if (findViewById.findViewById(2131296365) != null) {
if (kVar.d.getAdvertiser() != null) {
((TextView) findViewById.getAdvertiserView()).setText(kVar.d.getAdvertiser());
}
findViewById.getAdvertiserView().setVisibility(4);
}
findViewById.setNativeAd(kVar.d);
}
if (inflate != null) {
View inflate2 = LayoutInflater.from(this).inflate(2131492941, (ViewGroup) null, false);
((FrameLayout) inflate2.findViewById(2131296587)).addView(inflate);
com.google.android.material.bottomsheet.a aVar = new com.google.android.material.bottomsheet.a(this, 2131886172);
aVar.setCancelable(false);
aVar.setCanceledOnTouchOutside(true);
aVar.setContentView(inflate2);
aVar.setOnCancelListener(new e(aVar, 0));
inflate2.findViewById(2131297048).setOnClickListener(new t(this, aVar));
BottomSheetBehavior w3 = BottomSheetBehavior.w((View) inflate2.getParent());
int i = getResources().getDisplayMetrics().heightPixels;
w3.C(i - (i / 4));
aVar.show();
return;
}
}
finish();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
DrawerLayout inflate = getLayoutInflater().inflate(2131492898, (ViewGroup) null, false);
int i = 2131296392;
AppBarLayout c = l.c(inflate, 2131296392);
if (c != null) {
i = 2131296506;
SaxActionMode c2 = l.c(inflate, 2131296506);
if (c2 != null) {
DrawerLayout drawerLayout = inflate;
NavigationView c3 = l.c(inflate, 2131296786);
if (c3 != null) {
Toolbar c4 = l.c(inflate, 2131297016);
if (c4 != null) {
this.E = new s5.b(drawerLayout, c, c2, drawerLayout, c3, c4);
setContentView(drawerLayout);
w((Toolbar) this.E.f);
s5.b bVar = this.E;
c cVar = new c(this, (DrawerLayout) bVar.d, (Toolbar) bVar.f, 2131821059, 2131821058);
DrawerLayout drawerLayout2 = cVar.b;
View f = drawerLayout2.f(8388611);
cVar.e(f != null ? drawerLayout2.t(f) : false ? 1.0f : 0.0f);
i.e eVar = cVar.c;
DrawerLayout drawerLayout3 = cVar.b;
View f2 = drawerLayout3.f(8388611);
int i2 = f2 != null ? drawerLayout3.t(f2) : false ? cVar.e : cVar.d;
if (!cVar.f && !cVar.a.a()) {
cVar.f = true;
}
cVar.a.c(eVar, i2);
((DrawerLayout) this.E.d).a(cVar);
((DrawerLayout) this.E.d).a(new a());
((NavigationView) this.E.e).setNavigationItemSelectedListener(this);
k kVar = new k(h.a(new byte[]{42, -69, 100, -69, 57, -86, 100, -86, 60, -72, 100, -24, 123, -19, 124, -17, 123, -20, 122, -24, 122, -23, 123, -23, 120, -23, 125, -11, 112, -20, 126, -17, 124, -23, 121, -22, Byte.MAX_VALUE, -30}, new byte[]{73, -38}), 2131493047);
this.C = kVar;
n5.a.b.a(new v(kVar, this));
String a2 = h.a(new byte[]{-125, -68, -105, -90, -111, -118, -124, -74, -111, -68, -109, -80}, new byte[]{-27, -43});
MMKV mmkv = a6.e.a;
if (!(mmkv == null ? false : mmkv.a(a2))) {
a6.e.h(h.a(new byte[]{97, 91, 117, 65, 115, 109, 102, 81, 115, 91, 113, 87}, new byte[]{7, 50}), System.currentTimeMillis());
}
a6.e.g(h.a(new byte[]{58, -13, 47, -7, 45, -11, 4, -13, 52, -27, 53, -28}, new byte[]{91, -112}), a6.e.c(h.a(new byte[]{8, -124, 29, -114, 31, -126, 54, -124, 6, -110, 7, -109}, new byte[]{105, -25}), 0) + 1);
return;
}
i = 2131297016;
} else {
i = 2131296786;
}
}
}
throw new NullPointerException(h.a(new byte[]{61, -67, 3, -89, 25, -70, 23, -12, 2, -79, 1, -95, 25, -90, 21, -80, 80, -94, 25, -79, 7, -12, 7, -67, 4, -68, 80, -99, 52, -18, 80}, new byte[]{112, -44}).concat(inflate.getResources().getResourceName(i)));
}
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(2131558412, menu);
return super/*android.app.Activity*/.onCreateOptionsMenu(menu);
}
@Override
public void onDestroy() {
this.B.removeCallbacksAndMessages(null);
super.onDestroy();
}
@org.greenrobot.eventbus.a(threadMode = ThreadMode.MAIN)
public void onMessageEvent(ld.b bVar) {
x();
}
public boolean onOptionsItemSelected(MenuItem menuItem) {
ed.h hVar;
ed.h hVar2;
switch (menuItem.getItemId()) {
case 2131296646:
d.d(h.a(new byte[]{25, -49, 28, -59, 46, -56, 24, -45, 5, -49, 3, -39}, new byte[]{113, -96}));
hVar = new ed.h(this, 2);
hVar2 = new ed.h(this, 3);
a6.d.r(this, hVar, hVar2);
break;
case 2131296647:
d.d(h.a(new byte[]{76, -124, 73, -114, 123, -126, 74, -99, 77, -97, 65}, new byte[]{36, -21}));
a6.d.r(this, new ed.h(this, 0), new ed.h(this, 1));
break;
case 2131296649:
if (!kd.c.j(this)) {
y(false);
break;
} else {
y(true);
if (kd.c.j(this)) {
new kd.c(this).show();
}
break;
}
case 2131296651:
d.d(h.a(new byte[]{-92, 57, -95, 51, -109, 33, -87, 52, -109, 37, -92, 55, -66, 51}, new byte[]{-52, 86}));
hVar = new ed.h(this, 4);
hVar2 = new ed.h(this, 5);
a6.d.r(this, hVar, hVar2);
break;
}
return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
}
public void onResume() {
super.onResume();
this.B.postDelayed(new ed.h(this, 6), 50L);
this.B.postDelayed(new ed.h(this, 7), 100L);
}
public void onStart() {
super.onStart();
x();
}
public final void x() {
View childAt = ((NavigationView) this.E.e).k.b.getChildAt(0);
if (childAt != null) {
x5.c g = a6.d.g(getApplicationContext());
ImageView imageView = (ImageView) childAt.findViewById(2131296664);
ImageView imageView2 = (ImageView) childAt.findViewById(2131296665);
((ImageView) childAt.findViewById(2131296652)).setVisibility(8);
TextView textView = (TextView) childAt.findViewById(2131296621);
TextView textView2 = (TextView) childAt.findViewById(2131296622);
textView.setText(g.c);
textView2.setText(g.e);
ud.a.a(this, imageView);
imageView2.setOnClickListener(new b());
}
}
public final void y(boolean z) {
try {
if (((Toolbar) this.E.f).getMenu() != null && ((Toolbar) this.E.f).getMenu().findItem(2131296649) != null) {
((Toolbar) this.E.f).getMenu().findItem(2131296649).setVisible(z);
}
} catch (Throwable th) {
th.printStackTrace();
}
}
}