正在查看: Hopscotch v9.7.2 应用的 BottombarNavigationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 BottombarNavigationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.hopscotch.android.activity.parent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.media3.exoplayer.u;
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.google.android.gms.ads.internal.client.z0;
import com.payu.india.Payu.PayuConstants;
import com.yalantis.ucrop.view.CropImageView;
import in.hopscotch.android.activity.HomePageActivity;
import in.hopscotch.android.api.factory.AccountCardApiFactory;
import in.hopscotch.android.application.a0;
import in.hopscotch.android.attribution.AttributionConstants;
import in.hopscotch.android.attribution.AttributionData;
import in.hopscotch.android.attribution.OrderAttributionHelper;
import in.hopscotch.android.common.util.c;
import in.hopscotch.android.components.s;
import in.hopscotch.android.components.util.y;
import in.hopscotch.android.components.view.c;
import in.hopscotch.android.core.attribution.LPAttributionHelper;
import in.hopscotch.android.fragment.a;
import in.hopscotch.android.fragment.b0;
import in.hopscotch.android.fragment.homepage.CollectionsFragment;
import in.hopscotch.android.fragment.q1;
import in.hopscotch.android.model.FromAccount;
import in.hopscotch.android.model.SegmentDataModel;
import in.hopscotch.android.model.UserStatus;
import in.hopscotch.android.util.a1;
import in.hopscotch.android.util.x;
import in.hopscotch.android.util.z;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
public class BottombarNavigationActivity extends i implements c.d, DefaultHardwareBackBtnHandler {
public static final int C = 0;
public c A;
private TextView customActionBarTextView;
private boolean isBottomBarHidden;
private boolean isNotFirstLoadCart;
private AttributionData localAttributionData;
private boolean logOutDone;
public int p;
public AHBottomNavigation q;
public View r;
public FrameLayout s;
public FrameLayout t;
private String thanksForTheFeedbackToast;
public FrameLayout u;
private LinearLayout userNudgeLayout;
public FrameLayout v;
public in.hopscotch.android.components.view.c w;
public ArrayList<com.aurelhubert.ahbottomnavigation.d> x = new ArrayList<>();
public FragmentManager y = getSupportFragmentManager();
public ArrayList z = new ArrayList();
private BroadcastReceiver mCartUpdateBroadcastReceiver = new a();
private String fromLocation = "";
private SegmentDataModel segmentDataModel = null;
private int backPressCount = 2;
private long lastBackPressTimeStamp = 0;
private boolean cameFromCartPage = false;
public boolean B = false;
public class a extends BroadcastReceiver {
public a() {
}
@Override
public final void onReceive(Context context, Intent intent) {
String action = intent.getAction();
BottombarNavigationActivity bottombarNavigationActivity = BottombarNavigationActivity.this;
if (action == null || !intent.getAction().equals("cart_quantity")) {
if (intent.getAction() == null || !intent.getAction().equals("isFromOrderConfirmation")) {
return;
}
bottombarNavigationActivity.l1(0);
return;
}
intent.getIntExtra("quantity", in.hopscotch.android.application.a.b());
AHBottomNavigation aHBottomNavigation = bottombarNavigationActivity.q;
if (aHBottomNavigation != null) {
aHBottomNavigation.k(in.hopscotch.android.application.a.b());
}
}
}
public class b implements Animation.AnimationListener {
public b() {
}
@Override
public final void onAnimationEnd(Animation animation) {
BottombarNavigationActivity bottombarNavigationActivity = BottombarNavigationActivity.this;
bottombarNavigationActivity.userNudgeLayout.clearAnimation();
bottombarNavigationActivity.userNudgeLayout.setVisibility(8);
}
@Override
public final void onAnimationRepeat(Animation animation) {
}
@Override
public final void onAnimationStart(Animation animation) {
}
}
public interface c {
void k(int i);
}
public static void b1(BottombarNavigationActivity bottombarNavigationActivity, in.hopscotch.android.components.view.c cVar) {
if (cVar != null) {
if (bottombarNavigationActivity.B && cVar.i()) {
cVar.f();
}
cVar.e(true);
if (bottombarNavigationActivity.isBottomBarHidden) {
bottombarNavigationActivity.isBottomBarHidden = false;
} else {
bottombarNavigationActivity.g1();
}
}
bottombarNavigationActivity.B = false;
}
public static void c1(BottombarNavigationActivity bottombarNavigationActivity, AHBottomNavigation aHBottomNavigation) {
bottombarNavigationActivity.getClass();
if (aHBottomNavigation.isShown() && aHBottomNavigation.getChildCount() > 1 && aHBottomNavigation.getChildAt(1) != null) {
in.hopscotch.android.util.CoachMark.e.a.getClass();
if (in.hopscotch.android.util.CoachMark.e.a()) {
in.hopscotch.android.db.a.k().putBoolean("categoriesCoachMarkState", true).apply();
return;
}
new Handler().postDelayed(new androidx.core.app.a(bottombarNavigationActivity, 21), 500L);
if (bottombarNavigationActivity.isBottomBarHidden) {
bottombarNavigationActivity.p1();
} else {
bottombarNavigationActivity.isBottomBarHidden = true;
}
}
}
public static void d1(BottombarNavigationActivity bottombarNavigationActivity) {
LinearLayout linearLayout = bottombarNavigationActivity.userNudgeLayout;
if (linearLayout == null || linearLayout.getVisibility() != 0) {
return;
}
bottombarNavigationActivity.h1();
}
public static void j1(String str) {
c.a aVar = c.a.a;
if (in.hopscotch.android.common.util.j.i() && in.hopscotch.android.common.util.j.n()) {
in.hopscotch.android.hscart.ui.fragment.b.x1 = str;
} else {
q1.s1 = str;
}
}
public static void k1(String str) {
c.a aVar = c.a.a;
if (in.hopscotch.android.common.util.j.i() && in.hopscotch.android.common.util.j.n()) {
in.hopscotch.android.hscart.ui.fragment.b.s1 = str;
} else {
q1.p1 = str;
}
}
@Override
public final void B0() {
}
@Override
public final void J(in.hopscotch.android.components.view.c cVar) {
new Handler(Looper.getMainLooper()).postDelayed(new androidx.appcompat.app.l(22, this, cVar), 100L);
}
@Override
public final void W0() {
if (this.t.getVisibility() == 0) {
this.t.setVisibility(8);
}
super.W0();
}
@Override
public final void b0() {
in.hopscotch.android.components.toast.a.b(getApplicationContext());
}
@Override
public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
new Handler(Looper.getMainLooper()).postDelayed(new androidx.activity.n(this, 19), 100L);
return super.dispatchTouchEvent(motionEvent);
}
public final void f1(int i) {
if (i == 0) {
Object obj = this.z.get(i);
if (obj instanceof CollectionsFragment) {
((CollectionsFragment) obj).n1();
return;
}
return;
}
if (this.p == 0) {
Object obj2 = this.z.get(i);
if (obj2 instanceof CollectionsFragment) {
((CollectionsFragment) obj2).getClass();
CollectionsFragment.m1();
}
}
}
@Override
public final void g0(in.hopscotch.android.components.view.c cVar) {
}
public final synchronized void g1() {
if (this.q != null && !this.isBottomBarHidden) {
h1();
this.q.animate().translationY((int) (in.hopscotch.android.util.ui.c.a * 56.0d)).setDuration(100L).setInterpolator(new androidx.interpolator.view.animation.c()).start();
this.isBottomBarHidden = true;
}
}
public final void h1() {
LinearLayout linearLayout = this.userNudgeLayout;
if (linearLayout == null || linearLayout.getVisibility() != 8) {
AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, CropImageView.DEFAULT_ASPECT_RATIO);
alphaAnimation.setDuration(100L);
alphaAnimation.setInterpolator(new AccelerateInterpolator());
alphaAnimation.setAnimationListener(new b());
this.userNudgeLayout.clearAnimation();
this.userNudgeLayout.startAnimation(alphaAnimation);
}
}
public final void i1() {
ArrayList arrayList = this.z;
if (arrayList == null || arrayList.get(4) == null || !(this.z.get(4) instanceof q1) || !((Fragment) this.z.get(4)).isVisible()) {
return;
}
c.a aVar = c.a.a;
if (in.hopscotch.android.common.util.j.i() && in.hopscotch.android.common.util.j.n()) {
in.hopscotch.android.hscart.ui.viewmodel.a.q(((in.hopscotch.android.hscart.ui.fragment.b) this.z.get(4)).M0(), "Cart tab", false, false, (String) null, (Map) null, 62);
} else {
((q1) this.z.get(4)).e1();
}
}
public final void invokeDefaultOnBackPressed() {
super/*androidx.activity.j*/.onBackPressed();
}
public final void l1(int r7) {
throw new UnsupportedOperationException("Method not decompiled: in.hopscotch.android.activity.parent.BottombarNavigationActivity.l1(int):void");
}
public final void m1(String str) {
this.customActionBarTextView.setLayoutParams(new CoordinatorLayout.f(-1, -2));
this.customActionBarTextView.setText(str);
this.customActionBarTextView.setTextColor(getResources().getColor(in.hopscotch.android.components.m.blackish_gray));
this.customActionBarTextView.setTextSize(20.0f);
Typeface createFromAsset = Typeface.createFromAsset(getAssets(), getString(s.averta_semibold));
this.customActionBarTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
this.customActionBarTextView.setTypeface(createFromAsset);
}
public final void n1(SegmentDataModel segmentDataModel, int i) {
this.segmentDataModel = segmentDataModel;
o1(i, false);
}
public final void o1(int i, boolean z) {
if (!z) {
this.backPressCount = 2;
}
if (z && i == 4) {
return;
}
if (this.cameFromCartPage) {
Intent intent = new Intent((Context) this, (Class<?>) HomePageActivity.class);
intent.putExtra("HOME_TAB", i);
startActivity(intent);
finish();
finishAffinity();
this.cameFromCartPage = false;
}
int i2 = this.p;
String str = a1.a;
if (i2 == 0) {
in.hopscotch.android.util.CoachMark.a.a.a();
}
q1 q1Var = (Fragment) this.z.get(i);
String str2 = AttributionConstants.FUNNEL_MOMENTS;
if (i == 0) {
if (in.hopscotch.android.db.a.x().getBoolean("SHOULD_REFRESH_HOMEPAGE", false)) {
in.hopscotch.android.db.a.D(false);
Intent a2 = a0.a(this);
a2.setFlags(268468224);
startActivity(a2);
}
m1(a1.q(i));
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_DISCOVER, null, 0, null, null, null, null, null, null, null);
if (q1Var instanceof CollectionsFragment) {
CollectionsFragment collectionsFragment = (CollectionsFragment) q1Var;
OrderAttributionHelper.getInstance().addSortData(collectionsFragment.x1, collectionsFragment.p1, collectionsFragment.s1);
collectionsFragment.B1(this);
}
if (!z) {
in.hopscotch.android.analytics.c m = in.hopscotch.android.analytics.c.m();
if (TextUtils.isEmpty(getIntent().getStringExtra("FROM_SCREEN"))) {
int i3 = this.p;
if (i3 != 2) {
str2 = i3 != 3 ? i3 != 4 ? AttributionConstants.FUNNEL_DISCOVER : AttributionConstants.FUNNEL_CART : AttributionConstants.FUNNEL_ACCOUNT;
}
} else {
str2 = getIntent().getStringExtra("FROM_SCREEN");
}
m.r(str2, this.fromLocation);
this.fromLocation = "";
}
a.a aVar = in.hopscotch.android.fragment.a.s1;
String string = getString(2132017825);
aVar.getClass();
a.a.a(string);
k1(getString(2132017825));
j1(getString(2132017389));
} else if (i == 1) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_CATEGORIES, null, 0, null, "", null, "", null, null, null);
a.a aVar2 = in.hopscotch.android.fragment.a.s1;
String string2 = getString(2132019007);
aVar2.getClass();
a.a.a(string2);
k1(getString(2132019007));
j1(getString(2132017389));
} else if (i == 2) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_MOMENTS, null, 0, null, "", null, "", null, null, null);
if (!z) {
if (this.segmentDataModel != null) {
in.hopscotch.android.analytics.c m2 = in.hopscotch.android.analytics.c.m();
SegmentDataModel segmentDataModel = this.segmentDataModel;
String str3 = segmentDataModel.fromScreen;
String str4 = segmentDataModel.fromLocation;
int i4 = segmentDataModel.position;
m2.getClass();
in.hopscotch.android.analytics.c.P(i4, str3, str4);
} else {
in.hopscotch.android.analytics.c m3 = in.hopscotch.android.analytics.c.m();
int i5 = this.p;
if (i5 != 2) {
str2 = i5 != 3 ? i5 != 4 ? AttributionConstants.FUNNEL_DISCOVER : AttributionConstants.FUNNEL_CART : AttributionConstants.FUNNEL_ACCOUNT;
}
String string3 = getString(2132018072);
m3.getClass();
in.hopscotch.android.analytics.c.P(-1, str2, string3);
}
this.segmentDataModel = null;
}
a.a aVar3 = in.hopscotch.android.fragment.a.s1;
String string4 = getString(2132018370);
aVar3.getClass();
a.a.a(string4);
k1(getString(2132018370));
j1(getString(2132017389));
} else if (i == 3) {
m1(a1.q(i));
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_ACCOUNT, null, 0, null, null, null, null, null, null, null);
a.a aVar4 = in.hopscotch.android.fragment.a.s1;
String string5 = getString(2132017212);
aVar4.getClass();
a.a.a(string5);
k1(getString(2132017212));
j1(getString(2132017389));
} else if (i == 4) {
y.i();
m1(a1.q(i));
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_CART, null, 0, null, "", null, "", null, null, null);
a.a aVar5 = in.hopscotch.android.fragment.a.s1;
String string6 = getString(2132017388);
aVar5.getClass();
a.a.a(string6);
if (this.isNotFirstLoadCart) {
if (q1Var instanceof q1) {
q1Var.e1();
} else if (q1Var instanceof in.hopscotch.android.hscart.ui.fragment.b) {
in.hopscotch.android.hscart.ui.viewmodel.a.q(((in.hopscotch.android.hscart.ui.fragment.b) q1Var).M0(), "Cart tab", false, false, (String) null, (Map) null, 62);
}
}
this.isNotFirstLoadCart = true;
}
if (this.logOutDone && (q1Var instanceof CollectionsFragment)) {
((CollectionsFragment) q1Var).r1();
this.logOutDone = false;
}
if (z && (q1Var instanceof CollectionsFragment)) {
((CollectionsFragment) q1Var).w1();
return;
}
if (z && (q1Var instanceof b0)) {
((b0) q1Var).C0();
}
l1(i);
this.p = i;
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
Fragment fragment;
Fragment Q = getSupportFragmentManager().Q(2131365205);
if (Q instanceof in.hopscotch.android.hscart.ui.fragment.b) {
super.onActivityResult(i, i2, intent);
return;
}
if (i2 == -1 && (i == 2055 || i == 2056 || i == 2053 || i == 2057 || i == 3001 || i == 9864 || i == 20577 || i == 2062 || i == 2061)) {
ArrayList arrayList = this.z;
fragment = arrayList != null ? (Fragment) arrayList.get(4) : null;
if (fragment instanceof q1) {
fragment.onActivityResult(i, i2, intent);
return;
}
return;
}
if (i2 == -1 && i == 2059) {
ArrayList arrayList2 = this.z;
fragment = arrayList2 != null ? (Fragment) arrayList2.get(0) : null;
if (fragment instanceof CollectionsFragment) {
fragment.onActivityResult(i, i2, intent);
return;
}
return;
}
if (Q == null || ((intent == null || !intent.hasExtra("photo_upload_extra")) && i != 24042002)) {
super.onActivityResult(i, i2, intent);
} else {
Q.onActivityResult(i, i2, intent);
}
}
public void onBackPressed() {
if (this instanceof HomePageActivity) {
if (this.cameFromCartPage) {
super/*androidx.activity.j*/.onBackPressed();
return;
}
long nanoTime = System.nanoTime();
long j = this.lastBackPressTimeStamp;
long j2 = nanoTime - j;
if (j != 0 && TimeUnit.NANOSECONDS.toMillis(j2) > 6000) {
this.backPressCount = 2;
}
if (this.backPressCount >= 2) {
this.lastBackPressTimeStamp = System.nanoTime();
in.hopscotch.android.components.toast.a.d(getApplicationContext(), 2, getString(2132017943));
this.backPressCount--;
} else {
finish();
finishAffinity();
super/*androidx.activity.j*/.onBackPressed();
}
}
}
@Override
public void onCreate(Bundle bundle) {
boolean z;
int intExtra;
super.onCreate(null);
Intent intent = getIntent();
LPAttributionHelper.clearAttributionData();
int intExtra2 = intent.getIntExtra("HOME_TAB", 0);
if (intExtra2 == 0) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_DISCOVER, null, 0, null, null, null, null, null, null, null);
} else if (intExtra2 == 1) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_CATEGORIES, null, 0, null, null, null, null, null, null, null);
} else if (intExtra2 == 2) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_MOMENTS, null, 0, null, null, null, null, null, null, null);
} else if (intExtra2 == 3) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_ACCOUNT, null, 0, null, null, null, null, null, null, null);
} else if (intExtra2 == 4) {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_CART, null, 0, null, null, null, null, null, null, null);
} else {
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(AttributionConstants.FUNNEL_DISCOVER, null, 0, null, null, null, null, null, null, null);
}
super/*android.app.Activity*/.getIntent().putExtra("bottom_navigation_item", intent.getIntExtra("HOME_TAB", -1));
setContentView(2131558453);
getIntent().getBooleanExtra("IS_FROM_CUSTOM_TILE", false);
this.cameFromCartPage = getIntent().getBooleanExtra("FROM_NEW_CART", false);
this.v = (FrameLayout) findViewById(2131365205);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("cart_quantity");
intentFilter.addAction("isFromOrderConfirmation");
androidx.localbroadcastmanager.content.a.b(getApplicationContext()).c(this.mCartUpdateBroadcastReceiver, intentFilter);
this.r = findViewById(2131363370);
this.s = (FrameLayout) findViewById(2131363374);
View findViewById = findViewById(2131362658);
if (findViewById instanceof FrameLayout) {
this.t = (FrameLayout) findViewById;
}
this.u = (FrameLayout) findViewById(2131364266);
LinearLayout linearLayout = (LinearLayout) findViewById(2131365135);
this.userNudgeLayout = linearLayout;
linearLayout.setVisibility(8);
this.customActionBarTextView = new TextView(this);
this.q = findViewById(2131362089);
com.aurelhubert.ahbottomnavigation.d dVar = new com.aurelhubert.ahbottomnavigation.d(2132018144, 2131231360, 2131231359);
com.aurelhubert.ahbottomnavigation.d dVar2 = new com.aurelhubert.ahbottomnavigation.d(2132017418, 2131231036, 2131231035);
com.aurelhubert.ahbottomnavigation.d dVar3 = new com.aurelhubert.ahbottomnavigation.d(2132017212, 2131230873, 2131230863);
com.aurelhubert.ahbottomnavigation.d dVar4 = new com.aurelhubert.ahbottomnavigation.d(2132017321, 2131230913, 2131230910);
com.aurelhubert.ahbottomnavigation.d dVar5 = new com.aurelhubert.ahbottomnavigation.d(2132018370, 2131232178, 2131232177);
this.x.add(dVar);
this.x.add(dVar2);
this.x.add(dVar5);
this.x.add(dVar3);
this.x.add(dVar4);
this.q.d(this.x);
this.q.setAccentColor(androidx.core.content.a.b(this, 2131099810));
this.q.setInactiveColor(Color.parseColor("#606060"));
this.q.setNotificationBackgroundColor(androidx.core.content.a.b(this, 2131099810));
this.q.setColored(false);
this.q.setForceTint(false);
this.q.setForceTitlesDisplay(true);
this.q.setOnTabSelectedListener(new u(this, 16));
this.z.add(new CollectionsFragment.HomeTab(AttributionConstants.FUNNEL_DISCOVER, -1).c());
this.z.add(new in.hopscotch.android.fragment.n());
this.z.add(new b0());
this.z.add(new in.hopscotch.android.fragment.a());
c.a aVar = c.a.a;
if (in.hopscotch.android.common.util.j.i() && in.hopscotch.android.common.util.j.n()) {
ArrayList arrayList = this.z;
in.hopscotch.android.hscart.ui.fragment.b.p1.getClass();
arrayList.add(new in.hopscotch.android.hscart.ui.fragment.b());
} else {
q1 q1Var = new q1();
Bundle bundle2 = new Bundle();
if (getIntent() != null && getIntent().getBooleanExtra("REVIEW_CART_ON_SOLD_OUT_ITEMS", false)) {
bundle2.putBoolean("REVIEW_CART_ON_SOLD_OUT_ITEMS", true);
}
q1Var.setArguments(bundle2);
this.z.add(q1Var);
}
y.i();
Intent intent2 = getIntent();
if (intent2 == null || (intExtra = intent2.getIntExtra("HOME_TAB", -1)) <= 0) {
z = true;
} else {
String stringExtra = intent2.getStringExtra("from_location");
if ((!TextUtils.isEmpty(stringExtra) && stringExtra.equalsIgnoreCase(getString(2132017383))) || intent2.getBooleanExtra("cart_deeplink", false)) {
l1(0);
}
l1(intExtra);
this.p = intExtra;
if (intExtra != 2 || ((Fragment) this.z.get(intExtra)).isAdded()) {
if (intExtra == 2 && ((Fragment) this.z.get(intExtra)).isAdded() && ((Fragment) this.z.get(intExtra)).isVisible() && this.z.get(intExtra) != null && (this.z.get(intExtra) instanceof b0) && getIntent().getBooleanExtra("MOMENT_UPLOAD", false)) {
((b0) this.z.get(intExtra)).D0();
}
} else if (getIntent().getBooleanExtra("MOMENT_UPLOAD", false) && getIntent().getBooleanExtra("IS_FROM_CUSTOM_TILE", false)) {
Bundle bundle3 = new Bundle();
bundle3.putBoolean("MOMENT_UPLOAD", true);
bundle3.putString("FROM_SCREEN", getIntent().getStringExtra("FROM_SCREEN"));
bundle3.putString("from_location", getString(2132018054));
bundle3.putInt("custom_tile_id", getIntent().getIntExtra("custom_tile_id", -1));
bundle3.putInt("position", getIntent().getIntExtra("position", -1));
bundle3.putBoolean("IS_FROM_CUSTOM_TILE", getIntent().getBooleanExtra("IS_FROM_CUSTOM_TILE", false));
((Fragment) this.z.get(intExtra)).setArguments(bundle3);
} else if (!getIntent().getBooleanExtra("MOMENT_UPLOAD", false) && getIntent().getBooleanExtra("MOMENT_TAB", false) && getIntent().getBooleanExtra("IS_FROM_CUSTOM_TILE", false)) {
Bundle bundle4 = new Bundle();
if (getIntent().getBooleanExtra("IS_FROM_SPECIAL_PAGE", false) && getIntent().getStringExtra("FROM_SCREEN") != null) {
bundle4.putString("FROM_SCREEN", getIntent().getStringExtra("FROM_SCREEN"));
} else if (!getIntent().getBooleanExtra("IS_FROM_SPECIAL_PAGE", false)) {
bundle4.putString("FROM_SCREEN", getIntent().getStringExtra("FROM_SCREEN"));
}
bundle4.putInt("custom_tile_id", getIntent().getIntExtra("custom_tile_id", -1));
bundle4.putInt("position", getIntent().getIntExtra("position", -1));
bundle4.putString("from_location", getString(2132018054));
((Fragment) this.z.get(intExtra)).setArguments(bundle4);
}
z = false;
}
if ((this instanceof HomePageActivity) && z) {
FragmentManager fragmentManager = this.y;
androidx.fragment.app.a f = android.support.v4.media.a.f(fragmentManager, fragmentManager);
f.l(2131365205, (Fragment) this.z.get(0), PayuConstants.STRING_ZERO);
f.m(2130771983, 2130771984, 0, 0);
f.p(true);
this.p = 0;
a.a aVar2 = in.hopscotch.android.fragment.a.s1;
String string = getString(2132017825);
aVar2.getClass();
a.a.a(string);
k1(getString(2132017825));
j1(getString(2132017389));
}
this.q.getViewTreeObserver().addOnPreDrawListener(new in.hopscotch.android.activity.parent.b(this));
if (intent.getBooleanExtra("OPEN_HELP_CENTER", false)) {
z.b().e(getApplicationContext());
return;
}
if (intent.getBooleanExtra("OPEN_CONTACT_US", false)) {
z b2 = z.b();
Context applicationContext = getApplicationContext();
b2.getClass();
if (UserStatus.getInstance().getLoginStatus()) {
AccountCardApiFactory.getInstance().generateLoginTicketCall(new x(b2, false, applicationContext));
} else {
z.f(applicationContext, (String) null);
}
}
FromAccount.getInstance().setCameFromAccount(false);
String stringExtra2 = getIntent().getStringExtra("ratingMessage");
this.thanksForTheFeedbackToast = stringExtra2;
if (stringExtra2 == null || TextUtils.isEmpty(stringExtra2)) {
return;
}
in.hopscotch.android.components.toast.a.d(getApplicationContext(), 1, this.thanksForTheFeedbackToast);
}
@Override
public void onDestroy() {
androidx.localbroadcastmanager.content.a.b(getApplicationContext()).e(this.mCartUpdateBroadcastReceiver);
ArrayList<com.aurelhubert.ahbottomnavigation.d> arrayList = this.x;
if (arrayList != null) {
arrayList.clear();
this.x = null;
}
ArrayList arrayList2 = this.z;
if (arrayList2 != null) {
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
Fragment fragment = (Fragment) it.next();
FragmentManager fragmentManager = this.y;
fragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(fragmentManager);
aVar.t(fragment);
aVar.p(true);
}
this.z.clear();
this.z = null;
this.y = null;
}
in.hopscotch.android.components.view.c cVar = this.w;
if (cVar != null) {
cVar.setOnDiscoveryViewClickListener(null);
}
AHBottomNavigation aHBottomNavigation = this.q;
if (aHBottomNavigation != null) {
aHBottomNavigation.h();
}
this.mCartUpdateBroadcastReceiver = null;
super.onDestroy();
}
@Override
public void onPause() {
in.hopscotch.android.components.view.c cVar;
this.backPressCount = 2;
h1();
if (this.B && (cVar = this.w) != null) {
cVar.f();
this.w.e(false);
}
super.onPause();
}
public final boolean onPrepareOptionsMenu(Menu menu) {
int intExtra;
ArrayList arrayList;
if (getIntent() != null && (intExtra = getIntent().getIntExtra("HOME_TAB", 0)) != -1 && (arrayList = this.z) != null && !arrayList.isEmpty()) {
l1(intExtra);
this.p = intExtra;
m1(a1.q(intExtra));
}
return super/*android.app.Activity*/.onPrepareOptionsMenu(menu);
}
@Override
public void onResume() {
super.onResume();
OrderAttributionHelper.getInstance().setCurrentOrderAttributionData(this.localAttributionData);
Map<String, Object> orderAttributionSegmentParams = OrderAttributionHelper.getInstance().getOrderAttributionSegmentParams();
if (orderAttributionSegmentParams != null && !orderAttributionSegmentParams.isEmpty()) {
z0.n("attribution_data_for_scroll", new JSONObject(orderAttributionSegmentParams).toString());
}
in.hopscotch.android.application.a.d(this);
}
public final synchronized void p1() {
AHBottomNavigation aHBottomNavigation = this.q;
if (aHBottomNavigation != null && this.isBottomBarHidden) {
aHBottomNavigation.animate().translationY(CropImageView.DEFAULT_ASPECT_RATIO).setDuration(100L).setInterpolator(new androidx.interpolator.view.animation.c()).start();
this.isBottomBarHidden = false;
}
}
public final void q1() {
this.localAttributionData = OrderAttributionHelper.getInstance().getCurrentAttributionData();
}
}