正在查看: Vi App v10.18.0 应用的 NavigationUtils.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Vi App v10.18.0 应用的 NavigationUtils.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yupptv.ott.utils;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.TextUtils;
import android.widget.FrameLayout;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatButton;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.viapps.elk.KibanaUtility;
import com.yupptv.ott.FusionViliteMainActivity;
import com.yupptv.ott.MoviesWebViewActivity;
import com.yupptv.ott.OTTApplication;
import com.yupptv.ott.R;
import com.yupptv.ott.activity.LoadScreenActivity;
import com.yupptv.ott.adapters.l;
import com.yupptv.ott.adapters.s;
import com.yupptv.ott.analytics.AnalyticsUtils;
import com.yupptv.ott.analytics.AnalyticsV2;
import com.yupptv.ott.analytics.MyRecoManager;
import com.yupptv.ott.enums.ButtonType;
import com.yupptv.ott.enums.DialogType;
import com.yupptv.ott.enums.ListType;
import com.yupptv.ott.enums.OTPType;
import com.yupptv.ott.enums.PageType;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ott.epg.EPGFragment;
import com.yupptv.ott.fragments.ActionBottomSheetDialogFragment;
import com.yupptv.ott.fragments.CreateProfilesFragment;
import com.yupptv.ott.fragments.CustomDialogFragment;
import com.yupptv.ott.fragments.DebugSettingsFragment;
import com.yupptv.ott.fragments.ErrorFragment;
import com.yupptv.ott.fragments.FiltersFragment;
import com.yupptv.ott.fragments.FullScreenImageFragment;
import com.yupptv.ott.fragments.GridFragment;
import com.yupptv.ott.fragments.HomeFragment;
import com.yupptv.ott.fragments.NavigationFragment;
import com.yupptv.ott.fragments.PaymentMainFragment;
import com.yupptv.ott.fragments.PaymentsFragment;
import com.yupptv.ott.fragments.ProfilesFragment;
import com.yupptv.ott.fragments.ViewPagerFragment;
import com.yupptv.ott.fragments.WebViewFragment;
import com.yupptv.ott.fragments.account.FragmentAppSettings;
import com.yupptv.ott.fragments.account.ListFragment;
import com.yupptv.ott.fragments.account.OTTAccountFragment;
import com.yupptv.ott.fragments.account.VideoQualityFragment;
import com.yupptv.ott.fragments.onboarding.ChangeEmailFragment;
import com.yupptv.ott.fragments.onboarding.ChangeMobileNoFragment;
import com.yupptv.ott.fragments.onboarding.ForgotOTPVerification;
import com.yupptv.ott.fragments.onboarding.ForgotPassword;
import com.yupptv.ott.fragments.onboarding.ForgotPinFragment;
import com.yupptv.ott.fragments.onboarding.LanguageFragment;
import com.yupptv.ott.fragments.onboarding.NewContentFilterFragment;
import com.yupptv.ott.fragments.onboarding.OTPVerificationFragment;
import com.yupptv.ott.fragments.onboarding.ResetPasswordFragment;
import com.yupptv.ott.fragments.onboarding.SignInFragment;
import com.yupptv.ott.fragments.onboarding.SignupFragment;
import com.yupptv.ott.fragments.onboarding.SignupFragmentStep2;
import com.yupptv.ott.fragments.onboarding.SuccessResetPasswordFragment;
import com.yupptv.ott.fragments.onboarding.UpdateEmailMobileNoFragment;
import com.yupptv.ott.fragments.onboarding.UpdatePasswordFragment;
import com.yupptv.ott.fragments.onboarding.UserProfileFragment;
import com.yupptv.ott.fragments.payment.CouponCodeFragment;
import com.yupptv.ott.fragments.payment.OrderSummaryFragment;
import com.yupptv.ott.fragments.payment.PackagesFragment;
import com.yupptv.ott.fragments.payment.PaymentGateWaysFragment;
import com.yupptv.ott.fragments.payment.PaymentNewGatewaysFragment;
import com.yupptv.ott.fragments.payment.UpdateCardFragment;
import com.yupptv.ott.interfaces.BottomButtonsActionListener;
import com.yupptv.ott.interfaces.DialogListener;
import com.yupptv.ott.interfaces.FiltersSelectionListener;
import com.yupptv.ott.player.ExoPlayerFragment;
import com.yupptv.ott.player.detail.UpNextFragment;
import com.yupptv.ott.player.offlinedownload.OfflineDownloadListFragment;
import com.yupptv.ott.widget.HeaderItemWithControls;
import com.yupptv.ottsdk.OttSDK;
import com.yupptv.ottsdk.managers.MediaCatalog.MediaCatalogManager;
import com.yupptv.ottsdk.managers.User.UserManager;
import com.yupptv.ottsdk.model.Banner;
import com.yupptv.ottsdk.model.BottomTemplate;
import com.yupptv.ottsdk.model.Card;
import com.yupptv.ottsdk.model.ContentPage;
import com.yupptv.ottsdk.model.DeeplinkInfo;
import com.yupptv.ottsdk.model.EPGProgramsData;
import com.yupptv.ottsdk.model.Error;
import com.yupptv.ottsdk.model.Menu;
import com.yupptv.ottsdk.model.Networks;
import com.yupptv.ottsdk.model.Section;
import com.yupptv.ottsdk.model.Target;
import com.yupptv.ottsdk.model.User;
import com.yupptv.ottsdk.model.payments.PackagesV2;
import com.yupptv.ottsdk.model.user.Configs;
import com.yupptv.ottsdk.rest.network.RestAdapter;
import com.yupptv.ottsdk.utils.OttLog;
import in.juspay.hyper.constants.LogSubCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import org.json.JSONException;
import org.json.JSONObject;
public class NavigationUtils {
public static boolean itemClickActionInProgress = false;
public static class AnonymousClass10 {
public static final int[] $SwitchMap$com$yupptv$ott$enums$DialogType;
public static final int[] $SwitchMap$com$yupptv$ott$enums$PageType;
public static final int[] $SwitchMap$com$yupptv$ott$enums$ScreenType;
static {
int[] iArr = new int[DialogType.values().length];
$SwitchMap$com$yupptv$ott$enums$DialogType = iArr;
try {
iArr[DialogType.PACKAGE_INFO_DIALOG.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.MESSAGE_DIALOG.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.COUNTRIES_DIALOG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.SESSION_EXPIRED_DIALOG.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.DELINK_DEVICE.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.CONTINUE_WATCHING_DIALOG.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.CONTINUE_LOGOUT_DIALOG.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.APP_UPDATE.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.RECORD.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.PAYMENT_CONFIRMATION_DIALOG.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.LEAVE_PAGE_DIALOG.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.REGISTRATION_SUCCESS_DIALOG.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.REMOVE_LINKED_DEVICE_DIALOG.ordinal()] = 13;
} catch (NoSuchFieldError unused13) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.LINKED_DEVICE_LIMIT_DIALOG.ordinal()] = 14;
} catch (NoSuchFieldError unused14) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.DEEPLINK_INFO.ordinal()] = 15;
} catch (NoSuchFieldError unused15) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.STARTOVER_DIALOG.ordinal()] = 16;
} catch (NoSuchFieldError unused16) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.PLAYER_ACTIVE_SCREEN_DIALOG.ordinal()] = 17;
} catch (NoSuchFieldError unused17) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.SETTINGS_ACTIVE_SCREEN_DIALOG.ordinal()] = 18;
} catch (NoSuchFieldError unused18) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.REMOVE_SAVED_CARD_DIALOG.ordinal()] = 19;
} catch (NoSuchFieldError unused19) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.CHANGE_PLAN_DIALOG.ordinal()] = 20;
} catch (NoSuchFieldError unused20) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.ORDER_SUMMARY_DIALOG.ordinal()] = 21;
} catch (NoSuchFieldError unused21) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.TAX_INFO_DIALOG.ordinal()] = 22;
} catch (NoSuchFieldError unused22) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.ERROR_MESSAGE_DIALOG.ordinal()] = 23;
} catch (NoSuchFieldError unused23) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.SIGNIN_SIGNUP_INFO_DIALOG.ordinal()] = 24;
} catch (NoSuchFieldError unused24) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.FEEDBACK_RATING_DIALOG.ordinal()] = 25;
} catch (NoSuchFieldError unused25) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.GDPR_COOKIE_POLICY_DIALOG.ordinal()] = 26;
} catch (NoSuchFieldError unused26) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.WEBVIEW_NAVIGATION_DIALOG.ordinal()] = 27;
} catch (NoSuchFieldError unused27) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.OFFLINE_DELETE_DIALOG.ordinal()] = 28;
} catch (NoSuchFieldError unused28) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.VOUCHER_APPLY_FAILURE_DIALOG.ordinal()] = 29;
} catch (NoSuchFieldError unused29) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.SUBSCRIBE_RENT_INFO_DIALOG.ordinal()] = 30;
} catch (NoSuchFieldError unused30) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.PARENTAL_CONTROL_PASSCODE_DIALOG.ordinal()] = 31;
} catch (NoSuchFieldError unused31) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.UPDATE_AGE_DOB_DIALOG.ordinal()] = 32;
} catch (NoSuchFieldError unused32) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.USER_PROFILE_PASSCODE_DIALOG.ordinal()] = 33;
} catch (NoSuchFieldError unused33) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.ADD_USER_PROFILE_PASSCODE_DIALOG.ordinal()] = 34;
} catch (NoSuchFieldError unused34) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.AFTER_DARK_PASSCODE_DIALOG.ordinal()] = 35;
} catch (NoSuchFieldError unused35) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.ENVIRONMENT_LIST_DIALOG.ordinal()] = 36;
} catch (NoSuchFieldError unused36) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.LOGIN_TYPE_DIALOG.ordinal()] = 37;
} catch (NoSuchFieldError unused37) {
}
try {
$SwitchMap$com$yupptv$ott$enums$DialogType[DialogType.INSERT_PASSWORD_DIALOG.ordinal()] = 38;
} catch (NoSuchFieldError unused38) {
}
int[] iArr2 = new int[ScreenType.values().length];
$SwitchMap$com$yupptv$ott$enums$ScreenType = iArr2;
try {
iArr2[ScreenType.SIGNUP.ordinal()] = 1;
} catch (NoSuchFieldError unused39) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.SIGNUP2.ordinal()] = 2;
} catch (NoSuchFieldError unused40) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.SIGNIN.ordinal()] = 3;
} catch (NoSuchFieldError unused41) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.UPDATE_PASSWORD.ordinal()] = 4;
} catch (NoSuchFieldError unused42) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.PAYMENTS_MAIN.ordinal()] = 5;
} catch (NoSuchFieldError unused43) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.PACKAGES_MAIN.ordinal()] = 6;
} catch (NoSuchFieldError unused44) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.USER_PROFILE.ordinal()] = 7;
} catch (NoSuchFieldError unused45) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.UPDATE_CARD.ordinal()] = 8;
} catch (NoSuchFieldError unused46) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.UPDATE_EMAIL_MOBILE.ordinal()] = 9;
} catch (NoSuchFieldError unused47) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.ACTIVE_PACKAGES.ordinal()] = 10;
} catch (NoSuchFieldError unused48) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.TRANSACTIONS.ordinal()] = 11;
} catch (NoSuchFieldError unused49) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.FORGOT_PASSWORD.ordinal()] = 12;
} catch (NoSuchFieldError unused50) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.VIEW_LANGUAGES.ordinal()] = 13;
} catch (NoSuchFieldError unused51) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.CHANGE_EMAIL_ID.ordinal()] = 14;
} catch (NoSuchFieldError unused52) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.CHANGE_FULL_NAME.ordinal()] = 15;
} catch (NoSuchFieldError unused53) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.CHANGE_MOBILE_NUMBER.ordinal()] = 16;
} catch (NoSuchFieldError unused54) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.USER_PROFILES.ordinal()] = 17;
} catch (NoSuchFieldError unused55) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.CREATE_USER_PROFILES.ordinal()] = 18;
} catch (NoSuchFieldError unused56) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.FORGOT_PIN.ordinal()] = 19;
} catch (NoSuchFieldError unused57) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.FILTER_CONTENT.ordinal()] = 20;
} catch (NoSuchFieldError unused58) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.FULL_SCREEN.ordinal()] = 21;
} catch (NoSuchFieldError unused59) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.PAYMENT_GATEWAYS.ordinal()] = 22;
} catch (NoSuchFieldError unused60) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.FAVOURITES.ordinal()] = 23;
} catch (NoSuchFieldError unused61) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.PURCHASED_ITEMS.ordinal()] = 24;
} catch (NoSuchFieldError unused62) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.OFFLINE_VIDEO.ordinal()] = 25;
} catch (NoSuchFieldError unused63) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.VIDEO_QUALITY.ordinal()] = 26;
} catch (NoSuchFieldError unused64) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.CONTENT_FILTER.ordinal()] = 27;
} catch (NoSuchFieldError unused65) {
}
try {
$SwitchMap$com$yupptv$ott$enums$ScreenType[ScreenType.ACTIVATE_DEVICE.ordinal()] = 28;
} catch (NoSuchFieldError unused66) {
}
int[] iArr3 = new int[PageType.values().length];
$SwitchMap$com$yupptv$ott$enums$PageType = iArr3;
try {
iArr3[PageType.Content.ordinal()] = 1;
} catch (NoSuchFieldError unused67) {
}
try {
$SwitchMap$com$yupptv$ott$enums$PageType[PageType.Details.ordinal()] = 2;
} catch (NoSuchFieldError unused68) {
}
try {
$SwitchMap$com$yupptv$ott$enums$PageType[PageType.List.ordinal()] = 3;
} catch (NoSuchFieldError unused69) {
}
try {
$SwitchMap$com$yupptv$ott$enums$PageType[PageType.Player.ordinal()] = 4;
} catch (NoSuchFieldError unused70) {
}
try {
$SwitchMap$com$yupptv$ott$enums$PageType[PageType.Error.ordinal()] = 5;
} catch (NoSuchFieldError unused71) {
}
}
}
public static com.yupptv.ott.models.BottomDataModel bindGenericTemplate(java.lang.String r20, java.util.List<com.yupptv.ottsdk.model.BottomTemplate.Row> r21) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.utils.NavigationUtils.bindGenericTemplate(java.lang.String, java.util.List):com.yupptv.ott.models.BottomDataModel");
}
public static void eventCTAppInAppClick(Context context, Object obj, String str, String str2, String str3) {
int contentPosition = MyRecoManager.getInstance().getContentPosition();
int carouselPosition = MyRecoManager.getInstance().getCarouselPosition();
String sourceForAnalytics = MyRecoManager.getInstance().getSourceForAnalytics();
String sourceDetailsForAnalytics = MyRecoManager.getInstance().getSourceDetailsForAnalytics();
String subSourceDetailsForAnalytics = (TextUtils.isEmpty(str3) || !str3.equalsIgnoreCase("pro user vimtv app promotion")) ? MyRecoManager.getInstance().getSubSourceDetailsForAnalytics() : "partner - vimtv";
if (obj != null && (obj instanceof Card)) {
Card card = (Card) obj;
if (card.getTarget() != null && card.getTarget().getPageAttributes() != null) {
if (com.yupptv.ott.adapters.f.a(card, com.yupptv.ott.adapters.h.a(card, com.yupptv.ott.adapters.a.a(card, MyRecoManager.getInstance()))) || !card.getTemplate().contains("lsdk_pro")) {
com.yupptv.ott.adapters.c.a(card, MyRecoManager.getInstance());
} else {
com.yupptv.ott.adapters.d.a(card, new StringBuilder(), " - vimtv", MyRecoManager.getInstance());
}
String a = l.a(card);
boolean z = false;
if (a != null && (a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE_TV) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_EPG) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_CHANNEL))) {
z = true;
}
if (!com.yupptv.ott.adapters.e.a(card) && com.yupptv.ott.adapters.g.a(card, "true")) {
MyRecoManager.getInstance().setContentType("trailer");
} else if (z) {
MyRecoManager.getInstance().setContentType(Constants.CONTENT_TYPE_LIVE);
} else {
com.yupptv.ott.adapters.b.a(card, MyRecoManager.getInstance());
}
String a2 = com.yupptv.ott.adapters.j.a(card);
String a3 = com.yupptv.ott.adapters.k.a(card);
MyRecoManager.getInstance().setContentModel(a2);
MyRecoManager.getInstance().setContentTag(a3);
MyRecoManager.getInstance().setContentLanguage(card.getTarget().getPageAttributes().getLanguage());
}
} else if (!TextUtils.isEmpty(str3) && str3.equalsIgnoreCase("pro user vimtv app promotion")) {
MyRecoManager.getInstance().setContentPartnerName("vimtv");
}
String contentTitle = MyRecoManager.getInstance().getContentTitle();
String contentGenre = MyRecoManager.getInstance().getContentGenre();
String contentLanguage = MyRecoManager.getInstance().getContentLanguage();
String contentPartnerName = MyRecoManager.getInstance().getContentPartnerName();
String contentType = MyRecoManager.getInstance().getContentType();
CleverTap.moviesEventAppInAppClick(MyRecoManager.getInstance().getPROMOTIONAL_VIEW(), sourceForAnalytics, sourceDetailsForAnalytics, subSourceDetailsForAnalytics, carouselPosition, contentPosition, contentTitle, contentLanguage, contentPartnerName, MyRecoManager.getInstance().getContentModel(), MyRecoManager.getInstance().getContentTag(), contentType, contentGenre, MyRecoManager.getInstance().getContentTvShowName(), 0, context instanceof FusionViliteMainActivity ? ((FusionViliteMainActivity) context).bottomTabSelected : "Home", "", "");
}
public static void fetchDeepLinkInfo(final Object obj, final Context context, final String str) {
OttSDK ottSDK = OttSDK.getInstance();
if (obj instanceof Card) {
Card card = (Card) obj;
if (card.getTarget() != null && card.getTarget().getPageAttributes() != null && card.getTarget().getPageAttributes().getPayType() != null && !card.getTarget().getPageAttributes().getPayType().equalsIgnoreCase("F")) {
if (((ottSDK == null || ottSDK.getPreferenceManager() == null) ? null : ottSDK.getPreferenceManager().getLoggedUser()) == null) {
loadScreenActivityForResult(obj, (FragmentActivity) context, ScreenType.SIGNIN, NavigationConstants.NAV_FROM_HOME, str, 36, MyRecoManager.getInstance().getSourceForAnalytics(), MyRecoManager.getInstance().getSourceDetailsForAnalytics());
return;
}
}
}
if (context instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) context).showProgressBar();
}
ottSDK.getMediaManager().getDeeplinkInfo(str, new MediaCatalogManager.MediaCatalogCallback<DeeplinkInfo>() {
@Override
public void onFailure(Error error) {
Object obj2 = context;
if (obj2 instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) obj2).hideProgressBar();
}
if (error != null) {
CustomLog.e("detailsFragmentDeepLinkError", " " + error.getMessage());
if (error.getCode().equals(404)) {
Toast.makeText(context, "" + error.getMessage(), 0).show();
}
}
NavigationUtils.logKibanaError("NavigationUtils", "API", "/service/api/v1/page/deeplink", "NA", "contentid", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
}
@Override
public void onSuccess(DeeplinkInfo deeplinkInfo) {
Object obj2 = context;
if (obj2 instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) obj2).hideProgressBar();
}
if (deeplinkInfo == null || deeplinkInfo.getContentCode() == null || deeplinkInfo.getContentCode().trim().length() <= 0 || deeplinkInfo.getPartnerCode() == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("value", "1");
NavigationUtils.sendRecoEvents((FusionViliteMainActivity) context, hashMap);
NavigationUtils.startNewActivity(obj, context, deeplinkInfo, -1, str);
}
});
}
public static void fetchTemplate(OttSDK ottSDK) {
if (ottSDK == null) {
try {
ottSDK = OttSDK.getInstance();
} catch (Exception e2) {
CustomLog.e("TAG", "crash template :: " + e2.getMessage());
return;
}
}
ottSDK.getMediaManager().getAllBottomTemplates(new MediaCatalogManager.MediaCatalogCallback<List<BottomTemplate>>() {
@Override
public void onFailure(Error error) {
NavigationUtils.logKibanaError("NavigationUtils", "API", "/service/api/v1/templates", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
}
@Override
public void onSuccess(List<BottomTemplate> list) {
int size;
if (list == null || (size = list.size()) <= 0) {
return;
}
for (int i2 = 0; i2 < size; i2++) {
BottomTemplate bottomTemplate = list.get(i2);
String code = bottomTemplate.getCode();
UiUtils.mCommonTemplateHashMap.put(code, NavigationUtils.bindGenericTemplate(code, bottomTemplate.getRows()));
}
}
});
}
public static String getDeviceIpAddress() {
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface nextElement = networkInterfaces.nextElement();
if (nextElement.isUp() && !nextElement.isLoopback() && !nextElement.isVirtual()) {
Enumeration<InetAddress> inetAddresses = nextElement.getInetAddresses();
while (inetAddresses.hasMoreElements()) {
InetAddress nextElement2 = inetAddresses.nextElement();
if ((nextElement2 instanceof Inet4Address) && !nextElement2.isLoopbackAddress()) {
return nextElement2.getHostAddress();
}
}
}
}
return "Unable to get IP";
} catch (Exception e2) {
e2.printStackTrace();
return "Unable to get IP";
}
}
public static Fragment getHomeScreenFragment(String str, String str2, int i2) {
Bundle bundle = new Bundle();
HomeFragment homeFragment = new HomeFragment();
bundle.putString(NavigationConstants.TITLE, str);
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str2);
bundle.putInt(NavigationConstants.MENU_ITEM_POSITION, i2);
bundle.putString(NavigationConstants.NAV_FROM_PATH, str);
homeFragment.setArguments(bundle);
return homeFragment;
}
public static Fragment getListFragment(String str, String str2, int i2) {
Bundle bundle = new Bundle();
ListFragment listFragment = new ListFragment();
bundle.putSerializable("type", ListType.SETTINGS_MENU);
listFragment.setArguments(bundle);
return listFragment;
}
public static Fragment getPackagesFragment(String str, String str2, int i2) {
Bundle bundle = new Bundle();
PackagesFragment packagesFragment = new PackagesFragment();
bundle.putString(NavigationConstants.TITLE, str);
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str2);
bundle.putInt(NavigationConstants.MENU_ITEM_POSITION, i2);
bundle.putString(NavigationConstants.NAV_FROM_PATH, str);
bundle.putString(NavigationConstants.NAV_FROM, "tab");
packagesFragment.setArguments(bundle);
return packagesFragment;
}
public static Fragment getTvGuideFragment(String str, String str2, int i2) {
Bundle bundle = new Bundle();
EPGFragment ePGFragment = new EPGFragment();
bundle.putString(NavigationConstants.TITLE, str);
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str2);
bundle.putInt(NavigationConstants.MENU_ITEM_POSITION, i2);
bundle.putString(NavigationConstants.NAV_FROM_PATH, str);
ePGFragment.setArguments(bundle);
return ePGFragment;
}
public static Fragment getWebViewScreenFragment(String str, String str2) {
Bundle bundle = new Bundle();
WebViewFragment webViewFragment = new WebViewFragment();
bundle.putString("Browser", str);
if (str2 != null) {
bundle.putString(NavigationConstants.WEB_URL, str2);
}
webViewFragment.setArguments(bundle);
return webViewFragment;
}
public static void launchNavigationFragment(String str, FragmentActivity fragmentActivity) {
Bundle bundle = new Bundle();
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).currentItemtargerPath = str;
}
NavigationFragment navigationFragment = new NavigationFragment();
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str);
navigationFragment.setArguments(bundle);
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
}
private static void launchPaymentsFragment(Context context, String str, Object obj, String str2) {
if (context == 0 || !(context instanceof FusionViliteMainActivity)) {
return;
}
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) context;
fusionViliteMainActivity.selectHomeOnPopFromWebView = true;
if (fusionViliteMainActivity.isBottomBarVisible()) {
fusionViliteMainActivity.enableToolBarLogo(true);
}
fusionViliteMainActivity.launchWebviewPlansPage(null, str, str2);
}
private static void launchSignInFragment(Context context, Object obj, String str) {
if (OttSDK.getInstance() == null || s.a() != null || context == 0 || !(context instanceof FusionViliteMainActivity)) {
return;
}
?? r2 = (FusionViliteMainActivity) context;
Intent prepareContentAssociatedParams = prepareContentAssociatedParams(obj, new Intent((Context) r2, (Class<?>) LoadScreenActivity.class));
String str2 = NavigationConstants.SCREEN_TYPE;
ScreenType screenType = ScreenType.SIGNIN;
prepareContentAssociatedParams.putExtra(str2, screenType);
prepareContentAssociatedParams.putExtra(NavigationConstants.NAV_FROM, screenType.getValue());
prepareContentAssociatedParams.putExtra(NavigationConstants.NAV_FROM_PATH, AnalyticsV2.EVENT_BANNER_SIGNIN);
prepareContentAssociatedParams.putExtra(NavigationConstants.PATH, str);
r2.trackEvent(AnalyticsV2.EVENT_BANNER_SIGNIN);
r2.startActivityForResult(prepareContentAssociatedParams, 15);
}
private static void launchSignUpFragment(Context context, Object obj) {
if (OttSDK.getInstance() == null || s.a() != null || context == 0 || !(context instanceof FusionViliteMainActivity)) {
return;
}
?? r2 = (FusionViliteMainActivity) context;
Intent prepareContentAssociatedParams = prepareContentAssociatedParams(obj, new Intent((Context) r2, (Class<?>) LoadScreenActivity.class));
prepareContentAssociatedParams.putExtra(NavigationConstants.SCREEN_TYPE, ScreenType.SIGNUP);
prepareContentAssociatedParams.putExtra(NavigationConstants.NAV_FROM_PATH, AnalyticsV2.EVENT_BANNER_REGISTER);
r2.trackEvent(AnalyticsV2.EVENT_BANNER_REGISTER);
r2.startActivityForResult(prepareContentAssociatedParams, 16);
}
private static void loadScreenActivityForResult(Object obj, FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, String str3, String str4) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
trackEvent(screenType, str);
Intent prepareContentAssociatedParams = prepareContentAssociatedParams(obj, new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class));
prepareContentAssociatedParams.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
prepareContentAssociatedParams.putExtra(NavigationConstants.NAV_FROM, str);
prepareContentAssociatedParams.putExtra(NavigationConstants.CA_CONTENT_SOURCE, str3);
prepareContentAssociatedParams.putExtra(NavigationConstants.CA_CONTENT_SOURCE_DETAILS, str4);
String str5 = NavigationConstants.PAGEPATH;
if (str2 == null) {
str2 = "";
}
prepareContentAssociatedParams.putExtra(str5, str2);
fragmentActivity.startActivityForResult(prepareContentAssociatedParams, i2);
}
public static void loadScreenActivityForStart(Activity activity, ScreenType screenType, String str) {
Intent intent = new Intent(activity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
activity.startActivity(intent);
if (str.equalsIgnoreCase("settings")) {
return;
}
activity.finish();
}
public static void logKibanaError(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
PackageInfo packageInfo;
if (new Random().nextInt(10) + 1 != 1) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
try {
packageInfo = OTTApplication.getAppContext().getPackageManager().getPackageInfo(OTTApplication.getAppContext().getPackageName(), 0);
} catch (PackageManager.NameNotFoundException unused) {
packageInfo = null;
}
String valueOf = packageInfo != null ? String.valueOf(packageInfo.versionCode) : null;
jSONObject.put("MSISDN", OTTApplication.getMobileNumber());
jSONObject.put("ScreenName", str);
jSONObject.put(PaymentConstants.SDK_VERSION, "3.1.5");
jSONObject.put("deviceOSVersion", "" + Build.VERSION.SDK_INT);
if (!TextUtils.isEmpty(valueOf)) {
jSONObject.put("viAppVersion", valueOf);
}
jSONObject.put("provider", "vodafone");
jSONObject.put("subscriptionType", "prepaid");
String deviceIpAddress = getDeviceIpAddress();
if (!TextUtils.isEmpty(deviceIpAddress)) {
jSONObject.put("IPAddress", deviceIpAddress);
}
if (!str3.equalsIgnoreCase("NA")) {
jSONObject.put("APIName", str3);
}
if (!str5.equalsIgnoreCase("NA")) {
jSONObject.put("contentId", str5);
}
if (!str6.equalsIgnoreCase("NA")) {
jSONObject.put("contentName", str6);
}
if (!str4.equalsIgnoreCase("NA")) {
jSONObject.put("carouselName", str4);
}
JSONObject jSONObject2 = new JSONObject();
JSONObject jSONObject3 = new JSONObject();
if (!str7.equalsIgnoreCase("NA")) {
jSONObject3.put("errorCode", str7);
}
jSONObject3.put("errorMessage", str8);
jSONObject2.put("data", jSONObject3);
jSONObject.put("APIResponse", jSONObject2);
CustomLog.e("KibanaError", "json## " + jSONObject.toString());
KibanaUtility.sendLog(jSONObject, "vi-movies", new KibanaUtility.CallBack() {
@Override
public void onFailure(String str9) {
CustomLog.e("KibanaError", "response error## " + str9);
}
@Override
public void onSuccess(String str9) {
CustomLog.e("KibanaError", "response success## " + str9);
}
});
} catch (JSONException e2) {
CustomLog.e("KibanaError", "json Exception## " + e2.getMessage());
}
}
public static void navigateToOrderSummaryPage(FragmentActivity fragmentActivity, PaymentsFragment.PurchaseItem purchaseItem, String str, boolean z) {
OrderSummaryFragment orderSummaryFragment = new OrderSummaryFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("PurchaseItem", purchaseItem);
bundle.putString(NavigationConstants.NAV_FROM, str);
orderSummaryFragment.setArguments(bundle);
if (z) {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, orderSummaryFragment, "orderSummaryFragment").addToBackStack("orderSummaryFragment").commitAllowingStateLoss();
} else {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, orderSummaryFragment, "orderSummaryFragment").commitAllowingStateLoss();
}
}
public static void navigateToPlayer(FragmentActivity fragmentActivity, ButtonType buttonType, String str, String str2) {
if (fragmentActivity != null) {
if (fragmentActivity.getSupportFragmentManager().findFragmentByTag("navigationfragment") != null) {
fragmentActivity.getSupportFragmentManager().beginTransaction().remove(fragmentActivity.getSupportFragmentManager().findFragmentByTag("navigationfragment")).commitAllowingStateLoss();
}
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity.setPlayerScreenSource(str2);
fusionViliteMainActivity.setButtonType(buttonType);
fusionViliteMainActivity.goToDetail(str);
}
}
public static void onBoardAppSettingsNavigation(FragmentActivity fragmentActivity, ListType listType, Bundle bundle) {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, FragmentAppSettings.newInstance(listType, bundle), "appSettings").addToBackStack((String) null).commitAllowingStateLoss();
}
public static void onBoardListNavigation(FragmentActivity fragmentActivity, ListType listType, Bundle bundle) {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, ListFragment.newInstance(listType, bundle), "account").addToBackStack(listType.getValue()).commitAllowingStateLoss();
}
public static void onBoardNavigation(FragmentActivity fragmentActivity, Bundle bundle, ScreenType screenType) {
if (screenType != null) {
switch (AnonymousClass10.$SwitchMap$com$yupptv$ott$enums$ScreenType[screenType.ordinal()]) {
case 1:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new SignupFragment(), "signup").addToBackStack("sign_up").commitAllowingStateLoss();
break;
case 2:
SignupFragmentStep2 signupFragmentStep2 = new SignupFragmentStep2();
if (bundle != null) {
signupFragmentStep2.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, signupFragmentStep2, "signup2").addToBackStack("sign_up2").commitAllowingStateLoss();
break;
case 3:
SignInFragment signInFragment = new SignInFragment();
if (bundle != null) {
signInFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, signInFragment, "signin").addToBackStack("sign_in").commitAllowingStateLoss();
break;
case 4:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new UpdatePasswordFragment(), "updatepwd").addToBackStack("updatePwd").commitAllowingStateLoss();
break;
case 5:
case 6:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new PaymentMainFragment(), "paymentsmainfragment").addToBackStack("paymentsmainfragment").commitAllowingStateLoss();
break;
case 7:
UserProfileFragment userProfileFragment = new UserProfileFragment();
if (bundle != null) {
userProfileFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, userProfileFragment, "userprofile").addToBackStack("userprofile").commitAllowingStateLoss();
break;
case 8:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new UpdateCardFragment(), "updateCard").addToBackStack("updateCard").commitAllowingStateLoss();
break;
case 9:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, UpdateEmailMobileNoFragment.newInstance(screenType, bundle), "updateMobile").addToBackStack("updateMobile").commitAllowingStateLoss();
break;
case 10:
case 11:
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, OTTAccountFragment.newInstance(screenType, bundle), "account").addToBackStack(screenType.getValue()).commitAllowingStateLoss();
break;
case 12:
ForgotPassword forgotPassword = new ForgotPassword();
if (bundle != null) {
forgotPassword.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, forgotPassword, "address").addToBackStack("address").commitAllowingStateLoss();
break;
case 13:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new LanguageFragment(), "languages").addToBackStack("languages").commitAllowingStateLoss();
break;
case 14:
case 15:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, ChangeEmailFragment.newInstance(screenType, bundle), "change_email_id").addToBackStack("changeEmail").commitAllowingStateLoss();
break;
case 16:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, ChangeMobileNoFragment.newInstance(screenType, bundle), "change_mobile_number").addToBackStack("changeMobileNo").commitAllowingStateLoss();
break;
case 17:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, ProfilesFragment.newInstance(), "userprofiles").addToBackStack("userprofiles").commitAllowingStateLoss();
break;
case 18:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, CreateProfilesFragment.newInstance(), "createuserprofiles").addToBackStack("createuserprofiles").commitAllowingStateLoss();
break;
case 19:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new ForgotPinFragment(), "forgotpin").addToBackStack("forgotpin").commitAllowingStateLoss();
break;
case 20:
FiltersFragment filtersFragment = new FiltersFragment();
filtersFragment.setListener((FiltersSelectionListener) fragmentActivity);
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, filtersFragment, "FilterFragment").addToBackStack("FilterFragment").commitAllowingStateLoss();
break;
}
}
}
public static void onBoardOTPNavigation(FragmentActivity fragmentActivity, String str, OTPType oTPType, String str2, String str3, Bundle bundle) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, OTPVerificationFragment.newInstance(str, oTPType, str2, str3, bundle), "updateMobile").addToBackStack("updateMobile").commitAllowingStateLoss();
}
public static void onBoardWebViewNavigation(FragmentActivity fragmentActivity, String str, String str2) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", str);
if (str2 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str2);
}
fragmentActivity.startActivity(intent);
}
public static void onBoardWebViewNavigationForResult(FragmentActivity fragmentActivity, String str, String str2, String str3, Fragment fragment) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra(NavigationConstants.ORDERID, str);
if (str2 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str2);
}
String str4 = NavigationConstants.PURCHASE_GATEWAY;
if (str3 == null) {
str3 = "";
}
intent.putExtra(str4, str3);
fragment.startActivityForResult(intent, 99);
}
public static void operatorCouponCode(FragmentActivity fragmentActivity, List list, String str, String str2, String str3, Object obj, String str4, boolean z, String str5, String str6, String str7, boolean z2, String str8, String str9, boolean z3) {
CouponCodeFragment couponCodeFragment = new CouponCodeFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(NavigationConstants.PURCHASE_GATEWAY, (ArrayList) list);
bundle.putString(NavigationConstants.PURCHASE_IDS, str);
bundle.putString(NavigationConstants.PURCHASE_VALUE, str2);
bundle.putString(NavigationConstants.PURCHASED_PACKAGES, str3);
bundle.putString(NavigationConstants.PURCHASE_PACK_TYPE, str4);
bundle.putString(NavigationConstants.CURRENCY_SYMBOL, str6);
bundle.putBoolean(NavigationConstants.PURCHASE_FREE_TRIAL, z2);
bundle.putString(NavigationConstants.PURCHASE_FREE_TRIAL_TEXT, str8);
bundle.putString(NavigationConstants.PURCHASE_FREE_TRIAL_EXPIRY, str9);
bundle.putString("ChannelsMovies", str7);
bundle.putString("Currency", str5);
bundle.putParcelable(NavigationConstants.PURCHASE_ITEM, (Parcelable) obj);
bundle.putBoolean("FromTab", z);
couponCodeFragment.setArguments(bundle);
if (z3) {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(z ? R.id.contentframe : R.id.layout_frame, couponCodeFragment, "promocodefragment").addToBackStack("promocodefragment").commitAllowingStateLoss();
} else {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(z ? R.id.contentframe : R.id.layout_frame, couponCodeFragment, "promocodefragment").commitAllowingStateLoss();
}
}
public static void operatorPaymentNavigation(FragmentActivity fragmentActivity, List list, String str, String str2, String str3, Object obj, String str4, String str5, boolean z, boolean z2, String str6, String str7) {
PaymentGateWaysFragment paymentGateWaysFragment = new PaymentGateWaysFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(NavigationConstants.PURCHASE_GATEWAY, (ArrayList) list);
bundle.putString(NavigationConstants.PURCHASE_IDS, str);
bundle.putString(NavigationConstants.PURCHASE_VALUE, str2);
bundle.putString(NavigationConstants.PURCHASED_PACKAGES, str3);
bundle.putString(NavigationConstants.PURCHASE_PACK_TYPE, str4);
bundle.putString(NavigationConstants.CURRENCY_SYMBOL, str5);
bundle.putBoolean(NavigationConstants.PURCHASE_FREE_TRIAL, z2);
bundle.putString(NavigationConstants.PURCHASE_FREE_TRIAL_TEXT, str6);
bundle.putString(NavigationConstants.PURCHASE_FREE_TRIAL_EXPIRY, str7);
bundle.putParcelable(NavigationConstants.PURCHASE_ITEM, (Parcelable) obj);
paymentGateWaysFragment.setArguments(bundle);
FragmentTransaction beginTransaction = fragmentActivity.getSupportFragmentManager().beginTransaction();
int i2 = z ? R.id.contentframe : R.id.layout_frame;
ScreenType screenType = ScreenType.PAYMENT_GATEWAYS_SCREEN;
beginTransaction.add(i2, paymentGateWaysFragment, screenType.toString()).addToBackStack(screenType.toString()).commitAllowingStateLoss();
}
public static void performBannerClickNavigation(FragmentActivity fragmentActivity, Banner banner) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
if (banner == null || banner.getTarget() == null || banner.getTarget().getPath() == null) {
return;
}
String path = banner.getTarget().getPath();
if (path.trim().length() == 0) {
return;
}
if (fragmentActivity != null && (fragmentActivity instanceof FusionViliteMainActivity)) {
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
if (fusionViliteMainActivity.isBottomBarVisible()) {
AnalyticsUtils.getInstance().trackAnalyticsEvent(fusionViliteMainActivity.getScreenType(), null, banner, null, AnalyticsUtils.EVENT_BANNER, fusionViliteMainActivity.getPageEventName());
}
}
if (!banner.getIsInternal().booleanValue()) {
onBoardWebViewNavigation(fragmentActivity, NavigationConstants.NAV_FROM_BANNER, path, banner.getTitle());
return;
}
if (path.contains("signup")) {
launchSignUpFragment(fragmentActivity, banner);
return;
}
if (path.contains("signin")) {
launchSignInFragment(fragmentActivity, banner, null);
return;
}
if (path.contains(in.juspay.hypersdk.ota.Constants.PACKAGE_DIR_NAME) || path.equalsIgnoreCase("subscribe") || path.equalsIgnoreCase("plans") || path.contains("plans/list")) {
launchPaymentsFragment(fragmentActivity, "", banner, "");
return;
}
if ((banner.getIsDeeplinking() != null && banner.getIsDeeplinking().equalsIgnoreCase("true")) || (banner.getTarget() != null && banner.getTarget().getPageAttributes() != null && banner.getTarget().getPageAttributes().getIsDeeplinking() != null && banner.getTarget().getPageAttributes().getIsDeeplinking().trim().length() > 0 && banner.getTarget().getPageAttributes().getIsDeeplinking().equalsIgnoreCase("true"))) {
fetchDeepLinkInfo(banner, fragmentActivity, banner.getTarget().getPath());
return;
}
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).enableToolBarLogo(false);
}
launchNavigationFragment(path, banner.getTitle(), fragmentActivity);
}
public static void performErrorPageTransaction(FragmentActivity fragmentActivity, String str) {
try {
Bundle bundle = new Bundle();
ErrorFragment errorFragment = new ErrorFragment();
bundle.putString(NavigationConstants.ERROR_MESSAGE, str);
errorFragment.setArguments(bundle);
int i2 = R.id.error_frame_container;
((FrameLayout) fragmentActivity.findViewById(i2)).setVisibility(0);
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
Fragment findFragmentByTag = supportFragmentManager.findFragmentByTag("navigationfragment");
if (findFragmentByTag != null) {
supportFragmentManager.beginTransaction().remove(findFragmentByTag).commitAllowingStateLoss();
}
Fragment currentFragment = fragmentActivity instanceof FusionViliteMainActivity ? ((FusionViliteMainActivity) fragmentActivity).getCurrentFragment() : null;
if (!supportFragmentManager.isDestroyed()) {
FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
beginTransaction.addToBackStack(PageType.Error.getValue());
beginTransaction.replace(i2, errorFragment);
beginTransaction.commit();
return;
}
if (currentFragment != null && (currentFragment instanceof NavigationFragment)) {
if (((NavigationFragment) currentFragment).bottomBarVisibility) {
((FusionViliteMainActivity) fragmentActivity).showBottomBar(true);
} else {
((FusionViliteMainActivity) fragmentActivity).showBottomBar(false);
}
}
Toast.makeText((Context) fragmentActivity, R.string.something_went_wrong, 0).show();
} catch (Exception unused) {
}
}
public static void performGuideNavigation(FragmentActivity fragmentActivity, String str, String str2, int i2, String str3) {
Bundle bundle = new Bundle();
EPGFragment ePGFragment = new EPGFragment();
bundle.putString(NavigationConstants.TITLE, str != null ? str : "");
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str2);
bundle.putInt(NavigationConstants.MENU_ITEM_POSITION, i2);
String str4 = NavigationConstants.NAV_FROM_PATH;
if (str3 == null) {
str3 = "";
}
bundle.putString(str4, str3);
ePGFragment.setArguments(bundle);
fragmentActivity.getSupportFragmentManager().beginTransaction().setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out).add(R.id.contentframe, ePGFragment).addToBackStack(str).commitAllowingStateLoss();
}
public static void performHeaderNavigation(String str, FragmentActivity fragmentActivity, PageType pageType, Object obj) {
performHeaderNavigation(str, fragmentActivity, pageType, obj, null);
}
public static void performItemClickNavigation(FragmentActivity fragmentActivity, String str, String str2) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
Bundle bundle = new Bundle();
if (fragmentActivity == null) {
return;
}
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
int size = fusionViliteMainActivity.mMenuList.size();
String str3 = "";
boolean z = false;
for (int i2 = 0; i2 < size; i2++) {
if (str.equalsIgnoreCase(String.valueOf(fusionViliteMainActivity.mMenuList.get(i2).getTargetPath()))) {
str3 = String.valueOf(fusionViliteMainActivity.mMenuList.get(i2).getCode());
z = true;
}
}
if (z) {
fusionViliteMainActivity.updateMenutab(str3);
}
if (z) {
return;
}
NavigationFragment navigationFragment = new NavigationFragment();
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str);
if (str2 != null) {
bundle.putString(NavigationConstants.SCREENSOURCE, str2);
}
navigationFragment.setArguments(bundle);
if (fragmentActivity instanceof FusionViliteMainActivity) {
fusionViliteMainActivity.currentItemtargerPath = str;
}
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
}
public static void performPageNavigation(final androidx.fragment.app.FragmentActivity r17, java.lang.Object r18, java.lang.String r19, java.lang.String r20, java.lang.String r21, java.lang.String r22, java.lang.String r23, java.lang.String r24) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.utils.NavigationUtils.performPageNavigation(androidx.fragment.app.FragmentActivity, java.lang.Object, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String):void");
}
public static void performPasswordNavigation(FragmentActivity fragmentActivity) {
fragmentActivity.getSupportFragmentManager().beginTransaction().setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out).replace(R.id.contentframe, new DebugSettingsFragment()).commitAllowingStateLoss();
}
private static Intent prepareContentAssociatedParams(Object obj, Intent intent) {
String sourceForAnalytics = MyRecoManager.getInstance().getSourceForAnalytics();
String sourceDetailsForAnalytics = MyRecoManager.getInstance().getSourceDetailsForAnalytics();
String subSourceDetailsForAnalytics = MyRecoManager.getInstance().getSubSourceDetailsForAnalytics();
String contentGenre = MyRecoManager.getInstance().getContentGenre();
String contentLanguage = MyRecoManager.getInstance().getContentLanguage();
String contentPartnerName = MyRecoManager.getInstance().getContentPartnerName();
String contentType = MyRecoManager.getInstance().getContentType();
String contentModel = MyRecoManager.getInstance().getContentModel();
String contentTag = MyRecoManager.getInstance().getContentTag();
String contentId = MyRecoManager.getInstance().getContentId();
String contentTitle = MyRecoManager.getInstance().getContentTitle();
intent.putExtra(NavigationConstants.CONTENT_ASSOCIATED, true);
intent.putExtra(NavigationConstants.CA_CONTENT_NAME, contentTitle);
intent.putExtra(NavigationConstants.CA_CONTENT_TYPE, contentType);
intent.putExtra(NavigationConstants.CA_CONTENT_MODEL, contentModel);
intent.putExtra(NavigationConstants.CA_CONTENT_TAG, contentTag);
intent.putExtra(NavigationConstants.CA_CONTENT_GENRE, contentGenre);
intent.putExtra(NavigationConstants.CA_CONTENT_LANGUAGE, contentLanguage);
intent.putExtra(NavigationConstants.CA_CONTENT_ID, contentId);
intent.putExtra(NavigationConstants.CA_CONTENT_PARTNER, contentPartnerName);
intent.putExtra(NavigationConstants.CA_CONTENT_SOURCE, sourceForAnalytics);
intent.putExtra(NavigationConstants.CA_CONTENT_SOURCE_DETAILS, sourceDetailsForAnalytics);
intent.putExtra(NavigationConstants.CA_CONTENT_SUB_SOURCE_DETAILS, subSourceDetailsForAnalytics);
return intent;
}
public static void sendAutoPlayPauseBroadCast(Context context) {
OTTApplication.getLocalBroadcastManager(context).sendBroadcast(new Intent(Constants.PAUSE_BROADCAST));
}
public static void sendAutoPlayResumeBroadCast(Context context) {
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) context;
Fragment findFragmentById = fusionViliteMainActivity.getSupportFragmentManager().findFragmentById(R.id.contentframe);
Fragment findFragmentById2 = fusionViliteMainActivity.getSupportFragmentManager().findFragmentById(R.id.player_fragment_container);
if ((findFragmentById instanceof HomeFragment) || (findFragmentById instanceof ViewPagerFragment)) {
if (!(findFragmentById2 instanceof ExoPlayerFragment) || ((ExoPlayerFragment) findFragmentById2).player == null) {
OTTApplication.getLocalBroadcastManager(context).sendBroadcast(new Intent(Constants.RESUME_BROADCAST));
}
}
}
private static void sendClickData(String str) {
if (str == null || str.isEmpty()) {
return;
}
OttLog.error("contentPath", str);
OttSDK.getInstance().getUserManager().sendClickData(str, new UserManager.UserCallback<String>() {
@Override
public void onEmptySuccess() {
com.yupptv.ottsdk.managers.User.a.a(this);
}
@Override
public void onFailure(Error error) {
OttLog.error("contentPath", "error message" + error.getMessage());
NavigationUtils.logKibanaError("NavigationUtils", "API", "/service/click/analytics/v1/send/data", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
}
@Override
public void onSuccess(String str2) {
OttLog.error("contentPath", "send");
}
});
}
public static void sendRecoEvents(AppCompatActivity appCompatActivity, HashMap<String, String> hashMap) {
String str;
Configs utilAppConfigurations = APIUtils.getUtilAppConfigurations(appCompatActivity);
if (utilAppConfigurations == null || utilAppConfigurations.getSupportMyreco() == null || !utilAppConfigurations.getSupportMyreco().equals("true")) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("eventType", "Playback");
jSONObject.put("eventName", "Played");
StringBuilder sb = new StringBuilder("Android_");
String str2 = Build.VERSION.RELEASE;
sb.append(str2);
jSONObject.put("userAgent", sb.toString());
jSONObject.put(LogSubCategory.ApiCall.NETWORK, NetworkUtils.getNetworkType(appCompatActivity));
jSONObject.put(PaymentConstants.SDK_VERSION, String.valueOf(str2));
jSONObject.put("appVersion", "3.1.5");
jSONObject.put(LogSubCategory.Context.DEVICE, "Android");
jSONObject.put("value", (!hashMap.containsKey("value") || hashMap.get("value") == null) ? 1 : Integer.parseInt(hashMap.get("value")));
try {
if (hashMap.containsKey("carousal_name")) {
CustomLog.e("Sravani", "in player");
jSONObject.put("trackingId", (!hashMap.containsKey("tracking_id") || hashMap.get("tracking_id") == null) ? "" : hashMap.get("tracking_id"));
jSONObject.put("originSource", (!hashMap.containsKey("origin_source") || hashMap.get("origin_source") == null) ? "" : hashMap.get("origin_source"));
jSONObject.put("originMedium", (!hashMap.containsKey("origin_medium") || hashMap.get("origin_medium") == null) ? "" : hashMap.get("origin_medium"));
jSONObject.put("originName", (!hashMap.containsKey("carousal_name") || hashMap.get("carousal_name") == null) ? "" : hashMap.get("carousal_name"));
jSONObject.put("contentPath", (!hashMap.containsKey("target_path") || hashMap.get("target_path") == null) ? "" : hashMap.get("target_path"));
jSONObject.put("tabName", (!hashMap.containsKey("tabName") || hashMap.get("tabName") == null) ? "" : hashMap.get("tabName"));
jSONObject.put("selectedAudioLanguage", !TextUtils.isEmpty(MyRecoManager.getInstance().getSelectedAudioLanguage()) ? MyRecoManager.getInstance().getSelectedAudioLanguage() : "");
jSONObject.put("carouselPosition", (!hashMap.containsKey("carousal_position") || hashMap.get("carousal_position") == null || Integer.parseInt(hashMap.get("carousal_position")) == -1) ? "" : String.valueOf(hashMap.get("carousal_position")));
jSONObject.put("contentPosition", (!hashMap.containsKey("content_position") || hashMap.get("content_position") == null || Integer.parseInt(hashMap.get("content_position")) == -1) ? "" : String.valueOf(hashMap.get("content_position")));
str = "";
} else {
CustomLog.e("Sravani", "out player");
jSONObject.put("originName", (!hashMap.containsKey("originName") || hashMap.get("originName") == null) ? MyRecoManager.getInstance().getCarouselTitle() : hashMap.get("originName"));
jSONObject.put("contentPath", MyRecoManager.getInstance().getTargetPath());
jSONObject.put("tabName", (!hashMap.containsKey("tabName") || hashMap.get("tabName") == null || hashMap.get("tabName").isEmpty()) ? MyRecoManager.getInstance().getTAB_NAME() : hashMap.get("tabName"));
str = "";
try {
jSONObject.put("selectedAudioLanguage", str);
jSONObject.put("carouselPosition", MyRecoManager.getInstance().getCarouselPosition() != -1 ? String.valueOf(MyRecoManager.getInstance().getCarouselPosition()) : str);
jSONObject.put("contentPosition", MyRecoManager.getInstance().getContentPosition() != -1 ? String.valueOf(MyRecoManager.getInstance().getContentPosition()) : str);
jSONObject.put("trackingId", (!hashMap.containsKey("tracking_id") || hashMap.get("tracking_id") == null) ? (MyRecoManager.getInstance().getTRACKING_ID() == null || MyRecoManager.getInstance().getTRACKING_ID().isEmpty()) ? str : MyRecoManager.getInstance().getTRACKING_ID() : hashMap.get("tracking_id"));
jSONObject.put("originSource", (MyRecoManager.getInstance().getOriginSource() == null || MyRecoManager.getInstance().getOriginSource().isEmpty()) ? "AppOpen" : MyRecoManager.getInstance().getOriginSource());
jSONObject.put("originMedium", (MyRecoManager.getInstance().getOriginMedium() == null || MyRecoManager.getInstance().getOriginMedium().isEmpty()) ? "carousel" : MyRecoManager.getInstance().getOriginMedium());
} catch (JSONException unused) {
}
}
if (Constants.IS_FROM_NOTIFICATION) {
jSONObject.put("originMedium", "Notification");
jSONObject.put("tabName", str);
Constants.IS_FROM_NOTIFICATION = false;
}
} catch (JSONException unused2) {
str = "";
}
} catch (JSONException unused3) {
str = "";
}
CustomLog.e("Sravani", " " + jSONObject.toString());
CustomLog.e(appCompatActivity.getLocalClassName(), RestAdapter.getInstance(appCompatActivity).getApiClient() + str);
APIUtils.getOTTSdkInstance(appCompatActivity).getUserManager().sendMyrecoEvents(jSONObject, new UserManager.UserCallback<String>() {
@Override
public void onEmptySuccess() {
com.yupptv.ottsdk.managers.User.a.a(this);
}
@Override
public void onFailure(Error error) {
CustomLog.e("Sravani", " " + error.getMessage());
NavigationUtils.logKibanaError("NavigationUtils", "API", "/service/api/v1/send/myreco/events", "NA", "NA", "NA", com.yupptv.ott.f.a(error, new StringBuilder("")), error.getMessage());
}
@Override
public void onSuccess(String str3) {
CustomLog.e("Sravani", " " + str3);
}
});
}
public static void sendStartAutoScrollBroadCast(Context context) {
OTTApplication.getLocalBroadcastManager(context).sendBroadcast(new Intent(Constants.START_AUTOSCROLL));
}
public static void sendStopAutoScrollBroadCast(Context context) {
OTTApplication.getLocalBroadcastManager(context).sendBroadcast(new Intent(Constants.STOP_AUTOSCROLL));
}
public static ActionBottomSheetDialogFragment showChangeUpiJuspayCallDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
ActionBottomSheetDialogFragment newInstance = ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener);
newInstance.show(supportFragmentManager, "change_upi_juspay_call_dialog");
return newInstance;
}
public static void showDialog(FragmentActivity fragmentActivity, DialogType dialogType, PackagesV2 packagesV2, DialogListener dialogListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
try {
if (AnonymousClass10.$SwitchMap$com$yupptv$ott$enums$DialogType[dialogType.ordinal()] != 1) {
return;
}
CustomDialogFragment newInstance = CustomDialogFragment.newInstance(dialogType, packagesV2, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance.show(supportFragmentManager, "packInfoDialog");
} catch (IllegalStateException unused) {
}
}
public static ActionBottomSheetDialogFragment showInfoDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
ActionBottomSheetDialogFragment newInstance = ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener);
newInstance.show(supportFragmentManager, "dialog_bottom_player_rendering");
return newInstance;
}
public static ActionBottomSheetDialogFragment showSubscribeDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
ActionBottomSheetDialogFragment newInstance = ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener);
newInstance.show(supportFragmentManager, "dialog_subscribe_sheet");
return newInstance;
}
public static ActionBottomSheetDialogFragment showUserCocpDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
ActionBottomSheetDialogFragment newInstance = ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener);
newInstance.show(supportFragmentManager, "dialog_user_cocp_sheet");
return newInstance;
}
public static ActionBottomSheetDialogFragment showUserSuspendedDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
ActionBottomSheetDialogFragment newInstance = ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener);
newInstance.show(supportFragmentManager, "dialog_user_suspended_sheet");
return newInstance;
}
public static void startNewActivity(Object obj, Context context, DeeplinkInfo deeplinkInfo, int i2, String str) {
String contentType = deeplinkInfo.getContentType();
String contentCode = deeplinkInfo.getContentCode();
deeplinkInfo.getUrl();
String partnerCode = deeplinkInfo.getPartnerCode();
CustomLog.e("startNewActivity:DeepLink", contentCode + " " + contentType);
if (contentCode == null) {
return;
}
sendClickData(str);
String str2 = "";
List<Networks> networkList = APIUtils.getUtilApplicationManager(context).getNetworkList();
if (networkList != null) {
for (int i3 = 0; i3 < networkList.size(); i3++) {
if (networkList.get(i3).getCustomAttributes().getPartnerCode() != null && networkList.get(i3).getCustomAttributes().getPartnerCode().trim().length() > 0 && networkList.get(i3).getCustomAttributes().getPartnerCode().equalsIgnoreCase(partnerCode)) {
str2 = networkList.get(i3).getDeeplinkInfo();
}
}
}
OttLog.error("TAG DeepLink ", " Content Code :: ".concat(contentCode));
OttLog.error("TAG DeepLink ", " Package Name :: " + str2);
if (str2 == null || str2.isEmpty() || context == 0) {
if (context != 0) {
if (TextUtils.isEmpty(deeplinkInfo.getWebRedirectionEnabled()) || !deeplinkInfo.getWebRedirectionEnabled().equalsIgnoreCase("true")) {
Toast.makeText(context, "Something went wrong.", 1).show();
return;
} else {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(contentCode)));
return;
}
}
return;
}
eventCTAppInAppClick(context, obj, str, contentType, null);
Intent launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(str2);
if (launchIntentForPackage == null) {
if (TextUtils.isEmpty(deeplinkInfo.getWebRedirectionEnabled()) || !deeplinkInfo.getWebRedirectionEnabled().equalsIgnoreCase("true")) {
launchIntentForPackage = new Intent("android.intent.action.VIEW");
launchIntentForPackage.setData(Uri.parse("market://details?id=".concat(str2)));
} else {
launchIntentForPackage = new Intent("android.intent.action.VIEW", Uri.parse(contentCode));
context.startActivity(launchIntentForPackage);
}
} else if (contentCode.trim().isEmpty()) {
if (context instanceof FusionViliteMainActivity) {
str = ((FusionViliteMainActivity) context).currentItemtargerPath;
}
if (partnerCode != null && partnerCode.contains("sonyliv")) {
contentCode = com.yupptv.ott.b.a(contentCode, "&redirectionApi=watcho:///", str);
}
launchIntentForPackage.putExtra("contentCode", contentCode);
if (contentType != null) {
OttLog.error("TAG DeepLink ", " Content Type :: ".concat(contentType));
launchIntentForPackage.putExtra("contentType", contentType);
}
} else {
if (!str2.equalsIgnoreCase("com.viewlift.hoichoi")) {
launchIntentForPackage = new Intent("android.intent.action.VIEW");
launchIntentForPackage.setPackage(str2);
}
if (context instanceof FusionViliteMainActivity) {
str = ((FusionViliteMainActivity) context).currentItemtargerPath;
}
if (partnerCode != null && partnerCode.contains("sonyliv")) {
contentCode = com.yupptv.ott.b.a(contentCode, "&redirectionApi=watcho:///", str);
}
launchIntentForPackage.setData(Uri.parse(contentCode));
}
try {
OttLog.error("TAG DeepLink ", " Content Code :: " + contentCode);
context.startActivity(launchIntentForPackage);
} catch (ActivityNotFoundException e2) {
if (!TextUtils.isEmpty(deeplinkInfo.getWebRedirectionEnabled()) && deeplinkInfo.getWebRedirectionEnabled().equalsIgnoreCase("true")) {
context.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(contentCode)));
} else {
CustomLog.e("activityNotFoundOnDeepLinking", e2.getMessage());
Toast.makeText(context, "Google Playstore app not available", 1).show();
}
}
}
private static void trackEvent(ScreenType screenType, String str) {
try {
int i2 = AnonymousClass10.$SwitchMap$com$yupptv$ott$enums$ScreenType[screenType.ordinal()];
if (i2 != 1) {
if (i2 != 3) {
if ((i2 == 5 || i2 == 6) && str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PLAYER)) {
AnalyticsV2.getInstance().trackEvent(AnalyticsV2.EVENT_PLAYER_SUBSCRIBE);
}
} else if (str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PLAYER)) {
AnalyticsV2.getInstance().trackEvent(AnalyticsV2.EVENT_PLAYER_SIGNIN);
} else if (str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PAYMENT)) {
AnalyticsV2.getInstance().trackEvent(AnalyticsV2.EVENT_PAYMENT_SIGNIN);
}
} else if (str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PLAYER)) {
AnalyticsV2.getInstance().trackEvent(AnalyticsV2.EVENT_PLAYER_REGISTER);
} else if (str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PAYMENT)) {
AnalyticsV2.getInstance().trackEvent(AnalyticsV2.EVENT_PAYMENT_REGISTER);
}
} catch (NullPointerException unused) {
}
}
public static void webViewNavigationWithAbsoluteUrl(FragmentActivity fragmentActivity, String str, String str2) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", "");
intent.putExtra("webview_title", str2);
if (str != null) {
intent.putExtra(NavigationConstants.WEB_URL, str);
}
fragmentActivity.startActivity(intent);
}
public static void performHeaderNavigation(String str, FragmentActivity fragmentActivity, PageType pageType, Object obj, Fragment fragment) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
GridFragment gridFragment = new GridFragment();
Bundle bundle = new Bundle();
if (obj instanceof HeaderItemWithControls) {
HeaderItemWithControls headerItemWithControls = (HeaderItemWithControls) obj;
bundle.putParcelable(NavigationConstants.SECTIONDATA, (Parcelable) obj);
bundle.putString(NavigationConstants.TITLE, headerItemWithControls.getName());
bundle.putString(NavigationConstants.NAV_FROM_PATH, AnalyticsUtils.EVENT_VIEW_ALL + headerItemWithControls.getName());
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).currentItemtargerPath = headerItemWithControls.getControls().getViewAllTargetPath();
}
} else if (obj instanceof Section.SectionData) {
Section.SectionData sectionData = (Section.SectionData) obj;
bundle.putString(NavigationConstants.TITLE, sectionData.getExploreSectionTitle());
bundle.putString(NavigationConstants.NAV_FROM_EXPLORE, str);
bundle.putString(NavigationConstants.NAV_FROM_PATH, AnalyticsUtils.EVENT_VIEW_ALL + sectionData.getSection());
bundle.putParcelable(NavigationConstants.SECTIONDATA, (Parcelable) obj);
} else {
bundle.putString(NavigationConstants.TITLE, (String) obj);
}
bundle.putString(NavigationConstants.PAGE_TYPE, AnalyticsUtils.EVENT_VIEW_ALL);
gridFragment.setArguments(bundle);
if (!(fragment instanceof UpNextFragment)) {
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, gridFragment).addToBackStack(pageType.getValue()).commitAllowingStateLoss();
} else {
((FusionViliteMainActivity) fragmentActivity).displayViewAllFrameContainer();
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.viewAllFrameLayout, gridFragment).addToBackStack(pageType.getValue()).commitAllowingStateLoss();
}
}
public static void onBoardOTPNavigation(FragmentActivity fragmentActivity, String str, OTPType oTPType, String str2, String str3, String str4, Bundle bundle) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, OTPVerificationFragment.newInstance(str, oTPType, str2, str3, str4, bundle), "verifyMobile").addToBackStack("verifyMobile").commitAllowingStateLoss();
}
public static void onBoardWebViewNavigationForResult(FragmentActivity fragmentActivity, String str, String str2, boolean z) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", str);
if (str2 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str2);
}
intent.putExtra(NavigationConstants.WEB_URL_FROM_USER_PROFILES, z);
fragmentActivity.startActivityForResult(intent, 101);
}
public static void showDialog(String str, FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, Object obj, BottomButtonsActionListener bottomButtonsActionListener) {
if (fragmentActivity == null || fragmentActivity.isFinishing() || fragmentActivity.isDestroyed()) {
return;
}
ActionBottomSheetDialogFragment.newInstance(str, dialogType, hashMap, obj, bottomButtonsActionListener).show(fragmentActivity.getSupportFragmentManager(), "dialog_bottom_player_rendering");
}
public static void onBoardWebViewNavigation(FragmentActivity fragmentActivity, String str, String str2, String str3) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", str);
if (str2 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str2);
}
String str4 = NavigationConstants.TITLE;
if (str3 == null) {
str3 = "";
}
intent.putExtra(str4, str3);
fragmentActivity.startActivity(intent);
}
public static Fragment getHomeScreenFragment(String str, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
HomeFragment homeFragment = new HomeFragment();
bundle.putString(NavigationConstants.TITLE, str);
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str2);
bundle.putInt(NavigationConstants.MENU_ITEM_POSITION, i2);
bundle.putString(NavigationConstants.NAV_FROM_PATH, str);
bundle.putString(NavigationConstants.MAIN_MENU_TARGET_PATH, str3);
homeFragment.setArguments(bundle);
return homeFragment;
}
private static void launchNavigationFragment(String str, String str2, FragmentActivity fragmentActivity) {
Bundle bundle = new Bundle();
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).currentItemtargerPath = str;
}
NavigationFragment navigationFragment = new NavigationFragment();
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str);
String str3 = NavigationConstants.TITLE;
if (str2 == null) {
str2 = "";
}
bundle.putString(str3, str2);
navigationFragment.setArguments(bundle);
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
}
public static void onBoardOTPNavigation(FragmentActivity fragmentActivity, String str, OTPType oTPType, String str2, String str3, String str4, boolean z, Bundle bundle) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, OTPVerificationFragment.newInstance(str, oTPType, str2, str3, str4, z, bundle, "false", "", -1), "verifyMobile").addToBackStack("verifyMobile").commitAllowingStateLoss();
}
public static void showDialog(FragmentActivity fragmentActivity, DialogType dialogType, HashMap hashMap, DialogListener dialogListener) {
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
try {
switch (AnonymousClass10.$SwitchMap$com$yupptv$ott$enums$DialogType[dialogType.ordinal()]) {
case 2:
CustomDialogFragment newInstance = CustomDialogFragment.newInstance(DialogType.MESSAGE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance.show(supportFragmentManager, "msgDialog");
break;
case 3:
CustomDialogFragment newInstance2 = CustomDialogFragment.newInstance(DialogType.COUNTRIES_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance2.show(supportFragmentManager, "countriesDialog");
break;
case 4:
CustomDialogFragment newInstance3 = CustomDialogFragment.newInstance(DialogType.SESSION_EXPIRED_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance3.show(supportFragmentManager, "sessionExpiredDialog");
break;
case 5:
CustomDialogFragment newInstance4 = CustomDialogFragment.newInstance(DialogType.DELINK_DEVICE, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance4.show(supportFragmentManager, "delinkDevice");
break;
case 6:
CustomDialogFragment newInstance5 = CustomDialogFragment.newInstance(DialogType.CONTINUE_WATCHING_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance5.show(supportFragmentManager, "continuewatching");
break;
case 7:
CustomDialogFragment newInstance6 = CustomDialogFragment.newInstance(DialogType.CONTINUE_LOGOUT_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance6.show(supportFragmentManager, "continuelogout");
break;
case 8:
CustomDialogFragment newInstance7 = CustomDialogFragment.newInstance(DialogType.APP_UPDATE, hashMap, dialogListener);
supportFragmentManager.beginTransaction().add(newInstance7, "appupdate");
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance7.show(supportFragmentManager, "appupdate");
break;
case 9:
CustomDialogFragment newInstance8 = CustomDialogFragment.newInstance(DialogType.RECORD, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance8.show(supportFragmentManager, "recording");
break;
case 10:
CustomDialogFragment newInstance9 = CustomDialogFragment.newInstance(DialogType.PAYMENT_CONFIRMATION_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance9.show(supportFragmentManager, "paymentconfirmationdialog");
break;
case 11:
CustomDialogFragment newInstance10 = CustomDialogFragment.newInstance(DialogType.LEAVE_PAGE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance10.show(supportFragmentManager, "leavepagedialog");
break;
case 12:
CustomDialogFragment newInstance11 = CustomDialogFragment.newInstance(DialogType.REGISTRATION_SUCCESS_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance11.show(supportFragmentManager, "registrationsuccessdialog");
break;
case 13:
CustomDialogFragment newInstance12 = CustomDialogFragment.newInstance(DialogType.REMOVE_LINKED_DEVICE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance12.show(supportFragmentManager, "removelinkeddevicedialog");
break;
case 14:
CustomDialogFragment newInstance13 = CustomDialogFragment.newInstance(DialogType.LINKED_DEVICE_LIMIT_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance13.show(supportFragmentManager, "linkedDeviceLimitDialog");
break;
case 15:
CustomDialogFragment newInstance14 = CustomDialogFragment.newInstance(DialogType.DEEPLINK_INFO, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance14.show(supportFragmentManager, "deeplink_info");
break;
case 16:
CustomDialogFragment newInstance15 = CustomDialogFragment.newInstance(DialogType.STARTOVER_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().add(newInstance15, "startoverdialog");
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance15.show(supportFragmentManager, "startoverdialog");
break;
case 17:
CustomDialogFragment newInstance16 = CustomDialogFragment.newInstance(DialogType.PLAYER_ACTIVE_SCREEN_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance16.show(supportFragmentManager, "playerActiveScreenDialog");
break;
case 18:
CustomDialogFragment newInstance17 = CustomDialogFragment.newInstance(DialogType.SETTINGS_ACTIVE_SCREEN_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance17.show(supportFragmentManager, "settingActiveScreenDialog");
break;
case 19:
CustomDialogFragment newInstance18 = CustomDialogFragment.newInstance(DialogType.REMOVE_SAVED_CARD_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance18.show(supportFragmentManager, "remove_saved_card_dialog");
break;
case 20:
CustomDialogFragment newInstance19 = CustomDialogFragment.newInstance(DialogType.CHANGE_PLAN_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance19.show(supportFragmentManager, "CHANGE_PLAN_DIALOG");
break;
case 21:
CustomDialogFragment newInstance20 = CustomDialogFragment.newInstance(DialogType.ORDER_SUMMARY_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance20.show(supportFragmentManager, "ORDER_SUMMARY_DIALOG");
break;
case 22:
CustomDialogFragment newInstance21 = CustomDialogFragment.newInstance(DialogType.TAX_INFO_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance21.show(supportFragmentManager, "TAX_INFO_DIALOG");
break;
case 23:
CustomDialogFragment newInstance22 = CustomDialogFragment.newInstance(DialogType.ERROR_MESSAGE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance22.show(supportFragmentManager, "ERROR_MESSAGE_DIALOG");
break;
case 24:
CustomDialogFragment newInstance23 = CustomDialogFragment.newInstance(DialogType.SIGNIN_SIGNUP_INFO_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance23.show(supportFragmentManager, "SIGNIN_SIGNUP_INFO_DIALOG");
break;
case 25:
CustomDialogFragment.newInstance(DialogType.FEEDBACK_RATING_DIALOG, hashMap, dialogListener).show(supportFragmentManager, "feedbackratingdialog");
break;
case 26:
CustomDialogFragment newInstance24 = CustomDialogFragment.newInstance(DialogType.GDPR_COOKIE_POLICY_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance24.show(supportFragmentManager, "gdprcookiepolicy");
break;
case 27:
CustomDialogFragment newInstance25 = CustomDialogFragment.newInstance(DialogType.WEBVIEW_NAVIGATION_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance25.show(supportFragmentManager, "webviewNavigation");
break;
case 28:
CustomDialogFragment newInstance26 = CustomDialogFragment.newInstance(DialogType.OFFLINE_DELETE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance26.show(supportFragmentManager, "offlineDelete");
break;
case 29:
CustomDialogFragment newInstance27 = CustomDialogFragment.newInstance(DialogType.VOUCHER_APPLY_FAILURE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance27.show(supportFragmentManager, "VOUCHER_FAILURE_INFO_DIALOG");
break;
case 30:
CustomDialogFragment newInstance28 = CustomDialogFragment.newInstance(DialogType.SUBSCRIBE_RENT_INFO_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance28.show(supportFragmentManager, "SIGNIN_SIGNUP_INFO_DIALOG");
break;
case 31:
CustomDialogFragment newInstance29 = CustomDialogFragment.newInstance(DialogType.PARENTAL_CONTROL_PASSCODE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance29.show(supportFragmentManager, "PARENT_CONTROLLING_PASSCODE_DIALOG");
break;
case 32:
CustomDialogFragment newInstance30 = CustomDialogFragment.newInstance(DialogType.UPDATE_AGE_DOB_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance30.show(supportFragmentManager, "UPDATE_AGE_DOB_DIALOG");
break;
case 33:
CustomDialogFragment newInstance31 = CustomDialogFragment.newInstance(DialogType.USER_PROFILE_PASSCODE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance31.show(supportFragmentManager, "USER_PROFILE_PASSCODE_DIALOG");
break;
case 34:
CustomDialogFragment newInstance32 = CustomDialogFragment.newInstance(DialogType.ADD_USER_PROFILE_PASSCODE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance32.show(supportFragmentManager, "ADD_USER_PROFILE_PASSCODE_DIALOG");
break;
case 35:
CustomDialogFragment newInstance33 = CustomDialogFragment.newInstance(DialogType.AFTER_DARK_PASSCODE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance33.show(supportFragmentManager, "AFTER_DARK_AGREE_DIALOG");
break;
case 36:
CustomDialogFragment newInstance34 = CustomDialogFragment.newInstance(DialogType.ENVIRONMENT_LIST_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance34.show(supportFragmentManager, "ENVIRONMENT_LIST_DIALOG");
break;
case 37:
CustomDialogFragment newInstance35 = CustomDialogFragment.newInstance(DialogType.LOGIN_TYPE_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance35.show(supportFragmentManager, "LOGIN_TYPE_DIALOG");
break;
case 38:
CustomDialogFragment newInstance36 = CustomDialogFragment.newInstance(DialogType.INSERT_PASSWORD_DIALOG, hashMap, dialogListener);
supportFragmentManager.beginTransaction().commitAllowingStateLoss();
newInstance36.show(supportFragmentManager, "INSERT_PASSWORD_DIALOG");
break;
}
} catch (IllegalStateException unused) {
}
}
public static void onBoardWebViewNavigationForResult(String str, FragmentActivity fragmentActivity, String str2, String str3, String str4) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", str2);
if (!TextUtils.isEmpty(str) && (str.equalsIgnoreCase("subscription overlay") || str.equalsIgnoreCase("content watch now") || str.equalsIgnoreCase("content subscribe") || str.equalsIgnoreCase("content upgrade") || str.equalsIgnoreCase("player nudge"))) {
intent.putExtra("isFromDetailsPage", true);
} else if (!TextUtils.isEmpty(str) && str.equalsIgnoreCase(Constants.SOURCE_PARTNER_PAGE)) {
intent.putExtra("isFromPartnersPage", true);
}
if (str3 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str3);
}
if (str4 != null) {
intent.putExtra(NavigationConstants.TITLE, str4);
}
if (str != null) {
intent.putExtra(NavigationConstants.SUBCRIPTION_PAGE_SOURCE, str);
}
fragmentActivity.startActivityForResult(intent, 101);
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, int i2, String str2, String str3) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.PAYMENT_TYPE, str2);
intent.putExtra(NavigationConstants.PURCHASE_GATEWAY, str3);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void onBoardOTPNavigation(FragmentActivity fragmentActivity, String str, OTPType oTPType, Integer num, String str2, String str3, String str4, boolean z, Bundle bundle, String str5, String str6, int i2) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, OTPVerificationFragment.newInstance(str, oTPType, str2, str3, str4, z, bundle, str5, str6, i2, num), "verifyMobile").addToBackStack("verifyMobile").commitAllowingStateLoss();
}
public static void performItemClickNavigation(Fragment fragment, final FragmentActivity fragmentActivity, Object obj, final String str, String str2) {
EPGProgramsData.Program program;
Card card;
final String title;
char c;
DialogType dialogType;
OTTApplication.item = obj;
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
boolean z = obj instanceof Card;
if (z || (obj instanceof EPGProgramsData.Program)) {
User user = null;
if (z) {
card = (Card) obj;
program = null;
} else {
program = (EPGProgramsData.Program) obj;
card = null;
}
MyRecoManager.getInstance().setTRACKING_ID(str2);
final String path = card != null ? card.getTarget().getPath() : program.getTarget().getPath();
if (card == null || card.getDisplay() == null) {
title = program.getDisplay() != null ? program.getDisplay().getTitle() : "";
} else {
title = card.getDisplay().getTitle();
}
String template = card != null ? card.getTemplate() : program.getTemplate();
MyRecoManager.getInstance().setTargetPath(path);
if (!path.contains("plans/list") && !path.equalsIgnoreCase(in.juspay.hypersdk.ota.Constants.PACKAGE_DIR_NAME) && !path.equalsIgnoreCase("subscribe") && !path.equalsIgnoreCase("plans")) {
if (path.equalsIgnoreCase("signin")) {
((FusionViliteMainActivity) fragmentActivity).launchSigninPage(false, -1);
return;
}
String a = l.a(card);
boolean z2 = a != null && (a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_LIVE_TV) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_EPG) || a.equalsIgnoreCase(Constants.CONTENT_TYPE_CHANNEL));
Target target = card.getTarget();
if (template != null && !template.equalsIgnoreCase("")) {
switch (template.hashCode()) {
case -1963969477:
if (template.equals("lsdk_cocp_overlay")) {
c = 0;
break;
}
c = 65535;
break;
case 955021116:
if (template.equals("lsdk_upgrade_overlay")) {
c = 1;
break;
}
c = 65535;
break;
case 1193336636:
if (template.equals("lsdk_pro")) {
c = 2;
break;
}
c = 65535;
break;
case 1909139047:
if (template.equals("deeplink_info")) {
c = 3;
break;
}
c = 65535;
break;
case 2010772539:
if (template.equals("lsdk_suspended_overlay")) {
c = 4;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
dialogType = DialogType.USER_COCP_SHEET_DIALOG;
break;
case 1:
dialogType = DialogType.NO_PRO_USER_SHEET_DIALOG;
break;
case 2:
dialogType = DialogType.PRO_USER_POPUP_DIALOG;
if (Utils.isVimtvAppInstalledOrNot(fragmentActivity, "com.vodafone.vodafoneplay")) {
template = template.concat("_installed");
String showvimtvappinstalledpopup = OttSDK.getInstance().getApplicationManager().getAppConfigurations().getShowvimtvappinstalledpopup();
if (!TextUtils.isEmpty(showvimtvappinstalledpopup) && showvimtvappinstalledpopup.equalsIgnoreCase("false")) {
String vimtvdeeplinkbaseurl = OttSDK.getInstance().getApplicationManager().getAppConfigurations().getVimtvdeeplinkbaseurl();
if (!TextUtils.isEmpty(vimtvdeeplinkbaseurl)) {
eventCTAppInAppClick(fragmentActivity, obj, path, a, null);
OTTApplication.isDrawerOpen = false;
fragmentActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(vimtvdeeplinkbaseurl + path)));
return;
}
}
}
break;
case 3:
dialogType = DialogType.DEEPLINK_INFO;
break;
case 4:
dialogType = DialogType.USER_SUSPENDED_SHEET_DIALOG;
break;
default:
dialogType = DialogType.DIALOG_BOTTOM_RENDERING;
break;
}
DialogType dialogType2 = dialogType;
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity.isViewAllBottomSheetDisplayed = fusionViliteMainActivity.isViewAllFrameVisible();
HashMap hashMap = new HashMap();
hashMap.put("dialog_template_code", template);
hashMap.put("dialog_key_target_path", path);
hashMap.put("navigation_fragment", "navigation_tv_guide");
hashMap.put("dialog_key_message_title", title);
showDialog((str.equalsIgnoreCase("recommendations_page") || str.equalsIgnoreCase("details_page")) ? "Carousel" : str, fragmentActivity, dialogType2, hashMap, obj, new BottomButtonsActionListener() {
@Override
public void onButtonClicked(AppCompatButton appCompatButton, Object obj2, ButtonType buttonType) {
String str3;
try {
str3 = (String) appCompatButton.getTag();
if (str3 == null || str3.equalsIgnoreCase("")) {
str3 = path;
}
} catch (Exception unused) {
str3 = path;
}
if (obj2 == null && !buttonType.equals(ButtonType.DELETE_RECORD) && !buttonType.equals(ButtonType.UPGRADE) && !buttonType.equals(ButtonType.SUBSCRIBE) && !buttonType.equals(ButtonType.DELETE_RECORD_FROM_VIEWALL)) {
fragmentActivity.clearPlayerData();
fragmentActivity.setButtonType(buttonType);
fragmentActivity.setPlayerScreenSource(str);
fragmentActivity.goToDetail(str3);
return;
}
if (buttonType.equals(ButtonType.BROWSE_EPISODES)) {
OttSDK.getInstance().getMediaManager().cancelAll();
OttSDK.getInstance().getMediaManager().getPageContent(path, new MediaCatalogManager.MediaCatalogCallback<ContentPage>() {
@Override
public void onFailure(Error error) {
NavigationUtils.logKibanaError("NavigationUtils", "API", "/service/api/v1/page/content", "NA", "contentid", "NA", com.yupptv.ott.f.a(error, com.yupptv.ott.epg.a.a(error, fragmentActivity, 0, "")), error.getMessage());
}
@Override
public void onSuccess(ContentPage contentPage) {
FragmentActivity fragmentActivity2 = fragmentActivity;
if (fragmentActivity2 == null) {
return;
}
String pageType = contentPage.getPageInfo().getPageType();
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
NavigationUtils.performPageNavigation(fragmentActivity2, contentPage, pageType, path, title, "", "", "");
}
});
return;
}
if (buttonType.equals(ButtonType.DELETE_RECORD)) {
FusionViliteMainActivity fusionViliteMainActivity2 = fragmentActivity;
if (fusionViliteMainActivity2 == null || !(fusionViliteMainActivity2 instanceof FusionViliteMainActivity) || fusionViliteMainActivity2.navigationFrom.equalsIgnoreCase("search")) {
return;
}
fragmentActivity.refreshPager();
return;
}
if (buttonType.equals(ButtonType.UPGRADE)) {
fragmentActivity.getActivePackage(NavigationConstants.PAYMENT_UPGRADE_PLAN, NavigationConstants.NAV_FROM_HOME, 29);
return;
}
if (buttonType.equals(ButtonType.SUBSCRIBE)) {
FusionViliteMainActivity fusionViliteMainActivity3 = fragmentActivity;
fusionViliteMainActivity3.selectHomeOnPopFromWebView = true;
fusionViliteMainActivity3.launchWebviewPlansPage(null, null, str);
} else {
if (buttonType.equals(ButtonType.WATCH_EPISODE)) {
fragmentActivity.clearPlayerData();
fragmentActivity.setButtonType(buttonType);
fragmentActivity.setPlayerScreenSource(str);
fragmentActivity.goToDetail(str3);
return;
}
if (buttonType.equals(ButtonType.DELETE_RECORD_FROM_VIEWALL)) {
fragmentActivity.refreshViewAllData();
} else if (buttonType.equals(ButtonType.SIGNIN)) {
fragmentActivity.launchSigninPage(false, -1);
}
}
}
@Override
public void onDismiss() {
FragmentActivity fragmentActivity2;
FragmentActivity fragmentActivity3;
try {
FragmentActivity fragmentActivity4 = fragmentActivity;
Objects.requireNonNull(fragmentActivity4);
fragmentActivity4.isFinishing();
String str3 = str;
if (str3 != null && str3.equalsIgnoreCase("Search_Page") && (fragmentActivity3 = fragmentActivity) != null && !fragmentActivity3.isFinishing()) {
FusionViliteMainActivity fusionViliteMainActivity2 = fragmentActivity;
if (fusionViliteMainActivity2 instanceof FusionViliteMainActivity) {
fusionViliteMainActivity2.resetNowPlayingPath();
}
}
String str4 = str;
if (str4 == null || !str4.equalsIgnoreCase("Favourites_Page") || (fragmentActivity2 = fragmentActivity) == null || fragmentActivity2.isFinishing()) {
return;
}
FusionViliteMainActivity fusionViliteMainActivity3 = fragmentActivity;
if (fusionViliteMainActivity3 instanceof FusionViliteMainActivity) {
fusionViliteMainActivity3.refreshFavourites();
}
} catch (Exception unused) {
}
}
});
if (fragmentActivity == null || !(fragmentActivity instanceof FusionViliteMainActivity)) {
return;
}
FusionViliteMainActivity fusionViliteMainActivity2 = (FusionViliteMainActivity) fragmentActivity;
if (fusionViliteMainActivity2.isBottomBarVisible()) {
fusionViliteMainActivity2.enableToolBarLogo(true);
return;
}
return;
}
if (target != null && target.getPageAttributes() != null && !TextUtils.isEmpty(target.getPageAttributes().getIsDeeplinking()) && target.getPageAttributes().getIsDeeplinking().equalsIgnoreCase("true") && (!target.getPageType().equalsIgnoreCase(PageType.Details.toString()) || !z2)) {
FusionViliteMainActivity fusionViliteMainActivity3 = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity3.context = fragmentActivity;
fusionViliteMainActivity3.item = card;
fetchDeepLinkInfo(card, fragmentActivity, card.getTarget().getPath());
return;
}
if (OTTApplication.getWebLinkCallback() != null && target != null && target.getAttributes() != null && target.getAttributes().getViRedirection() != null && !TextUtils.isEmpty(target.getAttributes().getViRedirection().getValue()) && target.getAttributes().getViRedirection().getValue().equalsIgnoreCase("true")) {
OTTApplication.getWebLinkCallback().callWebLink(path);
((FusionViliteMainActivity) fragmentActivity).finish();
return;
}
if (!path.startsWith("http://") && !path.startsWith("https://")) {
if (card.getDisplay() != null && card.getDisplay().getMarkers() != null) {
for (int i2 = 0; i2 < com.yupptv.ott.c.a(card); i2++) {
if (((Card.PosterDisplay.Marker) com.yupptv.ott.d.a(card, i2)).getMarkerType().equalsIgnoreCase("special") && ((Card.PosterDisplay.Marker) com.yupptv.ott.d.a(card, i2)).getValue().equalsIgnoreCase("targetPlayerPage")) {
OttSDK ottSDK = OttSDK.getInstance();
if (card.getTarget() != null && card.getTarget().getPageAttributes() != null && card.getTarget().getPageAttributes().getPayType() != null && !card.getTarget().getPageAttributes().getPayType().equalsIgnoreCase("F")) {
if (ottSDK != null && ottSDK.getPreferenceManager() != null) {
user = ottSDK.getPreferenceManager().getLoggedUser();
}
if (user == null) {
loadScreenActivityForResult(card, fragmentActivity, ScreenType.SIGNIN, NavigationConstants.NAV_FROM_HOME, path, 36, MyRecoManager.getInstance().getSourceForAnalytics(), MyRecoManager.getInstance().getSourceDetailsForAnalytics());
return;
}
}
FusionViliteMainActivity fusionViliteMainActivity4 = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity4.setPlayerScreenSource(str);
fusionViliteMainActivity4.goToDetail(obj);
return;
}
}
} else if (program != null && program.getDisplay() != null && program.getDisplay().getMarkers() != null && program.getDisplay().getMarkers().getSpecial() != null && program.getDisplay().getMarkers().getSpecial().getValue().equalsIgnoreCase("targetPlayerPage")) {
OttSDK ottSDK2 = OttSDK.getInstance();
if (ottSDK2 != null && ottSDK2.getPreferenceManager() != null) {
user = ottSDK2.getPreferenceManager().getLoggedUser();
}
if (user == null) {
loadScreenActivityForResult(program, fragmentActivity, ScreenType.SIGNIN, NavigationConstants.NAV_FROM_HOME, path, 36, MyRecoManager.getInstance().getSourceForAnalytics(), MyRecoManager.getInstance().getSourceDetailsForAnalytics());
return;
}
FusionViliteMainActivity fusionViliteMainActivity5 = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity5.setPlayerScreenSource(str);
fusionViliteMainActivity5.goToDetail(obj);
return;
}
FusionViliteMainActivity fusionViliteMainActivity6 = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity6.hideViewAllFrameContainer();
Bundle bundle = new Bundle();
NavigationFragment navigationFragment = new NavigationFragment();
bundle.putString(NavigationConstants.MENU_ITEM_CODE, path);
bundle.putString(NavigationConstants.TITLE, title != null ? title : "");
if (!TextUtils.isEmpty(path) && path.contains("/")) {
bundle.putString(NavigationConstants.SCREEN_SUB_SOURCE_DETAILS, path.replace("/", "-"));
bundle.putString(NavigationConstants.SCREEN_SOURCE_DETAILS, MyRecoManager.getInstance().getCarouselTitle());
}
if (str != null) {
bundle.putString(NavigationConstants.SCREENSOURCE, str);
}
navigationFragment.setArguments(bundle);
if (fragmentActivity instanceof FusionViliteMainActivity) {
fusionViliteMainActivity6.currentItemtargerPath = path;
}
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
return;
}
if (target != null && target.getAttributes() != null && target.getAttributes().getIsExternalWeb() != null && !TextUtils.isEmpty(target.getAttributes().getIsExternalWeb().getValue()) && target.getAttributes().getIsExternalWeb().getValue().equalsIgnoreCase("true")) {
((FusionViliteMainActivity) fragmentActivity).startActivity(new Intent("android.intent.action.VIEW", Uri.parse(path)));
return;
}
FusionViliteMainActivity fusionViliteMainActivity7 = (FusionViliteMainActivity) fragmentActivity;
if (fusionViliteMainActivity7.isBottomBarVisible()) {
fusionViliteMainActivity7.enableToolBarLogo(true);
}
webViewNavigationWithAbsoluteUrl(fragmentActivity, path, "Games");
return;
}
FusionViliteMainActivity fusionViliteMainActivity8 = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity8.selectHomeOnPopFromWebView = true;
if (fusionViliteMainActivity8.isBottomBarVisible()) {
fusionViliteMainActivity8.enableToolBarLogo(true);
}
fusionViliteMainActivity8.launchWebviewPlansPage(null, path, str);
}
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, String str3, String str4) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.CA_CONTENT_SOURCE, str3);
intent.putExtra(NavigationConstants.CA_CONTENT_SOURCE_DETAILS, str4);
String str5 = NavigationConstants.PAGEPATH;
if (str2 == null) {
str2 = "";
}
intent.putExtra(str5, str2);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void onBoardWebViewNavigationForResult(String str, FragmentActivity fragmentActivity, String str2, String str3) {
onBoardWebViewNavigationForResult(str, fragmentActivity, str2, str3, (String) null);
}
public static void onBoardWebViewNavigationForResult(FragmentActivity fragmentActivity, String str, String str2, String str3) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) MoviesWebViewActivity.class);
intent.putExtra("load_fragment", str);
if (str2 != null) {
intent.putExtra(NavigationConstants.WEB_URL, str2);
}
if (str3 != null) {
intent.putExtra("navigatedFrom", str3);
}
fragmentActivity.startActivityForResult(intent, 101);
}
public static void performHeaderNavigation(FragmentActivity fragmentActivity, PageType pageType, Object obj, int i2) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
GridFragment gridFragment = new GridFragment();
Bundle bundle = new Bundle();
if (obj instanceof HeaderItemWithControls) {
HeaderItemWithControls headerItemWithControls = (HeaderItemWithControls) obj;
bundle.putParcelable(NavigationConstants.SECTIONDATA, (Parcelable) obj);
if (i2 >= 0) {
bundle.putInt("tab_position", i2);
bundle.putString(NavigationConstants.TITLE, headerItemWithControls.getSubSectionInfo().get(i2).getName());
} else {
bundle.putString(NavigationConstants.TITLE, headerItemWithControls.getName());
}
bundle.putString(NavigationConstants.NAV_FROM_PATH, AnalyticsUtils.EVENT_VIEW_ALL + headerItemWithControls.getName());
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).currentItemtargerPath = headerItemWithControls.getControls().getViewAllTargetPath();
}
} else {
bundle.putString(NavigationConstants.TITLE, (String) obj);
}
bundle.putString(NavigationConstants.PAGE_TYPE, AnalyticsUtils.EVENT_VIEW_ALL);
gridFragment.setArguments(bundle);
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, gridFragment).addToBackStack(pageType.getValue()).commitAllowingStateLoss();
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, int i2, String str2, String str3, String str4, int i3) {
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.PAYMENT_TYPE, str2);
intent.putExtra(NavigationConstants.PURCHASE_GATEWAY, str3);
intent.putExtra(NavigationConstants.ORDER_ID, str4);
intent.putExtra(NavigationConstants.PACK_ID, i3);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void onBoardNavigation(FragmentActivity fragmentActivity, ScreenType screenType, Bundle bundle) {
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
if (screenType != null) {
int i2 = AnonymousClass10.$SwitchMap$com$yupptv$ott$enums$ScreenType[screenType.ordinal()];
if (i2 == 1) {
SignupFragment signupFragment = new SignupFragment();
if (bundle != null) {
signupFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, signupFragment, "signup").addToBackStack("sign_up").commitAllowingStateLoss();
return;
}
if (i2 == 3) {
SignInFragment signInFragment = new SignInFragment();
if (bundle != null) {
signInFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, signInFragment, "signin").addToBackStack("sign_in").commitAllowingStateLoss();
return;
}
if (i2 == 13) {
LanguageFragment languageFragment = new LanguageFragment();
if (bundle != null) {
languageFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, languageFragment, "languages").addToBackStack("languages").commitAllowingStateLoss();
return;
}
if (i2 == 5 || i2 == 6) {
PaymentMainFragment paymentMainFragment = new PaymentMainFragment();
if (bundle != null) {
paymentMainFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, paymentMainFragment, "paymentsmainfragment").addToBackStack("paymentsmainfragment").commitAllowingStateLoss();
return;
}
if (i2 != 7) {
switch (i2) {
case 17:
ProfilesFragment profilesFragment = new ProfilesFragment();
if (bundle != null) {
profilesFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, profilesFragment, "userprofiles").addToBackStack("userprofiles").commitAllowingStateLoss();
break;
case 18:
CreateProfilesFragment createProfilesFragment = new CreateProfilesFragment();
if (bundle != null) {
createProfilesFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, createProfilesFragment, "createuserprofiles").addToBackStack("createuserprofiles").commitAllowingStateLoss();
break;
case 19:
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, new ForgotPinFragment(), "forgotpin").addToBackStack("createuserprofiles").commitAllowingStateLoss();
break;
default:
switch (i2) {
case 21:
FullScreenImageFragment fullScreenImageFragment = new FullScreenImageFragment();
if (bundle != null) {
fullScreenImageFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.layout_frame, fullScreenImageFragment, "FullScreenImageFragment").addToBackStack("FullScreenImageFragment").commitAllowingStateLoss();
break;
case 22:
PaymentNewGatewaysFragment paymentNewGatewaysFragment = new PaymentNewGatewaysFragment();
if (bundle != null) {
paymentNewGatewaysFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, paymentNewGatewaysFragment, "paymentnewgatewaysfragment").addToBackStack("paymentnewgatewaysfragment").commitAllowingStateLoss();
break;
case 23:
NavigationFragment navigationFragment = new NavigationFragment();
if (bundle != null) {
navigationFragment.setArguments(bundle);
}
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).currentItemtargerPath = (bundle == null || !bundle.containsKey(NavigationConstants.MENU_ITEM_CODE)) ? "favorites" : bundle.getString(NavigationConstants.MENU_ITEM_CODE);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
break;
case 24:
FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
int i3 = R.id.contentframe;
if ((supportFragmentManager.findFragmentById(i3) instanceof GridFragment) && fragmentActivity.getSupportFragmentManager().findFragmentByTag("purchasedItem") != null) {
fragmentActivity.getSupportFragmentManager().beginTransaction().remove(fragmentActivity.getSupportFragmentManager().findFragmentByTag("purchasedItem")).commitAllowingStateLoss();
}
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).showBottomBar(false);
}
GridFragment gridFragment = new GridFragment();
if (bundle != null) {
gridFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(i3, gridFragment, "purchasedItem").addToBackStack("purchasedItem").commitAllowingStateLoss();
break;
case 25:
FragmentManager supportFragmentManager2 = fragmentActivity.getSupportFragmentManager();
int i4 = R.id.contentframe;
if ((supportFragmentManager2.findFragmentById(i4) instanceof GridFragment) && supportFragmentManager2.findFragmentByTag("offlindownload") != null) {
supportFragmentManager2.beginTransaction().remove(supportFragmentManager2.findFragmentByTag("offlindownload")).commitAllowingStateLoss();
}
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).showBottomBar(false);
}
OfflineDownloadListFragment offlineDownloadListFragment = new OfflineDownloadListFragment();
if (bundle != null) {
offlineDownloadListFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(i4, offlineDownloadListFragment, "offlindownload").addToBackStack("offlindownload").commitAllowingStateLoss();
break;
case 26:
if (fragmentActivity != null && (fragmentActivity instanceof FusionViliteMainActivity)) {
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
fusionViliteMainActivity.showBottomBar(false);
fusionViliteMainActivity.enableToolBarLogo(false);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.contentframe, new VideoQualityFragment(), "VideoQuality").addToBackStack("VideoQuality").commitAllowingStateLoss();
break;
case 27:
if ((fragmentActivity.getSupportFragmentManager().findFragmentById(R.id.contentframe) instanceof GridFragment) && fragmentActivity.getSupportFragmentManager().findFragmentByTag("contentfilter") != null) {
fragmentActivity.getSupportFragmentManager().beginTransaction().remove(fragmentActivity.getSupportFragmentManager().findFragmentByTag("contentfilter")).commitAllowingStateLoss();
}
if (fragmentActivity instanceof FusionViliteMainActivity) {
((FusionViliteMainActivity) fragmentActivity).showBottomBar(false);
}
Preferences instance = Preferences.instance(fragmentActivity);
OttSDK ottSDK = OttSDK.getInstance();
if (instance.getBooleanPreferenceDefaultTrue("IS_FIRST_TIME_APP_OPEN").booleanValue()) {
if (ottSDK != null && ottSDK.getApplicationManager() != null && ottSDK.getApplicationManager().getNetworkList() != null && ottSDK.getApplicationManager().getNetworkList().size() > 0) {
instance.setBooleanPreference("IS_FIRST_TIME_APP_OPEN", Boolean.FALSE);
StringBuilder sb = new StringBuilder();
for (int i5 = 0; i5 < ottSDK.getApplicationManager().getNetworkList().size(); i5++) {
sb.append(",");
sb.append(ottSDK.getApplicationManager().getNetworkList().get(i5).getCode());
}
String substring = sb.toString().startsWith(",") ? sb.substring(1, sb.length()) : "";
if (sb.toString().endsWith(",")) {
substring = sb.substring(0, sb.length() - 1);
}
if (substring != null && !substring.equalsIgnoreCase("") && substring.length() > 0) {
instance.setStringPreference("SUBSCRIBED_CONTENT_PARTNERS", substring);
}
} else {
instance.setStringPreference("SUBSCRIBED_CONTENT_PARTNERS", "");
}
}
NewContentFilterFragment newContentFilterFragment = new NewContentFilterFragment();
if (bundle != null) {
newContentFilterFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.contentframe, newContentFilterFragment, "contentfilter").addToBackStack("contentfilter").commitAllowingStateLoss();
break;
case 28:
if (fragmentActivity != null && (fragmentActivity instanceof FusionViliteMainActivity)) {
((FusionViliteMainActivity) fragmentActivity).registerForScanResult();
break;
}
break;
}
}
return;
}
UserProfileFragment userProfileFragment = new UserProfileFragment();
if (bundle != null) {
userProfileFragment.setArguments(bundle);
}
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, userProfileFragment, "userprofile").addToBackStack("userprofile").commitAllowingStateLoss();
}
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, String str3, String str4, long j, List list, Double d2, String str5, String str6, String str7, String str8) {
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.PAGEPATH, str2 == null ? "" : str2);
intent.putExtra(NavigationConstants.PURCHASE_IDS, str3);
intent.putExtra(NavigationConstants.PURCHASE_FREE_TRIAL_EXPIRY, j);
intent.putExtra(NavigationConstants.PURCHASED_PACKAGES, str4);
intent.putExtra(NavigationConstants.PURCHASE_VALUE, d2);
intent.putExtra(NavigationConstants.PURCHASE_DURATION, str5);
intent.putExtra(NavigationConstants.CURRENCY, str6);
intent.putExtra(NavigationConstants.PAYMENT_TYPE, str7);
intent.putExtra(NavigationConstants.PURCHASE_PACK_TYPE, str8);
intent.putParcelableArrayListExtra(NavigationConstants.PURCHASE_GATEWAY, (ArrayList) list);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, PaymentsFragment.PurchaseItem purchaseItem) {
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
String str3 = NavigationConstants.PAGEPATH;
if (str2 == null) {
str2 = "";
}
intent.putExtra(str3, str2);
intent.putExtra("purchaseItem", purchaseItem);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, boolean z, boolean z2) {
trackEvent(screenType, str);
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.FROM_DETAILS, z);
intent.putExtra(NavigationConstants.TRANSACTIONALPACK, z2);
String str3 = NavigationConstants.PAGEPATH;
if (str2 == null) {
str2 = "";
}
intent.putExtra(str3, str2);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ScreenType screenType, String str, String str2, int i2, boolean z, boolean z2, HashMap hashMap) {
trackEvent(screenType, str);
if (fragmentActivity != null) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra(NavigationConstants.SCREEN_TYPE, screenType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra(NavigationConstants.FROM_DETAILS, z);
intent.putExtra(NavigationConstants.TRANSACTIONALPACK, z2);
String str3 = NavigationConstants.PAGEPATH;
if (str2 == null) {
str2 = "";
}
intent.putExtra(str3, str2);
intent.putExtra(NavigationConstants.ITEM, hashMap);
fragmentActivity.startActivityForResult(intent, i2);
}
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, ListType listType, List list, String str, int i2, String str2) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra("listType", true);
intent.putExtra(NavigationConstants.LIST_TYPE, listType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra("streamPollKey", str2);
intent.putParcelableArrayListExtra("activePackagesResponse", (ArrayList) list);
if (str.equalsIgnoreCase(NavigationConstants.NAV_FROM_PLAYER)) {
fragmentActivity.startActivityForResult(intent, i2);
} else {
str.equalsIgnoreCase(NavigationConstants.NAV_FROM_SETTINGS);
fragmentActivity.startActivity(intent);
}
}
public static void loadScreenActivityForResult(FragmentActivity fragmentActivity, Boolean bool, ListType listType, String str, int i2, String str2) {
Intent intent = new Intent((Context) fragmentActivity, (Class<?>) LoadScreenActivity.class);
intent.putExtra("listType", true);
intent.putExtra(NavigationConstants.LIST_TYPE, listType);
intent.putExtra(NavigationConstants.NAV_FROM, str);
intent.putExtra("streamPollKey", str2);
intent.putExtra("fromplayer", bool);
fragmentActivity.startActivityForResult(intent, i2);
}
public static void onBoardNavigation(FragmentActivity fragmentActivity, ScreenType screenType, String str, boolean z, boolean z2, int i2, Integer num, String str2) {
if (screenType == ScreenType.OTP_VERIFY) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, ForgotOTPVerification.newInstance(screenType, str, i2, z2, num), "ForgotOTPVerification").addToBackStack("ForgotOTPVerification").commitAllowingStateLoss();
return;
}
if (screenType == ScreenType.RESET_PASSWORD) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, ResetPasswordFragment.newInstance(screenType, str, i2, z2, num), "resetpwd").addToBackStack("resetpasswd").commitAllowingStateLoss();
return;
}
if (screenType == ScreenType.SUCCESS_RESET_PASSWORD) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, SuccessResetPasswordFragment.newInstance(screenType, str, i2, z2, num, str2), "successresetpwd").addToBackStack("successresetpwd").commitAllowingStateLoss();
} else if (screenType == ScreenType.UPDATE_PASSWORD) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, UpdatePasswordFragment.newInstance(screenType, str), "updatepwd").addToBackStack("updatepwd").commitAllowingStateLoss();
} else if (screenType == ScreenType.VIEW_LANGUAGES) {
fragmentActivity.getSupportFragmentManager().beginTransaction().replace(R.id.layout_frame, LanguageFragment.newInstance(screenType, z, z2), "languages").addToBackStack("languages").commitAllowingStateLoss();
}
}
public static void performItemClickNavigation(Object obj, FragmentActivity fragmentActivity, String str, String str2) {
OTTApplication.item = obj;
sendAutoPlayPauseBroadCast(fragmentActivity);
sendStopAutoScrollBroadCast(fragmentActivity);
OttSDK.getInstance();
MyRecoManager.getInstance().setTargetPath(str);
Bundle bundle = new Bundle();
FusionViliteMainActivity fusionViliteMainActivity = (FusionViliteMainActivity) fragmentActivity;
int i2 = 0;
if (fusionViliteMainActivity != null) {
fusionViliteMainActivity.enableToolBarLogo(false);
}
if (fragmentActivity == null) {
return;
}
String str3 = "";
FusionViliteMainActivity fusionViliteMainActivity2 = (FusionViliteMainActivity) fragmentActivity;
List<Menu> list = fusionViliteMainActivity2.mMenuList;
if (list != null) {
int size = list.size();
int i3 = 0;
while (i2 < size) {
if (str.equalsIgnoreCase(String.valueOf(fusionViliteMainActivity2.mMenuList.get(i2).getTargetPath()))) {
str3 = String.valueOf(fusionViliteMainActivity2.mMenuList.get(i2).getCode());
i3 = 1;
}
i2++;
}
i2 = i3;
}
if ((str.contains("plans/list") || str.contains("pricing") || str.contains("plans") || str.contains("activate")) && OttSDK.getInstance() != null && s.a() == null) {
launchSignInFragment(fragmentActivity, obj, str);
return;
}
if (!str.contains(in.juspay.hypersdk.ota.Constants.PACKAGE_DIR_NAME) && !str.contains("pricing") && !str.contains("plans") && !str.contains("plans/list")) {
if (str.contains("signup")) {
launchSignUpFragment(fragmentActivity, obj);
return;
}
if (str.contains("signin")) {
launchSignInFragment(fragmentActivity, obj, null);
return;
}
if (i2 != 0) {
fusionViliteMainActivity2.updateMenutab(str3);
return;
}
if (str.contains("activate")) {
fusionViliteMainActivity2.registerForScanResult();
return;
}
NavigationFragment navigationFragment = new NavigationFragment();
bundle.putString(NavigationConstants.MENU_ITEM_CODE, str);
navigationFragment.setArguments(bundle);
if (fragmentActivity instanceof FusionViliteMainActivity) {
fusionViliteMainActivity2.currentItemtargerPath = str;
}
fragmentActivity.getSupportFragmentManager().beginTransaction().add(R.id.contentframe, navigationFragment, "navigationfragment").commitAllowingStateLoss();
return;
}
launchPaymentsFragment(fragmentActivity, str, obj, str2);
}
}