正在查看: Hopscotch v9.7.2 应用的 SplashActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 SplashActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.hopscotch.android.activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.Button;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.IntentSenderRequest;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelKt;
import androidx.lifecycle.ViewModelProvider;
import com.android.installreferrer.api.InstallReferrerClient;
import com.facebook.applinks.AppLinkData;
import com.microsoft.clarity.Clarity;
import com.microsoft.clarity.ClarityConfig;
import com.microsoft.clarity.models.LogLevel;
import com.payu.upisdk.util.UpiConstant;
import in.hopscotch.android.api.ApiParam;
import in.hopscotch.android.api.factory.ResourcesApiFactory;
import in.hopscotch.android.api.model.VideoAspectRatio;
import in.hopscotch.android.api.response.AppConfigResponse;
import in.hopscotch.android.api.response.FeatureFlags;
import in.hopscotch.android.api.response.LoginResponse;
import in.hopscotch.android.api.response.RemoteConfigFlags;
import in.hopscotch.android.application.HsApplication;
import in.hopscotch.android.attribution.AttributionData;
import in.hopscotch.android.attribution.OrderAttributionHelper;
import in.hopscotch.android.common.helper.a;
import in.hopscotch.android.common.helper.b;
import in.hopscotch.android.common.util.c;
import in.hopscotch.android.common.util.u;
import in.hopscotch.android.components.textview.CustomTextView;
import in.hopscotch.android.model.FirstCartLoad;
import in.hopscotch.android.model.UserStatus;
import in.hopscotch.android.notificationnudge.model.NotificationNudge;
import in.hopscotch.android.service.applaunch.AttributionDataLogService;
import in.hopscotch.android.service.applaunch.DepartmentDataService;
import in.hopscotch.android.service.applaunch.FeatureCardIntentService;
import in.hopscotch.android.service.applaunch.FirstLaunchDataLogService;
import in.hopscotch.android.service.applaunch.SearchDataIntentService;
import in.hopscotch.android.service.applaunch.UserAddressesService;
import in.hopscotch.android.ui.exchange.ExchangeItemReasonFragment;
import in.hopscotch.android.ui.exchange.ExchangeItemsListingFragment;
import in.hopscotch.android.ui.webapp.WebAppAssetService;
import in.hopscotch.android.util.f0;
import in.hopscotch.android.viewmodel.c0;
import in.juspay.hyperinteg.HyperServiceHolder;
import java.util.HashMap;
import java.util.List;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineStart;
public class SplashActivity extends in.hopscotch.android.activity.base.a implements f0.b {
private static final int DEFERRED_DEEP_LINK_HANDLERS = 1;
private static final String SCREEN = "ORDER_CONFIRMATION";
public static final int p = 0;
private AppConfigResponse appConfigResponse;
private in.hopscotch.android.appupdate.b appUpdateHelper;
private String deepLinkFromAppsFlyer;
private String deepLinkFromFB;
private boolean isFromCRM;
private boolean isFromCleverTap;
private String linkForChannelAttribution;
private AttributionData localAttributionData;
private String mAppLinkData;
private in.hopscotch.android.viewmodel.c0 viewModel;
private boolean isFromNotification = false;
private String intentAction = null;
private boolean fromLink = false;
private boolean fromFbDeepLink = false;
private boolean fromAppsFlyerDeepLink = false;
private boolean isFirstInstall = false;
private int deferredDeeplinkCounter = 0;
private final androidx.activity.result.b<IntentSenderRequest> appUpdateLauncher = registerForActivityResult(new androidx.activity.result.contract.f(), new com.facebook.login.d(this, 4));
public static void b1(SplashActivity splashActivity, Dialog dialog) {
splashActivity.getClass();
dialog.dismiss();
in.hopscotch.android.appupdate.b bVar = splashActivity.appUpdateHelper;
androidx.activity.result.b<IntentSenderRequest> bVar2 = splashActivity.appUpdateLauncher;
com.google.android.play.core.appupdate.y yVar = new com.google.android.play.core.appupdate.y();
yVar.c(1);
yVar.b();
bVar.j(bVar2, yVar.a());
}
public static void c1(SplashActivity splashActivity, AppLinkData appLinkData) {
if (appLinkData != null) {
splashActivity.getClass();
Uri targetUri = appLinkData.getTargetUri();
if (targetUri != null) {
String uri = targetUri.toString();
splashActivity.deepLinkFromFB = uri;
in.hopscotch.android.deeplinking.b.a.getClass();
in.hopscotch.android.deeplinking.b.b(uri, true);
}
}
splashActivity.deferredDeeplinkCounter++;
splashActivity.j1();
}
public static void d1(SplashActivity splashActivity, AppLinkData appLinkData) {
if (appLinkData != null) {
splashActivity.getClass();
if (appLinkData.getTargetUri() != null) {
String uri = appLinkData.getTargetUri().toString();
splashActivity.deepLinkFromFB = uri;
in.hopscotch.android.deeplinking.b.a.getClass();
in.hopscotch.android.deeplinking.b.b(uri, true);
}
}
if (TextUtils.isEmpty(splashActivity.deepLinkFromFB)) {
splashActivity.p1();
} else {
splashActivity.m1(splashActivity.deepLinkFromFB);
splashActivity.linkForChannelAttribution = splashActivity.deepLinkFromFB;
}
splashActivity.finish();
}
public static void e1(SplashActivity splashActivity, Boolean bool) {
AppConfigResponse appConfigResponse;
splashActivity.getClass();
if (bool.booleanValue() && (appConfigResponse = splashActivity.appConfigResponse) != null && appConfigResponse.isHardUpdate()) {
splashActivity.l1(splashActivity.appConfigResponse);
return;
}
in.hopscotch.android.util.u0.m().k();
if (!TextUtils.isEmpty(in.hopscotch.android.db.a.x().getString(ApiParam.Search.UTM_GENDER, null))) {
in.hopscotch.android.util.u0.m().C(in.hopscotch.android.db.a.x().getString(ApiParam.Search.UTM_GENDER, null));
}
ResourcesApiFactory.getInstance().appLaunched(new g6(splashActivity));
}
public static void f1(final SplashActivity splashActivity, AppConfigResponse appConfigResponse, LoginResponse loginResponse) {
in.hopscotch.android.common.helper.a aVar;
if (appConfigResponse != null) {
splashActivity.appConfigResponse = appConfigResponse;
if (appConfigResponse.getInstantCheckoutVariant() != null) {
in.hopscotch.android.db.a.k().putString("instantCheckoutVariant", appConfigResponse.getInstantCheckoutVariant());
in.hopscotch.android.db.a.k().apply();
in.hopscotch.android.common.util.j.n0(appConfigResponse.isSortBarEnabled());
in.hopscotch.android.common.util.j.j0(appConfigResponse.isRecentlySortVisible());
in.hopscotch.android.core.providers.a.c(appConfigResponse.isUPIRefundsEnabled());
FeatureFlags featureFlags = appConfigResponse.getFeatureFlags();
RemoteConfigFlags remoteConfigFlags = appConfigResponse.getRemoteConfigFlags();
List<VideoAspectRatio> videoTransformations = appConfigResponse.getVideoTransformations();
String firstContact = appConfigResponse.getFirstContact();
if (featureFlags != null) {
in.hopscotch.android.common.util.j.Z(featureFlags.getOrderConfirmation());
in.hopscotch.android.common.util.j.S(featureFlags.getCart());
in.hopscotch.android.common.util.j.a0(featureFlags.getProfile());
in.hopscotch.android.common.util.j.X(featureFlags.getLogin());
in.hopscotch.android.common.util.j.d0(featureFlags.getVerifyReturn());
in.hopscotch.android.common.util.j.Y(featureFlags.getNewPdp());
in.hopscotch.android.common.util.j.R(featureFlags.getClarity());
in.hopscotch.android.common.util.j.c0(featureFlags.getUnifiedPlp());
}
if (remoteConfigFlags != null) {
in.hopscotch.android.common.util.j.W(remoteConfigFlags.getFeatureInAppUpdateEnabled());
in.hopscotch.android.common.util.j.b0(remoteConfigFlags.isRatingAfterShoppingExperienceEnabled());
in.hopscotch.android.common.util.j.V(remoteConfigFlags.isHomepageAnalyticsEnabled());
in.hopscotch.android.common.util.j.K(remoteConfigFlags.getCardTokenisationLearnMoreLink());
in.hopscotch.android.common.util.j.U(remoteConfigFlags.isGokwikEnabled());
in.hopscotch.android.common.util.j.T(remoteConfigFlags.getFeatureEnableDeleteAccountAndroid());
}
if (videoTransformations != null) {
in.hopscotch.android.common.util.j.q0(new com.google.gson.k().h(videoTransformations));
}
if (appConfigResponse.getNotificationNudges() != null) {
in.hopscotch.android.notificationnudge.a.b(appConfigResponse.getNotificationNudges());
NotificationNudge a = in.hopscotch.android.notificationnudge.a.a(SCREEN);
if (a != null) {
com.google.android.gms.ads.internal.client.z0.n("notificationText", a.getDescription());
}
}
if (!TextUtils.isEmpty(firstContact)) {
in.hopscotch.android.db.a.k().putString("CUSTOMER_CARE_CONTACT", firstContact).apply();
}
Context applicationContext = splashActivity.getApplicationContext();
String clarityProjectId = HsApplication.b().b.getClarityProjectId(false);
in.hopscotch.android.common.helper.a.a.getClass();
Intrinsics.checkNotNullParameter(applicationContext, "content");
Intrinsics.checkNotNullParameter(clarityProjectId, "projectId");
c.a.a.getClass();
if (in.hopscotch.android.common.util.j.h()) {
a.b.a.getClass();
aVar = a.b.a();
} else {
aVar = null;
}
if (aVar != null) {
ClarityConfig clarityConfig = new ClarityConfig(clarityProjectId);
clarityConfig.setLogLevel(LogLevel.None);
Clarity.initialize(applicationContext, clarityConfig);
}
}
}
if (loginResponse != null) {
splashActivity.getClass();
in.hopscotch.android.util.w0.a(splashActivity, loginResponse);
}
final int i = 0;
splashActivity.appUpdateHelper.l().observe(splashActivity, new Observer() {
public final void onChanged(Object obj) {
switch (i) {
case 0:
SplashActivity.e1((SplashActivity) splashActivity, (Boolean) obj);
break;
case 1:
ExchangeItemReasonFragment.E0((ExchangeItemReasonFragment) splashActivity, (in.hopscotch.android.presentation.state.a) obj);
break;
default:
ExchangeItemsListingFragment.D0((ExchangeItemsListingFragment) splashActivity, (in.hopscotch.android.presentation.state.a) obj);
break;
}
}
});
splashActivity.appUpdateHelper.h();
}
public static void g1(final SplashActivity splashActivity) {
in.hopscotch.android.viewmodel.c0 c0Var = splashActivity.viewModel;
c0.a aVar = new c0.a() {
public final void a(AppConfigResponse appConfigResponse, LoginResponse loginResponse) {
SplashActivity.f1(SplashActivity.this, appConfigResponse, loginResponse);
}
};
c0Var.getClass();
Intrinsics.checkNotNullParameter(aVar, "listener");
BuildersKt.launch$default(ViewModelKt.getViewModelScope(c0Var), (CoroutineContext) null, (CoroutineStart) null, new in.hopscotch.android.viewmodel.d0(aVar, (kotlin.coroutines.d) null), 3, (Object) null);
}
public static void h1(SplashActivity splashActivity, ActivityResult activityResult) {
if (splashActivity.appConfigResponse == null) {
splashActivity.appConfigResponse = new AppConfigResponse(true, splashActivity.getString(2132018044), splashActivity.getString(2132018043), "baseline", false, false, false, null, null, null, null, null);
}
if (activityResult.c() == 0) {
splashActivity.l1(splashActivity.appConfigResponse);
HashMap hashMap = new HashMap();
hashMap.put("from_screen", splashActivity.getResources().getString(2132019203));
in.hopscotch.android.analytics.c.m().getClass();
in.hopscotch.android.analytics.c.I("in_app_update_user_cancel", hashMap, false, true);
return;
}
if (activityResult.c() == 1) {
splashActivity.l1(splashActivity.appConfigResponse);
HashMap hashMap2 = new HashMap();
hashMap2.put("from_screen", splashActivity.getResources().getString(2132019203));
in.hopscotch.android.analytics.c.m().getClass();
in.hopscotch.android.analytics.c.I("in_app_update_installed_failed", hashMap2, false, true);
}
}
public static void i1(final SplashActivity splashActivity) {
splashActivity.getClass();
in.hopscotch.android.util.u0.m().y();
boolean z = splashActivity.isFirstInstall;
if (!z) {
boolean z2 = splashActivity.isFromNotification;
if (z2 || !splashActivity.fromLink) {
if (z2) {
if (!TextUtils.isEmpty(splashActivity.intentAction)) {
in.hopscotch.android.deeplinking.b bVar = in.hopscotch.android.deeplinking.b.a;
String str = splashActivity.intentAction;
bVar.getClass();
in.hopscotch.android.deeplinking.b.b(str, true);
}
splashActivity.o1(splashActivity.isFirstInstall);
} else if (UserStatus.getInstance().getLoginStatus()) {
splashActivity.startActivity(in.hopscotch.android.application.a0.a(splashActivity));
} else {
splashActivity.p1();
}
splashActivity.finish();
} else {
splashActivity.deepLinkFromFB = null;
if (splashActivity.fromFbDeepLink) {
AppLinkData.fetchDeferredAppLinkData(splashActivity, new androidx.media3.exoplayer.h0(splashActivity, 13));
Uri data = splashActivity.getIntent().getData();
if (data != null) {
splashActivity.deepLinkFromFB = data.toString().replaceAll("&target_url.*", "");
}
} else if (splashActivity.fromAppsFlyerDeepLink) {
splashActivity.linkForChannelAttribution = splashActivity.deepLinkFromAppsFlyer;
Function1 function1 = new Function1() {
public final Object invoke(Object obj) {
int i = SplashActivity.p;
SplashActivity splashActivity2 = SplashActivity.this;
splashActivity2.getClass();
if (((Boolean) obj).booleanValue()) {
splashActivity2.p1();
}
splashActivity2.finish();
return null;
}
};
int i = in.hopscotch.android.analytics.f.a;
Intrinsics.checkNotNullParameter(splashActivity, "context");
Intrinsics.checkNotNullParameter(splashActivity, "lifecycleOwner");
BuildersKt.launch$default(LifecycleOwnerKt.getLifecycleScope(splashActivity), (CoroutineContext) null, (CoroutineStart) null, new in.hopscotch.android.analytics.e(function1, splashActivity, null), 3, (Object) null);
} else {
try {
Uri data2 = splashActivity.getIntent().getData();
if (data2 != null) {
Intent intent = splashActivity.getIntent();
if (intent == null || intent.getData() == null || !intent.getData().toString().toLowerCase().contains("hopscotch.in")) {
splashActivity.m1(data2.toString());
} else {
String uri = data2.toString();
splashActivity.mAppLinkData = uri;
if (!TextUtils.isEmpty(uri)) {
in.hopscotch.android.deeplinking.b bVar2 = in.hopscotch.android.deeplinking.b.a;
String str2 = splashActivity.mAppLinkData;
bVar2.getClass();
in.hopscotch.android.deeplinking.b.b(str2, true);
in.hopscotch.android.util.f.d(splashActivity, splashActivity.mAppLinkData, (String) null, false);
splashActivity.linkForChannelAttribution = splashActivity.mAppLinkData;
}
}
} else {
splashActivity.p1();
}
splashActivity.finish();
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
}
}
} else if (splashActivity.fromFbDeepLink) {
AppLinkData.fetchDeferredAppLinkData(splashActivity, new androidx.media3.exoplayer.u(splashActivity, 15));
} else if (splashActivity.fromLink) {
if (splashActivity.getIntent() != null && splashActivity.getIntent().getData() != null) {
in.hopscotch.android.deeplinking.b bVar3 = in.hopscotch.android.deeplinking.b.a;
String uri2 = splashActivity.getIntent().getData().toString();
bVar3.getClass();
in.hopscotch.android.deeplinking.b.b(uri2, true);
}
splashActivity.deferredDeeplinkCounter++;
splashActivity.j1();
} else {
if (splashActivity.isFromNotification) {
splashActivity.o1(z);
} else if (z) {
splashActivity.p1();
} else {
splashActivity.startActivity(in.hopscotch.android.application.a0.a(splashActivity));
}
splashActivity.finish();
}
OrderAttributionHelper.getInstance().setCurrentOrderAttributionData(splashActivity.localAttributionData);
}
@Override
public final void B0() {
}
@Override
public final void b0() {
}
@Override
public final void finish() {
synchronized (this) {
n1();
try {
androidx.core.app.j.a(this, SearchDataIntentService.class, 9000, new Intent());
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
k1();
if (!this.isFirstInstall) {
try {
androidx.core.app.j.a(this, FeatureCardIntentService.class, 4000, new Intent());
} catch (Exception e2) {
in.hopscotch.android.util.g.b(e2);
}
}
try {
androidx.core.app.j.a(this, UserAddressesService.class, 6000, new Intent());
} catch (Exception e3) {
in.hopscotch.android.util.g.b(e3);
}
try {
androidx.core.app.j.a(this, DepartmentDataService.class, 6001, new Intent());
} catch (Exception e4) {
in.hopscotch.android.util.g.b(e4);
}
}
if (this.isFromNotification) {
in.hopscotch.android.util.e0.b().j("Push");
}
if (this.fromAppsFlyerDeepLink && !TextUtils.isEmpty(this.deepLinkFromAppsFlyer)) {
in.hopscotch.android.util.e0.b().j("AppsFlyer");
}
if (this.fromFbDeepLink && !TextUtils.isEmpty(this.deepLinkFromFB)) {
in.hopscotch.android.util.e0.b().j("Facebook");
}
super.finish();
}
public final synchronized void j1() {
try {
try {
int i = this.deferredDeeplinkCounter;
if (i == 1) {
this.deferredDeeplinkCounter = i + 1;
if (!TextUtils.isEmpty(this.deepLinkFromFB)) {
in.hopscotch.android.deeplinking.b bVar = in.hopscotch.android.deeplinking.b.a;
String str = this.deepLinkFromFB;
bVar.getClass();
in.hopscotch.android.deeplinking.b.b(str, true);
this.linkForChannelAttribution = this.deepLinkFromFB;
p1();
} else if (!TextUtils.isEmpty(this.mAppLinkData)) {
in.hopscotch.android.db.a.I(this.mAppLinkData, true);
this.linkForChannelAttribution = this.mAppLinkData;
p1();
} else if (this.isFromNotification) {
o1(this.isFirstInstall);
} else if (this.isFirstInstall) {
p1();
} else {
startActivity(in.hopscotch.android.application.a0.a(this));
}
finish();
}
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
} catch (Throwable th) {
throw th;
}
}
public final void k1() {
in.hopscotch.android.deeplinking.a a;
String str = "";
if (TextUtils.isEmpty(this.linkForChannelAttribution)) {
this.linkForChannelAttribution = "";
}
boolean startsWith = this.linkForChannelAttribution.startsWith("http");
if (startsWith) {
String str2 = this.linkForChannelAttribution;
a = new in.hopscotch.android.deeplinking.a();
try {
String[] split = str2.split("\\?");
if (split.length >= 2) {
int i = 0;
for (String str3 : split[1].split("&")) {
if (str3.contains(ApiParam.Search.UTM_SOURCE)) {
a.c = str3.split("=")[1];
i++;
}
if (str3.contains(ApiParam.Search.UTM_CAMPAIGN)) {
a.b = str3.split("=")[1];
i++;
}
if (str3.contains(ApiParam.Search.UTM_MEDIUM)) {
a.d = str3.split("=")[1];
i++;
}
if (str3.contains(ApiParam.Search.UTM_TERM)) {
a.i = str3.split("=")[1];
i++;
}
if (str3.contains("keyWord=")) {
str = str3.split("=")[1];
}
}
Uri g = androidx.core.app.b.g(this);
if (i == 0) {
a.d = "applink";
if (g != null) {
if (!TextUtils.isEmpty(g.getScheme()) && g.getScheme().equalsIgnoreCase("android-app") && !TextUtils.isEmpty(g.getHost())) {
a.c = in.hopscotch.android.util.a1.r(this, g.getHost());
} else if (!TextUtils.isEmpty(g.getHost())) {
a.c = g.getHost();
a.d = "search";
if (!TextUtils.isEmpty(str)) {
a.b = str.toLowerCase();
in.hopscotch.android.util.u0.m().z(a.b);
}
}
}
in.hopscotch.android.util.u0.m().k();
in.hopscotch.android.util.u0.m().H(a.c);
in.hopscotch.android.util.u0.m().D(a.d);
} else if (!TextUtils.isEmpty(a.d) && a.d.equalsIgnoreCase("sharing") && TextUtils.isEmpty(a.c) && g != null && !TextUtils.isEmpty(g.getScheme()) && g.getScheme().equalsIgnoreCase("android-app") && !TextUtils.isEmpty(g.getHost())) {
a.c = in.hopscotch.android.util.a1.r(this, g.getHost());
}
}
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
} else {
in.hopscotch.android.deeplinking.b bVar = in.hopscotch.android.deeplinking.b.a;
String str4 = this.linkForChannelAttribution;
bVar.getClass();
a = in.hopscotch.android.deeplinking.b.a(str4);
}
in.hopscotch.android.analytics.a.d().a("Landing screen");
HashMap hashMap = new HashMap();
if (a != null) {
if (!TextUtils.isEmpty(a.c)) {
hashMap.put(ApiParam.Search.UTM_SOURCE, a.c);
}
if (!TextUtils.isEmpty(a.d)) {
hashMap.put(ApiParam.Search.UTM_MEDIUM, a.d);
}
if (!TextUtils.isEmpty(a.b)) {
hashMap.put(ApiParam.Search.UTM_CAMPAIGN, a.b);
}
if (!TextUtils.isEmpty(a.i)) {
hashMap.put(ApiParam.Search.UTM_TERM, a.i);
}
if (!TextUtils.isEmpty(a.j)) {
hashMap.put(ApiParam.Search.UTM_GENDER, a.j);
}
if (!TextUtils.isEmpty(a.a)) {
hashMap.put(ApiParam.Search.DEEPLINK, a.a);
}
}
hashMap.put(ApiParam.Search.INSTALL, (!this.isFirstInstall || startsWith) ? "No" : "Yes");
Intent intent = new Intent();
intent.putExtra("attribution_data", hashMap);
try {
androidx.core.app.j.a(this, AttributionDataLogService.class, 3000, intent);
} catch (Exception e2) {
in.hopscotch.android.util.g.b(e2);
}
}
public final void l1(AppConfigResponse appConfigResponse) {
Dialog dialog = new Dialog(this);
dialog.setContentView(2131558680);
dialog.setCancelable(false);
Button button = (Button) dialog.findViewById(2131361988);
Button button2 = (Button) dialog.findViewById(2131362567);
AppCompatTextView appCompatTextView = (CustomTextView) dialog.findViewById(2131363604);
AppCompatTextView appCompatTextView2 = (CustomTextView) dialog.findViewById(2131363603);
appCompatTextView.setText(appConfigResponse.getDialogTitle());
appCompatTextView2.setText(appConfigResponse.getDialogContent());
button.setOnClickListener(new c(2, this, dialog));
button2.setOnClickListener(new v(3, this, dialog));
dialog.show();
if (dialog.getWindow() != null) {
dialog.getWindow().setLayout(-1, -2);
}
}
public final void m1(String str) {
in.hopscotch.android.deeplinking.b.a.getClass();
in.hopscotch.android.deeplinking.b.b(str, true);
Intent a = in.hopscotch.android.util.s0.a(this, str, "", (String) null, "DeepLink", (String) null, ApiParam.Search.DEEPLINK, (Bundle) null);
if (a == null) {
a = in.hopscotch.android.application.a0.a(this);
}
a.putExtra("TASK_STACK_BUILDER_EXISTS", true);
in.hopscotch.android.ui.util.c.a(this, a);
}
public final synchronized void n1() {
if (this.isFirstInstall) {
try {
androidx.core.app.j.a(this, FirstLaunchDataLogService.class, 5000, new Intent());
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
}
}
public final void o1(boolean z) {
String str = this.intentAction;
if (str == null || str.trim().isEmpty()) {
return;
}
in.hopscotch.android.deeplinking.b bVar = in.hopscotch.android.deeplinking.b.a;
String str2 = this.intentAction;
bVar.getClass();
in.hopscotch.android.deeplinking.b.b(str2, true);
Intent a = in.hopscotch.android.util.s0.a(this, this.intentAction, "", (String) null, "Push".concat(this.isFromCleverTap ? "_CleverTap" : this.isFromCRM ? "_CRM" : ""), (String) null, (String) null, (Bundle) null);
a.putExtra("FROM_NOTIFICATION", true);
a.putExtra("TASK_STACK_BUILDER_EXISTS", true);
this.linkForChannelAttribution = this.intentAction;
if (z) {
p1();
} else {
in.hopscotch.android.ui.util.c.a(this, a);
}
}
@Override
public final void onCreate(Bundle bundle) {
in.hopscotch.android.util.e0.b().l();
this.i = true;
super.onCreate(bundle);
this.viewModel = new ViewModelProvider(this).get(in.hopscotch.android.viewmodel.c0.class);
requestWindowFeature(1);
getWindow().setFlags(1024, 1024);
getWindow().getDecorView().setSystemUiVisibility(4100);
in.hopscotch.android.util.ui.c.a(getApplicationContext(), getWindow());
OrderAttributionHelper.getInstance().clearAttributionData();
in.hopscotch.android.util.u0.m().k();
this.localAttributionData = OrderAttributionHelper.getInstance().addAttributionData(null, null, 0, null, null, null, null, null, null, null);
getWindow().setStatusBarColor(getResources().getColor(2131099812));
boolean z = in.hopscotch.android.db.a.x().getBoolean("first_install_status", true);
this.isFirstInstall = z;
if (z) {
com.google.android.gms.ads.internal.client.z0.p("first_screen", true);
}
LayoutInflater layoutInflater = getLayoutInflater();
int i = in.hopscotch.android.databinding.s2.e;
in.hopscotch.android.databinding.s2 s2Var = (in.hopscotch.android.databinding.s2) androidx.databinding.p.M(layoutInflater, 2131558506, (ViewGroup) null, false, androidx.databinding.g.e());
setContentView(s2Var.E());
((in.hopscotch.android.common.media.d) com.bumptech.glide.c.i(this).f(this)).u().O0().q0(s2Var.d);
in.hopscotch.android.db.a.J(true);
b.a.a.getClass();
in.hopscotch.android.common.helper.b c = b.a.c();
if (in.hopscotch.android.common.util.t.a(HsApplication.a()) && c != null) {
String a = HsApplication.a();
Intrinsics.checkNotNullParameter(a, "deviceId");
HashMap hashMap = new HashMap();
hashMap.put("VisitorId", a);
hashMap.put("Tz", "Asia/Kolkata");
Boolean bool = Boolean.TRUE;
hashMap.put("MSG-push", bool);
hashMap.put("MSG-email", bool);
hashMap.put("MSG-sms", bool);
com.clevertap.android.sdk.u b = b.a.b();
if (b != null) {
b.U(hashMap);
}
}
this.appUpdateHelper = new in.hopscotch.android.appupdate.b(this);
in.hopscotch.android.components.util.u uVar = in.hopscotch.android.components.util.u.a;
Context applicationContext = getApplicationContext();
uVar.getClass();
in.hopscotch.android.components.util.u.b(applicationContext, this);
FirstCartLoad.getInstance().setFirstCartLoad(true);
Intent intent = getIntent();
if (intent != null && intent.getData() != null) {
String uri = intent.getData().toString();
this.fromLink = uri.contains(getResources().getString(2132017300).toLowerCase());
this.fromFbDeepLink = uri.contains("utm_source=Facebook") || uri.contains("utm_medium=Facebook_Nanigans") || uri.contains("utm_source=facebook");
boolean contains = uri.contains("af_deeplink=true");
this.fromAppsFlyerDeepLink = contains;
if (contains) {
this.deepLinkFromAppsFlyer = uri;
}
}
com.google.firebase.crashlytics.c.a().d("ACTIVITY_NAME", getClass().getName());
com.google.firebase.crashlytics.c.a().a.j(Settings.Secure.getString(getContentResolver(), "android_id"));
this.isFromNotification = getIntent().getBooleanExtra("FROM_NOTIFICATION", false);
this.isFromCleverTap = getIntent().getBooleanExtra("FROM_CLEVERTAP", false);
this.isFromCRM = getIntent().getBooleanExtra("FROM_CRM", false);
this.intentAction = getIntent().getStringExtra("INTENT_ACTION");
if (getIntent() != null && getIntent().getExtras() != null) {
String string = getIntent().getExtras().getString("wzrk_acct_id");
in.hopscotch.android.common.util.u.a.getClass();
if (u.a.a(string)) {
this.isFromNotification = true;
this.isFromCleverTap = true;
this.isFromCRM = false;
}
if (u.a.a(getIntent().getExtras().getString("wzrk_dl"))) {
this.intentAction = getIntent().getExtras().getString("wzrk_dl");
} else {
this.intentAction = getString(in.hopscotch.android.components.s.createDeepLinkHomePage);
}
}
in.hopscotch.android.db.a.g0(null, false);
in.hopscotch.android.db.a.m0(null, false);
in.hopscotch.android.db.a.i0(null, false);
in.hopscotch.android.db.a.f0(null, false);
in.hopscotch.android.db.a.h0(null, false);
in.hopscotch.android.db.a.l0(null, false);
in.hopscotch.android.db.a.j0(null, false);
in.hopscotch.android.db.a.k0(null, false);
in.hopscotch.android.db.a.I(null, false);
try {
in.hopscotch.android.db.a.k().putBoolean(UpiConstant.PUSH_ENABLED, in.hopscotch.android.util.i0.a(getApplicationContext()));
in.hopscotch.android.db.a.k().apply();
} catch (Exception e) {
in.hopscotch.android.util.g.b(e);
}
in.hopscotch.android.db.a.k().putBoolean("is_fb_available", in.hopscotch.android.util.a1.I(this, "com.facebook.orca"));
in.hopscotch.android.db.a.k().apply();
in.hopscotch.android.db.a.k().putBoolean("WA_AVAILABLE", in.hopscotch.android.util.a1.I(this, UpiConstant.PACKAGE_ID_WHATSAPP));
in.hopscotch.android.db.a.k().apply();
in.hopscotch.android.db.a.k().putBoolean("FC_AVAILABLE", in.hopscotch.android.util.a1.I(this, "fc.admin.fcexpressadmin"));
in.hopscotch.android.db.a.k().apply();
in.hopscotch.android.db.a.k().putBoolean("MY_AVAILABLE", in.hopscotch.android.util.a1.I(this, "com.myntra.android"));
in.hopscotch.android.db.a.k().apply();
in.hopscotch.android.helper.a.d();
try {
androidx.core.app.j.a(this, WebAppAssetService.class, 1, new Intent());
} catch (Exception e2) {
in.hopscotch.android.util.g.b(e2);
}
in.hopscotch.android.core.util.b.a.getClass();
in.hopscotch.android.core.util.b.a();
if (!in.hopscotch.android.db.a.x().getBoolean("installReferrerCalled", false)) {
InstallReferrerClient build = InstallReferrerClient.newBuilder(this).build();
build.startConnection(new f6(this, build));
}
b.a.a();
}
@Override
public final void onDestroy() {
in.hopscotch.android.util.f0.b().e();
super.onDestroy();
}
public final void onNewIntent(Intent intent) {
try {
setIntent(intent);
b.a.a.getClass();
com.clevertap.android.sdk.u b = b.a.b();
if (b != null) {
b.T(intent.getExtras());
}
} catch (Throwable th) {
th.printStackTrace();
}
super/*androidx.activity.j*/.onNewIntent(intent);
}
@Override
public final void onPause() {
in.hopscotch.android.util.f0.b().e();
super.onPause();
}
public final void onStart() {
super.onStart();
HyperServiceHolder hyperServiceHolder = new HyperServiceHolder(this);
in.hopscotch.android.util.l0.a.getClass();
hyperServiceHolder.initiate(in.hopscotch.android.util.l0.a());
HsApplication.b().h.h(new androidx.appcompat.widget.g1(this, 17));
}
public final void p1() {
UserStatus.getInstance().setLoginStatus(false);
if (this.isFirstInstall) {
startActivity(new Intent((Context) this, (Class<?>) FeatureVideoActivity.class));
return;
}
if (!TextUtils.isEmpty(in.hopscotch.android.db.a.i())) {
String str = in.hopscotch.android.util.a1.a;
String i = in.hopscotch.android.db.a.i();
in.hopscotch.android.db.a.f0("", true);
in.hopscotch.android.util.s0.f(this, i, "", (String) null, "DeepLink", "", (String) null, (String) null, 0, 0, (Bundle) null);
return;
}
if (TextUtils.isEmpty(in.hopscotch.android.db.a.f())) {
startActivity(in.hopscotch.android.application.a0.a(this));
return;
}
String str2 = in.hopscotch.android.util.a1.a;
String f = in.hopscotch.android.db.a.f();
in.hopscotch.android.db.a.I("", true);
in.hopscotch.android.util.f.d(this, f, (String) null, false);
}
}