Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 HomeActivity.java 源代码,内容仅作参考
package in.swiggy.android.activities;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.Window;
import android.view.WindowInsets;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebSettings;
import android.widget.EditText;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.splashscreen.c;
import androidx.core.view.i1;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager2.widget.ViewPager2;
import com.appsflyer.AppsFlyerConversionListener;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.play.core.install.InstallState;
import dagger.android.DispatchingAndroidInjector;
import in.juspay.hypersdk.core.PaymentConstants;
import in.swiggy.android.R;
import in.swiggy.android.SwiggyApplication;
import in.swiggy.android.adapters.BindingAdaptersKt;
import in.swiggy.android.analytics.perf.AppLaunchContext;
import in.swiggy.android.analytics.perf.SwiggyPerfMonitor;
import in.swiggy.android.analytics.perf.a;
import in.swiggy.android.analytics_sdk.event.senders.KlyticsEventSender;
import in.swiggy.android.commons.extension.KotlinExtensionsKt;
import in.swiggy.android.commonsui.ui.arch.BaseMvvmActivity;
import in.swiggy.android.commonsui.ui.utils.Transition;
import in.swiggy.android.commonsui.view.SwiggyRatingBar;
import in.swiggy.android.dagger.em;
import in.swiggy.android.databinding.k2;
import in.swiggy.android.databinding.ma;
import in.swiggy.android.databinding.ua;
import in.swiggy.android.databinding.y3;
import in.swiggy.android.dls.button.NormalButton;
import in.swiggy.android.dls.textview.DlsTextView;
import in.swiggy.android.feature.bottombar.BottomBarHandlerV2;
import in.swiggy.android.jankStats.JankStatsAggregator;
import in.swiggy.android.mndutils.enums.LocationHalfCardAction;
import in.swiggy.android.mndutils.interfaces.g;
import in.swiggy.android.mvvm.home.HomeActivityNavigator;
import in.swiggy.android.mvvm.home.viewmodel.HomeActivityViewModel;
import in.swiggy.android.mvvm.home.viewmodel.HomeActivityViewModelHelperKt;
import in.swiggy.android.overlay.handler.OverlayUseCase;
import in.swiggy.android.overlays.trackCrouton.ui.TrackCroutonUIService;
import in.swiggy.android.payment.utility.placeorder.PlaceOrderUtility;
import in.swiggy.android.reactnative.dinersone.DinersOneFragment;
import in.swiggy.android.seo.SeoAttributionModel;
import in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.permissions.PermissionsPlugin;
import in.swiggy.android.tejas.TejasConstants;
import in.swiggy.android.tejas.feature.launch.prelaunch.PreLaunchApiState;
import in.swiggy.android.tejas.network.ISwiggyNetworkExceptionHandler;
import in.swiggy.android.tejas.oldapi.models.KeySeparator;
import in.swiggy.android.utils.ComposeInitializer;
import in.swiggy.android.utils.RxBusPipelineUtils;
import in.swiggy.android.utils.j1;
import in.swiggy.android.utils.p1;
import in.swiggy.android.view.SwiggyImageView;
import java.util.HashMap;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlinx.coroutines.q1;
import kotlinx.coroutines.v0;
public final class HomeActivity extends BaseMvvmActivity<HomeActivityViewModel, in.swiggy.android.databinding.c0> implements in.swiggy.android.commoninterfaces.f, in.swiggy.android.feature.homevideopopup.c, dagger.android.e, in.swiggy.android.fragmentservices.impl.g, in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.permissions.c, in.swiggy.android.mndutils.interfaces.i, in.swiggy.android.bottombar.interfaces.a, in.swiggy.android.swiggylynx.interfaces.b, in.swiggy.android.commonsFeature.g, ISwiggyNetworkExceptionHandler, in.swiggy.android.commonsui.bindingadapters.interfaces.a, in.swiggy.android.listingkit.interfaces.g, in.swiggy.android.commoninterfaces.c, in.swiggy.android.feature.address.smartNudges.a {
public static final a C0 = new a(null);
public static final int D0 = 8;
private static long E0;
public DispatchingAndroidInjector<Object> A;
private boolean A0;
public in.swiggy.android.mxn.launch.a B;
private final ISwiggyNetworkExceptionHandler B0;
public OverlayUseCase C;
public dagger.a<in.swiggy.android.apputils.f> D;
public dagger.a<in.swiggy.android.apputils.bottombar.d> E;
public in.swiggy.android.commons.utils.contextservice.h F;
public SharedPreferences G;
public in.swiggy.android.overlays.trackCrouton.store.a H;
public in.swiggy.android.overlays.b I;
public in.swiggy.android.mvvm.services.s J;
public in.swiggy.android.mvvm.home.b K;
public in.swiggy.android.mvvm.home.i L;
public dagger.a<in.swiggy.android.networkutils.n> M;
public JankStatsAggregator N;
public in.swiggy.android.listingkit.rv.d O;
private String P;
public in.swiggy.android.commons.featureFlags.d Q;
private final kotlin.j R;
private io.reactivex.disposables.b S;
private io.reactivex.disposables.b T;
private final kotlin.j U;
public dagger.a<in.swiggy.android.mndutils.interfaces.h> V;
private io.reactivex.disposables.a W;
private boolean X;
private String Y;
private BottomBarHandlerV2 Z;
private boolean c0;
private final PermissionsPlugin j;
private TrackCroutonUIService k;
public dagger.a<in.swiggy.android.analytics.interfaces.c> l;
public dagger.a<in.swiggy.android.repositories.interfaces.d> m;
public in.swiggy.android.commons.utils.contextservice.h n;
public SharedPreferences o;
public RecyclerView.u p;
private final SwiggyPerfMonitor p0;
public dagger.a<in.swiggy.koordinates.compass.core.b> q;
public dagger.a<p1> r;
public in.swiggy.android.analytics.d s;
public in.swiggy.android.commons.utils.a t;
public AppsFlyerConversionListener u;
public dagger.a<KlyticsEventSender> v;
public dagger.a<PlaceOrderUtility> w;
public in.swiggy.android.config.c x;
public dagger.a<in.swiggy.android.discovery.pageskeleton.datamanager.b> y;
private SwiggyRatingBar y0;
public in.swiggy.android.singleton.a z;
private boolean z0;
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final void a(Activity context, String str) {
kotlin.jvm.internal.o.k(context, "context");
Intent intent = new Intent(context, HomeActivity.class);
intent.addFlags(603979776);
intent.putExtra("launchReferrer", str);
context.startActivity(intent);
}
public final void b(Activity context, Bundle bundle) {
kotlin.jvm.internal.o.k(context, "context");
Intent intent = new Intent(context, HomeActivity.class);
if (bundle != null) {
intent.putExtras(bundle);
}
intent.addFlags(603979776);
context.startActivity(intent);
}
public final void c(Activity context, String str) {
kotlin.jvm.internal.o.k(context, "context");
Intent intent = new Intent(context, HomeActivity.class);
intent.addFlags(268468224);
intent.putExtra("launchReferrer", str);
context.startActivity(intent);
}
private a() {
}
}
public static final class b extends androidx.activity.m {
b() {
super(true);
}
@Override
public void handleOnBackPressed() {
if (!KotlinExtensionsKt.h(Boolean.valueOf(HomeActivity.this.o2().get().l5()))) {
setEnabled(false);
HomeActivity.super.onBackPressed();
return;
}
HomeActivity.this.p2().x4();
}
}
public static final class c implements p1.a {
c() {
}
@Override
public void a(Exception e) {
kotlin.jvm.internal.o.k(e, "e");
in.swiggy.android.commons.utils.x.b("HomeActivity", "completeUpdate(): successful request");
}
@Override
public void b(j1 info) {
kotlin.jvm.internal.o.k(info, "info");
in.swiggy.android.commons.utils.x.b("HomeActivity", "completeUpdate(): successful request");
}
}
public HomeActivity() {
super(R.layout.activity_home, kotlin.jvm.internal.r.b(HomeActivityViewModel.class), null, 4, null);
kotlin.j b2;
kotlin.j b3;
this.j = new PermissionsPlugin(this);
this.P = "test_user";
b2 = kotlin.l.b(new Function0<HomeActivityViewModel>() {
{
super(0);
}
@Override
public final HomeActivityViewModel invoke() {
return HomeActivity.P1(HomeActivity.this);
}
});
this.R = b2;
b3 = kotlin.l.b(new Function0<in.swiggy.android.databinding.c0>() {
{
super(0);
}
@Override
public final in.swiggy.android.databinding.c0 invoke() {
return HomeActivity.O1(HomeActivity.this);
}
});
this.U = b3;
this.W = new io.reactivex.disposables.a();
this.p0 = SwiggyPerfMonitor.a;
this.z0 = true;
this.A0 = true;
this.B0 = this;
}
private final void C2(Intent intent) {
try {
Application application = getApplication();
kotlin.jvm.internal.o.i(application, "null cannot be cast to non-null type in.swiggy.android.SwiggyApplication");
SwiggyApplication swiggyApplication = (SwiggyApplication) application;
if (!swiggyApplication.d0()) {
HomeActivityViewModelHelperKt.o(p2(), SwiggyApplication.J.b(), b3(intent));
swiggyApplication.p0();
}
HomeActivityViewModelHelperKt.g(p2(), "app-launch-time", "app-launch", new HashMap());
HomeActivityViewModelHelperKt.t(p2(), "extra-splash-time", "screen-splash");
} catch (Exception e) {
in.swiggy.android.commons.utils.x.i("HomeActivity", e);
}
}
public static final Object C3(HomeActivity this$0) {
ViewStub i;
kotlin.jvm.internal.o.k(this$0, "this$0");
androidx.databinding.p animationViewStub = this$0.q2().B;
kotlin.jvm.internal.o.j(animationViewStub, "animationViewStub");
if (animationViewStub.h() == null && animationViewStub.i() != null && (i = animationViewStub.i()) != null) {
i.inflate();
}
ViewDataBinding g = animationViewStub.g();
if (g instanceof ma) {
ma maVar = (ma) g;
maVar.B.setImageAssetsFolder("fireworks_lottie");
maVar.B.setAnimation("fireworks_lottie/fireworks_lottie.json");
maVar.B.setScaleType(ImageView.ScaleType.CENTER_CROP);
maVar.B.y();
return null;
}
return null;
}
private final void F2() {
RxBusPipelineUtils.e();
}
public static final void F3(final HomeActivity this$0, com.google.android.play.core.appupdate.a aVar, ViewStub viewStub, View view) {
int i;
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().R.g();
if (g instanceof y3) {
y3 y3Var = (y3) g;
y3Var.W(this$0);
y3Var.b0(112, this$0.p2());
y3Var.b0(17, this$0.p2().q9());
NormalButton btnUpdateV2 = y3Var.C;
kotlin.jvm.internal.o.j(btnUpdateV2, "btnUpdateV2");
btnUpdateV2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
HomeActivity.G3(HomeActivity.this, view2);
}
});
btnUpdateV2.setText(R.string.update_text);
if (aVar != null) {
i = aVar.b();
} else {
i = 0;
}
this$0.p2().yc(i);
String str = "Version " + i;
DlsTextView updateSubtitleV2 = y3Var.F;
kotlin.jvm.internal.o.j(updateSubtitleV2, "updateSubtitleV2");
updateSubtitleV2.setText(str);
DlsTextView updateTitleV2 = y3Var.G;
kotlin.jvm.internal.o.j(updateTitleV2, "updateTitleV2");
SwiggyImageView updateIconV2 = y3Var.E;
kotlin.jvm.internal.o.j(updateIconV2, "updateIconV2");
updateTitleV2.setText(R.string.update_title);
updateIconV2.setImageResource(R.drawable.ic_in_app_update_icon_v2);
}
}
public static final void G3(HomeActivity this$0, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
this$0.H3();
}
private final void H2(final String str, final SeoAttributionModel seoAttributionModel) {
this.W.c(in.swiggy.android.commons.rxjava.g.c(new Callable() {
@Override
public final Object call() {
Boolean J2;
J2 = HomeActivity.J2(SeoAttributionModel.this, this, str);
return J2;
}
}, io.reactivex.schedulers.a.c()));
}
private final void H3() {
in.swiggy.android.analytics.gtm.g h = s2().get().h("ux4-home-page", "click-in-app-update-cta", "1202", 9999);
kotlin.jvm.internal.o.j(h, "getGtmEventData(...)");
s2().get().b(h);
Y1().get().t(this, 1001);
}
public static final Boolean J2(SeoAttributionModel seoAttributionModel, HomeActivity this$0, String str) {
kotlin.jvm.internal.o.k(seoAttributionModel, "$seoAttributionModel");
kotlin.jvm.internal.o.k(this$0, "this$0");
SwiggyApplication.a aVar = SwiggyApplication.J;
if (aVar.c()) {
aVar.e(false);
if (seoAttributionModel.c()) {
this$0.s3(seoAttributionModel);
}
in.swiggy.android.analytics.interfaces.c cVar = this$0.s2().get();
in.swiggy.android.analytics.gtm.g q = cVar.q("app-launch", "app-launch", this$0.p2().da(), 9999, str);
kotlin.jvm.internal.o.j(q, "getGtmEventData(...)");
cVar.f(q);
cVar.o("device-details", "ux4-home-page", "-", "-", 9999);
if (this$0.X) {
this$0.X = false;
in.swiggy.android.analytics.gtm.g h = cVar.h("ux4-home-page", "click-shortcut-option", this$0.Y, 9999);
kotlin.jvm.internal.o.j(h, "getGtmEventData(...)");
cVar.b(h);
}
}
return Boolean.TRUE;
}
private final void L2() {
q2().U.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.S2(HomeActivity.this, viewStub, view);
}
});
q2().T.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.T2(HomeActivity.this, viewStub, view);
}
});
q2().L.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.U2(HomeActivity.this, viewStub, view);
}
});
q2().S.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.M2(HomeActivity.this, viewStub, view);
}
});
q2().G.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.O2(HomeActivity.this, viewStub, view);
}
});
q2().I.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.P2(HomeActivity.this, viewStub, view);
}
});
q2().V.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.Q2(viewStub, view);
}
});
this.k = new TrackCroutonUIService(p2().fb().g(), androidx.lifecycle.s.a(this), new Function0<View>() {
{
super(0);
}
@Override
public final View invoke() {
androidx.databinding.p overlayTrackCrouton = HomeActivity.this.q2().S;
kotlin.jvm.internal.o.j(overlayTrackCrouton, "overlayTrackCrouton");
if (overlayTrackCrouton.j()) {
return overlayTrackCrouton.h();
}
ViewStub i = overlayTrackCrouton.i();
if (i != null) {
return i.inflate();
}
return null;
}
});
}
private final void L3() {
int i;
Integer m;
try {
em emVar = em.a;
Application application = getApplication();
kotlin.jvm.internal.o.i(application, "null cannot be cast to non-null type in.swiggy.android.SwiggyApplication");
String string = emVar.c((SwiggyApplication) application).getString("view_compat_loop_count", null);
if (string != null && m != null) {
i = m.intValue();
} else {
i = 0;
}
for (int i2 = 0; i2 < i; i2++) {
androidx.core.view.l0.k();
}
} catch (Exception e) {
in.swiggy.android.commons.utils.x.b("HomeActivity", "viewPagerHackFix: " + e);
}
}
public static final void M2(final HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().S.g();
if (g instanceof in.swiggy.android.overlays.databinding.a) {
in.swiggy.android.overlays.databinding.a aVar = (in.swiggy.android.overlays.databinding.a) g;
aVar.b0(21, new View.OnClickListener() {
@Override
public final void onClick(View view2) {
HomeActivity.N2(HomeActivity.this, view2);
}
});
aVar.D.setSelected(true);
aVar.b0(25, this$0.p2().fb().j());
aVar.W(this$0);
}
}
public static final void N2(HomeActivity this$0, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
this$0.p2().gc();
}
public static final in.swiggy.android.databinding.c0 O1(HomeActivity homeActivity) {
return (in.swiggy.android.databinding.c0) homeActivity.Q0();
}
public static final void O2(HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().G.g();
if (g instanceof k2) {
k2 k2Var = (k2) g;
k2Var.b0(61, this$0.p2().i9().g());
k2Var.b0(16, this$0.q2().E);
k2Var.W(this$0);
}
}
public static final HomeActivityViewModel P1(HomeActivity homeActivity) {
return (HomeActivityViewModel) homeActivity.V0();
}
public static final void P2(HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
in.swiggy.android.crosspollination.feature.bottommediasheet.view.c.b(this$0, this$0.q2().I.g(), this$0.p2(), this$0.o2().get());
}
public static final void Q2(ViewStub viewStub, View view) {
if (view != null) {
BindingAdaptersKt.d(view, false, true, false, true);
}
}
public static final void S2(HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().U.g();
if (g != null) {
g.b0(112, this$0.p2().Oa());
g.W(this$0);
}
}
private final void T1(Intent intent) {
Uri parse;
Set<String> queryParameterNames;
try {
String action = intent.getAction();
String dataString = intent.getDataString();
if (kotlin.jvm.internal.o.f("android.intent.action.VIEW", action) && dataString != null && (queryParameterNames = (parse = Uri.parse(dataString)).getQueryParameterNames()) != null && queryParameterNames.contains(PaymentConstants.CLIENT_ID) && queryParameterNames.contains("seller_id")) {
String swuid = t2().get().getSwuid();
String query = parse.getQuery();
u2().get().getDownloaderGeneratedApiService().hitAppsFlyerPixel("https://t.o-s.io/aclick?device_id=" + swuid + KeySeparator.AMP + query).k0(io.reactivex.schedulers.a.c()).P(io.reactivex.schedulers.a.c()).e0();
}
} catch (Exception e) {
in.swiggy.android.commons.utils.x.i("HomeActivity", e);
}
}
public static final void T2(HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().T.g();
if (g != null) {
g.b0(112, this$0.p2().Oa());
g.W(this$0);
}
}
private final void U1() {
in.swiggy.android.analytics.gtm.g h = s2().get().h("ux4-home-page", "click-in-app-update-restart-app", "1202", 9999);
kotlin.jvm.internal.o.j(h, "getGtmEventData(...)");
s2().get().b(h);
Y1().get().q(new c());
}
public static final void U2(HomeActivity this$0, ViewStub viewStub, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
ViewDataBinding g = this$0.q2().L.g();
if (g instanceof ua) {
ua uaVar = (ua) g;
uaVar.b0(112, this$0.p2());
uaVar.b0(17, this$0.p2().q9());
uaVar.W(this$0);
SwiggyRatingBar swiggyRatingBar = uaVar.C;
this$0.y0 = swiggyRatingBar;
if (swiggyRatingBar != null) {
swiggyRatingBar.setRating(BitmapDescriptorFactory.HUE_RED);
}
}
}
private final void W2() {
BottomBarHandlerV2 bottomBarHandlerV2 = this.Z;
if (bottomBarHandlerV2 != null && bottomBarHandlerV2 != null) {
bottomBarHandlerV2.B();
}
this.Z = new BottomBarHandlerV2(p2().A0(), p2(), this, o2());
Context applicationContext = getApplicationContext();
kotlin.jvm.internal.o.i(applicationContext, "null cannot be cast to non-null type in.swiggy.android.SwiggyApplication");
((SwiggyApplication) applicationContext).c0().o(this.Z);
BottomBarHandlerV2 bottomBarHandlerV22 = this.Z;
if (bottomBarHandlerV22 != null) {
bottomBarHandlerV22.x();
}
}
private final void X2() {
androidx.startup.a.c(this).d(ComposeInitializer.class);
}
private final void Y2(Context context) {
boolean z;
boolean c2 = c2().c("android_newrelic_enabled", true);
boolean z2 = r2().getBoolean("newrelic_geekstats_enabled", false);
in.swiggy.android.analytics.newrelic.b bVar = new in.swiggy.android.analytics.newrelic.b(A2());
in.swiggy.android.repositories.interfaces.d dVar = t2().get();
if (!c2 && !z2) {
z = false;
} else {
z = true;
}
in.swiggy.android.analytics.newrelic.d.a(context, dVar, z, X1().b(), "AAb74f4db44fb501851c54472ffd2384d9765005da", bVar);
}
private final void Z2() {
if (in.swiggy.android.feature.payment.utils.a.a(r2())) {
p2().Hc(x2().get());
}
}
public static final void a3(Activity activity, String str) {
C0.a(activity, str);
}
private final boolean b3(Intent intent) {
Boolean bool;
if (intent.getExtras() != null) {
Bundle extras = intent.getExtras();
Boolean bool2 = null;
if (extras != null) {
bool = Boolean.valueOf(extras.containsKey("landingActivity"));
} else {
bool = null;
}
if (!KotlinExtensionsKt.h(bool)) {
Bundle extras2 = intent.getExtras();
if (extras2 != null) {
bool2 = Boolean.valueOf(extras2.getBoolean("deeplink"));
}
if (KotlinExtensionsKt.h(bool2)) {
}
}
return true;
}
return false;
}
private final void c3() {
in.swiggy.android.analytics.perf.b.a.b(new a.b(SwiggyPerfMonitor.a.h(), AppLaunchContext.NORMAL));
}
private final void d3() {
if (this.c0) {
return;
}
this.c0 = true;
this.p0.k("screen-global", "event-first-interact", new HashMap(), true);
}
private final void g3() {
p2().Y8().k(this, new androidx.lifecycle.z() {
@Override
public final void onChanged(Object obj) {
HomeActivity.i3(HomeActivity.this, ((Boolean) obj).booleanValue());
}
});
}
public static final void i3(HomeActivity this$0, boolean z) {
kotlin.jvm.internal.o.k(this$0, "this$0");
if (z) {
this$0.H3();
} else {
this$0.U1();
}
}
public static final boolean j3(HomeActivity this$0) {
kotlin.jvm.internal.o.k(this$0, "this$0");
return this$0.z0;
}
public static final Boolean k3(HomeActivity this$0) {
kotlin.jvm.internal.o.k(this$0, "this$0");
this$0.Y2(this$0);
this$0.g2().d(this$0.g2().b(this$0));
HomeActivityViewModel p2 = this$0.p2();
PlaceOrderUtility placeOrderUtility = this$0.x2().get();
kotlin.jvm.internal.o.j(placeOrderUtility, "get(...)");
p2.q8(placeOrderUtility);
this$0.p2().m8();
this$0.p2().Vb();
this$0.Z2();
this$0.y2().d();
in.swiggy.android.mvvm.home.i y2 = this$0.y2();
Context applicationContext = this$0.getApplicationContext();
kotlin.jvm.internal.o.j(applicationContext, "getApplicationContext(...)");
y2.a(applicationContext);
this$0.x3();
this$0.F2();
this$0.p2().w8();
return Boolean.TRUE;
}
public static final void l3(View view, float f) {
}
public static final Boolean n3(HomeActivity this$0, Intent intent) {
kotlin.jvm.internal.o.k(this$0, "this$0");
kotlin.jvm.internal.o.k(intent, "$intent");
this$0.T1(intent);
return Boolean.TRUE;
}
public static final Boolean o3(HomeActivity this$0, String str, SeoAttributionModel dpLandingInfo) {
kotlin.jvm.internal.o.k(this$0, "this$0");
kotlin.jvm.internal.o.k(dpLandingInfo, "$dpLandingInfo");
in.swiggy.android.analytics.appsflyer.d.d(this$0, this$0.V1(), this$0.X1(), this$0.Z1());
if (this$0.t2().get().F()) {
Context applicationContext = this$0.getContext().getApplicationContext();
kotlin.jvm.internal.o.i(applicationContext, "null cannot be cast to non-null type in.swiggy.android.SwiggyApplication");
new in.swiggy.android.utils.h0((SwiggyApplication) applicationContext).a(this$0.t2().get().getCustomerId(), this$0.t2().get().F());
}
this$0.H2(str, dpLandingInfo);
return Boolean.TRUE;
}
public static final void p3(HomeActivity this$0, InstallState installState) {
kotlin.jvm.internal.o.k(this$0, "this$0");
kotlin.jvm.internal.o.k(installState, "installState");
this$0.q3(installState);
}
private final q1 r3() {
return kotlinx.coroutines.g.d(androidx.lifecycle.s.a(this), v0.b(), null, new HomeActivity$preFetchSplashScreen$1(this, null), 2, null);
}
private final void s3(SeoAttributionModel seoAttributionModel) {
in.swiggy.android.analytics.interfaces.c cVar = s2().get();
in.swiggy.android.analytics.gtm.g p = cVar.p("app-launch", "landing-event-order-id", seoAttributionModel.e(), seoAttributionModel.i(), seoAttributionModel.h(), seoAttributionModel.f(), seoAttributionModel.g(), seoAttributionModel.d(), 9999);
kotlin.jvm.internal.o.j(p, "getGtmEventData(...)");
cVar.k(p);
}
private final void t3() {
ViewGroup.LayoutParams layoutParams = q2().K.getLayoutParams();
layoutParams.height = in.swiggy.android.utils.f.c(this);
q2().K.setLayoutParams(layoutParams);
}
private final void u3(Intent intent) {
String str;
if (intent != null && kotlin.jvm.internal.o.f("android.intent.action.VIEW", intent.getAction()) && intent.getDataString() != null) {
str = "deeplink";
} else if (intent != null && intent.getExtras() != null && intent.hasExtra("launchSource") && kotlin.jvm.internal.o.f(intent.getStringExtra("launchSource"), "pn")) {
str = "pn-" + intent.getStringExtra("landingActivity");
} else if (intent != null && intent.getExtras() != null && intent.hasExtra("launchSource") && kotlin.jvm.internal.o.f(intent.getStringExtra("launchSource"), "ppn")) {
str = "ppn";
} else {
str = "direct";
}
in.swiggy.android.analytics.gtm.e.A(str);
r2().edit().putString("launch_source", str).apply();
}
private final void v3(Intent intent) {
if (intent.hasExtra("shortcut-click")) {
this.X = true;
this.Y = intent.getStringExtra("shortcut-destination");
}
}
private final void w3(Intent intent) {
if (intent.hasExtra("fromWebCart")) {
f3();
}
}
private final void x3() {
Boolean bool;
boolean z;
String str = "";
String string = r2().getString("userAgent", "");
if (string != null) {
if (string.length() == 0) {
z = true;
} else {
z = false;
}
bool = Boolean.valueOf(z);
} else {
bool = null;
}
if (KotlinExtensionsKt.h(bool)) {
try {
String defaultUserAgent = WebSettings.getDefaultUserAgent(this);
if (defaultUserAgent != null) {
str = defaultUserAgent;
}
r2().edit().putString("userAgent", str).apply();
if (l2().get().c()) {
in.swiggy.klytics.singleton.b.a.k(str);
}
} catch (Exception e) {
in.swiggy.android.commons.utils.x.i("HomeActivity", e);
}
} else if (l2().get().c()) {
in.swiggy.klytics.singleton.b bVar = in.swiggy.klytics.singleton.b.a;
if (string != null) {
str = string;
}
bVar.k(str);
}
}
public static final void z3(HomeActivity this$0, View view) {
kotlin.jvm.internal.o.k(this$0, "this$0");
this$0.U1();
}
@Override
public dagger.android.b<Object> A() {
return W1();
}
public final SharedPreferences A2() {
SharedPreferences sharedPreferences = this.G;
if (sharedPreferences != null) {
return sharedPreferences;
}
kotlin.jvm.internal.o.C("sharedPreferences");
return null;
}
public final void A3(boolean z, boolean z2) {
p2().Pc(z, z2);
S1();
}
@Override
public void B0() {
q2().K.setVisibility(8);
}
public final View B2() {
if (p2().Za().g() && q2().L.j()) {
return q2().L.h();
}
if (p2().fb().r() && q2().S.j()) {
return q2().S.h();
}
if (p2().a9().g() && q2().R.j()) {
return q2().R.h();
}
if (p2().Oa().z().g() && q2().T.j()) {
return q2().T.h();
}
if (p2().Oa().A().g() && q2().U.j()) {
return q2().U.h();
}
if (p2().ib().c0()) {
return q2().Q.C();
}
return null;
}
public final void B3() {
in.swiggy.android.commons.rxjava.g.d(new Callable() {
@Override
public final Object call() {
Object C3;
C3 = HomeActivity.C3(HomeActivity.this);
return C3;
}
}, 500L, TimeUnit.MILLISECONDS, io.reactivex.android.schedulers.a.a());
}
public final void D2() {
p2().xb();
}
public final void D3(final com.google.android.play.core.appupdate.a aVar, Boolean bool) {
p2().oc(kotlin.jvm.internal.o.f(Boolean.TRUE, bool));
p2().Bc(true);
p2().Ac(0);
q2().R.l(new ViewStub.OnInflateListener() {
@Override
public final void onInflate(ViewStub viewStub, View view) {
HomeActivity.F3(HomeActivity.this, aVar, viewStub, view);
}
});
}
public final void E2() {
p2().oc(false);
p2().Ac(8);
}
public final void J3(boolean z) {
g.a.a(o2().get().o5(), z, false, 2, null);
}
@Override
public ISwiggyNetworkExceptionHandler N0() {
return this.B0;
}
@Override
public void R(LocationHalfCardAction locationHalfCardAction) {
kotlin.jvm.internal.o.k(locationHalfCardAction, "locationHalfCardAction");
}
public void R1() {
getOnBackPressedDispatcher().c(this, new b());
}
public final void S1() {
in.swiggy.android.bottombar.interfaces.d dVar;
boolean z;
Fragment Q2 = o2().get().Q2();
if (Q2 instanceof in.swiggy.android.bottombar.interfaces.d) {
dVar = (in.swiggy.android.bottombar.interfaces.d) Q2;
} else {
dVar = null;
}
if (dVar != null) {
z = dVar.Q0();
} else {
z = false;
}
HomeActivityViewModelHelperKt.d(p2(), z);
}
public final in.swiggy.android.analytics.d V1() {
in.swiggy.android.analytics.d dVar = this.s;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C("analyticsFeatureGate");
return null;
}
public final void V2() {
in.swiggy.android.commons.utils.g e = d2().e();
Integer r = e.r();
if (!e.s()) {
Context context = getContext();
kotlin.jvm.internal.o.i(context, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
WindowInsets rootWindowInsets = ((AppCompatActivity) context).getWindow().getDecorView().getRootWindowInsets();
if (rootWindowInsets != null) {
r = Integer.valueOf(i1.C(rootWindowInsets).f(i1.m.g()).b);
}
}
if (r != null && r.intValue() > 0) {
e.x(r);
}
}
public final DispatchingAndroidInjector<Object> W1() {
DispatchingAndroidInjector<Object> dispatchingAndroidInjector = this.A;
if (dispatchingAndroidInjector != null) {
return dispatchingAndroidInjector;
}
kotlin.jvm.internal.o.C("androidInjector");
return null;
}
@Override
public void X0() {
}
public final in.swiggy.android.commons.utils.a X1() {
in.swiggy.android.commons.utils.a aVar = this.t;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("appBuildDetails");
return null;
}
@Override
public void Y() {
q2().K.setVisibility(0);
}
public final dagger.a<p1> Y1() {
dagger.a<p1> aVar = this.r;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("appUpdateManager");
return null;
}
public final AppsFlyerConversionListener Z1() {
AppsFlyerConversionListener appsFlyerConversionListener = this.u;
if (appsFlyerConversionListener != null) {
return appsFlyerConversionListener;
}
kotlin.jvm.internal.o.C("appsFlyerConversionListener");
return null;
}
public final int a2() {
return in.swiggy.android.commons.utils.y.a(q2().E.getHeight(), this);
}
public final dagger.a<in.swiggy.android.apputils.bottombar.d> b2() {
dagger.a<in.swiggy.android.apputils.bottombar.d> aVar = this.E;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("bottomBarHelper");
return null;
}
@Override
public RecyclerView.u c0() {
RecyclerView.u uVar = this.p;
if (uVar != null) {
return uVar;
}
kotlin.jvm.internal.o.C("viewPool");
return null;
}
public final in.swiggy.android.config.c c2() {
in.swiggy.android.config.c cVar = this.x;
if (cVar != null) {
return cVar;
}
kotlin.jvm.internal.o.C(PaymentConstants.Category.CONFIG);
return null;
}
@Override
public String d0() {
return "ux4-home-page";
}
public final in.swiggy.android.commons.utils.contextservice.h d2() {
in.swiggy.android.commons.utils.contextservice.h hVar = this.F;
if (hVar != null) {
return hVar;
}
kotlin.jvm.internal.o.C("contextService");
return null;
}
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
kotlin.jvm.internal.o.k(event, "event");
if (event.getAction() == 1) {
View currentFocus = getCurrentFocus();
if (currentFocus instanceof EditText) {
Rect rect = new Rect();
EditText editText = (EditText) currentFocus;
editText.getGlobalVisibleRect(rect);
if (!rect.contains((int) event.getRawX(), (int) event.getRawY())) {
editText.clearFocus();
Object systemService = getSystemService("input_method");
kotlin.jvm.internal.o.i(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
((InputMethodManager) systemService).hideSoftInputFromWindow(editText.getWindowToken(), 0);
}
}
}
try {
return super.dispatchTouchEvent(event);
} catch (AssertionError e) {
in.swiggy.android.commons.utils.x.c("HomeActivity", "onDispatchTouchEvent", e);
return false;
} catch (Exception e2) {
in.swiggy.android.commons.utils.x.c("HomeActivity", "onDispatchTouchEvent", e2);
return false;
}
}
public final void e3(String title, in.swiggy.android.jankStats.b jankData) {
kotlin.jvm.internal.o.k(title, "title");
kotlin.jvm.internal.o.k(jankData, "jankData");
HomeActivityViewModelHelperKt.p((HomeActivityViewModel) V0(), title, jankData, f2().c());
}
public final in.swiggy.android.listingkit.rv.d f2() {
in.swiggy.android.listingkit.rv.d dVar = this.O;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C("customRecyclerViewPoolHandler");
return null;
}
public void f3() {
o2().get().U3(b2().get().b(), null);
}
public final in.swiggy.android.mvvm.home.b g2() {
in.swiggy.android.mvvm.home.b bVar = this.K;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("deferredDeepLinkHelper");
return null;
}
@Override
public Context getContext() {
return this;
}
public final in.swiggy.android.commons.featureFlags.d h2() {
in.swiggy.android.commons.featureFlags.d dVar = this.Q;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C("featureFlags");
return null;
}
@Override
public boolean handleOnNetworkNotAvailableException() {
return false;
}
@Override
public boolean handleOnSessionExpired() {
return false;
}
public final dagger.a<in.swiggy.android.apputils.f> i2() {
dagger.a<in.swiggy.android.apputils.f> aVar = this.D;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("flowUtil");
return null;
}
public final in.swiggy.android.singleton.a j2() {
in.swiggy.android.singleton.a aVar = this.z;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("homeActivityHashCodeHolder");
return null;
}
public final JankStatsAggregator k2() {
JankStatsAggregator jankStatsAggregator = this.N;
if (jankStatsAggregator != null) {
return jankStatsAggregator;
}
kotlin.jvm.internal.o.C("jankStatsAggregator");
return null;
}
public final dagger.a<KlyticsEventSender> l2() {
dagger.a<KlyticsEventSender> aVar = this.v;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("klyticsEventSender");
return null;
}
public final in.swiggy.android.mxn.launch.a m2() {
in.swiggy.android.mxn.launch.a aVar = this.B;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("launchIntentHandler");
return null;
}
public final void m3(in.swiggy.koordinates.core.f fVar) {
in.swiggy.koordinates.core.f fVar2;
if (!DeepLinkActivity.C.a() && fVar != null) {
p2().tb(fVar);
HomeActivityViewModel p2 = p2();
in.swiggy.koordinates.compass.core.dataModels.a value = n2().get().i().getValue();
if (value == null || (fVar2 = value.b()) == null) {
fVar2 = new in.swiggy.koordinates.core.f(0.0d, 0.0d);
}
p2.qb(fVar, fVar2);
}
}
@Override
public in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.permissions.a n() {
return this.j;
}
@Override
public Transition n1() {
return Transition.DEFAULT;
}
public final dagger.a<in.swiggy.koordinates.compass.core.b> n2() {
dagger.a<in.swiggy.koordinates.compass.core.b> aVar = this.q;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("locationContext");
return null;
}
public final dagger.a<in.swiggy.android.mndutils.interfaces.h> o2() {
dagger.a<in.swiggy.android.mndutils.interfaces.h> aVar = this.V;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("mHomeActivityService");
return null;
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 145 && i2 == 0) {
finish();
}
if (i == 1001) {
if (i2 != -1) {
if (i2 == 1) {
in.swiggy.android.commons.utils.x.i("HomeActivity", new Exception("APP_UPDATE_FAILED"));
}
p2().Zb();
}
E2();
} else if (i == 1002) {
if (i2 == -1) {
in.swiggy.android.analytics.gtm.g h = s2().get().h("ux4-home-page", "click-in-app-update-cta-deeplink", "1202", 9999);
kotlin.jvm.internal.o.j(h, "getGtmEventData(...)");
s2().get().b(h);
return;
}
in.swiggy.android.commons.utils.x.i("HomeActivity", new Exception("APP_UPDATE_FAILED"));
} else if (i == 149) {
in.swiggy.android.apputils.j jVar = in.swiggy.android.apputils.j.a;
in.swiggy.koordinates.compass.core.b bVar = n2().get();
kotlin.jvm.internal.o.j(bVar, "get(...)");
jVar.a(intent, bVar);
} else if (o2().get().Q2() instanceof DinersOneFragment) {
Fragment Q2 = o2().get().Q2();
kotlin.jvm.internal.o.i(Q2, "null cannot be cast to non-null type in.swiggy.android.reactnative.dinersone.DinersOneFragment");
((DinersOneFragment) Q2).onActivityResult(i, i2, intent);
}
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
V2();
}
@Override
@SuppressLint({"MissingSuperCall"})
public void onBackPressed() {
getOnBackPressedDispatcher().f();
}
@Override
protected void onCreate(Bundle bundle) {
Intent intent;
c3();
int i = Build.VERSION.SDK_INT;
if (i >= 31) {
androidx.core.splashscreen.c.b.a(this).c(new c.d() {
@Override
public final boolean a() {
boolean j3;
j3 = HomeActivity.j3(HomeActivity.this);
return j3;
}
});
}
this.p0.k("screen-global", "event-first-load", new HashMap(), true);
this.p0.s("HomeActivity", "fn-onCreate", new HashMap(), true);
E0 = System.currentTimeMillis();
setTheme(R.style.NavDrawerAppTheme);
if (i < 31) {
r3();
}
getIntent().putExtras(in.swiggy.android.commonsui.feature.irctc.a.a.e(getIntent().getData(), getTaskId()));
in.swiggy.android.analytics.newrelic.d.g(d0());
L3();
super.onCreate(bundle);
HomeActivityHelperKt.c(this);
HomeActivityHelperKt.d(this);
j2().a(hashCode());
Bundle extras = getIntent().getExtras();
if (extras != null) {
m2().a(extras);
}
new HomeActivityNavigator(o2(), p2(), androidx.lifecycle.s.a(this)).e(this);
in.swiggy.android.trackkit.pip.a.b(this);
L2();
if (s1()) {
intent = new Intent();
} else {
intent = getIntent();
}
p2().Q8();
intent.putExtra("from_external_deeplink", true);
kotlin.jvm.internal.o.h(intent);
onNewIntent(intent);
p2().wb(intent.getExtras());
in.swiggy.android.commons.rxjava.g.b(new Callable() {
@Override
public final Object call() {
Boolean k3;
k3 = HomeActivity.k3(HomeActivity.this);
return k3;
}
});
t3();
q2().M.setOffscreenPageLimit(5);
q2().M.setPageTransformer(new ViewPager2.k() {
@Override
public final void a(View view, float f) {
HomeActivity.l3(view, f);
}
});
in.swiggy.android.commonsui.glide.preload.monitor.c.a.c(new in.swiggy.android.utils.o0());
g3();
in.swiggy.android.utils.k0.a.a(getWindow());
getLifecycle().a(v2());
R1();
C2(intent);
SwiggyPerfMonitor.f(this.p0, "HomeActivity", "fn-onCreate", null, 4, null);
}
@Override
protected void onDestroy() {
Boolean bool;
io.reactivex.disposables.b bVar;
k2().n();
super.onDestroy();
io.reactivex.disposables.b bVar2 = this.S;
if (bVar2 != null) {
if (bVar2 != null) {
bool = Boolean.valueOf(bVar2.isDisposed());
} else {
bool = null;
}
if (KotlinExtensionsKt.e(bool) && (bVar = this.S) != null) {
bVar.dispose();
}
}
r2().edit().putBoolean("android_track_show_more_button_shown_in_this_session", false).apply();
g2().f();
p2().Y8().q(this);
o2().get().m0();
f2().a();
}
@Override
public void onNewIntent(final Intent intent) {
boolean z;
kotlin.jvm.internal.o.k(intent, "intent");
super.onNewIntent(intent);
in.swiggy.android.commons.rxjava.g.b(new Callable() {
@Override
public final Object call() {
Boolean n3;
n3 = HomeActivity.n3(HomeActivity.this, intent);
return n3;
}
});
p2().pb();
W2();
boolean b3 = b3(intent);
if (intent.hasExtra("launchSource") && kotlin.jvm.internal.o.f(intent.getStringExtra("launchSource"), "pn")) {
z = true;
} else {
z = false;
}
intent.putExtra("launchedFromPN", z);
final String b2 = HomeActivityHelperKt.b(this, intent.getExtras(), b3);
final SeoAttributionModel a2 = HomeActivityHelperKt.a(this);
if (b3) {
if (!intent.hasExtra("launchSource")) {
intent.putExtra("launchSource", "pn");
}
o2().get().G1();
if (intent.getBooleanExtra("from_external_deeplink", false)) {
o2().get().P1(true);
}
p2().Dc(true);
} else {
p2().Dc(false);
}
if (intent.getBooleanExtra("deeplink_activity_processors_failed", false)) {
p2().zc(true);
w2().get().l();
A3(true, true);
o2().get().p2();
}
setIntent(intent);
u3(intent);
v3(intent);
w3(intent);
o2().get().onNewIntent(intent);
p2().Db(intent);
intent.removeExtra("from_external_deeplink");
in.swiggy.android.commons.rxjava.g.b(new Callable() {
@Override
public final Object call() {
Boolean o3;
o3 = HomeActivity.o3(HomeActivity.this, b2, a2);
return o3;
}
});
}
@Override
protected void onResume() {
super.onResume();
if (this.A0) {
X2();
this.A0 = false;
}
SwiggyRatingBar swiggyRatingBar = this.y0;
if (swiggyRatingBar != null && swiggyRatingBar != null) {
swiggyRatingBar.setRating(BitmapDescriptorFactory.HUE_RED);
}
in.swiggy.android.commons.rxjava.h.b(new in.swiggy.android.track.models.a());
i2().get().i();
if (r2().getBoolean("refresh_home_after_super_payment", false)) {
r2().edit().remove("refresh_home_after_super_payment").apply();
m3(n2().get().getLocation().getValue().a());
f3();
}
if (r2().getBoolean("home_screen_force_refresh_flag", false)) {
r2().edit().remove("home_screen_force_refresh_flag").apply();
m3(n2().get().getLocation().getValue().a());
}
Window window = getWindow();
if (window != null) {
window.setStatusBarColor(0);
}
}
@Override
@SuppressLint({"MissingSuperCall"})
protected void onSaveInstanceState(Bundle outState) {
kotlin.jvm.internal.o.k(outState, "outState");
if (!p2().X8().n()) {
Lifecycle lifecycle = getLifecycle();
kotlin.jvm.internal.o.j(lifecycle, "<get-lifecycle>(...)");
if (lifecycle instanceof androidx.lifecycle.t) {
((androidx.lifecycle.t) lifecycle).o(Lifecycle.State.CREATED);
return;
}
return;
}
super.onSaveInstanceState(outState);
}
@Override
protected void onStart() {
super.onStart();
if (p2().C8()) {
this.T = Y1().get().u().subscribeOn(io.reactivex.schedulers.a.c()).observeOn(io.reactivex.android.schedulers.a.a()).subscribe(new io.reactivex.functions.d() {
@Override
public final void accept(Object obj) {
HomeActivity.p3(HomeActivity.this, (InstallState) obj);
}
});
}
p2().N8(Settings.canDrawOverlays(getContext()));
}
@Override
protected void onStop() {
Boolean bool;
io.reactivex.disposables.b bVar;
io.reactivex.disposables.b bVar2 = this.T;
if (bVar2 != null) {
if (bVar2 != null) {
bool = Boolean.valueOf(bVar2.isDisposed());
} else {
bool = null;
}
if (KotlinExtensionsKt.e(bool) && (bVar = this.T) != null) {
bVar.dispose();
}
}
super.onStop();
}
@Override
public void onUserInteraction() {
d3();
super.onUserInteraction();
}
@Override
public in.swiggy.android.listingkit.rv.d p() {
if (kotlin.jvm.internal.o.f(this.P, "test_user")) {
return f2();
}
return null;
}
public final HomeActivityViewModel p2() {
return (HomeActivityViewModel) this.R.getValue();
}
public final in.swiggy.android.databinding.c0 q2() {
return (in.swiggy.android.databinding.c0) this.U.getValue();
}
public final void q3(InstallState installState) {
kotlin.jvm.internal.o.k(installState, "installState");
int d = installState.d();
if (d != 2 && d != 4) {
if (d == 11) {
y3();
return;
}
return;
}
E2();
}
public final SharedPreferences r2() {
SharedPreferences sharedPreferences = this.o;
if (sharedPreferences != null) {
return sharedPreferences;
}
kotlin.jvm.internal.o.C("mSharedPreferences");
return null;
}
@Override
public void refresh() {
o2().get().I1();
}
@Override
public void s(String deeplink) {
kotlin.jvm.internal.o.k(deeplink, "deeplink");
BottomBarHandlerV2 bottomBarHandlerV2 = this.Z;
if (bottomBarHandlerV2 != null) {
bottomBarHandlerV2.D(deeplink);
}
}
public final dagger.a<in.swiggy.android.analytics.interfaces.c> s2() {
dagger.a<in.swiggy.android.analytics.interfaces.c> aVar = this.l;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("mSwiggyEventHandler");
return null;
}
public final dagger.a<in.swiggy.android.repositories.interfaces.d> t2() {
dagger.a<in.swiggy.android.repositories.interfaces.d> aVar = this.m;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("mUser");
return null;
}
@Override
public void u0() {
}
public final dagger.a<in.swiggy.android.networkutils.n> u2() {
dagger.a<in.swiggy.android.networkutils.n> aVar = this.M;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("networkWrapper");
return null;
}
public final OverlayUseCase v2() {
OverlayUseCase overlayUseCase = this.C;
if (overlayUseCase != null) {
return overlayUseCase;
}
kotlin.jvm.internal.o.C("overlayUseCase");
return null;
}
@Override
public void w0() {
}
public final dagger.a<in.swiggy.android.discovery.pageskeleton.datamanager.b> w2() {
dagger.a<in.swiggy.android.discovery.pageskeleton.datamanager.b> aVar = this.y;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("pageSkeletonDataManager");
return null;
}
public final dagger.a<PlaceOrderUtility> x2() {
dagger.a<PlaceOrderUtility> aVar = this.w;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("placeOrderUtility");
return null;
}
public final in.swiggy.android.mvvm.home.i y2() {
in.swiggy.android.mvvm.home.i iVar = this.L;
if (iVar != null) {
return iVar;
}
kotlin.jvm.internal.o.C("rootTrackerHelper");
return null;
}
public final void y3() {
in.swiggy.android.analytics.gtm.g h = s2().get().h("ux4-home-page", "impression-in-app-restart-app", "1202", 9999);
kotlin.jvm.internal.o.j(h, "getGtmEventData(...)");
s2().get().j(h);
p2().oc(true);
p2().Bc(false);
p2().Ac(0);
ViewDataBinding g = q2().R.g();
if (g instanceof y3) {
y3 y3Var = (y3) g;
y3Var.W(this);
y3Var.b0(112, p2());
y3Var.b0(17, p2().q9());
NormalButton btnUpdateV2 = y3Var.C;
kotlin.jvm.internal.o.j(btnUpdateV2, "btnUpdateV2");
btnUpdateV2.setText(R.string.restart_btn_text);
btnUpdateV2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
HomeActivity.z3(HomeActivity.this, view);
}
});
DlsTextView updateSubtitleV2 = y3Var.F;
kotlin.jvm.internal.o.j(updateSubtitleV2, "updateSubtitleV2");
DlsTextView updateTitleV2 = y3Var.G;
kotlin.jvm.internal.o.j(updateTitleV2, "updateTitleV2");
SwiggyImageView updateIconV2 = y3Var.E;
kotlin.jvm.internal.o.j(updateIconV2, "updateIconV2");
updateIconV2.setImageResource(R.drawable.ic_app_restart_v2);
updateTitleV2.setText(R.string.restart_title);
updateSubtitleV2.setText("Version 4.51.1(" + p2().I9() + ")");
}
}
@Override
public void z(boolean z) {
p2().A9().h(!z);
p2().x4();
}
@Override
public void z0() {
if (HomeActivityViewModelHelperKt.s(p2())) {
this.z0 = p2().Ra().h7().f() instanceof PreLaunchApiState.Loading;
return;
}
if (this.z0) {
this.z0 = false;
}
p2().cb().r6().h(false);
}
public final String z2(SharedPreferences sharedPreferences) {
kotlin.jvm.internal.o.k(sharedPreferences, "sharedPreferences");
String d = in.swiggy.android.jankStats.e.d(sharedPreferences, "enable_food_rv_improvement", "true", "enable_food_force_rv_improvement", TejasConstants.ENABLE_V4_PROFILE_API_DEFAULT);
this.P = d;
return d;
}
}