正在查看: Chaupal v3.2 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yupptv.ott;
import android.R;
import android.app.ActivityManager;
import android.app.Dialog;
import android.app.PendingIntent;
import android.app.PictureInPictureParams;
import android.app.RemoteAction;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.Html;
import android.text.TextUtils;
import android.transition.Fade;
import android.util.Base64;
import android.util.Log;
import android.util.SparseArray;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.view.ViewStub;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;
import androidx.core.widget.NestedScrollView;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.airbnb.lottie.LottieDrawable;
import com.appsflyer.AppsFlyerLib;
import com.clevertap.android.sdk.CTInboxStyleConfig;
import com.clevertap.android.sdk.CleverTapAPI;
import com.clevertap.android.sdk.inapp.CTInAppNotification;
import com.clevertap.android.sdk.inapp.CTLocalInApp;
import com.connectsdk.device.ConnectableDevice;
import com.connectsdk.device.ConnectableDeviceListener;
import com.connectsdk.service.DeviceService;
import com.connectsdk.service.command.ServiceCommandError;
import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.offline.DownloadService;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.FullScreenContentCallback;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.admanager.AdManagerAdView;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.google.android.gms.ads.interstitial.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInApi;
import com.google.android.gms.cast.MediaStatus;
import com.google.android.gms.cast.framework.CastButtonFactory;
import com.google.android.gms.cast.framework.CastContext;
import com.google.android.gms.cast.framework.CastSession;
import com.google.android.gms.cast.framework.Session;
import com.google.android.gms.cast.framework.SessionManager;
import com.google.android.gms.cast.framework.SessionManagerListener;
import com.google.android.gms.cast.framework.media.RemoteMediaClient;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.OptionalPendingResult;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.tabs.TabLayout;
import com.google.firebase.auth.FirebaseAuth;
import com.yupptv.ott.activity.LoadScreenActivity;
import com.yupptv.ott.activity.WelcomeVideoActivity;
import com.yupptv.ott.cast.controller.MiniController;
import com.yupptv.ott.enums.AdsType;
import com.yupptv.ott.enums.ButtonType;
import com.yupptv.ott.enums.DialogType;
import com.yupptv.ott.enums.ListType;
import com.yupptv.ott.enums.PageType;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ott.enums.ThemeEnum;
import com.yupptv.ott.fragments.ActivateDeviceFragment;
import com.yupptv.ott.fragments.t2;
import com.yupptv.ott.player.detail.UpNextFragment;
import com.yupptv.ott.player.offlinedownload.MediaDownloadService;
import com.yupptv.ott.player.offlinedownload.OfflineDownloadData;
import com.yupptv.ott.shorts.ShortsFragment;
import com.yupptv.ott.views.Carousel;
import com.yupptv.ott.views.CustomMaterialSearchView;
import com.yupptv.ott.views.WatchWhileLayout;
import com.yupptv.ottsdk.OttSDK;
import com.yupptv.ottsdk.enums.TenantBuildType;
import com.yupptv.ottsdk.managers.Application.AppManager;
import com.yupptv.ottsdk.managers.MediaCatalog.MediaCatalogManager;
import com.yupptv.ottsdk.managers.Payment.PaymentManager;
import com.yupptv.ottsdk.managers.Preferences.PreferenceManager;
import com.yupptv.ottsdk.managers.User.UserManager;
import com.yupptv.ottsdk.model.Card;
import com.yupptv.ottsdk.model.Content;
import com.yupptv.ottsdk.model.ContentPage;
import com.yupptv.ottsdk.model.EPG;
import com.yupptv.ottsdk.model.EPGProgramsData;
import com.yupptv.ottsdk.model.EPGUserChannels;
import com.yupptv.ottsdk.model.Error;
import com.yupptv.ottsdk.model.Menu;
import com.yupptv.ottsdk.model.PageData;
import com.yupptv.ottsdk.model.PageInfo;
import com.yupptv.ottsdk.model.Params;
import com.yupptv.ottsdk.model.SubMenu;
import com.yupptv.ottsdk.model.User;
import com.yupptv.ottsdk.model.ads.AdUrlResponse;
import com.yupptv.ottsdk.model.ads.AdUrlType;
import com.yupptv.ottsdk.model.payments.ActivePackagesResponse;
import com.yupptv.ottsdk.model.systemfeatures.FeaturesInfo;
import com.yupptv.ottsdk.model.systemfeatures.Fields;
import com.yupptv.ottsdk.model.systemfeatures.SystemFeatures;
import com.yupptv.ottsdk.model.user.Configs;
import com.yupptv.ottsdk.model.user.UserSubscriptionOffer;
import com.yupptv.ottsdk.rest.network.RestAdapter;
import com.yupptv.ottsdk.utils.DeviceUtils;
import com.yupptv.ottsdk.utils.OttLog;
import ec.c;
import eightbitlab.com.blurview.BlurView;
import hd.a;
import hd.w;
import io.branch.referral.Branch;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
import tc.i;
import xc.a;
public class MainActivity extends com.yupptv.ott.activity.a implements WatchWhileLayout.b, oc.l, View.OnClickListener, oc.t, oc.k, oc.f, a.b, oc.c, r3.j0, r3.k0, r3.d, r3.l0 {
public static boolean A3;
public static boolean B3;
public static boolean C3;
public static String D3;
public static String E3;
private static JSONObject F3;
private static String G3;
public static boolean H3;
public static int I3;
public static CleverTapAPI J3;
public wc.a A;
private FixedAspectRatioRelativeLayout A0;
public Fragment A2;
private UpNextFragment B;
private RecyclerView B0;
PictureInPictureParams.Builder B2;
private FrameLayout C;
private ProgressBar C0;
private BroadcastReceiver C2;
private bc.t D0;
protected MiniController D1;
private boolean D2;
private float E;
private View E0;
public ec.c E1;
private View F0;
private Object F1;
private LinearLayout G;
private View G0;
private Object G1;
private FrameLayout G2;
private LinearLayout H;
private TextView H0;
private AppCompatButton I;
private TextView I0;
private RelativeLayout I1;
private AdManagerAdView I2;
private AppCompatButton J;
private TextView J0;
MiniController J1;
private int J2;
private AppCompatButton K;
private TextView K0;
private boolean K1;
private AppCompatButton L;
private Typeface L0;
PreferenceManager L2;
private ImageView M;
private FrameLayout M0;
private ImageView N;
private TabLayout N0;
public NestedScrollView N1;
private ImageView O;
private BlurView O0;
private ImageView P;
private BlurView P0;
private LottieDrawable Q;
private BlurView Q0;
public List<Menu> Q1;
hd.a0 Q2;
private ImageView R;
public BlurView R0;
int R2;
private ImageView S;
public RecyclerView S0;
private AppCompatImageView S2;
private ImageView T;
public RelativeLayout T0;
private ImageView T2;
private ImageView U;
private LinearLayout U2;
private ImageView V;
private AppCompatButton V0;
private RelativeLayout V2;
public Configuration X2;
private ImageView Y;
public CustomMaterialSearchView Y0;
private int Y1;
private Context Y2;
private ImageView Z;
public Fragment Z0;
private hd.y Z1;
private Drawable a2;
private h2 c1;
Configuration c3;
private View d1;
public RelativeLayout d2;
public int d3;
public Toolbar e;
private ImageView e0;
private View e1;
public RelativeLayout e2;
private TextView f;
private ImageView f0;
public LinearLayout f1;
public RelativeLayout f2;
private TextView g;
private ImageView g0;
public TextView g2;
AppCompatImageView g3;
private TextView h;
private AppCompatButton h0;
public TextView h2;
private TextView i;
private TextView i0;
private TextView i2;
private TextView j;
private TextView j0;
private TextView j2;
private Handler j3;
private AppCompatImageView k;
private TextView k0;
private RelativeLayout k2;
private Runnable k3;
private DrawerLayout l;
private TextView l0;
private ImageView l2;
public TextView l3;
private androidx.appcompat.app.b m;
private TextView m0;
private ImageView m2;
private CollapsingToolbarLayout n;
public t2 n1;
private ImageView n2;
public AppBarLayout o;
private NestedScrollView o0;
private ImageView o2;
public WatchWhileLayout p;
private NestedScrollView p0;
private ImageView p2;
Handler p3;
public NestedScrollView q0;
private EPG q1;
protected MenuItem q3;
private LinearLayoutCompat r0;
private EPGUserChannels r1;
protected MenuItem r3;
public Fragment s;
private LinearLayout s0;
private EPGProgramsData s1;
private xc.a s2;
private Carousel t;
private ImageView t0;
private boolean t1;
private OfflineDownloadData t2;
private id.r0 u;
private ImageView u0;
public Dialog u3;
private ImageView v0;
private InterstitialAd v1;
private ImageView w0;
private id.b x;
private ImageView x0;
private CastSession x1;
private ImageView y0;
private SessionManager y1;
CTInboxStyleConfig y2;
private Carousel z;
private ImageView z0;
private CastContext z1;
String q = null;
Card r = null;
public String v = "home";
public int w = -1;
public String y = "home";
private int D = 0;
private boolean F = false;
private String W = "";
Fragment X = null;
public ButtonType n0 = ButtonType.NONE;
public boolean U0 = false;
private List<String> W0 = new ArrayList();
public boolean X0 = false;
public String a1 = "";
public String b1 = "";
public String g1 = "";
public boolean h1 = false;
public boolean i1 = false;
public boolean j1 = false;
public boolean k1 = false;
public boolean l1 = false;
public boolean m1 = false;
private boolean o1 = false;
public boolean p1 = false;
private HashMap<String, Boolean> u1 = new HashMap<>();
List w1 = new ArrayList();
private final SessionManagerListener A1 = new g2(this, null);
private boolean B1 = false;
public boolean C1 = false;
private long H1 = 0;
private boolean L1 = false;
public boolean M1 = false;
public boolean O1 = true;
private int P1 = 1;
private String R1 = "";
public String S1 = cc.c.v1;
String T1 = "";
String U1 = "";
private boolean V1 = false;
public String W1 = "";
private boolean X1 = false;
private String b2 = "";
public int c2 = 0;
public boolean q2 = false;
public boolean r2 = false;
private boolean u2 = false;
public boolean v2 = false;
public String w2 = "";
public boolean x2 = false;
private int z2 = 0;
private String E2 = "play";
private String F2 = "pause";
private String H2 = "";
private HashMap<String, AdUrlResponse> K2 = new HashMap<>();
public boolean M2 = false;
public boolean N2 = false;
public boolean O2 = false;
public boolean P2 = true;
String W2 = "THEME_PREFERENCE";
private String Z2 = "";
Configuration a3 = new Configuration();
Configuration b3 = new Configuration();
public boolean e3 = false;
boolean f3 = false;
String h3 = "";
String i3 = getClass().getName();
private boolean m3 = false;
private TabLayout.d n3 = new x();
private TabLayout.d o3 = new y();
c.m s3 = new d1();
ConnectableDeviceListener t3 = new f1();
private boolean v3 = false;
public Handler w3 = new Handler();
public Runnable x3 = new j1();
private i.e1 y3 = new p1();
androidx.activity.result.b<nb.r> z3 = registerForActivityResult(new nb.p(), new androidx.activity.result.a() {
public final void a(Object obj) {
MainActivity.this.g3((nb.q) obj);
}
});
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
MainActivity.this.s3(true);
}
}
class a0 implements Runnable {
a0() {
}
@Override
public void run() {
cc.e.n().M("Notification");
cc.e.n().L("Notification");
MainActivity.this.u2 = false;
}
}
class a1 implements UserManager.UserCallback<User> {
a1() {
}
@Override
public void onSuccess(User user) {
if (user == null || user.getProfileId() != null) {
MainActivity.this.i4();
} else {
MainActivity.this.B3();
}
}
@Override
public void onFailure(Error error) {
MainActivity.this.i4();
}
}
class a2 implements UserManager.UserCallback<UserSubscriptionOffer> {
a2() {
}
@Override
public void onSuccess(UserSubscriptionOffer userSubscriptionOffer) {
MainActivity.this.Q2();
if (userSubscriptionOffer != null) {
MainActivity.this.W4(userSubscriptionOffer);
}
}
@Override
public void onFailure(Error error) {
MainActivity.this.Q2();
}
}
class b implements View.OnClickListener {
b() {
}
@Override
public void onClick(View view) {
if (MainActivity.this.l == null || !MainActivity.this.l.C(8388611)) {
return;
}
MainActivity.this.l.d(8388611);
}
}
class b0 implements Runnable {
b0() {
}
@Override
public void run() {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
List<Menu> menuList = hd.a.a.d(OTTApplication.o()).getMenuList();
if (menuList == null || menuList.size() == 0) {
MainActivity.this.h2();
return;
}
MainActivity.this.D5(menuList);
if (com.yupptv.ott.a.o) {
w.b.a(MainActivity.this);
}
MainActivity.this.b();
MainActivity.this.N0.setVisibility(0);
MainActivity.this.O0.setVisibility(com.yupptv.ott.a.S ? 0 : 8);
MainActivity.this.A = new wc.a();
MainActivity.this.getSupportFragmentManager().q().q(2131428733, MainActivity.this.A).j();
MainActivity.this.B = new UpNextFragment();
MainActivity mainActivity = MainActivity.this;
mainActivity.p = (WatchWhileLayout) mainActivity.findViewById(2131429993);
MainActivity mainActivity2 = MainActivity.this;
mainActivity2.p.setListener(mainActivity2);
MainActivity.this.B0.setAdapter(MainActivity.this.D0);
MainActivity.this.r2();
hd.u.a = false;
hd.h.b("mainactivity", "step 14");
?? r0 = MainActivity.this;
((MainActivity) r0).a2 = r0.s2(r0);
}
}
class b1 implements MediaCatalogManager.MediaCatalogCallback<String> {
b1() {
}
@Override
public void onSuccess(String str) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
hd.i.d().g(str);
}
@Override
public void onFailure(Error error) {
}
}
class b2 implements View.OnClickListener {
b2() {
}
@Override
public void onClick(View view) {
HashMap hashMap = new HashMap();
hashMap.put("response", "cancel");
cc.c.d().t("offer_banner_home", hashMap);
MainActivity.this.V1();
}
}
class c implements View.OnClickListener {
c() {
}
@Override
public void onClick(View view) {
if (MainActivity.this.l == null || !MainActivity.this.l.C(8388611)) {
return;
}
MainActivity.this.l.d(8388611);
}
}
class c0 implements View.OnClickListener {
c0() {
}
@Override
public void onClick(View view) {
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) == null || c0133a.g(OTTApplication.o()).getLoggedUser() != null) {
MainActivity.this.H1();
} else {
cc.b.B0().a2("settings");
MainActivity.this.y3(true, -1);
}
}
}
class c1 extends RemoteMediaClient.Callback {
c1() {
}
public void onMetadataUpdated() {
MainActivity.this.k5(false);
if (MainActivity.this.x1 != null) {
hd.h.b("Chromecast", "onMetadataUpdated" + MainActivity.this.x1.isConnected());
if (!MainActivity.this.x1.isConnected()) {
MainActivity.this.I1.setVisibility(8);
return;
}
MainActivity.this.I1.setVisibility(0);
if (MainActivity.this.x1.getRemoteMediaClient() != null) {
hd.h.b("Chromecast", "onMetadataUpdated content is playing" + MainActivity.this.x1.isConnected());
MainActivity mainActivity = MainActivity.this;
mainActivity.J5(mainActivity.Y1);
}
}
}
public void onPreloadStatusUpdated() {
super.onPreloadStatusUpdated();
}
public void onQueueStatusUpdated() {
super.onQueueStatusUpdated();
}
public void onSendingRemoteMediaRequest() {
super.onSendingRemoteMediaRequest();
}
public void onStatusUpdated() {
MediaStatus mediaStatus;
super.onStatusUpdated();
if (MainActivity.this.x1 == null || MainActivity.this.x1.getRemoteMediaClient() == null || (mediaStatus = MainActivity.this.x1.getRemoteMediaClient().getMediaStatus()) == null) {
return;
}
hd.h.b("Keerthi", " onStatusUpdated: mediaStatus: " + mediaStatus + " mediaStatus.getPlayerState(): " + mediaStatus.getPlayerState());
if (mediaStatus.getPlayerState() == 1 || mediaStatus.getPlayerState() == 0) {
if (mediaStatus.getIdleReason() == 0) {
hd.h.b("mediaStatus", "IDLE_REASON_NONE");
} else if (mediaStatus.getIdleReason() == 4 || mediaStatus.getIdleReason() == 3) {
hd.h.b("mediaStatus", " Error or interrupted");
MainActivity.this.K4(false);
}
}
}
}
class c2 implements View.OnClickListener {
final AppCompatButton a;
final UserSubscriptionOffer c;
c2(AppCompatButton appCompatButton, UserSubscriptionOffer userSubscriptionOffer) {
this.a = appCompatButton;
this.c = userSubscriptionOffer;
}
@Override
public void onClick(View view) {
HashMap hashMap = new HashMap();
hashMap.put("response", this.a.getText().toString());
cc.c.d().t("offer_banner_home", hashMap);
MainActivity.this.F3(false, this.c.getTargetPath(), new String[0]);
MainActivity.this.V1();
}
}
class d implements View.OnClickListener {
d() {
}
@Override
public void onClick(View view) {
MainActivity.this.s3(true);
}
}
class d0 implements UserManager.UserCallback<String> {
final String a;
d0(String str) {
this.a = str;
}
@Override
public void onSuccess(String str) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
if (this.a.equalsIgnoreCase("Eng")) {
OTTApplication.O(MainActivity.this);
} else if (this.a.equalsIgnoreCase("FRE")) {
OTTApplication.P(MainActivity.this);
} else {
OTTApplication.R(MainActivity.this);
}
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) != null) {
c0133a.g(OTTApplication.o()).setDisplayLanguage(this.a);
}
MainActivity.this.h2();
}
@Override
public void onFailure(Error error) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.k4();
MainActivity.this.l4(false);
}
}
class d1 implements c.m {
d1() {
}
@Override
public void a() {
MainActivity mainActivity = MainActivity.this;
MenuItem menuItem = mainActivity.q3;
if (menuItem != null) {
menuItem.setIcon(mainActivity.getResources().getDrawable(2131230987));
((AnimationDrawable) MainActivity.this.q3.getIcon()).start();
}
}
@Override
public void b() {
MenuItem menuItem = MainActivity.this.q3;
if (menuItem != null) {
menuItem.setVisible(true);
}
MainActivity.this.invalidateOptionsMenu();
}
@Override
public void c() {
MenuItem menuItem = MainActivity.this.q3;
if (menuItem != null) {
menuItem.setVisible(false);
}
MainActivity.this.invalidateOptionsMenu();
}
}
class d2 implements View.OnClickListener {
d2() {
}
@Override
public void onClick(View view) {
hd.h.b("HomeFragment", "Unfavourite ");
MainActivity.this.l0();
}
}
class e implements View.OnClickListener {
e() {
}
@Override
public void onClick(View view) {
MainActivity.this.f5(cc.d.M);
MainActivity.this.w3();
}
}
class e0 implements AppManager.AppManagerCallback<JSONObject> {
e0() {
}
public void onSuccess(JSONObject jSONObject) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.k4();
MainActivity.this.l4(false);
}
public void onFailure(Error error) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.k4();
MainActivity.this.l4(false);
}
}
class e1 implements View.OnClickListener {
e1() {
}
@Override
public void onClick(View view) {
ArrayList arrayList = new ArrayList();
arrayList.add(MainActivity.this.getResources().getString(2131952692));
arrayList.add(MainActivity.this.getResources().getString(2131952542));
MainActivity.this.y2 = new CTInboxStyleConfig();
MainActivity.this.y2.E(arrayList);
hd.a0 a0Var = MainActivity.this.Q2;
if (a0Var == null || a0Var.u("isThemeEnable") == null || !MainActivity.this.Q2.u("isThemeEnable").equalsIgnoreCase("true") || MainActivity.this.Q2.e("weburl_theme_key").booleanValue()) {
MainActivity.this.U1();
} else if (MainActivity.this.R2 == ThemeEnum.LIGHT_THEME.getValue()) {
MainActivity.this.G3();
} else if (MainActivity.this.R2 == ThemeEnum.DARK_THEME.getValue()) {
MainActivity.this.U1();
} else if (MainActivity.this.R2 == ThemeEnum.SYSTEM_DEFAULT_THEME.getValue()) {
MainActivity mainActivity = MainActivity.this;
if (mainActivity.d3 == 32) {
mainActivity.U1();
} else {
mainActivity.G3();
}
} else {
MainActivity.this.U1();
}
CleverTapAPI cleverTapAPI = MainActivity.J3;
if (cleverTapAPI != null) {
cleverTapAPI.R0(MainActivity.this.y2);
}
}
}
private static class e2 extends AsyncTask<Void, Void, Void> {
Context a;
e2(Context context) {
this.a = context;
}
@Override
public Void doInBackground(Void... voidArr) {
AdvertisingIdClient.Info info;
String str;
Context context = this.a;
if (context != null) {
try {
info = AdvertisingIdClient.getAdvertisingIdInfo(context);
} catch (GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException | Exception unused) {
info = null;
}
try {
boolean isLimitAdTrackingEnabled = info.isLimitAdTrackingEnabled();
cc.b.B0().u1(String.valueOf(!isLimitAdTrackingEnabled));
str = !isLimitAdTrackingEnabled ? info.getId() : null;
try {
Log.v("track", "technical " + str.substring(0, 3));
} catch (Exception unused2) {
}
} catch (Exception unused3) {
str = null;
}
hd.a0.y(this.a).T("pref_key_advertising_id", str);
}
return null;
}
}
class f implements View.OnClickListener {
f() {
}
@Override
public void onClick(View view) {
MainActivity.this.f5(cc.d.N);
MainActivity.this.I2();
}
}
class f0 implements Runnable {
f0() {
}
@Override
public void run() {
MainActivity.this.getSupportFragmentManager().e1();
MainActivity.this.n1.F0(0);
if (MainActivity.this.N0 != null) {
MainActivity.this.N0.z(0).m();
}
}
}
class f1 implements ConnectableDeviceListener {
f1() {
}
public void onCapabilityUpdated(ConnectableDevice connectableDevice, List<String> list, List<String> list2) {
}
public void onConnectionFailed(ConnectableDevice connectableDevice, ServiceCommandError serviceCommandError) {
}
public void onDeviceDisconnected(ConnectableDevice connectableDevice) {
MenuItem menuItem = MainActivity.this.q3;
if (menuItem != null) {
menuItem.setIcon(2131231697);
}
MiniController miniController = MainActivity.this.D1;
if (miniController != null) {
miniController.setVisibility(8);
}
if (MainActivity.this.D != 1 || MainActivity.this.G1 == null) {
return;
}
MainActivity.this.F1 = null;
MainActivity mainActivity = MainActivity.this;
mainActivity.H2(mainActivity.G1);
}
public void onDeviceReady(ConnectableDevice connectableDevice) {
MenuItem menuItem = MainActivity.this.q3;
if (menuItem != null) {
menuItem.setIcon(2131231701);
}
MainActivity.this.I1.setVisibility(0);
MiniController miniController = MainActivity.this.D1;
if (miniController != null) {
miniController.setVisibility(0);
}
if (MainActivity.this.D != 2 || MainActivity.this.G1 == null) {
return;
}
MainActivity.this.F1 = null;
MainActivity mainActivity = MainActivity.this;
mainActivity.H2(mainActivity.G1);
}
public void onPairingRequired(ConnectableDevice connectableDevice, DeviceService deviceService, DeviceService.PairingType pairingType) {
}
}
public interface f2 {
void a(View view, int i, Object obj, int i2);
}
class g implements DrawerLayout.e {
g() {
}
public void a(@NonNull View view) {
}
public void b(@NonNull View view) {
}
public void c(int i) {
}
public void d(@NonNull View view, float f) {
if (f > BitmapDescriptorFactory.HUE_RED) {
MainActivity.this.t1 = true;
} else {
MainActivity.this.t1 = false;
}
}
}
class g0 implements Runnable {
g0() {
}
@Override
public void run() {
MainActivity.this.n1.F0(0);
if (MainActivity.this.N0 != null) {
MainActivity.this.N0.z(0).m();
}
}
}
class g1 implements Runnable {
final String a;
final int c;
g1(String str, int i) {
this.a = str;
this.c = i;
}
@Override
public void run() {
int i;
if (this.a.equalsIgnoreCase("search")) {
MainActivity.this.n1.F0(0);
} else {
int i2 = this.c;
if (i2 >= 0) {
MainActivity.this.n1.F0(i2);
}
}
if (MainActivity.this.N0 == null || (i = this.c) < 0 || i >= MainActivity.this.N0.getTabCount()) {
return;
}
MainActivity.this.N0.z(this.c).m();
}
}
private class g2 implements SessionManagerListener {
class a implements Runnable {
a() {
}
@Override
public void run() {
((tc.i) MainActivity.this.s).d3();
}
}
private g2() {
}
public void onSessionEnded(Session session, int i) {
hd.h.b("TAG" + session.isDisconnected(), "onSessionEnded " + i);
try {
if (MainActivity.this.s instanceof tc.i) {
new Handler().postDelayed(new a(), 500L);
}
} catch (Exception unused) {
}
}
public void onSessionEnding(Session session) {
hd.h.b("chromeCast" + session.isDisconnected(), "onSessionEnding ");
MainActivity mainActivity = MainActivity.this;
mainActivity.C1 = true;
mainActivity.s4(ButtonType.NONE);
MainActivity.this.q5();
}
public void onSessionResumeFailed(Session session, int i) {
hd.h.b("chromeCast", "onSessionResumeFailed");
t2 t2Var = MainActivity.this.n1;
if (t2Var != null) {
t2Var.I0(0);
}
}
public void onSessionResumed(Session session, boolean z) {
MainActivity.this.invalidateOptionsMenu();
MainActivity.this.E1();
}
public void onSessionResuming(Session session, String str) {
}
public void onSessionStartFailed(Session session, int i) {
hd.h.b("chromeCast" + session.isDisconnected(), "onSessionStartFailed ");
}
public void onSessionStarted(Session session, String str) {
hd.h.b("chromeCast", "onSessionStarted");
MainActivity.this.invalidateOptionsMenu();
MainActivity mainActivity = MainActivity.this;
mainActivity.x1 = mainActivity.z1.getSessionManager().getCurrentCastSession();
if (MainActivity.this.x1.isConnected()) {
MainActivity.this.s();
Fragment fragment = MainActivity.this.s;
if (fragment != null) {
((tc.i) fragment).F2();
}
MainActivity.this.J4(true);
}
MainActivity mainActivity2 = MainActivity.this;
mainActivity2.C1 = false;
MenuItem menuItem = mainActivity2.q3;
if (menuItem != null) {
menuItem.setVisible(false);
}
MainActivity.this.E1();
}
public void onSessionStarting(Session session) {
}
public void onSessionSuspended(Session session, int i) {
hd.h.b("chromeCast", "onSessionSuspended");
}
g2(MainActivity mainActivity, k kVar) {
this();
}
}
class h implements View.OnClickListener {
h() {
}
@Override
public void onClick(View view) {
}
}
class h0 implements Runnable {
h0() {
}
@Override
public void run() {
MainActivity.this.o1 = false;
}
}
class h1 implements PaymentManager.PaymentCallback<List<ActivePackagesResponse>> {
final String a;
final int b;
final String c;
h1(String str, int i, String str2) {
this.a = str;
this.b = i;
this.c = str2;
}
@Override
public void onSuccess(List<ActivePackagesResponse> list) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.Q2();
if (list.size() == 0) {
hd.u.M(MainActivity.this, ScreenType.PAYMENTS, this.a, this.b, this.c, "");
return;
}
ActivePackagesResponse activePackagesResponse = list.get(0);
if (activePackagesResponse.getGateway().equalsIgnoreCase("Demo")) {
MainActivity.this.L4(hd.a.a.c(OTTApplication.o()).getDEMO_GATEWAY_ERROR_MESSAGE(), "");
return;
}
if (activePackagesResponse.getGateway().equalsIgnoreCase("rokuinapp")) {
if (this.c.equalsIgnoreCase(hd.r.j0)) {
?? r92 = MainActivity.this;
r92.L4(r92.getString(2131952259), MainActivity.this.getString(2131952258));
return;
} else {
?? r93 = MainActivity.this;
r93.L4(r93.getString(2131952256), MainActivity.this.getString(2131952255));
return;
}
}
if (!activePackagesResponse.getGateway().equalsIgnoreCase("amazoninapp")) {
hd.u.M(MainActivity.this, ScreenType.PAYMENTS, this.a, this.b, this.c, "");
} else if (this.c.equalsIgnoreCase(hd.r.j0)) {
?? r94 = MainActivity.this;
r94.L4(r94.getString(2131952259), MainActivity.this.getString(2131952257));
} else {
?? r95 = MainActivity.this;
r95.L4(r95.getString(2131952256), MainActivity.this.getString(2131952254));
}
}
@Override
public void onFailure(Error error) {
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.Q2();
hd.u.M(MainActivity.this, ScreenType.PAYMENTS, this.a, this.b, this.c, "");
}
}
public interface h2 {
void h(View view, int i, Object obj);
}
class i implements View.OnClickListener {
i() {
}
@Override
public void onClick(View view) {
MainActivity.this.M2(true);
}
}
class i0 implements Runnable {
i0() {
}
@Override
public void run() {
MainActivity.this.o1 = false;
}
}
class i1 implements View.OnClickListener {
i1() {
}
@Override
public void onClick(View view) {
Dialog dialog = MainActivity.this.u3;
if (dialog != null) {
dialog.dismiss();
}
}
}
class j implements MediaCatalogManager.MediaCatalogCallback<ContentPage> {
j() {
}
@Override
public void onSuccess(ContentPage contentPage) {
Fragment fragment = MainActivity.this.s;
if (fragment != null) {
((tc.i) fragment).F2();
}
MainActivity.this.H2(contentPage);
}
@Override
public void onFailure(Error error) {
MainActivity.this.U4(error.getMessage());
}
}
class j0 implements View.OnClickListener {
j0() {
}
@Override
public void onClick(View view) {
}
}
class j1 implements Runnable {
j1() {
}
@Override
public void run() {
MainActivity.this.v3 = false;
}
}
class k implements OnInitializationCompleteListener {
k() {
}
public void onInitializationComplete(InitializationStatus initializationStatus) {
}
}
class k0 implements Runnable {
k0() {
}
@Override
public void run() {
t2 t2Var = MainActivity.this.n1;
t2Var.F0(t2Var != null ? t2Var.r0() : 0);
if (MainActivity.this.N0 != null) {
if (MainActivity.this.N0.getSelectedTabPosition() != -1 && MainActivity.this.N0.z(MainActivity.this.N0.getSelectedTabPosition()) != null) {
MainActivity.this.N0.z(MainActivity.this.N0.getSelectedTabPosition()).m();
} else if (MainActivity.this.N0.z(0) != null) {
MainActivity.this.N0.z(0).m();
}
}
}
}
class k1 implements Runnable {
k1() {
}
@Override
public void run() {
MainActivity mainActivity = MainActivity.this;
if (mainActivity.A2 instanceof mc.l) {
return;
}
mainActivity.F5(false, "", false, null);
}
}
class l implements View.OnClickListener {
final String a;
final String c;
l(String str, String str2) {
this.a = str;
this.c = str2;
}
@Override
public void onClick(View view) {
if (MainActivity.this.v3) {
return;
}
MainActivity.this.v3 = true;
MainActivity mainActivity = MainActivity.this;
mainActivity.w3.postDelayed(mainActivity.x3, 3000L);
cc.c.d().m(ScreenType.HOME, null, null, null, this.a, cc.c.v1, null);
hd.u.f0(MainActivity.this, hd.r.w1, this.c, this.a);
}
}
class l0 implements UserManager.UserCallback<User> {
l0() {
}
@Override
public void onSuccess(User user) {
MainActivity.this.Q2();
MainActivity.this.K2(user);
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.L5(user);
}
@Override
public void onFailure(Error error) {
MainActivity.this.Q2();
r3.d dVar = MainActivity.this;
if (dVar == null || dVar.isFinishing()) {
return;
}
MainActivity.this.u5();
}
}
class l1 implements Runnable {
final boolean a;
final String c;
final User d;
l1(boolean z, String str, User user) {
this.a = z;
this.c = str;
this.d = user;
}
@Override
public void run() {
User user;
MainActivity.this.f2.setVisibility(this.a ? 0 : 8);
if (this.a) {
MainActivity.this.f2.setVisibility(0);
MainActivity.this.M.setVisibility(this.c.isEmpty() ? 0 : 8);
if (hd.e.T.equalsIgnoreCase("chaupal")) {
MainActivity.this.P.setVisibility((!this.c.isEmpty() || ((user = this.d) != null && (user.getPackages() == null || !this.d.getPackages().isEmpty()))) ? 8 : 0);
}
if (hd.e.T.equalsIgnoreCase("dishtv")) {
MainActivity.this.O.setVisibility(this.c.isEmpty() ? 0 : 8);
}
MainActivity.this.G.setVisibility(this.c.isEmpty() ? 0 : 8);
if (!hd.e.T.equalsIgnoreCase("chaupal") && !hd.e.T.equalsIgnoreCase("starhub")) {
MainActivity.this.g2.setVisibility(this.c.isEmpty() ? 8 : 0);
if (this.c.isEmpty()) {
return;
}
MainActivity.this.g2.setText(this.c);
return;
}
MainActivity.this.m2.setVisibility(this.c.isEmpty() ? 8 : 0);
MainActivity.this.h2.setVisibility(this.c.isEmpty() ? 8 : 0);
if (this.c.isEmpty()) {
return;
}
MainActivity.this.h2.setText(this.c);
}
}
}
class m implements FragmentManager.l {
m() {
}
public void a() {
int q0 = MainActivity.this.getSupportFragmentManager().q0();
if (q0 >= 1) {
MainActivity.this.b5(true);
MainActivity.this.I5(false);
} else {
MainActivity.this.b5(false);
MainActivity.this.G4("");
MainActivity.this.I5(true);
}
Fragment j0 = MainActivity.this.getSupportFragmentManager().j0(2131427847);
if (j0 != null) {
j0.onResume();
TextView textView = MainActivity.this.h2;
if (textView != null && textView.getVisibility() == 0 && q0 == 1 && (j0 instanceof com.yupptv.ott.fragments.a1)) {
MainActivity.this.L1 = true;
MainActivity.this.z(true);
}
}
}
}
class m0 implements ResultCallback<Status> {
m0() {
}
public void onResult(Status status) {
OTTApplication.w().u().disconnect();
OTTApplication.w().M(null);
}
}
class m1 implements oc.h {
final Params a;
final boolean c;
m1(Params params, boolean z) {
this.a = params;
this.c = z;
}
@Override
public void o(boolean z, int i, HashMap hashMap) {
t2 t2Var;
if (i == 1 && this.a.getUrl().trim().length() > 0) {
MainActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(this.a.getUrl())));
}
MainActivity.this.N0.z(0).m();
if (!this.c || (t2Var = MainActivity.this.n1) == null) {
return;
}
t2Var.F0(0);
}
@Override
public void y(boolean z, int i, int i2) {
}
}
class n implements View.OnClickListener {
n() {
}
@Override
public void onClick(View view) {
MainActivity.this.b();
if (MainActivity.this.l.C(8388611)) {
return;
}
MainActivity.this.l.K(8388611);
}
}
class n0 implements GoogleApiClient.ConnectionCallbacks {
class a implements ResultCallback<Status> {
a() {
}
public void onResult(Status status) {
OTTApplication.w().u().disconnect();
OTTApplication.w().M(null);
}
}
n0() {
}
public void onConnected(Bundle bundle) {
GoogleSignInApi googleSignInApi = Auth.GoogleSignInApi;
OptionalPendingResult silentSignIn = googleSignInApi.silentSignIn(OTTApplication.w().u());
if (silentSignIn.isDone()) {
silentSignIn.get();
googleSignInApi.signOut(OTTApplication.w().u()).setResultCallback(new a());
}
}
public void onConnectionSuspended(int i) {
}
}
class n1 implements View.OnClickListener {
n1() {
}
@Override
public void onClick(View view) {
MainActivity.this.w3();
}
}
class o implements f2 {
final Configs a;
o(Configs configs) {
this.a = configs;
}
@Override
public void a(View view, int i, Object obj, int i2) {
if (i2 != 1) {
if (i2 == 2) {
if (((String) obj).equalsIgnoreCase("nav_languages")) {
MainActivity.this.f5(cc.d.y);
MainActivity mainActivity = MainActivity.this;
mainActivity.h5(cc.c.Y, "Languages", mainActivity.S1);
MainActivity.this.s3(true);
return;
}
return;
}
if (i2 != 3) {
if (i2 == 4 && !MainActivity.this.V1) {
MainActivity.this.V1 = true;
MainActivity.this.Z4();
return;
}
return;
}
if (view.getId() == 2131428541) {
MainActivity.this.f5(cc.d.E + MainActivity.D3);
MainActivity.this.z5(MainActivity.D3);
return;
}
if (view.getId() == 2131428542) {
MainActivity.this.f5(cc.d.E + "ENG");
MainActivity.this.z5("ENG");
return;
}
return;
}
if (MainActivity.this.l != null && !((String) obj).equalsIgnoreCase("nav_sign_out")) {
MainActivity.this.l.h();
}
HashMap hashMap = new HashMap();
a.C0133a c0133a = hd.a.a;
User loggedUser = c0133a.g(OTTApplication.o()).getLoggedUser();
if (loggedUser != null) {
hashMap.put(cc.b.D0, loggedUser.getUserId());
hashMap.put(cc.b.E0, cc.b.B0().p1());
}
String str = (String) obj;
if (str.equalsIgnoreCase("nav_help")) {
MainActivity.this.f5(cc.d.w);
MainActivity mainActivity2 = MainActivity.this;
mainActivity2.h5(cc.c.Y, "Help", mainActivity2.S1);
Configs configs = this.a;
if (configs != null && configs.getHelpPageUrl() != null) {
hashMap.put("url", this.a.getHelpPageUrl());
}
cc.c.d().o(cc.b.M0, hashMap);
hd.u.e0(MainActivity.this, hd.r.b1, null);
return;
}
if (str.equalsIgnoreCase("nav_aboutus")) {
MainActivity.this.f5(cc.d.x);
MainActivity mainActivity3 = MainActivity.this;
mainActivity3.h5(cc.c.Y, "About us", mainActivity3.S1);
hd.u.e0(MainActivity.this, hd.r.a1, null);
return;
}
if (str.equalsIgnoreCase("nav_privacy_policy")) {
MainActivity.this.f5(cc.d.B);
Configs configs2 = this.a;
if (configs2 != null && configs2.getPrivacyPolicyPageUrl() != null) {
hashMap.put("url", this.a.getPrivacyPolicyPageUrl());
}
cc.c.d().o(cc.b.M0, hashMap);
MainActivity mainActivity4 = MainActivity.this;
mainActivity4.h5(cc.c.Y, "Privacy Policy", mainActivity4.S1);
hd.u.e0(MainActivity.this, hd.r.q1, null);
return;
}
if (str.equalsIgnoreCase("nav_terms_conditions")) {
MainActivity.this.f5(cc.d.C);
Configs configs3 = this.a;
if (configs3 != null && configs3.getTermsConditionsPageUrl() != null) {
hashMap.put("url", this.a.getTermsConditionsPageUrl());
}
cc.c.d().o(cc.b.M0, hashMap);
MainActivity mainActivity5 = MainActivity.this;
mainActivity5.h5(cc.c.Y, "Terms and Conditions", mainActivity5.S1);
hd.u.e0(MainActivity.this, hd.r.s1, null);
return;
}
if (str.equalsIgnoreCase("nav_faq")) {
MainActivity.this.f5(cc.d.D);
Configs configs4 = this.a;
if (configs4 != null && configs4.getFaqPageUrl() != null) {
hashMap.put("url", this.a.getFaqPageUrl());
}
cc.c.d().o(cc.b.M0, hashMap);
MainActivity mainActivity6 = MainActivity.this;
mainActivity6.h5(cc.c.Y, "FAQs", mainActivity6.S1);
hd.u.e0(MainActivity.this, hd.r.r1, null);
return;
}
if (str.equalsIgnoreCase("nav_pricing")) {
MainActivity.this.f5(cc.d.A);
MainActivity mainActivity7 = MainActivity.this;
mainActivity7.h5(cc.c.Y, "Packages", mainActivity7.S1);
MainActivity.this.w3();
return;
}
if (str.equalsIgnoreCase("nav_contact_us")) {
MainActivity.this.f5(cc.d.F);
Configs configs5 = this.a;
if (configs5 != null && configs5.getContactUsPageUrl() != null) {
hashMap.put("url", this.a.getContactUsPageUrl());
}
cc.c.d().o(cc.b.M0, hashMap);
MainActivity mainActivity8 = MainActivity.this;
mainActivity8.h5(cc.c.Y, "Contact Us", mainActivity8.S1);
hd.u.e0(MainActivity.this, hd.r.t1, null);
return;
}
if (str.equalsIgnoreCase("nav_bookmarks")) {
MainActivity.this.f5(cc.d.G);
MainActivity mainActivity9 = MainActivity.this;
mainActivity9.h5(cc.c.Y, "Bookmarks", mainActivity9.S1);
Toast.makeText((Context) MainActivity.this, (CharSequence) "Bookmarks not available!", 0).show();
return;
}
if (str.equalsIgnoreCase("nav_activate_device")) {
MainActivity.this.f5(cc.d.H);
MainActivity mainActivity10 = MainActivity.this;
mainActivity10.h5(cc.c.Y, "Connect TV", mainActivity10.S1);
MainActivity.this.h4();
return;
}
if (str.equalsIgnoreCase("nav_redeem_voucher")) {
MainActivity.this.f5(cc.d.H);
MainActivity mainActivity11 = MainActivity.this;
mainActivity11.h5(cc.c.Y, "Redeem Voucher", mainActivity11.S1);
if (hd.a.r(MainActivity.this).getLoggedUser() == null) {
MainActivity.this.y3(false, 10003);
return;
} else {
MainActivity.this.F3(true, null, new String[0]);
return;
}
}
if (str.equalsIgnoreCase("nav_app_settings")) {
MainActivity.this.f5(cc.d.J);
MainActivity mainActivity12 = MainActivity.this;
mainActivity12.h5(cc.c.Y, "App Settings", mainActivity12.S1);
hd.u.Y(MainActivity.this, ScreenType.APP_SETTINGS, null);
return;
}
if (str.equalsIgnoreCase("nav_sign_out")) {
MainActivity mainActivity13 = MainActivity.this;
mainActivity13.h5(cc.c.Y, "Logout", mainActivity13.S1);
if ((c0133a.g(OTTApplication.o()) == null || c0133a.g(OTTApplication.o()).getLoggedUser() != null) && !MainActivity.this.V1) {
MainActivity.this.V1 = true;
MainActivity.this.Z4();
return;
}
return;
}
if (str.equalsIgnoreCase("nav_favourites")) {
MainActivity.this.f5(cc.d.z);
MainActivity mainActivity14 = MainActivity.this;
mainActivity14.h5(cc.c.Y, "Favourites", mainActivity14.S1);
cc.e.n().R("Favourites");
if (MainActivity.this.l != null) {
MainActivity.this.l.h();
}
if (c0133a.g(OTTApplication.o()) != null && c0133a.g(OTTApplication.o()).getLoggedUser() == null) {
Toast.makeText((Context) view.getContext(), (CharSequence) MainActivity.this.getResources().getString(2131952226), 1).show();
return;
}
Bundle bundle = new Bundle();
bundle.putString(hd.r.I0, "Favourites");
bundle.putString(hd.r.c, PageType.List.getValue());
String str2 = hd.r.i;
ScreenType screenType = ScreenType.FAVOURITES;
bundle.putString(str2, screenType.getValue());
hd.u.Y(view.getContext(), screenType, bundle);
return;
}
if (str.equalsIgnoreCase("nav_languages")) {
MainActivity.this.f5(cc.d.y);
MainActivity mainActivity15 = MainActivity.this;
mainActivity15.h5(cc.c.Y, "Languages", mainActivity15.S1);
MainActivity.this.s3(true);
return;
}
if (str.equalsIgnoreCase("nav_account")) {
MainActivity.this.f5(cc.d.y);
MainActivity mainActivity16 = MainActivity.this;
mainActivity16.h5(cc.c.Y, "Account", mainActivity16.S1);
MainActivity.this.t3();
return;
}
if (str.equalsIgnoreCase("nav_pricing")) {
MainActivity.this.f5(cc.d.y);
MainActivity mainActivity17 = MainActivity.this;
mainActivity17.h5(cc.c.Y, "Pricing", mainActivity17.S1);
MainActivity.this.u3();
return;
}
if (str.equalsIgnoreCase("nav_profile")) {
MainActivity.this.f5(cc.d.I);
MainActivity mainActivity18 = MainActivity.this;
mainActivity18.h5(cc.c.Z, "Profile Information", mainActivity18.S1);
Bundle bundle2 = new Bundle();
bundle2.putString(hd.r.y0, hd.r.f1);
hd.u.Y(view.getContext(), ScreenType.USER_PROFILE, bundle2);
return;
}
if (str.equalsIgnoreCase("nav_video_quality")) {
MainActivity mainActivity19 = MainActivity.this;
String str3 = cc.c.c0;
mainActivity19.S1 = str3;
mainActivity19.h5(str3, mainActivity19.getResources().getString(2131952962), cc.c.Y);
hd.u.Y(MainActivity.this, ScreenType.VIDEO_QUALITY, null);
if (MainActivity.this.l != null) {
MainActivity.this.l.h();
return;
}
return;
}
if (str.equalsIgnoreCase("nav_offline_video")) {
MainActivity mainActivity20 = MainActivity.this;
String str4 = cc.c.C0;
mainActivity20.S1 = str4;
mainActivity20.h5(str4, "My Download", cc.c.Y);
cc.e.n().R("My Download");
if (MainActivity.this.l != null) {
MainActivity.this.l.h();
}
MainActivity.this.z4(false);
if (c0133a.g(OTTApplication.o()).getLoggedUser() == null) {
r3.d dVar = MainActivity.this;
Toast.makeText((Context) dVar, (CharSequence) dVar.getResources().getString(2131951626), 1).show();
return;
}
Bundle bundle3 = new Bundle();
bundle3.putString(hd.r.I0, "My Downloads");
bundle3.putString(hd.r.c, PageType.List.getValue());
String str5 = hd.r.i;
ScreenType screenType2 = ScreenType.OFFLINE_VIDEO;
bundle3.putString(str5, screenType2.getValue());
hd.u.Y(view.getContext(), screenType2, bundle3);
return;
}
if (str.equalsIgnoreCase("nav_rateapp")) {
MainActivity mainActivity21 = MainActivity.this;
mainActivity21.S1 = "Rate App";
mainActivity21.h5("Rate App", "Rate App", cc.c.Y);
hd.h0.e(MainActivity.this);
return;
}
if (str.equalsIgnoreCase("nav_shareapp")) {
MainActivity mainActivity22 = MainActivity.this;
mainActivity22.S1 = "Share App";
mainActivity22.h5("Share App", "Share App", cc.c.Y);
hd.h0.f(MainActivity.this);
return;
}
if (str.equalsIgnoreCase("nav_feedback")) {
MainActivity mainActivity23 = MainActivity.this;
mainActivity23.S1 = "Feedback";
mainActivity23.h5("Feedback", "Feedback", cc.c.Y);
hd.h0.e(MainActivity.this);
return;
}
MainActivity.this.M2(true);
MainActivity.this.f5(cc.d.s + MainActivity.this.D0.u(i));
MainActivity.this.c1.h(view, i, obj);
}
}
class o0 implements View.OnClickListener {
o0() {
}
@Override
public void onClick(View view) {
MainActivity.this.onBackPressed();
MainActivity.this.d2.setVisibility(8);
}
}
class o1 implements UserManager.UserCallback<User> {
final FeaturesInfo a;
final hd.a0 b;
class a implements oc.h {
class C0052a implements UserManager.UserCallback<String> {
C0052a() {
}
@Override
public void onSuccess(String str) {
MainActivity.this.Q2();
o1.this.b.A(Boolean.FALSE);
}
@Override
public void onFailure(Error error) {
MainActivity.this.Q2();
MainActivity.this.U4(error.getMessage());
}
}
a() {
}
@Override
public void o(boolean r6, int r7, java.util.HashMap r8) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.MainActivity.o1.a.o(boolean, int, java.util.HashMap):void");
}
@Override
public void y(boolean z, int i, int i2) {
}
}
o1(FeaturesInfo featuresInfo, hd.a0 a0Var) {
this.a = featuresInfo;
this.b = a0Var;
}
@Override
public void onSuccess(User user) {
Fields fields = this.a.getFields();
MainActivity.this.K2(user);
String age = (fields.getAge() == null || fields.getAge().trim().isEmpty()) ? "" : fields.getAge();
String gender = (fields.getGender() == null || fields.getGender().trim().isEmpty()) ? "" : fields.getGender();
if (((age.trim().isEmpty() || age.equals("0")) && (gender.trim().isEmpty() || gender.equals("0"))) || user == null) {
return;
}
if (user.getGender() == null || user.getGender().equalsIgnoreCase("") || user.getDob() == null || user.getDob().longValue() == 0) {
HashMap hashMap = new HashMap();
hashMap.put("msg1", "To Enjoy Uninterrupted Services");
hashMap.put("msg2", MainActivity.this.getResources().getString(2131951680, "age and gender"));
if (user.getGender() == null || user.getGender().equalsIgnoreCase("")) {
hashMap.put("gender", gender);
}
if (user.getDob() == null || user.getDob().longValue() == 0) {
hashMap.put("age", age);
}
if ((age.equals("0") || age.equals("")) && user.getDob() == null && (user.getGender() == null || !user.getGender().isEmpty())) {
return;
}
if ((gender.equals("0") || gender.equals("")) && user.getGender() != null && user.getGender().equals("") && user.getDob() != null) {
return;
}
if (this.b.d().booleanValue() || ((age.equals("2") && user.getDob() == null) || (gender.equals("2") && user.getGender().isEmpty()))) {
hd.u.J0(MainActivity.this, DialogType.UPDATE_AGE_DOB_DIALOG, hashMap, new a());
}
}
}
@Override
public void onFailure(Error error) {
}
}
class p implements Runnable {
p() {
}
@Override
public void run() {
hd.h.b("DEBUG", "CAlling offline download page");
hd.e0.y0();
hd.d.a();
hd.u.Y(MainActivity.this, ScreenType.OFFLINE_VIDEO, null);
}
}
class p0 implements oc.h {
final User.ProfileParentalDetails a;
class a implements UserManager.UserCallback<String> {
a() {
}
@Override
public void onSuccess(String str) {
hd.h.a("DEBUG", "activate profile success : " + str);
MainActivity.this.P1();
}
@Override
public void onFailure(Error error) {
hd.h.a("DEBUG", "activate profile error : " + error.getMessage());
MainActivity.this.U4(error.getMessage());
}
}
p0(User.ProfileParentalDetails profileParentalDetails) {
this.a = profileParentalDetails;
}
@Override
public void o(boolean z, int i, HashMap hashMap) {
if (z) {
String str = null;
if (hashMap != null && hashMap.containsKey("PassCode")) {
str = (String) hashMap.get("PassCode");
}
hd.a.a.b(OTTApplication.o()).getUserManager().activateUserProfile(this.a.getProfileId().intValue(), str, new a());
}
}
@Override
public void y(boolean z, int i, int i2) {
}
}
class p1 extends i.e1 {
p1() {
}
@Override
public void a() {
MainActivity mainActivity = MainActivity.this;
mainActivity.x5(2131231906, mainActivity.F2, 2, 2);
}
@Override
public void b() {
MainActivity mainActivity = MainActivity.this;
mainActivity.x5(2131231908, mainActivity.E2, 1, 1);
}
}
class q implements Runnable {
q() {
}
@Override
public void run() {
cc.e.n().L("Notification");
cc.e.n().M("Notification");
MainActivity mainActivity = MainActivity.this;
mainActivity.H2(mainActivity.t2);
MainActivity.this.t2 = null;
MainActivity.this.u2 = false;
}
}
class q0 implements UserManager.UserCallback<String> {
q0() {
}
@Override
public void onSuccess(String str) {
hd.h.a("DEBUG", "activate profile success : " + str);
MainActivity.this.P1();
MainActivity.this.Q2();
}
@Override
public void onFailure(Error error) {
hd.h.a("DEBUG", "activate profile error : " + error.getMessage());
MainActivity.this.U4(error.getMessage());
MainActivity.this.Q2();
}
}
class q1 extends BroadcastReceiver {
q1() {
}
@Override
public void onReceive(Context context, Intent intent) {
if (intent == null) {
return;
}
if (!intent.getAction().equals("media_control")) {
Fragment fragment = MainActivity.this.s;
if (((tc.i) fragment) == null || ((tc.i) fragment).D0 == null) {
return;
}
((tc.i) fragment).D0.j0();
return;
}
int intExtra = intent.getIntExtra("control_type", 0);
if (intExtra == 1) {
MainActivity.this.m4();
cc.c.d().t("player_actions", cc.b.B0().A(cc.c.e1));
} else {
if (intExtra != 2) {
return;
}
MainActivity.this.U3();
cc.c.d().t("player_actions", cc.b.B0().A(cc.c.f1));
}
}
}
class r implements Runnable {
r() {
}
@Override
public void run() {
try {
if (MainActivity.this.s2 != null) {
MainActivity.this.s2.k(MainActivity.this.getIntent(), MainActivity.this);
}
} catch (Exception unused) {
}
String w = hd.a0.y(MainActivity.this).w();
if (w != null && !w.equalsIgnoreCase("")) {
if (MainActivity.this.t2.n().equals(w)) {
MainActivity mainActivity = MainActivity.this;
String n = mainActivity.t2.n();
MainActivity mainActivity2 = MainActivity.this;
hd.u.u0(mainActivity, n, mainActivity2.S1, mainActivity2.y);
} else {
MainActivity mainActivity3 = MainActivity.this;
hd.u.u0(mainActivity3, w, mainActivity3.S1, mainActivity3.y);
}
}
MainActivity.this.v2 = false;
}
}
class r0 extends e3.b {
r0(ImageView imageView) {
super(imageView);
}
public void p(Bitmap bitmap) {
androidx.core.graphics.drawable.c a = androidx.core.graphics.drawable.d.a(MainActivity.this.getResources(), bitmap);
a.e(true);
MainActivity.this.k.setImageDrawable(a);
}
}
class r1 implements Runnable {
r1() {
}
@Override
public void run() {
MainActivity.this.n1.F0(0);
if (MainActivity.this.N0 != null) {
MainActivity.this.N0.z(0).m();
}
}
}
class s implements View.OnClickListener {
s() {
}
@Override
public void onClick(View view) {
MainActivity.this.onBackPressed();
}
}
class s0 implements Runnable {
s0() {
}
@Override
public void run() {
MainActivity.this.e5();
}
}
class s1 implements Runnable {
s1() {
}
@Override
public void run() {
MainActivity mainActivity = MainActivity.this;
mainActivity.n1.F0(mainActivity.t2("after_dark"));
MainActivity.this.Z3();
}
}
class t implements View.OnClickListener {
t() {
}
@Override
public void onClick(View view) {
MainActivity.this.onBackPressed();
}
}
class t0 implements Runnable {
t0() {
}
@Override
public void run() {
if (MainActivity.this.X1 && MainActivity.this.x1 != null && MainActivity.this.x1.isConnected()) {
MainActivity.this.p.minimize(true);
}
}
}
class t1 extends e3.g<Bitmap> {
final CardView e;
t1(CardView cardView) {
this.e = cardView;
}
public void i(@NonNull Bitmap bitmap, f3.d<? super Bitmap> dVar) {
MainActivity.this.u3.show();
this.e.setBackground(new BitmapDrawable(MainActivity.this.getResources(), bitmap));
}
}
class u implements View.OnClickListener {
u() {
}
@Override
public void onClick(View view) {
MainActivity.this.onBackPressed();
}
}
class u0 implements View.OnClickListener {
u0() {
}
@Override
public void onClick(View view) {
MainActivity.this.s3(false);
}
}
class u1 implements View.OnClickListener {
u1() {
}
@Override
public void onClick(View view) {
Dialog dialog = MainActivity.this.u3;
if (dialog != null) {
dialog.dismiss();
}
}
}
class v implements View.OnClickListener {
v() {
}
@Override
public void onClick(View view) {
MainActivity.this.onBackPressed();
}
}
class v0 implements Runnable {
final Object a;
v0(Object obj) {
this.a = obj;
}
@Override
public void run() {
MainActivity.this.B.N(this.a);
}
}
class v1 implements Runnable {
final AdUrlType.Position a;
final String c;
v1(AdUrlType.Position position, String str) {
this.a = position;
this.c = str;
}
@Override
public void run() {
String str;
if (this.a == null || (str = this.c) == null || str.equalsIgnoreCase("")) {
return;
}
Fragment fragment = MainActivity.this.X;
if (fragment instanceof com.yupptv.ott.fragments.a1) {
((com.yupptv.ott.fragments.a1) fragment).K1(this.a, this.c);
}
}
}
class w implements UserManager.UserCallback<String> {
w() {
}
@Override
public void onSuccess(String str) {
MainActivity mainActivity = MainActivity.this;
if (mainActivity == null) {
return;
}
mainActivity.g5(cc.c.x0, 0, null);
MainActivity.this.Q2();
hd.h.b("HomeFragment", MainActivity.this.getResources().getString(2131952221));
MainActivity.this.W0.clear();
MainActivity.this.T0.setVisibility(8);
MainActivity.this.g4();
}
@Override
public void onFailure(Error error) {
MainActivity.this.Q2();
if (MainActivity.this == null) {
return;
}
hd.h.b("HomeFragment", error.getMessage());
}
}
class w0 implements Runnable {
w0() {
}
@Override
public void run() {
MainActivity mainActivity = MainActivity.this;
mainActivity.N2 = true;
mainActivity.O1();
MainActivity.this.J5(0);
}
}
class w1 implements Runnable {
final AdUrlType.Position a;
final String c;
w1(AdUrlType.Position position, String str) {
this.a = position;
this.c = str;
}
@Override
public void run() {
String str;
if (!hd.e0.c || this.a == null || (str = this.c) == null || str.equalsIgnoreCase("")) {
return;
}
((com.yupptv.ott.fragments.a1) MainActivity.this.X).K1(this.a, this.c);
}
}
class x implements TabLayout.d {
class a implements Runnable {
a() {
}
@Override
public void run() {
MainActivity.this.l4(false);
}
}
x() {
}
@Override
public void f(com.google.android.material.tabs.TabLayout.g r20) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.MainActivity.x.f(com.google.android.material.tabs.TabLayout$g):void");
}
@Override
public void k(TabLayout.g gVar) {
MainActivity.this.I4(gVar, 4);
if (gVar.i().toString().equalsIgnoreCase("plans")) {
((ImageView) gVar.e().findViewById(2131429682)).setColorFilter(MainActivity.this.getResources().getColor(2131100459));
((TextView) gVar.e().findViewById(2131429674)).setTextColor(MainActivity.this.getResources().getColor(2131100459));
return;
}
((ImageView) gVar.e().findViewById(2131429682)).setColorFilter(MainActivity.this.getResources().getColor(2131100459));
((TextView) gVar.e().findViewById(2131429674)).setTextColor(MainActivity.this.getResources().getColor(2131100459));
if (gVar.i().toString().equalsIgnoreCase("after_dark")) {
((ImageView) gVar.e().findViewById(2131429682)).setImageDrawable(MainActivity.this.getResources().getDrawable(2131231345));
((TextView) gVar.e().findViewById(2131429674)).setTextColor(MainActivity.this.getResources().getColor(2131100459));
}
}
@Override
public void s(TabLayout.g gVar) {
Fragment s0;
com.yupptv.ott.fragments.a1 a1Var;
RecyclerView recyclerView;
hd.h.b("onTabSelectListener2", "onTabReselected");
Fragment j0 = MainActivity.this.getSupportFragmentManager().j0(2131427847);
if (MainActivity.this.getSupportFragmentManager().q0() >= 1 && !MainActivity.this.Y2()) {
MainActivity.this.onBackPressed();
return;
}
if (!(j0 instanceof t2) || (s0 = MainActivity.this.n1.s0()) == null || !(s0 instanceof com.yupptv.ott.fragments.a1) || (recyclerView = (a1Var = (com.yupptv.ott.fragments.a1) s0).y) == null) {
return;
}
if (recyclerView.getLayoutManager().a2() != 0) {
a1Var.y.z1(0);
MainActivity.this.k(true);
} else {
MainActivity mainActivity = MainActivity.this;
mainActivity.n1.F0(mainActivity.t2("home"));
}
}
}
class x0 implements Runnable {
x0() {
}
@Override
public void run() {
MainActivity.this.getWindow().clearFlags(1024);
if (ViewConfiguration.get(MainActivity.this.getApplicationContext()).hasPermanentMenuKey()) {
return;
}
MainActivity.this.getWindow().getDecorView().setSystemUiVisibility(0);
}
}
class x1 implements View.OnClickListener {
x1() {
}
@Override
public void onClick(View view) {
MainActivity.this.f5(cc.d.M);
MainActivity.this.w3();
}
}
class y implements TabLayout.d {
y() {
}
@Override
public void f(TabLayout.g gVar) {
if (gVar == null || gVar.i() == null) {
return;
}
if (MainActivity.this.m3) {
MainActivity.this.N0.z(MainActivity.this.t2(gVar.i().toString())).f().setColorFilter(MainActivity.this.getResources().getColor(2131100451), PorterDuff.Mode.SRC_IN);
}
hd.h.a("testtt", "tab2" + gVar.i().toString());
String obj = gVar.i().toString();
obj.hashCode();
switch (obj) {
case "home":
MainActivity mainActivity = MainActivity.this;
t2 t2Var = mainActivity.n1;
if (t2Var != null) {
t2Var.F0(mainActivity.t2("home"));
}
String str = MainActivity.this.S1;
if (str != null && !str.equalsIgnoreCase(cc.c.v1)) {
HashMap hashMap = new HashMap();
hashMap.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.HOME, null, null, null, cc.c.S, null, hashMap);
}
MainActivity.this.S1 = cc.c.v1;
break;
case "guide":
MainActivity mainActivity2 = MainActivity.this;
t2 t2Var2 = mainActivity2.n1;
if (t2Var2 != null) {
t2Var2.F0(mainActivity2.t2("guide"));
}
String str2 = MainActivity.this.S1;
if (str2 != null && !str2.equalsIgnoreCase(cc.c.r1)) {
HashMap hashMap2 = new HashMap();
hashMap2.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.GUIDE, null, null, null, cc.c.Q, null, hashMap2);
}
MainActivity.this.S1 = cc.c.r1;
break;
case "catchup":
MainActivity mainActivity3 = MainActivity.this;
t2 t2Var3 = mainActivity3.n1;
if (t2Var3 != null) {
t2Var3.F0(mainActivity3.t2("catchup"));
}
String str3 = MainActivity.this.S1;
if (str3 != null && !str3.equalsIgnoreCase(cc.c.s1)) {
HashMap hashMap3 = new HashMap();
hashMap3.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.CATCHUP, null, null, null, cc.c.R, null, hashMap3);
}
MainActivity.this.S1 = cc.c.s1;
break;
case "favourites":
MainActivity mainActivity4 = MainActivity.this;
t2 t2Var4 = mainActivity4.n1;
if (t2Var4 != null) {
t2Var4.F0(mainActivity4.t2("favourites"));
}
String str4 = MainActivity.this.S1;
if (str4 != null && !str4.equalsIgnoreCase(cc.c.C1)) {
HashMap hashMap4 = new HashMap();
hashMap4.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.FAVOURITES, null, null, null, cc.c.V, null, hashMap4);
}
MainActivity.this.S1 = cc.c.C1;
break;
case "settings":
MainActivity mainActivity5 = MainActivity.this;
t2 t2Var5 = mainActivity5.n1;
if (t2Var5 != null) {
t2Var5.F0(mainActivity5.t2("settings"));
}
String str5 = MainActivity.this.S1;
if (str5 != null && !str5.equalsIgnoreCase(cc.c.t1)) {
HashMap hashMap5 = new HashMap();
hashMap5.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.SETTINGS, null, null, null, cc.c.X, null, hashMap5);
}
MainActivity.this.S1 = cc.c.t1;
break;
default:
MainActivity.this.k(false);
MainActivity mainActivity6 = MainActivity.this;
t2 t2Var6 = mainActivity6.n1;
if (t2Var6 != null) {
t2Var6.F0(mainActivity6.t2(gVar.i().toString()));
}
String str6 = MainActivity.this.S1;
if (str6 != null) {
if (!str6.equalsIgnoreCase(cc.c.I1 + "_" + gVar.i().toString())) {
HashMap hashMap6 = new HashMap();
hashMap6.put(cc.c.D0, MainActivity.this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + MainActivity.this.S1);
cc.c.d().m(ScreenType.NONE, null, null, null, cc.c.b0, null, hashMap6);
}
}
MainActivity.this.S1 = cc.c.I1 + "_" + gVar.i().toString();
break;
}
}
@Override
public void k(TabLayout.g gVar) {
if (MainActivity.this.m3) {
MainActivity.this.N0.z(MainActivity.this.t2(gVar.i().toString())).f().setColorFilter(MainActivity.this.getResources().getColor(2131100459), PorterDuff.Mode.SRC_IN);
}
}
@Override
public void s(TabLayout.g gVar) {
}
}
class y0 implements oc.h {
y0() {
}
@Override
public void o(boolean z, int i, HashMap hashMap) {
MainActivity.this.V1 = false;
if (i == 0) {
return;
}
MainActivity.this.M3();
}
@Override
public void y(boolean z, int i, int i2) {
}
}
class y1 extends InterstitialAdLoadCallback {
class a extends FullScreenContentCallback {
a() {
}
public void onAdDismissedFullScreenContent() {
MainActivity.this.v1 = null;
}
public void onAdFailedToShowFullScreenContent(AdError adError) {
MainActivity.this.v1 = null;
}
public void onAdShowedFullScreenContent() {
}
}
y1() {
}
public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {
MainActivity.this.v1 = interstitialAd;
hd.h.a("DFP ADS", "onAdLoaded");
interstitialAd.setFullScreenContentCallback(new a());
}
public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
hd.h.a("DFP ADS", "onAdError" + loadAdError.toString());
MainActivity.this.v1 = null;
}
}
class z implements Runnable {
z() {
}
@Override
public void run() {
MainActivity.this.v2 = false;
}
}
class z0 implements UserManager.UserCallback<String> {
z0() {
}
@Override
public void onSuccess(String str) {
MainActivity.this.Q2();
MainActivity.this.M1();
}
@Override
public void onFailure(Error error) {
MainActivity mainActivity = MainActivity.this;
if (mainActivity == null) {
return;
}
mainActivity.Q2();
}
}
class z1 implements Runnable {
z1() {
}
@Override
public void run() {
Intent intent = new Intent((Context) MainActivity.this, (Class<?>) WelcomeVideoActivity.class);
MainActivity.this.overridePendingTransition(0, 0);
MainActivity.this.startActivityForResult(intent, 19);
MainActivity.this.overridePendingTransition(0, 0);
}
}
static {
androidx.appcompat.app.i.S(true);
B3 = false;
C3 = false;
D3 = "";
G3 = "";
H3 = false;
I3 = -1;
}
public void B3() {
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent.putExtra(hd.r.i, ScreenType.USER_PROFILES);
intent.putExtra(hd.r.y0, hd.r.l);
startActivity(intent);
finish();
}
public void B5() {
Fragment r1Var;
hd.u.B0(this.Y2);
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) != null) {
Configs c3 = c0133a.c(OTTApplication.o());
r1Var = (c3 == null || c3.getSearchStaticMenus() == null || c3.getSearchStaticMenus().trim().length() <= 0) ? new com.yupptv.ott.fragments.r1() : new com.yupptv.ott.fragments.u1();
} else {
r1Var = new com.yupptv.ott.fragments.r1();
}
this.e2.setBackgroundColor(getResources().getColor(2131100385));
this.Z0 = r1Var;
this.A2 = r1Var;
ImageView imageView = this.R;
if (imageView == null || imageView.getVisibility() != 0) {
I3(r1Var);
} else {
z(false);
Y1(false, "");
getSupportFragmentManager().q().c(2131427847, r1Var, "" + r1Var.getClass().getSimpleName()).g(r1Var.getClass().getSimpleName()).j();
}
String str = this.S1;
if (str != null && !str.equalsIgnoreCase(cc.c.t1)) {
HashMap hashMap = new HashMap();
hashMap.put(cc.c.D0, this.S1);
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + this.S1);
cc.c.d().m(ScreenType.SETTINGS, null, null, null, cc.c.X, null, hashMap);
}
this.S1 = cc.c.t1;
}
private void C5(float f3) {
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setStatusBarColor(Z1(Math.max(BitmapDescriptorFactory.HUE_RED, Math.min(1.0f, f3)), getResources().getColor(2131100423), -16777216));
}
}
private void D1(User.ProfileParentalDetails profileParentalDetails) {
boolean z2 = (profileParentalDetails == null || profileParentalDetails.getChildren() == null || !profileParentalDetails.getChildren().booleanValue()) ? false : true;
if (profileParentalDetails != null && profileParentalDetails.getProfileId() != null && profileParentalDetails.getProfileId().toString().trim().length() > 0) {
cc.b.B0().Y1(profileParentalDetails.getProfileId().toString());
}
cc.c.d().t("select_profile", cc.b.B0().C(z2, true));
if (V2()) {
return;
}
u4(true);
this.w3.postDelayed(this.x3, 1000L);
if (profileParentalDetails.getProfileLockActive() == null || !profileParentalDetails.getProfileLockActive().booleanValue()) {
Q4();
hd.a.a.b(OTTApplication.o()).getUserManager().activateUserProfile(profileParentalDetails.getProfileId().intValue(), null, new q0());
} else {
HashMap hashMap = new HashMap();
hashMap.put("imageUrl", profileParentalDetails.getImageUrl() != null ? profileParentalDetails.getImageUrl() : "");
hashMap.put("profileName", profileParentalDetails.getName() != null ? profileParentalDetails.getName() : "");
hd.u.J0(this, DialogType.USER_PROFILE_PASSCODE_DIALOG, hashMap, new p0(profileParentalDetails));
}
}
public void E1() {
CastSession currentCastSession = this.y1.getCurrentCastSession();
this.x1 = currentCastSession;
if (currentCastSession == null || currentCastSession.getRemoteMediaClient() == null) {
return;
}
this.x1.getRemoteMediaClient().registerCallback(z2());
}
public void H1() {
if (hd.e.p) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof mc.l) {
((mc.l) j02).b1();
this.O2 = !this.O2;
p4();
}
}
}
private void H4() {
if (this.L2 == null) {
x2();
}
PreferenceManager preferenceManager = this.L2;
if (preferenceManager == null || preferenceManager.getLoggedUser() == null) {
this.S2.setBackground(getResources().getDrawable(2131232510));
} else if (this.O2) {
this.S2.setBackground(getResources().getDrawable(2131231913));
} else {
this.S2.setBackground(getResources().getDrawable(2131231595));
}
}
public void I2() {
Configs c3 = hd.a.a.c(OTTApplication.o());
if (c3 == null || c3.getCallingNumber() == null) {
return;
}
String callingNumber = c3.getCallingNumber();
Intent intent = new Intent("android.intent.action.DIAL");
try {
intent.setData(Uri.parse("tel:" + callingNumber));
startActivity(intent);
} catch (ActivityNotFoundException unused) {
}
}
public boolean I3(Fragment fragment) {
List<Menu> list;
String simpleName = fragment.getClass().getSimpleName();
this.A2 = fragment;
if (fragment instanceof com.yupptv.ott.fragments.a1) {
this.X0 = false;
} else if ((fragment instanceof t2) && (list = this.Q1) != null && list.size() > 0) {
this.X0 = true;
}
if (getSupportFragmentManager().k0(simpleName) != null) {
hd.u.C0(this);
}
getSupportFragmentManager().q().r(2131427847, fragment, "" + fragment.getClass().getSimpleName()).j();
if (!(fragment instanceof mc.l)) {
this.O2 = false;
new Handler().postDelayed(new k1(), 500L);
}
return true;
}
public void I4(TabLayout.g gVar, int i2) {
if (gVar == null || gVar.i() == null) {
return;
}
gVar.e().findViewById(2131429471).setVisibility(i2);
}
public void I5(boolean z2) {
}
private void K5() {
hd.a.n(OTTApplication.o()).getUserManager().getUserInfo(new a1());
}
private boolean L2() {
CastSession castSession;
int q02 = getSupportFragmentManager().q0();
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 != null && (j02 instanceof nc.j)) {
l4(false);
} else if (j02 != null && (j02 instanceof xc.b) && hd.e0.h0(this)) {
z(true);
}
int i2 = this.D;
if (i2 == 0) {
this.W1 = "";
if (q02 == 1) {
try {
Fragment j03 = getSupportFragmentManager().j0(2131427847);
if (j03 == null || !(j03 instanceof xc.b)) {
z(true);
} else if (!hd.e0.h0(this)) {
if (this.o1) {
finish();
return true;
}
this.o1 = true;
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131951708), 0).show();
new Handler().postDelayed(new i0(), 3000L);
return false;
}
} catch (Exception unused) {
}
}
if (q02 > 1) {
if ((j02 instanceof mc.a) || (j02 instanceof com.yupptv.ott.fragments.onboarding.o)) {
z(true);
} else {
z(false);
}
}
if (q02 >= 1 && (j02 instanceof com.yupptv.ott.fragments.a1)) {
X1(false);
B4("");
}
if (q02 == 1) {
if (this.h1) {
c4();
} else {
t2 t2Var = this.n1;
if (t2Var != null) {
t2Var.B0();
}
}
}
if (q02 < 1) {
return false;
}
if (j02 instanceof mc.l) {
z(true);
return false;
}
getSupportFragmentManager().e1();
return true;
}
if (i2 != 1) {
if (i2 != 2) {
return false;
}
if (q02 == 1) {
try {
Fragment j04 = getSupportFragmentManager().j0(2131427847);
if (j04 == null || !(j04 instanceof xc.b)) {
z(true);
} else if (!hd.e0.h0(this)) {
((tc.i) this.s).f = 2;
this.p.slideHorizontal(true);
return true;
}
} catch (Exception unused2) {
}
}
if (q02 > 1) {
z(false);
}
if (q02 == 1) {
if (this.h1) {
c4();
} else {
t2 t2Var2 = this.n1;
if (t2Var2 != null) {
t2Var2.B0();
}
}
}
if (q02 >= 1 && (j02 instanceof com.yupptv.ott.fragments.a1)) {
X1(false);
B4("");
}
if (q02 >= 1) {
getSupportFragmentManager().e1();
return true;
}
((tc.i) this.s).f = 2;
this.p.slideHorizontal(true);
return true;
}
T4();
tc.i iVar = null;
Fragment fragment = this.s;
if (fragment != null && (fragment instanceof tc.i)) {
iVar = (tc.i) fragment;
iVar.i4(false);
}
this.p.minimize(true);
if (U2()) {
this.J2 = (int) getResources().getDimension(2131166082);
} else {
this.J2 = (int) getResources().getDimension(2131166085);
}
r4();
if ((com.yupptv.ott.a.M || ((j02 instanceof ShortsFragment) && ((ShortsFragment) j02).isVisible())) && ((castSession = this.x1) == null || castSession.getRemoteMediaClient() == null || !(this.x1.getRemoteMediaClient().isBuffering() || this.x1.getRemoteMediaClient().isPlaying()))) {
if (iVar != null) {
iVar.N.setVisibility(8);
}
O1();
} else {
this.p.exitFullscreenToMinimize();
}
J5(this.Y1);
Fragment j05 = getSupportFragmentManager().j0(2131427847);
if (j05 != null && (j05 instanceof xc.b)) {
z(false);
}
if (j05 != null && (j05 instanceof com.yupptv.ott.fragments.u1)) {
z(true);
}
return true;
}
private void L3(List<User.ProfileParentalDetails> list) {
LinearLayout linearLayout = this.U2;
if (linearLayout != null && linearLayout.getChildCount() > 0) {
this.U2.removeAllViews();
}
LayoutInflater from = LayoutInflater.from(this);
ViewGroup viewGroup = null;
if (list != null) {
for (final User.ProfileParentalDetails profileParentalDetails : list) {
hd.h.a("DEBUG", "profiles " + profileParentalDetails.getName());
View inflate = from.inflate(2131624208, viewGroup);
AppCompatImageView findViewById = inflate.findViewById(2131429254);
AppCompatImageView findViewById2 = inflate.findViewById(2131429257);
AppCompatTextView findViewById3 = inflate.findViewById(2131429258);
if (profileParentalDetails.getName() != null && !profileParentalDetails.getName().trim().isEmpty()) {
findViewById3.setText(profileParentalDetails.getName());
}
if (profileParentalDetails.getImageUrl() != null && !profileParentalDetails.getImageUrl().trim().isEmpty()) {
com.bumptech.glide.b.u(OTTApplication.o()).u(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(profileParentalDetails.getImageUrl())).b0(2131231972).j(2131231972).r0(new p2.h[]{new com.bumptech.glide.load.resource.bitmap.i(), new com.bumptech.glide.load.resource.bitmap.v((int) getResources().getDimension(2131166734))}).F0(findViewById);
}
if (profileParentalDetails.getProfileLockActive() != null && profileParentalDetails.getProfileLockActive().booleanValue()) {
hd.h.a("DEBUG", "profiles " + profileParentalDetails.getProfileLockActive());
findViewById2.setVisibility(0);
}
inflate.setTag(profileParentalDetails);
inflate.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.c3(profileParentalDetails, view);
}
});
this.U2.addView(inflate);
viewGroup = null;
}
}
View inflate2 = from.inflate(2131624521, (ViewGroup) null);
View inflate3 = from.inflate(2131624448, (ViewGroup) null);
AppCompatTextView findViewById4 = inflate3.findViewById(z8.f.h);
findViewById4.setText(getResources().getString(2131952139));
findViewById4.setTextColor(getResources().getColor(2131100512));
findViewById4.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.d3(view);
}
});
View inflate4 = from.inflate(2131624448, (ViewGroup) null);
AppCompatTextView findViewById5 = inflate4.findViewById(z8.f.h);
findViewById5.setText(getResources().getString(2131952373));
findViewById5.setTextColor(getResources().getColor(2131100512));
findViewById5.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.e3(view);
}
});
View inflate5 = from.inflate(2131624448, (ViewGroup) null);
AppCompatTextView findViewById6 = inflate5.findViewById(z8.f.h);
findViewById6.setText("Add Profile");
findViewById6.setTextColor(getResources().getColor(2131100512));
findViewById6.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.f3(view);
}
});
this.U2.addView(inflate2);
this.U2.addView(inflate5);
this.U2.addView(inflate3);
this.U2.addView(inflate4);
}
public void L4(String str, String str2) {
int i2 = getResources().getDisplayMetrics().heightPixels;
Dialog dialog = new Dialog(this);
this.u3 = dialog;
dialog.requestWindowFeature(1);
this.u3.setContentView(2131624002);
this.u3.getWindow().setLayout((int) (getResources().getDisplayMetrics().widthPixels * 0.9d), -2);
this.u3.setCanceledOnTouchOutside(false);
TextView textView = (TextView) this.u3.findViewById(2131428368);
TextView textView2 = (TextView) this.u3.findViewById(2131427678);
if (str != null && str.trim().length() > 0) {
textView.setText(str);
}
if (str2 == null || str2.trim().length() <= 0) {
textView2.setVisibility(8);
} else {
textView2.setText(str2);
}
this.u3.findViewById(2131428940).setOnClickListener(new i1());
this.u3.show();
}
public void L5(User user) {
if (user == null) {
return;
}
if (user.getStatus().intValue() == 0) {
u5();
return;
}
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) != null) {
c0133a.g(OTTApplication.o()).setPreferedLanguages(user.getLanguages());
}
if (com.yupptv.ott.a.h && OTTApplication.w() != null && user.getAttributes().getDisplayLanguageCode() != null) {
if (!user.getAttributes().getDisplayLanguageCode().isEmpty() && user.getAttributes().getDisplayLanguageCode().trim().length() > 0) {
this.Q2.E(user.getAttributes().getDisplayLanguageCode());
} else if (this.Q2.h() != null) {
hd.a0 a0Var = this.Q2;
a0Var.E(a0Var.h());
}
}
RecyclerView recyclerView = this.B0;
if (recyclerView != null && recyclerView.getAdapter() != null) {
this.B0.getAdapter().notifyDataSetChanged();
}
this.e1.setVisibility(8);
this.I.setVisibility(8);
this.J.setVisibility(8);
this.d1.setVisibility(8);
if (!hd.e.p) {
this.S2.setVisibility(8);
}
if (hd.e.p) {
if (user.getProfileParentalDetails() == null || user.getProfileId() == null) {
return;
}
L3(user.getProfileParentalDetails());
int intValue = user.getProfileId().intValue();
hd.h.a("DEBUG", "selectedProfileId + " + intValue);
for (User.ProfileParentalDetails profileParentalDetails : user.getProfileParentalDetails()) {
if (profileParentalDetails.getProfileId().intValue() == intValue) {
hd.h.a("DEBUG", "profileParentDetails.getProfileId() + " + profileParentalDetails.getProfileId());
hd.h.a("DEBUG", "profileParentDetails.getName() + " + profileParentalDetails.getName());
this.h.setText(profileParentalDetails.getName());
if (profileParentalDetails.getImageUrl() != null && !profileParentalDetails.getImageUrl().trim().isEmpty()) {
hd.h.a("DEBUG", "profileParentDetails.getImageUrl() + " + profileParentalDetails.getImageUrl());
com.bumptech.glide.b.u(OTTApplication.o()).u(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(profileParentalDetails.getImageUrl())).b0(2131231972).F0(this.T2);
}
}
}
return;
}
if ((user.getFirstName() != null && !user.getFirstName().isEmpty()) || (user.getLastName() != null && !user.getLastName().isEmpty())) {
this.h.setText(user.getFirstName() + " " + user.getLastName());
if (!user.getEmail().isEmpty()) {
this.g.setText(user.getEmail());
} else if (!user.getPhoneNumber().isEmpty()) {
this.g.setText(user.getPhoneNumber());
}
c2(user.getFirstName() + " " + user.getLastName());
return;
}
if (user.getName() != null && !user.getName().isEmpty()) {
this.h.setText(user.getName());
if (!user.getEmail().isEmpty()) {
this.g.setText(user.getEmail());
} else if (!user.getPhoneNumber().isEmpty()) {
this.g.setText(user.getPhoneNumber());
}
c2(user.getName());
return;
}
if (user.getEmail().isEmpty()) {
this.h.setText(user.getPhoneNumber());
this.g.setVisibility(8);
c2(user.getPhoneNumber());
} else {
this.h.setText(user.getEmail());
if (!user.getPhoneNumber().isEmpty()) {
this.g.setText(user.getPhoneNumber());
}
c2(user.getEmail());
}
}
public void M1() {
String str;
this.Q2.A(Boolean.TRUE);
cc.c.d().t("Signout", new HashMap());
HashMap hashMap = new HashMap();
a.C0133a c0133a = hd.a.a;
User loggedUser = c0133a.g(OTTApplication.o()).getLoggedUser();
hashMap.put("userid", (loggedUser == null || loggedUser.getUserId() == null) ? "NA" : loggedUser.getUserId());
hashMap.put("usertype", cc.b.B0().p1());
cc.c.d().o("Signout", hashMap);
cc.c.d().s("Signout", cc.b.B0().X(null, false));
if (c0133a.g(OTTApplication.o()) != null) {
User loggedUser2 = c0133a.g(OTTApplication.o()).getLoggedUser();
if (loggedUser2 != null) {
str = "" + loggedUser2.getUserId();
} else {
str = "";
}
hd.e0.l((OTTApplication) getApplication(), str);
c0133a.g(OTTApplication.o()).setLoggedInUser("");
hd.a0.y(this.Y2).U("RECENT_SEARCH_KEYWORDS", new HashSet());
c0133a.g(OTTApplication.o()).setPreferedLanguages("");
c0133a.g(OTTApplication.o()).setPreferedMultiLanguages("");
}
cc.c.d().k(null);
OTTApplication.w().B().clear();
G1(null);
hd.a0.y(this).Q("");
hd.a0.y(this).K(false);
a5();
h2();
}
public boolean M2(boolean z2) {
if (getSupportFragmentManager().q0() >= 1) {
return L2();
}
DrawerLayout findViewById = findViewById(2131428058);
if (!z2) {
return L2();
}
if (findViewById.C(8388611)) {
findViewById.d(8388611);
return false;
}
findViewById.K(8388611);
b();
return true;
}
public void M3() {
Q4();
cc.b.B0().i0(null, false);
hd.a.a.b(OTTApplication.o()).getUserManager().logout(new z0());
}
private void M5(boolean z2) {
if (!z2) {
T4();
Fragment fragment = this.s;
if (fragment != null && (fragment instanceof tc.i)) {
((tc.i) fragment).A3(0);
}
this.p.exitFullscreen();
} else if (this.p.mState != 2) {
R2();
Fragment fragment2 = this.s;
if (fragment2 != null && (fragment2 instanceof tc.i)) {
((tc.i) fragment2).A3(120);
}
this.p.enterFullscreen();
}
Fragment fragment3 = this.s;
if (fragment3 instanceof tc.i) {
((tc.i) fragment3).i4(z2);
}
}
private void N5() {
this.o0 = findViewById(2131427991);
this.p0 = findViewById(2131427893);
LinearLayoutCompat findViewById = findViewById(2131428471);
this.r0 = findViewById;
findViewById.setBackground(getResources().getDrawable(2131231156));
this.s0 = (LinearLayout) findViewById(2131427977);
this.t0 = (ImageView) findViewById(2131427968);
this.A0 = (FixedAspectRatioRelativeLayout) findViewById(2131427993);
this.u0 = (ImageView) findViewById(2131427892);
this.x0 = (ImageView) findViewById(2131428448);
this.y0 = (ImageView) findViewById(2131428455);
this.v0 = (ImageView) findViewById(2131427981);
this.z0 = (ImageView) findViewById(2131427894);
this.J0 = (TextView) findViewById(2131427896);
this.E0 = findViewById(2131427975);
this.G0 = findViewById(2131427974);
this.F0 = findViewById(2131427976);
this.K0 = (TextView) findViewById(2131427541);
n5();
}
private void O2(HashMap<String, String> hashMap, String str) {
String str2;
String str3;
if (hashMap != null) {
J3 = CleverTapAPI.H(this);
if (str.equalsIgnoreCase("InboxButtonClick")) {
J3.u();
}
if (!hashMap.containsKey("launchurl") || (str2 = hashMap.get("launchurl")) == null) {
return;
}
if (str2.startsWith("http") || str2.startsWith("https")) {
if (hashMap.containsKey("isExternal") && hashMap.get("isExternal").equalsIgnoreCase("True")) {
hd.u.A(this, str2);
return;
} else {
hd.u.f0(this, hd.r.F1, str2, "");
return;
}
}
if (!str2.contains("flexi") || (str3 = hd.d.h) == null || str3.trim().length() <= 0) {
if (str2.startsWith("/")) {
str2 = str2.substring(1);
}
hd.u.t0(this, str2);
return;
}
String str4 = hd.d.h;
if (str4.startsWith("http") || str4.startsWith("https")) {
E3(null, true, hd.r.V1);
return;
}
if (str4.startsWith("/")) {
str4 = str4.substring(1);
}
hd.u.t0(this, str4);
}
}
private void P4() {
Configs c3;
Dialog dialog = new Dialog(this);
this.u3 = dialog;
dialog.setContentView(2131624455);
this.u3.getWindow().setBackgroundDrawableResource(2131100500);
this.u3.setCancelable(true);
this.u3.setCanceledOnTouchOutside(false);
this.u3.getWindow().setLayout((int) (getResources().getDisplayMetrics().widthPixels * 0.9d), (int) (getResources().getDisplayMetrics().heightPixels * 0.85d));
this.u3.getWindow().setGravity(17);
RecyclerView findViewById = this.u3.findViewById(2131427465);
ImageView imageView = (ImageView) this.u3.findViewById(2131427792);
TextView textView = (TextView) this.u3.findViewById(2131429775);
TextView textView2 = (TextView) this.u3.findViewById(2131429647);
CardView findViewById2 = this.u3.findViewById(2131427706);
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) != null && (c3 = c0133a.c(OTTApplication.o())) != null && c3.getInterstitialStaticPopup() != null) {
sc.a p2 = hd.e0.p(c3.getInterstitialStaticPopup());
textView.setText(p2.d());
textView2.setText(p2.c());
bc.j jVar = new bc.j(this, p2.b());
findViewById.setHasFixedSize(true);
findViewById.setLayoutManager(new LinearLayoutManager(this));
findViewById.setAdapter(jVar);
if (p2.a() != null) {
com.bumptech.glide.b.v(this).k().K0(p2.a()).d().C0(new t1(findViewById2));
}
}
imageView.setOnClickListener(new u1());
hd.a0.y(this).C("interstitial_static_popup", Boolean.TRUE);
}
private void Q3(Intent intent, boolean z2, int i2) {
intent.putExtra(hd.r.i, ScreenType.SIGNIN);
if (i2 != -1) {
intent.putExtra("BACK_NAVIGATION_REFERENCE", i2);
}
if (i2 == 10003) {
intent.putExtra(hd.r.y0, "redeemvocher");
}
if (z2) {
intent.putExtra(hd.r.y0, hd.r.f1);
}
if (i2 != 10002) {
startActivityForResult(intent, 15);
} else {
intent.putExtra(hd.r.z0, true);
startActivityForResult(intent, 101);
}
}
private void R1(List<Content.DataRow> list, boolean z2) {
String str;
this.r0.removeAllViews();
this.p0.setVisibility(0);
for (int i2 = 0; i2 < list.size(); i2++) {
List elements = list.get(i2).getElements();
for (int i3 = 0; i3 < elements.size(); i3++) {
Content.Elements elements2 = (Content.Elements) elements.get(i3);
if (elements2.getElementType().equalsIgnoreCase("text") && elements2.getElementSubtype().equalsIgnoreCase("title")) {
TextView textView = this.J0;
if (textView != null) {
textView.setText(elements2.getData());
this.J0.setTextColor(androidx.core.content.a.getColor(this, 2131099844));
}
} else if (elements2.getElementType().equalsIgnoreCase("image")) {
ImageView imageView = null;
if (elements2.getElementSubtype().equalsIgnoreCase("partnerIcon")) {
str = elements2.getData();
imageView = this.z0;
} else if (elements2.getElementSubtype().equalsIgnoreCase("bgImage")) {
this.u0.setVisibility(0);
this.v0.setVisibility(8);
str = elements2.getData();
imageView = this.u0;
hd.h.b("Mainactivity>>>>", "getImageAbsolutePath" + hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(str));
} else {
str = "";
}
if (!TextUtils.isEmpty(str) && imageView != null) {
com.bumptech.glide.b.v(this).u(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(str)).j(2131231140).P0(y2.d.i()).F0(imageView);
}
}
}
}
}
private boolean R4() {
return System.currentTimeMillis() - hd.a0.y(this).p("USRSUB_PUSH_PRIMER_POPUP_SHOWTIME") > 172800000;
}
private void S1(List<Content.DataRow> list, boolean z2) {
this.r0.removeAllViews();
LinearLayout linearLayout = new LinearLayout(this);
int i2 = 0;
linearLayout.setOrientation(0);
int i3 = 17;
linearLayout.setGravity(17);
LinearLayout linearLayout2 = new LinearLayout(this);
linearLayout2.setOrientation(0);
linearLayout2.setGravity(17);
LinearLayout linearLayout3 = new LinearLayout(this);
linearLayout3.setOrientation(0);
linearLayout3.setGravity(17);
int i4 = 0;
while (i4 < list.size() + 1) {
LinearLayoutCompat linearLayoutCompat = new LinearLayoutCompat(this);
LinearLayoutCompat.a aVar = new LinearLayoutCompat.a(-1, -2);
aVar.setMargins(i2, i2, i2, i2);
linearLayoutCompat.setLayoutParams(aVar);
linearLayoutCompat.setGravity(i3);
if (i4 == 0) {
linearLayoutCompat.addView(m2(z2));
this.r0.addView(linearLayoutCompat, i4);
} else {
List elements = list.get(i4 - 1).getElements();
int i5 = 0;
int i6 = 0;
while (i5 < elements.size()) {
final Content.Elements elements2 = (Content.Elements) elements.get(i5);
List list2 = elements;
if (!elements2.getElementType().equalsIgnoreCase("text") || elements2.getElementSubtype().equalsIgnoreCase("title") || elements2.getElementSubtype().equalsIgnoreCase("rentalinfo") || elements2.getElementSubtype().equalsIgnoreCase("cast") || elements2.getElementSubtype().equalsIgnoreCase("crew") || elements2.getElementSubtype().equalsIgnoreCase("languageDisplayText") || elements2.getElementSubtype().equalsIgnoreCase("pgrating") || elements2.getElementSubtype().equalsIgnoreCase("imdb") || elements2.getElementSubtype().equalsIgnoreCase("vodChanneltitle") || elements2.getElementSubtype().equalsIgnoreCase("description") || elements2.getElementSubtype().equalsIgnoreCase("vodChannelDescription") || elements2.getElementSubtype().equalsIgnoreCase("availableIn") || elements2.getElementSubtype().equalsIgnoreCase("streamQuality") || elements2.getElementSubtype().equalsIgnoreCase("audioQuality") || elements2.getElementSubtype().equalsIgnoreCase("advisory") || elements2.getElementSubtype().equalsIgnoreCase("premium")) {
if (elements2.getElementType().equalsIgnoreCase("text") && (elements2.getElementSubtype().equalsIgnoreCase("imdb") || elements2.getElementSubtype().equalsIgnoreCase("pgrating"))) {
linearLayout.setPadding(0, hd.e0.x(getResources(), 2131166812), 0, 0);
linearLayoutCompat.setOrientation(1);
elements2.getElementSubtype().equalsIgnoreCase("pgrating");
if (elements2.getElementSubtype().equalsIgnoreCase("imdb")) {
TextView textView = new TextView(this);
textView.setText("|");
textView.setClickable(elements2.getIsClickable().booleanValue());
textView.setTextColor(androidx.core.content.a.getColor(this, z2 ? 2131099918 : 2131099920));
textView.setTypeface(androidx.core.content.res.h.g(textView.getContext(), 2131296261));
textView.setTextSize(hd.e0.x(getResources(), 2131167521));
textView.setPadding(hd.e0.x(getResources(), 2131166329), 0, hd.e0.x(getResources(), 2131166329), 0);
textView.setGravity(17);
linearLayout3.addView(textView);
ImageView imageView = new ImageView(this);
imageView.setImageDrawable(androidx.core.content.a.getDrawable(this, 2131231673));
linearLayout3.addView(imageView);
TextView textView2 = new TextView(this);
textView2.setText(elements2.getData());
textView2.setClickable(elements2.getIsClickable().booleanValue());
textView2.setTextColor(androidx.core.content.a.getColor(this, z2 ? 2131099918 : 2131099920));
textView2.setTypeface(androidx.core.content.res.h.g(textView2.getContext(), 2131296261));
textView2.setTextSize(hd.e0.x(getResources(), 2131167521));
textView2.setPadding(hd.e0.x(getResources(), 2131166322), 0, 0, 0);
textView2.setGravity(17);
linearLayout3.addView(textView2);
if (linearLayout.getChildCount() == 0 || linearLayout.getChildCount() <= 0) {
linearLayout.addView(linearLayout3);
linearLayoutCompat.addView(linearLayout, i6);
} else {
linearLayout.removeView(linearLayout2);
linearLayoutCompat.removeView(linearLayout);
linearLayout.addView(linearLayout2);
linearLayout.addView(linearLayout3);
linearLayoutCompat.addView(linearLayout, i6 - 1);
}
i6++;
}
} else if (elements2.getElementType().equalsIgnoreCase("marker")) {
if (elements2.getElementSubtype().equalsIgnoreCase("rating")) {
TextView textView3 = new TextView(this);
textView3.setText(elements2.getData());
textView3.setClickable(elements2.getIsClickable().booleanValue());
textView3.setTextColor(androidx.core.content.a.getColor(this, z2 ? 2131099918 : 2131099920));
textView3.setTypeface(androidx.core.content.res.h.g(textView3.getContext(), 2131296258));
textView3.setPadding(hd.e0.x(getResources(), 2131166329), 0, hd.e0.x(getResources(), 2131166329), 0);
textView3.setCompoundDrawablesWithIntrinsicBounds(2131232490, 0, 0, 0);
textView3.setCompoundDrawablePadding(10);
textView3.setTextSize(hd.e0.x(getResources(), 2131166326));
textView3.setGravity(17);
linearLayoutCompat.addView(textView3, i6);
} else if (elements2.getElementSubtype().equalsIgnoreCase("hd")) {
ImageView imageView2 = new ImageView(this);
imageView2.setImageDrawable(androidx.core.content.a.getDrawable(this, 2131231322));
imageView2.setPadding(hd.e0.x(getResources(), 2131166329), 0, 0, 0);
linearLayoutCompat.addView(imageView2, i6);
} else if (elements2.getElementSubtype().equalsIgnoreCase("cc")) {
ImageView imageView3 = new ImageView(this);
imageView3.setImageDrawable(androidx.core.content.a.getDrawable(this, 2131231040));
imageView3.setPadding(hd.e0.x(getResources(), 2131166329), 0, 0, 0);
linearLayoutCompat.addView(imageView3, i6);
} else if (elements2.getElementSubtype().equalsIgnoreCase("duration")) {
TextView textView4 = new TextView(this);
textView4.setText(elements2.getData());
textView4.setClickable(elements2.getIsClickable().booleanValue());
textView4.setTextColor(androidx.core.content.a.getColor(this, z2 ? 2131099918 : 2131099920));
textView4.setTypeface(androidx.core.content.res.h.g(textView4.getContext(), 2131296258));
textView4.setPadding(hd.e0.x(getResources(), 2131166329), 0, hd.e0.x(getResources(), 2131166329), 0);
textView4.setCompoundDrawablesWithIntrinsicBounds(2131231054, 0, 0, 0);
textView4.setCompoundDrawablePadding(10);
textView4.setTextSize(hd.e0.x(getResources(), 2131166328));
textView4.setGravity(17);
linearLayoutCompat.addView(textView4, i6);
i6++;
}
i6++;
} else if ((hd.e.T.equalsIgnoreCase("chaupal") || hd.e.T.equalsIgnoreCase("starhub")) && elements2.getElementSubtype().equalsIgnoreCase("trailer")) {
this.l3.setVisibility(0);
this.P0.setVisibility(0);
this.l3.setText(elements2.getData());
this.l3.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.b3(elements2, view);
}
});
}
i5++;
elements = list2;
} else {
TextView textView5 = new TextView(this);
textView5.setClickable(elements2.getIsClickable().booleanValue());
if (elements2.getElementSubtype().equalsIgnoreCase("expiryInfo")) {
String[] split = elements2.getData().split("@");
if (split.length == 2) {
textView5.setText(Html.fromHtml("<font color=red>" + split[0] + "</font> <font color=white>" + split[1] + "</font>"));
} else {
textView5.setText(elements2.getData());
textView5.setTextColor(androidx.core.content.a.getColor(this, 2131100342));
}
} else {
textView5.setText(elements2.getData().replace("|", "|"));
textView5.setTextColor(androidx.core.content.a.getColor(this, z2 ? 2131099919 : 2131099921));
}
textView5.setTypeface(androidx.core.content.res.h.g(this, 2131296261));
if (elements2.getElementSubtype().equalsIgnoreCase("expiryInfo")) {
textView5.setTextSize(hd.e0.x(getResources(), 2131167522));
} else {
textView5.setTextSize(hd.e0.x(getResources(), 2131167521));
}
textView5.setMaxLines(5);
textView5.setGravity(17);
textView5.setPadding(hd.e0.x(getResources(), 2131166329), 0, hd.e0.x(getResources(), 2131166329), 0);
linearLayoutCompat.addView(textView5, i6);
i6++;
}
i5++;
elements = list2;
}
this.r0.addView(linearLayoutCompat, i4);
}
i4++;
i2 = 0;
i3 = 17;
}
}
private void S2() {
new Handler().postDelayed(new b0(), 50L);
}
private void T4() {
hd.h.b("SystemUI", "SHow system UI");
new Handler().postDelayed(new x0(), 1700L);
}
public void U4(String str) {
if (TextUtils.isEmpty(str.trim())) {
return;
}
Toast.makeText((Context) this, (CharSequence) str, 1).show();
}
private void V4() {
AppCompatButton appCompatButton;
AppCompatButton appCompatButton2;
AppCompatButton appCompatButton3 = this.L;
if (appCompatButton3 != null) {
appCompatButton3.setVisibility(8);
}
AppCompatButton appCompatButton4 = this.K;
if (appCompatButton4 != null) {
appCompatButton4.setVisibility(8);
}
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) != null) {
if (c0133a.c(OTTApplication.o()).getIsCallSupported() != null && c0133a.c(OTTApplication.o()).getIsCallSupported().equalsIgnoreCase("true") && (appCompatButton2 = this.L) != null) {
appCompatButton2.setVisibility(0);
}
if (c0133a.c(OTTApplication.o()).getShowPackages() == null || !c0133a.c(OTTApplication.o()).getShowPackages().equalsIgnoreCase("true") || (appCompatButton = this.K) == null) {
return;
}
appCompatButton.setVisibility(8);
}
}
private void W3() {
if (hd.e0.a) {
String str = "empty";
if (this.K2 == null || this.n1 == null || !U2()) {
if (this.K2 != null) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
this.X = j02;
if (j02 != null && (j02 instanceof com.yupptv.ott.fragments.a1)) {
str = ((com.yupptv.ott.fragments.a1) j02).p0;
}
if (this.K2.containsKey("adtab_" + str)) {
AdUrlResponse adUrlResponse = this.K2.get("adtab_" + str);
if (adUrlResponse == null) {
return;
}
List adUrlTypes = adUrlResponse.getAdUrlTypes();
if (adUrlTypes == null || adUrlTypes.size() <= 0) {
hd.h.b("DFP ADS", "No Key/Values in HashMap");
RelativeLayout relativeLayout = com.yupptv.ott.activity.a.d;
if (relativeLayout != null) {
relativeLayout.setVisibility(8);
return;
}
return;
}
hd.e0.a = true;
boolean z2 = false;
for (int i2 = 0; i2 < adUrlTypes.size(); i2++) {
if (((AdUrlType) adUrlTypes.get(i2)).getUrlType().equalsIgnoreCase(AdsType.Banner.toString()) && hd.e0.b) {
H3(((AdUrlType) adUrlTypes.get(i2)).getAdUnitId());
hd.h.b("DFP ADS", "banner ad available for adtab_" + str);
z2 = true;
} else if (((AdUrlType) adUrlTypes.get(i2)).getUrlType().equalsIgnoreCase(AdsType.Interstitial.toString()) && hd.e0.d) {
K3(((AdUrlType) adUrlTypes.get(i2)).getAdUnitId());
hd.h.b("DFP ADS", "interstitial ad available for adtab_" + str);
} else if (((AdUrlType) adUrlTypes.get(i2)).getUrlType().equalsIgnoreCase(AdsType.Native.toString()) && hd.e0.c && (this.X instanceof com.yupptv.ott.fragments.a1)) {
new Handler().postDelayed(new w1(((AdUrlType) adUrlTypes.get(i2)).getPosition(), ((AdUrlType) adUrlTypes.get(i2)).getAdUnitId()), 200L);
StringBuilder sb2 = new StringBuilder();
sb2.append("interstitial ad available for adtab_");
t2 t2Var = this.n1;
sb2.append(t2Var.q0(t2Var.r0()));
hd.h.a("DFP ADS", sb2.toString());
}
}
if (!z2) {
StringBuilder sb3 = new StringBuilder();
sb3.append("not banner ad for adtab_");
t2 t2Var2 = this.n1;
sb3.append(t2Var2.q0(t2Var2.r0()));
hd.h.b("DFP ADS", sb3.toString());
}
RelativeLayout relativeLayout2 = com.yupptv.ott.activity.a.d;
if (relativeLayout2 != null) {
relativeLayout2.setVisibility(z2 ? 0 : 8);
return;
}
return;
}
return;
}
return;
}
if (!U2()) {
Fragment j03 = getSupportFragmentManager().j0(2131427847);
this.X = j03;
if (j03 != null && (j03 instanceof com.yupptv.ott.fragments.a1)) {
str = ((com.yupptv.ott.fragments.a1) j03).p0;
}
} else if (this.n1.s0() != null && (this.n1.s0() instanceof com.yupptv.ott.fragments.a1)) {
Fragment s02 = this.n1.s0();
this.X = s02;
if (s02 instanceof com.yupptv.ott.fragments.a1) {
str = ((com.yupptv.ott.fragments.a1) s02).p0;
}
}
HashMap<String, AdUrlResponse> hashMap = this.K2;
StringBuilder sb4 = new StringBuilder();
sb4.append("adtab_");
t2 t2Var3 = this.n1;
sb4.append(t2Var3.q0(t2Var3.r0()));
if (hashMap.containsKey(sb4.toString())) {
HashMap<String, AdUrlResponse> hashMap2 = this.K2;
StringBuilder sb5 = new StringBuilder();
sb5.append("adtab_");
t2 t2Var4 = this.n1;
sb5.append(t2Var4.q0(t2Var4.r0()));
AdUrlResponse adUrlResponse2 = hashMap2.get(sb5.toString());
if (adUrlResponse2 == null) {
return;
}
List adUrlTypes2 = adUrlResponse2.getAdUrlTypes();
if (adUrlTypes2 == null || adUrlTypes2.size() < 1) {
AdUrlResponse adUrlResponse3 = this.K2.get("adtab_" + str);
if (adUrlResponse3 != null) {
adUrlTypes2 = adUrlResponse3.getAdUrlTypes();
}
}
if (adUrlTypes2 == null || adUrlTypes2.size() <= 0) {
hd.h.b("DFP ADS", "No Key/Values in HashMap");
RelativeLayout relativeLayout3 = com.yupptv.ott.activity.a.d;
if (relativeLayout3 != null) {
relativeLayout3.setVisibility(8);
return;
}
return;
}
hd.e0.a = true;
boolean z3 = false;
for (int i3 = 0; i3 < adUrlTypes2.size(); i3++) {
if (((AdUrlType) adUrlTypes2.get(i3)).getUrlType().equalsIgnoreCase(AdsType.Banner.toString()) && hd.e0.b) {
H3(((AdUrlType) adUrlTypes2.get(i3)).getAdUnitId());
hd.h.b("DFP ADS", "banner ad available for adtab_" + str);
z3 = true;
} else if (((AdUrlType) adUrlTypes2.get(i3)).getUrlType().equalsIgnoreCase(AdsType.Interstitial.toString()) && hd.e0.d) {
K3(((AdUrlType) adUrlTypes2.get(i3)).getAdUnitId());
hd.h.b("DFP ADS", "interstitial ad available for adtab_" + str);
} else if (((AdUrlType) adUrlTypes2.get(i3)).getUrlType().equalsIgnoreCase(AdsType.Native.toString()) && hd.e0.c) {
AdUrlType.Position position = null;
if (this.n1.s0() != null && (this.n1.s0() instanceof com.yupptv.ott.fragments.a1)) {
String str2 = "";
if (((AdUrlType) adUrlTypes2.get(i3)).getPosition() != null && ((AdUrlType) adUrlTypes2.get(i3)).getAdUnitId() != null && !((AdUrlType) adUrlTypes2.get(i3)).getAdUnitId().equalsIgnoreCase("")) {
position = ((AdUrlType) adUrlTypes2.get(i3)).getPosition();
str2 = ((AdUrlType) adUrlTypes2.get(i3)).getAdUnitId();
}
new Handler().postDelayed(new v1(position, str2), 200L);
hd.h.a("DFP ADS", "interstitial ad available for adtab_" + str);
}
}
}
if (!z3) {
StringBuilder sb6 = new StringBuilder();
sb6.append("not banner ad for adtab_");
t2 t2Var5 = this.n1;
sb6.append(t2Var5.q0(t2Var5.r0()));
hd.h.b("DFP ADS", sb6.toString());
}
RelativeLayout relativeLayout4 = com.yupptv.ott.activity.a.d;
if (relativeLayout4 != null) {
relativeLayout4.setVisibility(z3 ? 0 : 8);
}
}
}
}
public void W4(UserSubscriptionOffer userSubscriptionOffer) {
Dialog dialog = new Dialog(this);
this.u3 = dialog;
dialog.setContentView(2131624523);
this.u3.getWindow().setBackgroundDrawableResource(2131100500);
this.u3.setCancelable(true);
this.u3.setCanceledOnTouchOutside(false);
this.u3.getWindow().setLayout((int) (getResources().getDisplayMetrics().widthPixels * 0.8d), -2);
this.u3.getWindow().setGravity(17);
AppCompatImageView findViewById = this.u3.findViewById(2131428962);
AppCompatImageView findViewById2 = this.u3.findViewById(2131427787);
AppCompatButton findViewById3 = this.u3.findViewById(2131428186);
AppCompatTextView findViewById4 = this.u3.findViewById(2131428961);
if (userSubscriptionOffer.getDescription() != null && userSubscriptionOffer.getDescription().trim().length() > 0) {
findViewById4.setVisibility(0);
findViewById4.setText(userSubscriptionOffer.getDescription());
}
if (userSubscriptionOffer.getImgUrl() != null && userSubscriptionOffer.getImgUrl().trim().length() > 0) {
findViewById.setVisibility(0);
String imgUrl = userSubscriptionOffer.getImgUrl();
a.C0133a c0133a = hd.a.a;
if (c0133a.f(OTTApplication.o()) != null) {
imgUrl = c0133a.f(OTTApplication.o()).getImageAbsolutePath(imgUrl);
}
com.bumptech.glide.b.v(this).u(c0133a.f(OTTApplication.o()).getImageAbsolutePath(imgUrl)).b0(2131231104).j(2131231104).F0(findViewById);
}
findViewById2.setOnClickListener(new b2());
findViewById3.setOnClickListener(new c2(findViewById3, userSubscriptionOffer));
hd.a0.y(this).M("USRSUB_OFFER_POPUP_SHOWTIME", System.currentTimeMillis());
this.u3.show();
}
public boolean Y2() {
Fragment j02 = getSupportFragmentManager().j0(2131428004);
return j02 != null && j02.isAdded();
}
private boolean Y4() {
return System.currentTimeMillis() - hd.a0.y(this).p("USRSUB_OFFER_POPUP_SHOWTIME") > 86400000;
}
private static int Z1(float f3, int i2, int i3) {
int i4 = (i3 >> 8) & 255;
return ((((int) ((i4 - r2) * f3)) + ((i2 >> 8) & 255)) << 8) | (((i2 >>> 24) + ((int) (((i3 >>> 24) - r0) * f3))) << 24) | ((((i2 >> 16) & 255) + ((int) ((((i3 >> 16) & 255) - r1) * f3))) << 16) | ((i2 & 255) + ((int) (((i3 & 255) - r7) * f3)));
}
public void Z4() {
HashMap hashMap = new HashMap();
hashMap.put("msg2", "");
if (hd.d.r) {
hashMap.put("msg1", getResources().getString(2131952370));
} else {
hashMap.put("msg1", getResources().getString(2131952368));
}
hd.u.J0(this, DialogType.CONTINUE_LOGOUT_DIALOG, hashMap, new y0());
}
private void a2(boolean z2, boolean z3) {
this.o.r(z2, false);
}
private boolean a3(Object obj) {
Fragment fragment;
Object e22;
if (obj != null && (fragment = this.s) != null && (fragment instanceof tc.i) && (e22 = ((tc.i) fragment).e2()) != null && (e22 instanceof ContentPage)) {
if (obj instanceof ContentPage) {
ContentPage contentPage = (ContentPage) obj;
return contentPage.getPageInfo() != null && ((ContentPage) e22).getPageInfo().getPath().equalsIgnoreCase(contentPage.getPageInfo().getPath());
}
if (obj instanceof Card) {
return ((Card) obj).getTarget().getPath().equalsIgnoreCase(((ContentPage) e22).getPageInfo().getPath());
}
if ((obj instanceof String) && ((String) obj).equalsIgnoreCase(((ContentPage) e22).getPageInfo().getPath())) {
return true;
}
}
return false;
}
private void b2() {
a.C0133a c0133a = hd.a.a;
if (c0133a.b(OTTApplication.o()).getUserManager() != null) {
Q4();
c0133a.b(OTTApplication.o()).getUserManager().getUserSubscriptionOffer(new a2());
}
}
public void b3(Content.Elements elements, View view) {
HashMap<String, Object> h3 = cc.b.B0().h("Trailer", null);
h3.put("content_type", "Trailer");
cc.c.d().t("click_event", h3);
hd.u.F(elements.getTarget(), this);
}
private void c2(String str) {
String str2 = "";
if (str == null || str.trim().length() < 1) {
this.i.setText("");
return;
}
if (!str.contains(" ")) {
this.i.setText("" + str.charAt(0));
return;
}
String[] split = str.split(" ");
if (split.length > 0) {
for (int i2 = 0; i2 < split.length; i2++) {
if (split[i2].length() > 0) {
str2 = str2 + split[i2].charAt(0);
}
if (str2.length() == 2) {
break;
}
}
}
this.i.setText(str2);
}
public void c3(User.ProfileParentalDetails profileParentalDetails, View view) {
D1(profileParentalDetails);
}
public void d3(View view) {
B3();
this.U2.setVisibility(8);
this.O2 = false;
}
private void d4() {
if (getSupportFragmentManager().j0(2131427847) instanceof t2) {
c4();
this.h1 = false;
} else if (!(getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.z0) || (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.q0) || (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.u0)) {
this.h1 = true;
} else {
this.h1 = false;
}
}
public void e3(View view) {
Q4();
this.U2.setVisibility(8);
this.O2 = false;
hd.u.K(this, this.W, false);
}
private void e4() {
List<Menu> menuList = hd.a.p(OTTApplication.o()).getMenuList();
List<Menu> list = this.Q1;
if (list == null || list.isEmpty()) {
return;
}
if (this.Q1.size() != menuList.size()) {
D5(menuList);
return;
}
for (int i2 = 0; i2 < this.Q1.size(); i2++) {
if (!this.Q1.get(i2).getCode().equalsIgnoreCase(menuList.get(i2).getCode())) {
D5(menuList);
}
}
}
public void f3(View view) {
hd.u.K(this, this.W, true);
this.U2.setVisibility(8);
this.O2 = false;
}
public void g3(nb.q qVar) {
if (qVar == null || qVar.a() == null) {
Intent b3 = qVar.b();
if (b3 == null || !b3.hasExtra("MISSING_CAMERA_PERMISSION")) {
return;
}
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131951763), 0).show();
return;
}
String a3 = qVar.a();
if (a3.contains("http") || a3.contains("https")) {
try {
String[] split = new URI(a3).getPath().split("/");
if (split.length > 0) {
a3 = split[split.length - 1];
}
} catch (URISyntaxException unused) {
}
a3 = "";
}
startActivity(new Intent((Context) this, (Class<?>) ActivateDeviceFragment.class).putExtra("activationCode", a3));
}
public void g5(String str, int i2, ContentPage contentPage) {
try {
HashMap hashMap = new HashMap();
hashMap.put(cc.c.Q0, i2 == 0 ? cc.c.d1 : cc.c.c1);
hd.h.b("TAG", "#ATTRIBUTE_ACTIONS : " + i2);
cc.c.d().m(ScreenType.PLAYER, null, contentPage, null, str, cc.c.x1, hashMap);
} catch (NullPointerException unused) {
}
}
public void h2() {
hd.a.a.d(OTTApplication.o()).getConfigurationData((TenantBuildType) null, new e0());
}
public void h3(View view) {
B5();
}
public void h5(String str, String str2, String str3) {
try {
HashMap hashMap = new HashMap();
hashMap.put(cc.c.R0, str2);
hd.h.b("TAG", "#ATTRIBUTE_MENU_NAME : " + str2);
cc.c d3 = cc.c.d();
ScreenType screenType = ScreenType.HAMBURGER;
if (str3 == null || str3.trim().length() <= 0) {
str3 = cc.c.M1;
}
d3.m(screenType, null, null, null, str, str3, hashMap);
} catch (Exception unused) {
}
}
public void i3(View view) {
onBackPressed();
}
public void i4() {
hd.a0.y(this).C("FromAccountPage", Boolean.TRUE);
finish();
startActivity(getIntent());
overridePendingTransition(0, 0);
}
private void i5(String str, String str2, Object obj) {
try {
HashMap hashMap = new HashMap();
cc.c d3 = cc.c.d();
ScreenType screenType = ScreenType.PLAYER;
if (str2 == null || str2.trim().length() <= 0) {
str2 = cc.c.M1;
}
d3.m(screenType, null, obj, null, str, str2, hashMap);
} catch (NullPointerException unused) {
}
}
public void j3(View view) {
this.x2 = true;
F3(false, "buy/packages-list", new String[0]);
}
public void k3(x1.g gVar) {
LottieDrawable lottieDrawable;
if (gVar == null || (lottieDrawable = this.Q) == null) {
return;
}
lottieDrawable.u0(gVar);
}
public void k5(boolean z2) {
CastContext castContext;
if (z2) {
this.X1 = false;
if (this.z1.getSessionManager().getCurrentCastSession() != null && this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient() != null && this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().hasMediaSession() && this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getMediaInfo() != null) {
this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getMediaInfo().getContentId();
}
if (this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getStreamDuration() > 0) {
this.H1 = this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getApproximateStreamPosition();
} else {
this.H1 = 0L;
}
try {
if (this.G1 == null && (castContext = this.z1) != null && castContext.getCastState() == 4) {
this.G1 = hd.b.c(this.x1.getRemoteMediaClient().getMediaInfo());
}
this.K1 = true;
try {
if (this.G1 != null) {
H2(this.F1);
} else if (F3 != null) {
H2((ContentPage) new com.google.gson.d().h(F3.toString(), ContentPage.class));
}
} catch (Exception unused) {
}
} catch (JSONException unused2) {
this.G1 = null;
}
}
}
public static void l3(Throwable th) {
hd.h.b("LottieError", "Failed to load Lottie composition" + th);
}
private TextView m2(boolean z2) {
TextView textView = new TextView(this);
textView.setText(this.f.getText());
textView.setGravity(17);
textView.setTextColor(androidx.core.content.a.getColor(this, 2131099920));
textView.setTypeface(androidx.core.content.res.h.g(this, 2131296261));
textView.setTextSize(hd.e0.x(getResources(), 2131167498));
return textView;
}
public void m3(com.airbnb.lottie.n nVar) {
if (nVar != null) {
nVar.d(new x1.r() {
public final void onResult(Object obj) {
MainActivity.this.k3((x1.g) obj);
}
}).c(new x1.r() {
public final void onResult(Object obj) {
MainActivity.l3((Throwable) obj);
}
});
}
}
public void n3(String str, Handler handler) {
final com.airbnb.lottie.n A = x1.p.A(this, str, (String) null);
handler.postDelayed(new Runnable() {
@Override
public final void run() {
MainActivity.this.m3(A);
}
}, 200L);
}
private void n5() {
Configuration configuration = getResources().getConfiguration();
if (configuration.orientation == 2) {
this.A0.setmAspectRatio(getResources().getFraction(2131361807, 1, 1));
ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.t0.getLayoutParams();
if (marginLayoutParams == null) {
marginLayoutParams = new RelativeLayout.LayoutParams(-1, -1);
}
int a3 = kd.b.a(getResources().getDimension(2131165626), getApplicationContext());
marginLayoutParams.setMargins(a3, 0, a3, 0);
this.t0.setLayoutParams(marginLayoutParams);
}
if (configuration.orientation == 1) {
this.A0.setmAspectRatio(getResources().getFraction(2131361806, 1, 1));
ViewGroup.MarginLayoutParams marginLayoutParams2 = (ViewGroup.MarginLayoutParams) this.t0.getLayoutParams();
if (marginLayoutParams2 == null) {
marginLayoutParams2 = new RelativeLayout.LayoutParams(-1, -1);
}
marginLayoutParams2.setMargins(0, 0, 0, 0);
this.t0.setLayoutParams(marginLayoutParams2);
}
}
public void o3(final String str, final Handler handler) {
new Thread(new Runnable() {
@Override
public final void run() {
MainActivity.this.n3(str, handler);
}
}).start();
this.Q.O0(-1);
this.P.setImageDrawable(this.Q);
this.Q.start();
}
public void p3(View view) {
if (hd.e.p) {
User loggedUser = hd.a.r(OTTApplication.o()).getLoggedUser();
if (loggedUser != null && loggedUser.getProfileId() == null) {
B3();
return;
}
M4();
this.O2 = !this.O2;
H4();
}
}
public void q3(View view) {
this.O2 = !this.O2;
H4();
if (this.U2.getVisibility() == 0) {
this.U2.setVisibility(8);
this.B0.setVisibility(0);
} else {
this.U2.setVisibility(0);
this.B0.setVisibility(8);
}
}
public void r2() {
hd.a.a.f(OTTApplication.o()).getDateTime(new b1());
}
public void r3() {
Y1(false, "");
Bundle bundle = new Bundle();
mc.l lVar = new mc.l();
bundle.putSerializable("type", ListType.SETTINGS_MENU);
lVar.setArguments(bundle);
I3(lVar);
}
private void r4() {
RelativeLayout relativeLayout = com.yupptv.ott.activity.a.d;
if (relativeLayout == null || relativeLayout.getVisibility() != 0) {
return;
}
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) com.yupptv.ott.activity.a.d.getLayoutParams();
layoutParams.bottomMargin = this.J2;
com.yupptv.ott.activity.a.d.setLayoutParams(layoutParams);
}
public void t3() {
String str;
String str2;
cc.c.d().t("Account Settings", cc.b.B0().z(false));
a.C0133a c0133a = hd.a.a;
Configs c3 = c0133a.c(OTTApplication.o());
if (c3 == null || c3.getSiteURL() == null) {
str = "";
} else {
str = c3.getSiteURL();
hd.h.a("siteurl>>", str);
}
PreferenceManager g3 = c0133a.g(OTTApplication.o());
if (g3 == null) {
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952830), 0).show();
return;
}
String sessionId = g3.getSessionId() != null ? g3.getSessionId() : "";
String deviceUniqueId = g3.getDeviceUniqueId() != null ? g3.getDeviceUniqueId() : "";
String str3 = ("bi===" + deviceUniqueId + "&&&si===" + sessionId + "&&&ci===" + g3.getYuppDeviceId()) + "&&&theme===w";
if (com.yupptv.ott.a.h) {
str3 = str3 + "&&&lang===" + this.W.toLowerCase();
}
String str4 = str3 + "&&&source===Account";
hd.h.a("url>>", "siteurl>>2 " + str4);
String encodeToString = Base64.encodeToString(str4.getBytes(), 2);
try {
encodeToString = URLEncoder.encode(encodeToString, "UTF-8");
} catch (UnsupportedEncodingException unused) {
}
if (str.endsWith("/")) {
str2 = str + "settings?ut=" + encodeToString;
} else {
str2 = str + "/settings?ut=" + encodeToString;
}
hd.h.a("DEBUG>>", "siteurl " + str2);
if (!hd.v.d(this)) {
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952922), 0).show();
} else {
cc.b.B0().b2("account");
hd.u.g0(this, hd.r.y1, str2);
}
}
public void u5() {
RecyclerView recyclerView = this.B0;
if (recyclerView != null && recyclerView.getAdapter() != null) {
this.B0.getAdapter().notifyDataSetChanged();
}
a5();
this.e1.setVisibility(8);
this.d1.setVisibility(0);
this.I.setVisibility(8);
this.J.setVisibility(8);
}
private void v5() {
Configs c3;
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) == null || (c3 = c0133a.c(OTTApplication.o())) == null || c3.getShowCtAppInbox() == null || c3.getShowCtAppInbox().trim().length() <= 0) {
return;
}
if (!c3.getShowCtAppInbox().equalsIgnoreCase("true")) {
this.T.setVisibility(8);
this.j.setVisibility(8);
return;
}
this.T.setVisibility(0);
this.j.setVisibility(0);
int N = CleverTapAPI.H(this).N();
this.z2 = N;
if (N > 0) {
this.j.setText(String.valueOf(N));
} else {
this.j.setVisibility(8);
}
}
private void x2() {
this.L2 = hd.a.a.g(OTTApplication.o());
}
public static boolean y2() {
return H3;
}
private void y5(float f3) {
this.C.setAlpha(f3);
}
private RemoteMediaClient.Callback z2() {
return new c1();
}
public void z4(boolean z2) {
AppBarLayout.d dVar = (AppBarLayout.d) this.n.getLayoutParams();
if (z2) {
dVar.d(3);
if (this.p1) {
this.p0.setVisibility(0);
this.p1 = false;
} else {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
Fragment j03 = getSupportFragmentManager().j0(2131428004);
if ((j02 != null && (j02 instanceof com.yupptv.ott.fragments.q0)) || (j03 != null && (j03 instanceof com.yupptv.ott.fragments.q0))) {
this.o0.setVisibility(0);
}
}
a2(true, false);
} else {
this.o0.setVisibility(8);
this.p0.setVisibility(8);
dVar.d(21);
a2(true, true);
if (getSupportFragmentManager().q0() < 1) {
H5(1, true);
}
}
if (z2) {
dVar.d(21);
} else {
dVar.d(0);
}
this.n.setLayoutParams(dVar);
}
public void z5(String str) {
Q4();
hd.a.a.b(OTTApplication.o()).getUserManager().updateUserDisplayPreference(str, new d0(str));
}
public EPGUserChannels A2() {
return this.r1;
}
public void A3(String str, Card card) {
this.q = str;
this.r = card;
TabLayout tabLayout = this.N0;
tabLayout.H(tabLayout.z(t2("shorts")));
}
public void A4(Carousel carousel) {
this.t = carousel;
}
public void A5(String str) {
str.hashCode();
switch (str) {
case "BEN":
OTTApplication.N(this);
a.C0133a c0133a = hd.a.a;
if (c0133a.b(OTTApplication.o()) != null) {
c0133a.b(OTTApplication.o()).setLocaleBengali(this);
break;
}
break;
case "ENG":
OTTApplication.O(this);
if (hd.a.a.b(OTTApplication.o()) != null) {
OttSDK.setLocaleEnglish(this);
break;
}
break;
case "HIN":
OTTApplication.Q(this);
a.C0133a c0133a2 = hd.a.a;
if (c0133a2.b(OTTApplication.o()) != null) {
c0133a2.b(OTTApplication.o()).setLocaleHindi(this);
break;
}
break;
case "TAM":
OTTApplication.S(this);
a.C0133a c0133a3 = hd.a.a;
if (c0133a3.b(OTTApplication.o()) != null) {
c0133a3.b(OTTApplication.o()).setLocaleTamil(this);
break;
}
break;
case "TEL":
OTTApplication.T(this);
a.C0133a c0133a4 = hd.a.a;
if (c0133a4.b(OTTApplication.o()) != null) {
c0133a4.b(OTTApplication.o()).setLocaleTelugu(this);
break;
}
break;
default:
OTTApplication.O(this);
if (hd.a.a.b(OTTApplication.o()) != null) {
OttSDK.setLocaleEnglish(this);
break;
}
break;
}
}
public ScreenType B2() {
TabLayout tabLayout = this.N0;
if (tabLayout == null || tabLayout.getVisibility() != 0) {
return this.U1.trim().length() > 0 ? ScreenType.getType(this.U1) : ScreenType.NONE;
}
String obj = this.N0.z(this.N0.getSelectedTabPosition()).i().toString();
obj.hashCode();
switch (obj) {
case "tvguide":
case "guide":
return ScreenType.GUIDE;
case "watchlist":
case "my_watchlist":
return ScreenType.WATCHLIST;
case "home":
return ScreenType.HOME;
case "catchup":
return ScreenType.CATCHUP;
case "favourites":
return ScreenType.FAVOURITES;
case "settings":
return ScreenType.SETTINGS;
default:
return ScreenType.NONE;
}
}
public void B4(String str) {
if (this.q0 != null) {
if (str == null || str.trim().length() <= 0) {
this.l0.setVisibility(8);
this.g0.setVisibility(8);
} else {
this.l0.setVisibility(0);
this.g0.setVisibility(8);
this.l0.setText(str);
}
}
}
@Override
public void C(Object obj) {
l4(false);
if (obj != null) {
i5(cc.c.s0, this.U1, obj);
UpNextFragment upNextFragment = this.B;
if (upNextFragment != null) {
upNextFragment.M(false);
}
UpNextFragment upNextFragment2 = this.B;
if (upNextFragment2 != null) {
upNextFragment2.R(obj);
}
wc.a aVar = this.A;
if (aVar != null) {
aVar.a1(obj);
}
wc.a aVar2 = this.A;
if (aVar2 != null) {
aVar2.W0(obj);
return;
}
return;
}
int i2 = this.D;
if (i2 != 1) {
if (i2 != 2) {
return;
}
this.p.slideHorizontal(true);
return;
}
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).i4(false);
}
this.p.minimize(true);
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout.mIsFullscreen) {
watchWhileLayout.exitFullscreenToMinimize();
}
WatchWhileLayout watchWhileLayout2 = this.p;
watchWhileLayout2.mIsFullscreen = false;
watchWhileLayout2.mState = 2;
watchWhileLayout2.slideHorizontal(true);
}
public String C2() {
return this.b2;
}
public void C3(String str, String str2) {
if (str != null) {
hd.u.h0(this, hd.r.A1, str, str2);
}
}
public void C4(int i2) {
this.D = i2;
}
public void D(HashMap<String, String> hashMap) {
O2(hashMap, "InAppButtonClick");
}
public int D2() {
hd.a.a.g(OTTApplication.o()).getLoggedUser();
return getResources().getColor(2131099717);
}
public void D3(String str, String str2, boolean z2) {
String str3;
hd.h.b("myURL>>>", "" + str);
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) == null) {
Toast.makeText((Context) this, (CharSequence) "Something went wrong", 0).show();
return;
}
PreferenceManager g3 = c0133a.g(OTTApplication.o());
String sessionId = g3.getSessionId() != null ? g3.getSessionId() : "";
String deviceUniqueId = g3.getDeviceUniqueId() != null ? g3.getDeviceUniqueId() : "";
String str4 = "pi===" + str2 + "&&&bi===" + deviceUniqueId + "&&&si===" + sessionId + "&&&ci===" + g3.getYuppDeviceId() + "&&&utm_source===APP&&&redirect===/";
Configs c3 = c0133a.c(OTTApplication.o());
if (c3.getExternalBrowserValidityTimeInSec() != null) {
try {
if (Integer.parseInt(c3.getExternalBrowserValidityTimeInSec()) > 0) {
str4 = str4 + "&&&validity===" + (System.currentTimeMillis() + (r9 * 1000));
}
} catch (NumberFormatException unused) {
}
}
if (g3.getLoggedUser() != null) {
User loggedUser = g3.getLoggedUser();
if (loggedUser != null) {
if (loggedUser.getExternalUserId() != null) {
str4 = str4 + "&&&OTTSMSID===" + loggedUser.getExternalUserId();
}
if (loggedUser.getPhoneNumber() != null) {
String phoneNumber = loggedUser.getPhoneNumber();
if (phoneNumber != null) {
phoneNumber = hd.i0.a(phoneNumber);
if (phoneNumber.trim().length() > 10) {
phoneNumber = phoneNumber.substring(phoneNumber.length() - 10);
}
}
str4 = str4 + "&&&mobile===" + phoneNumber;
}
if (loggedUser.getAuthToken() != null) {
str4 = str4 + "&&&auth_id===" + loggedUser.getAuthToken();
}
}
} else {
str4 = str4 + "&&&OTTSMSID===-1&&&mobile===-1&&&auth_id===-1";
}
String str5 = str4 + "&&&appsflyerId===" + AppsFlyerLib.getInstance().getAppsFlyerUID(this) + "&&&advertisingId===" + hd.a0.y(this).u("pref_key_advertising_id");
if (g3.getIpInfo() != null && g3.getIpInfo().getTrueIP() != null && g3.getIpInfo().getTrueIP().trim().length() > 0) {
str5 = str5 + "&&&ip===" + g3.getIpInfo().getTrueIP();
}
hd.h.a("DEBUG encode ", "encode " + str5);
hd.h.a("DEBUG encode ", "siteurl " + str);
String encodeToString = Base64.encodeToString(str5.getBytes(), 3);
try {
encodeToString = URLEncoder.encode(encodeToString, "UTF-8");
} catch (UnsupportedEncodingException unused2) {
}
hd.h.a("DEBUG encode before encryption ", "encode " + str);
if (str.endsWith("?")) {
str3 = str + "ut=" + encodeToString;
} else {
str3 = str + "?ut=" + encodeToString;
}
hd.h.a("DEBUG encode after encryption ", "flexi siteurl " + str3);
hd.h.b("redirectionalUrl", " 4 : " + str3);
hd.u.g0(this, hd.r.C1, str3);
}
public void D4(String str) {
this.U1 = str;
}
public void D5(List<Menu> list) {
char c3;
List<Menu> list2 = this.Q1;
if (list2 != null) {
list2.clear();
}
TabLayout tabLayout = this.N0;
if (tabLayout != null) {
tabLayout.E();
}
if (this.Q1 == null) {
this.Q1 = new ArrayList();
}
this.Q1.addAll(list);
int size = list.size();
if (size > getResources().getInteger(2131492914)) {
this.N0.setTabMode(1);
this.N0.setTabGravity(0);
} else {
this.N0.setTabMode(1);
this.N0.setTabGravity(0);
}
boolean z2 = false;
int i2 = -1;
for (int i3 = 0; i3 < size; i3++) {
RelativeLayout relativeLayout = (RelativeLayout) LayoutInflater.from(this).inflate(com.yupptv.ott.a.J ? 2131624048 : 2131624047, (ViewGroup) null);
TextView textView = (TextView) relativeLayout.findViewById(2131429674);
ImageView imageView = (ImageView) relativeLayout.findViewById(2131429682);
textView.setText(list.get(i3).getDisplayText());
textView.setTypeface(androidx.core.content.res.h.g(this, 2131296261), 1);
String code = list.get(i3).getCode();
code.hashCode();
switch (code.hashCode()) {
case -1827029285:
if (code.equals("account_m")) {
c3 = 0;
break;
}
c3 = 65535;
break;
case -1211677427:
if (code.equals("home_m")) {
c3 = 1;
break;
}
c3 = 65535;
break;
case -1177318867:
if (code.equals("account")) {
c3 = 2;
break;
}
c3 = 65535;
break;
case -1131585765:
if (code.equals("kids_m")) {
c3 = 3;
break;
}
c3 = 65535;
break;
case -1003272776:
if (code.equals("e_learning")) {
c3 = 4;
break;
}
c3 = 65535;
break;
case -946803270:
if (code.equals("tvguide")) {
c3 = 5;
break;
}
c3 = 65535;
break;
case -906336856:
if (code.equals("search")) {
c3 = 6;
break;
}
c3 = 65535;
break;
case -903148681:
if (code.equals("shorts")) {
c3 = 7;
break;
}
c3 = 65535;
break;
case -870216457:
if (code.equals("swag_mobile")) {
c3 = '\b';
break;
}
c3 = 65535;
break;
case -816678056:
if (code.equals("videos")) {
c3 = '\t';
break;
}
c3 = 65535;
break;
case -425599448:
if (code.equals("my-aha_mobile")) {
c3 = '\n';
break;
}
c3 = 65535;
break;
case -411750398:
if (code.equals("home_mobile")) {
c3 = 11;
break;
}
c3 = 65535;
break;
case -280322202:
if (code.equals("watch_now")) {
c3 = '\f';
break;
}
c3 = 65535;
break;
case -279939603:
if (code.equals("watchlist")) {
c3 = '\r';
break;
}
c3 = 65535;
break;
case -146626905:
if (code.equals("d2h_mobile")) {
c3 = 14;
break;
}
c3 = 65535;
break;
case 3208415:
if (code.equals("home")) {
c3 = 15;
break;
}
c3 = 65535;
break;
case 3291757:
if (code.equals("kids")) {
c3 = 16;
break;
}
c3 = 65535;
break;
case 3347807:
if (code.equals("menu")) {
c3 = 17;
break;
}
c3 = 65535;
break;
case 3543434:
if (code.equals("swag")) {
c3 = 18;
break;
}
c3 = 65535;
break;
case 54345219:
if (code.equals("my_siti_mobile")) {
c3 = 19;
break;
}
c3 = 65535;
break;
case 95458912:
if (code.equals("debut")) {
c3 = 20;
break;
}
c3 = 65535;
break;
case 98712316:
if (code.equals("guide")) {
c3 = 21;
break;
}
c3 = 65535;
break;
case 106748522:
if (code.equals("plans")) {
c3 = 22;
break;
}
c3 = 65535;
break;
case 545161127:
if (code.equals("watchnow")) {
c3 = 23;
break;
}
c3 = 65535;
break;
case 555760278:
if (code.equals("catchup")) {
c3 = 24;
break;
}
c3 = 65535;
break;
case 586052842:
if (code.equals("favourites")) {
c3 = 25;
break;
}
c3 = 65535;
break;
case 692889332:
if (code.equals("account_mobile")) {
c3 = 26;
break;
}
c3 = 65535;
break;
case 794428861:
if (code.equals("book_d2h_mobile")) {
c3 = 27;
break;
}
c3 = 65535;
break;
case 820462825:
if (code.equals("dth_mobile")) {
c3 = 28;
break;
}
c3 = 65535;
break;
case 994290514:
if (code.equals("my_dishtv_mobile")) {
c3 = 29;
break;
}
c3 = 65535;
break;
case 1028478746:
if (code.equals("my_watchlist")) {
c3 = 30;
break;
}
c3 = 65535;
break;
case 1312704747:
if (code.equals("downloads")) {
c3 = 31;
break;
}
c3 = 65535;
break;
case 1432626128:
if (code.equals("channels")) {
c3 = ' ';
break;
}
c3 = 65535;
break;
case 1434631203:
if (code.equals("settings")) {
c3 = '!';
break;
}
c3 = 65535;
break;
case 1541704270:
if (code.equals("debut_m")) {
c3 = '\"';
break;
}
c3 = 65535;
break;
case 1541925881:
if (code.equals("after_dark")) {
c3 = '#';
break;
}
c3 = 65535;
break;
case 1683173044:
if (code.equals("kids_mobile")) {
c3 = '$';
break;
}
c3 = 65535;
break;
case 1761518591:
if (code.equals("book_dth_mobile")) {
c3 = '%';
break;
}
c3 = 65535;
break;
case 2004962180:
if (code.equals("book_d2h")) {
c3 = '&';
break;
}
c3 = 65535;
break;
case 2004964226:
if (code.equals("book_dth")) {
c3 = '\'';
break;
}
c3 = 65535;
break;
case 2059799393:
if (code.equals("debut_mobile")) {
c3 = '(';
break;
}
c3 = 65535;
break;
default:
c3 = 65535;
break;
}
switch (c3) {
case 0:
case 2:
case 17:
case 26:
imageView.setImageDrawable(getResources().getDrawable(2131231332));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout2 = this.N0;
tabLayout2.e(tabLayout2.B().s(list.get(i3).getCode()).p(relativeLayout));
break;
case 1:
case 11:
case 15:
imageView.setImageDrawable(getResources().getDrawable(2131231667));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout3 = this.N0;
tabLayout3.e(tabLayout3.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 3:
case 16:
case '$':
imageView.setImageDrawable(getResources().getDrawable(2131231678));
TabLayout tabLayout4 = this.N0;
tabLayout4.e(tabLayout4.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 4:
imageView.setImageDrawable(getResources().getDrawable(2131231678));
TabLayout tabLayout5 = this.N0;
tabLayout5.e(tabLayout5.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 5:
case 21:
imageView.setImageDrawable(getResources().getDrawable(2131231966));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout6 = this.N0;
tabLayout6.e(tabLayout6.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 6:
imageView.setImageDrawable(getResources().getDrawable(2131231929));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout7 = this.N0;
tabLayout7.e(tabLayout7.B().s(list.get(i3).getCode()).p(relativeLayout));
this.R.setVisibility(8);
z2 = true;
continue;
case 7:
imageView.setImageDrawable(getResources().getDrawable(2131232401));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout8 = this.N0;
tabLayout8.e(tabLayout8.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case '\b':
case 18:
imageView.setImageDrawable(getResources().getDrawable(2131231898));
TabLayout tabLayout9 = this.N0;
tabLayout9.e(tabLayout9.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case '\t':
case '\f':
case 23:
imageView.setImageDrawable(getResources().getDrawable(2131231976));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout10 = this.N0;
tabLayout10.e(tabLayout10.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case '\n':
imageView.setImageDrawable(getResources().getDrawable(2131232326));
TabLayout tabLayout11 = this.N0;
tabLayout11.e(tabLayout11.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case '\r':
case 30:
imageView.setImageDrawable(getResources().getDrawable(2131231987));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout12 = this.N0;
tabLayout12.e(tabLayout12.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 14:
case 19:
case 27:
case 28:
case 29:
case '%':
case '&':
case '\'':
imageView.setImageDrawable(getResources().getDrawable(2131231540));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout13 = this.N0;
tabLayout13.e(tabLayout13.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 20:
case '\"':
case '(':
imageView.setImageDrawable(getResources().getDrawable(2131231586));
TabLayout tabLayout14 = this.N0;
tabLayout14.e(tabLayout14.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 22:
imageView.setImageDrawable(getResources().getDrawable(2131231898));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout15 = this.N0;
tabLayout15.e(tabLayout15.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 24:
imageView.setImageDrawable(getResources().getDrawable(2131231555));
TabLayout tabLayout16 = this.N0;
tabLayout16.e(tabLayout16.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 25:
imageView.setImageDrawable(getResources().getDrawable(2131231323));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout17 = this.N0;
tabLayout17.e(tabLayout17.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case 31:
imageView.setImageDrawable(getResources().getDrawable(2131231598));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout18 = this.N0;
tabLayout18.e(tabLayout18.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case ' ':
imageView.setImageDrawable(getResources().getDrawable(2131231556));
TabLayout tabLayout19 = this.N0;
tabLayout19.e(tabLayout19.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
case '!':
imageView.setImageDrawable(getResources().getDrawable(2131232283));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout20 = this.N0;
tabLayout20.e(tabLayout20.B().s(list.get(i3).getCode()).p(relativeLayout));
break;
case '#':
imageView.setImageDrawable(getResources().getDrawable(2131231345));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout21 = this.N0;
tabLayout21.e(tabLayout21.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
default:
imageView.setImageDrawable(getResources().getDrawable(2131231937));
imageView.setColorFilter(getResources().getColor(2131100459));
TabLayout tabLayout22 = this.N0;
tabLayout22.e(tabLayout22.B().s(list.get(i3).getCode()).p(relativeLayout));
continue;
}
i2 = i3;
}
if (!z2) {
this.R.setVisibility(0);
}
hd.a0 y2 = hd.a0.y(this);
if (!y2.e("FromAccountPage").booleanValue() || i2 <= -1) {
return;
}
y2.C("FromAccountPage", Boolean.FALSE);
this.N0.z(i2).m();
}
public int E2() {
t2 t2Var = this.n1;
if (t2Var != null) {
return t2Var.r0();
}
return -1;
}
public void E3(Configs configs, boolean z2, String str) {
String str2;
if (configs == null) {
a.C0133a c0133a = hd.a.a;
if (c0133a.d(OTTApplication.o()) != null) {
configs = c0133a.c(OTTApplication.o());
}
}
if (configs == null) {
return;
}
String flexiPlanUrl = configs.getFlexiPlanUrl();
if (z2 && configs.getFlexiPlanWebSiteUrl() != null && configs.getFlexiPlanWebSiteUrl().trim().length() > 0) {
flexiPlanUrl = configs.getFlexiPlanWebSiteUrl();
}
if (flexiPlanUrl == null) {
flexiPlanUrl = configs.getSiteURL();
}
a.C0133a c0133a2 = hd.a.a;
if (c0133a2.g(OTTApplication.o()) == null) {
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952830), 0).show();
Q2();
return;
}
PreferenceManager g3 = c0133a2.g(OTTApplication.o());
String sessionId = g3.getSessionId() != null ? g3.getSessionId() : "";
String deviceUniqueId = g3.getDeviceUniqueId() != null ? g3.getDeviceUniqueId() : "";
String str3 = "bi===" + deviceUniqueId + "&&&si===" + sessionId + "&&&ci===" + g3.getYuppDeviceId() + "&&&utm_source===APP&&&redirect===/";
if (configs.getExternalBrowserValidityTimeInSec() != null) {
try {
if (Integer.parseInt(configs.getExternalBrowserValidityTimeInSec()) > 0) {
str3 = str3 + "&&&validity===" + (System.currentTimeMillis() + (r9 * 1000));
}
} catch (NumberFormatException unused) {
}
}
if (g3.getLoggedUser() != null) {
User loggedUser = g3.getLoggedUser();
if (loggedUser != null) {
if (loggedUser.getExternalUserId() != null) {
str3 = str3 + "&&&OTTSMSID===" + loggedUser.getExternalUserId();
}
if (loggedUser.getPhoneNumber() != null) {
String phoneNumber = loggedUser.getPhoneNumber();
if (phoneNumber != null) {
phoneNumber = hd.i0.a(phoneNumber);
if (phoneNumber.trim().length() > 10) {
phoneNumber = phoneNumber.substring(phoneNumber.length() - 10);
}
}
str3 = str3 + "&&&mobile===" + phoneNumber;
}
if (loggedUser.getAuthToken() != null) {
str3 = str3 + "&&&auth_id===" + loggedUser.getAuthToken();
}
}
} else {
str3 = str3 + "&&&OTTSMSID===-1&&&mobile===-1&&&auth_id===-1";
}
String str4 = str3 + "&&&theme===b";
if (com.yupptv.ott.a.h) {
str4 = str4 + "&&&lang===" + this.Z2.toLowerCase();
}
String str5 = str4 + "&&&appsflyerId===" + AppsFlyerLib.getInstance().getAppsFlyerUID(this) + "&&&ctid===" + E3 + "&&&advertisingId===" + hd.a0.y(this).u("pref_key_advertising_id");
if (g3.getIpInfo() != null && g3.getIpInfo().getTrueIP() != null && g3.getIpInfo().getTrueIP().trim().length() > 0) {
str5 = str5 + "&&&ip===" + g3.getIpInfo().getTrueIP();
}
hd.a0 a0Var = this.Q2;
if (a0Var != null && a0Var.j() != null && !this.Q2.j().isEmpty()) {
str5 = str5 + "&&&app_instance_id===" + this.Q2.j();
}
if (com.yupptv.ott.a.l) {
str5 = (((str5 + "&&&os===Android") + "&&&os_version===" + DeviceUtils.os_version) + "&&&limit_ad_tracking===false") + "&&&branch_key===key_live_kfRjeIpRvXzvCEEzGMp6YmpaEFn7AXvK";
}
if (!this.h3.isEmpty()) {
str5 = str5 + "&&&planId===" + this.h3;
}
String str6 = str5 + "&&&source===" + cc.b.B0().F0();
hd.h.a("url>>", "siteurl>>2 " + str6);
String encodeToString = Base64.encodeToString(str6.getBytes(), 3);
try {
encodeToString = URLEncoder.encode(encodeToString, "UTF-8");
} catch (UnsupportedEncodingException unused2) {
}
if (flexiPlanUrl.endsWith("?")) {
str2 = flexiPlanUrl + "ut=" + encodeToString;
} else {
str2 = flexiPlanUrl + "?ut=" + encodeToString;
}
hd.h.a("DEBUG", "flexi siteurl " + str2);
if (str == null || !(str.equalsIgnoreCase(hd.r.V1) || str.equalsIgnoreCase(hd.r.F1))) {
hd.u.g0(this, hd.r.y1, str2);
} else {
hd.u.e0(this, hd.r.y1, str2);
}
Q2();
}
public void E4() {
if (this.D == 0) {
setRequestedOrientation(1);
}
}
public void E5(boolean z2, String str, boolean z3) {
NestedScrollView nestedScrollView = this.q0;
if (nestedScrollView == null || !(nestedScrollView == null || nestedScrollView.getVisibility() == 0)) {
this.d2.setVisibility(z2 ? 0 : 8);
if (str != null && str.length() > 0) {
str = str.trim();
}
this.i2.setText(str);
this.o2.setVisibility(8);
this.j2.setVisibility(8);
this.p2.setVisibility(8);
this.n2.setVisibility(8);
if (!z3) {
this.l2.setVisibility(8);
this.k2.setVisibility(8);
} else {
this.l2.setVisibility(0);
this.k2.setVisibility(0);
this.k2.setOnClickListener(new o0());
}
}
}
@Override
public void F(boolean z2) {
M5(z2);
}
public void F1() {
if (this.n1 != null) {
TabLayout tabLayout = this.N0;
if (tabLayout == null || tabLayout.getSelectedTabPosition() == 0) {
onBackPressed();
} else {
new Handler().postDelayed(new f0(), 10L);
z(true);
}
}
}
public void F2() {
new Handler().postDelayed(new w0(), 500L);
}
public void F3(boolean z2, String str, String... strArr) {
String str2;
String str3;
hd.h.a("MainActivity>>", "launchWebviewPlansPage::" + str);
if (strArr != null && strArr.length > 0 && strArr[0] != null && !strArr[0].isEmpty()) {
this.h3 = strArr[0];
}
a.C0133a c0133a = hd.a.a;
Configs c3 = c0133a.c(OTTApplication.o());
if (c3 != null && c3.getFlexiPlanUrl() != null && c3.getFlexiPlanUrl().trim().length() > 0) {
E3(c3, false, hd.r.I1);
return;
}
String str4 = "";
String siteURL = (c3 == null || c3.getSiteURL() == null) ? "" : c3.getSiteURL();
if (c0133a.g(OTTApplication.o()) == null) {
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952830), 0).show();
Q2();
return;
}
PreferenceManager g3 = c0133a.g(OTTApplication.o());
String sessionId = g3.getSessionId() != null ? g3.getSessionId() : "";
String deviceUniqueId = g3.getDeviceUniqueId() != null ? g3.getDeviceUniqueId() : "";
int yuppDeviceId = g3.getYuppDeviceId();
hd.h.b("DEBUG", "sessionId " + sessionId);
hd.h.b("DEBUG", "boxId " + deviceUniqueId);
hd.h.b("DEBUG", "clientId " + yuppDeviceId);
this.R2 = this.Q2.m(this.W2);
String str5 = (("bi===" + deviceUniqueId + "&&&si===" + sessionId + "&&&ci===" + yuppDeviceId) + "&&&theme===w") + "&&&source===" + cc.b.B0().F0();
if (com.yupptv.ott.a.h) {
str5 = str5 + "&&&lang===" + this.Z2.toLowerCase();
}
hd.h.a("url>>", "siteurl>>2 " + str5);
if (z2) {
str2 = str5 + "&&&redirect===redeem";
} else if (str == null || str.trim().length() <= 0) {
str2 = str5 + "&&&redirect===buy/packages-list";
} else {
str2 = str5 + "&&&redirect===" + str;
}
if (!this.h3.isEmpty()) {
str2 = str2 + "&&&planId===" + this.h3;
}
hd.h.b("DEBUG", "siteurl string to encode " + str2);
String encodeToString = Base64.encodeToString(str2.getBytes(), 2);
try {
encodeToString = URLEncoder.encode(encodeToString, "UTF-8");
} catch (UnsupportedEncodingException unused) {
}
if (siteURL.endsWith("/")) {
str3 = siteURL + "sso/manage?ut=" + encodeToString;
} else {
str3 = siteURL + "/sso/manage?ut=" + encodeToString;
}
hd.h.b("DEBUG", "siteurl " + str3);
String str6 = hd.r.y1;
if (!TextUtils.isEmpty(str) && str.trim().contains("devices")) {
str6 = hd.r.z1;
str4 = getResources().getString(2131951624);
}
hd.u.h0(this, str6, str3, str4);
Q2();
}
public void F4(String str) {
this.b2 = str;
}
public void F5(boolean z2, String str, boolean z3, String str2) {
this.d2.setVisibility(8);
}
@Override
public void G() {
boolean z2;
T4();
p5();
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).i4(false);
}
this.p.minimize(true);
if (U2()) {
this.J2 = (int) getResources().getDimension(2131166082);
} else {
this.J2 = (int) getResources().getDimension(2131166085);
}
r4();
if (com.yupptv.ott.a.M) {
O1();
} else {
this.p.exitFullscreenToMinimize();
}
CastSession castSession = this.x1;
if (castSession != null && castSession.isConnected()) {
s();
}
Fragment j02 = getSupportFragmentManager().j0(2131427847);
Iterator it = getSupportFragmentManager().w0().iterator();
while (true) {
if (!it.hasNext()) {
z2 = false;
break;
} else if (((Fragment) it.next()) instanceof com.yupptv.ott.fragments.q0) {
z2 = true;
break;
}
}
if (z2) {
z(false);
} else if (j02 != null && (j02 instanceof com.yupptv.ott.fragments.u1)) {
z(true);
}
J5(this.Y1);
}
public void G1(OfflineDownloadData offlineDownloadData) {
int size;
xc.a t2 = ((OTTApplication) getApplication()).t();
this.s2 = t2;
if (t2 != null) {
try {
if (offlineDownloadData != null) {
t2.l(offlineDownloadData);
} else {
SparseArray<OfflineDownloadData> sparseArray = xc.a.l;
if (sparseArray != null && (size = sparseArray.size()) > 0) {
for (int i2 = 0; i2 < size; i2++) {
try {
xc.a aVar = this.s2;
if (aVar != null) {
aVar.l(sparseArray.valueAt(i2));
}
} catch (Exception unused) {
}
}
}
}
} catch (Exception unused2) {
}
}
}
public void G2() {
TabLayout tabLayout;
if (this.n1 == null || (tabLayout = this.N0) == null || tabLayout.getSelectedTabPosition() == 0) {
return;
}
new Handler().postDelayed(new s1(), 10L);
}
public void G3() {
this.y2.t(getResources().getString(2131951685));
this.y2.D("#f8f8f8");
this.y2.C("#eb3495");
this.y2.B("#e7195a");
this.y2.F("#707272");
this.y2.r("#000000");
this.y2.y("#000000");
this.y2.w(getResources().getString(2131951961));
this.y2.v("#ffffff");
this.y2.u("#ffffff");
this.y2.A("#000000");
this.y2.z(getResources().getString(2131952397));
}
public void G4(String str) {
this.e.setTitle(str);
this.f.setText(str);
this.e.setLogo((Drawable) null);
}
public void G5(String str) {
if (str == null || str.trim().length() <= 0) {
return;
}
com.bumptech.glide.b.v(this).k().K0(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(str)).C0(new r0(this.k));
}
public void H() {
hd.h.c("CT_Inbox>>", "inboxDidInitialize() called");
}
public void H2(java.lang.Object r8) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.MainActivity.H2(java.lang.Object):void");
}
public void H3(String str) {
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) != null && c0133a.c(OTTApplication.o()).getBannerAdUnitIdAndroid() != null) {
str = c0133a.c(OTTApplication.o()).getBannerAdUnitIdAndroid();
}
if (str.trim().isEmpty() || this.H2.equalsIgnoreCase(str)) {
return;
}
this.H2 = str;
if (str.trim().length() > 1) {
AdManagerAdView adManagerAdView = new AdManagerAdView(this);
this.I2 = adManagerAdView;
adManagerAdView.setAdSize(AdSize.BANNER);
this.I2.setAdUnitId(str);
com.yupptv.ott.activity.a.d.addView(this.I2);
AdManagerAdView adManagerAdView2 = this.I2;
if (adManagerAdView2 != null) {
U(adManagerAdView2, this);
}
}
}
public void H5(int i2, boolean z2) {
if (i2 == 0) {
this.P1 = 0;
if (Build.VERSION.SDK_INT >= 16) {
this.e.setBackground(new ColorDrawable(getResources().getColor(2131100484)));
} else {
this.e.setBackgroundDrawable(new ColorDrawable(getResources().getColor(2131100484)));
}
} else {
this.P1 = 1;
if (Build.VERSION.SDK_INT >= 16) {
this.e.setBackground(new ColorDrawable(getResources().getColor(2131100484)));
} else {
this.e.setBackgroundDrawable(new ColorDrawable(getResources().getColor(2131100484)));
}
if (getSupportFragmentManager().q0() < 1) {
b5(false);
}
}
invalidateOptionsMenu();
}
public void I1(String str, oc.s sVar) {
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).K1(str, sVar);
}
}
public void J1() {
UpNextFragment upNextFragment = this.B;
if (upNextFragment != null) {
upNextFragment.K();
}
}
public void J2() {
TabLayout tabLayout;
if (this.n1 == null || (tabLayout = this.N0) == null || tabLayout.getSelectedTabPosition() == 0) {
return;
}
new Handler().postDelayed(new r1(), 10L);
}
public void J3(Fragment fragment, String str) {
if (fragment != null) {
getSupportFragmentManager().q().s(R.anim.fade_in, R.anim.fade_out).b(2131427847, fragment).g(str).j();
Y1(true, str);
}
}
public void J4(boolean z2) {
this.X1 = z2;
if (!z2) {
this.I1.setVisibility(8);
} else {
this.I1.setVisibility(0);
J5(this.Y1);
}
}
public void J5(int i2) {
CastSession castSession;
OttLog.error("updateValue", "++++++++++" + i2);
if (i2 != 0 || (castSession = this.x1) == null || castSession.getRemoteMediaClient() == null || !(this.x1.getRemoteMediaClient().isBuffering() || this.x1.getRemoteMediaClient().isPlaying())) {
this.M0.setPadding(0, 0, 0, i2);
} else {
OttLog.error("updateValue", "is 0 chrmecast playing");
}
}
public void K1() {
Fragment fragment = this.s;
if (fragment != null) {
((tc.i) fragment).i1 = null;
((tc.i) fragment).k1 = null;
}
}
public void K2(User user) {
}
public void K3(String str) {
if (str == null || hd.e0.f) {
return;
}
InterstitialAd.load(this, str, new AdRequest.Builder().build(), new y1());
InterstitialAd interstitialAd = this.v1;
if (interstitialAd != null) {
interstitialAd.show(this);
}
}
public void K4(boolean z2) {
hd.h.b("chromeCast", "showChromecastLoading : " + this.F1);
if (!z2) {
this.J1.setVisibility(8);
} else if (this.F1 != null) {
this.J1.setVisibility(0);
}
this.J1.setTitle("ChromeCast");
this.J1.setSubTitle("Loading.. Please wait");
}
@Override
public void L() {
com.yupptv.ott.activity.a.d.setVisibility(0);
r4();
t2 t2Var = this.n1;
if (t2Var != null) {
t2Var.I0((int) getResources().getDimension(2131166086));
}
hd.h.b("DEBUG", "onBannerAdLoaded");
}
public void L1() {
ArrayList arrayList = new ArrayList();
bc.u uVar = new bc.u(this, (String[]) arrayList.toArray(new String[arrayList.size()]), getResources().getDrawable(2131232543), false, this.Y0);
uVar.d(new ArrayList());
this.Y0.setAdapter(uVar);
}
@Override
public void M() {
}
public void M4() {
if (this.U2.getVisibility() == 0) {
this.U2.setVisibility(8);
this.B0.setVisibility(0);
} else {
this.B0.setVisibility(8);
this.U2.setVisibility(0);
}
}
public void N1(String str) {
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) == null || c0133a.g(OTTApplication.o()).getLoggedUser() == null) {
return;
}
if (c0133a.g(OTTApplication.o()).getLoggedUser() == null && str != null && str.equalsIgnoreCase("my_library")) {
this.w3.postDelayed(this.x3, 1000L);
return;
}
DrawerLayout drawerLayout = this.l;
if (drawerLayout != null) {
drawerLayout.h();
}
}
public void N2() {
CleverTapAPI H = CleverTapAPI.H(this);
J3 = H;
E3 = H.A();
CleverTapAPI.H(this).G0();
CleverTapAPI cleverTapAPI = J3;
if (cleverTapAPI != null) {
if (this.Q2 != null && !cleverTapAPI.Z() && R4()) {
T1();
}
J3.N0(this);
J3.M0(this);
J3.O0(this);
J3.I0(this);
J3.U();
}
Q1();
CleverTapAPI.r(getApplicationContext(), "default", "General", "Clevertap Inapp message Testing", 5, true);
}
public void N3() {
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout.mState == 0) {
watchWhileLayout.mState = 1;
watchWhileLayout.mIsFullscreen = false;
watchWhileLayout.canAnimate();
this.p.reset();
}
this.p.maximize(true);
}
public void N4(boolean z2) {
this.d2.setVisibility(z2 ? 0 : 8);
}
public void O1() {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
cc.e.n().N("");
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout != null) {
((tc.i) this.s).f = 2;
watchWhileLayout.mState = 2;
if (com.yupptv.ott.a.M || ((j02 instanceof ShortsFragment) && ((ShortsFragment) j02).isVisible())) {
this.p.mIsFullscreen = false;
}
this.p.slideHorizontal(true);
}
}
public void O3() {
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout != null) {
watchWhileLayout.minimize(true);
}
}
public void O4() {
if (hd.e0.a) {
InterstitialAd interstitialAd = this.v1;
if (interstitialAd != null) {
interstitialAd.show(this);
}
K3(null);
}
}
public void O5(boolean z2) {
TextView textView;
Log.d(this.i3, "visibleCollapsingTopMenu: " + z2);
if ((hd.e.T.equalsIgnoreCase("chaupal") || hd.e.T.equalsIgnoreCase("starhub")) && (textView = this.h2) != null && textView.getVisibility() == 8) {
BlurView blurView = this.R0;
if (blurView != null) {
blurView.setVisibility(z2 ? 0 : 8);
}
if (z2 && this.o0 != null && !hd.e.T.equalsIgnoreCase("starhub")) {
this.o0.setVisibility(8);
}
} else {
this.R0.setVisibility(z2 ? 0 : 8);
}
((ViewGroup.MarginLayoutParams) this.o.getLayoutParams()).topMargin = z2 ? this.f2.getHeight() : 0;
}
public void P1() {
Intent intent = getIntent();
intent.addFlags(67108864);
intent.addFlags(268468224);
startActivity(intent);
finish();
}
public void P2() {
((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(new View(this).getWindowToken(), 2);
}
public void P3() {
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout != null) {
watchWhileLayout.minimize(true);
}
if (U2()) {
this.J2 = (int) getResources().getDimension(2131166082);
} else {
this.J2 = (int) getResources().getDimension(2131166085);
}
r4();
}
public void Q1() {
CleverTapAPI.r(getApplicationContext(), "default", "General", "Clevertap Inapp message Testing", 5, true);
CleverTapAPI.r(getApplicationContext(), "important", "Important", "Important Updates", 5, true);
CleverTapAPI.r(getApplicationContext(), "alerts", "Alerts", "Most important updates", 5, true);
CleverTapAPI.r(getApplicationContext(), "payment", "Payment", "Payment related comms", 5, true);
CleverTapAPI.r(getApplicationContext(), "subscription", "Subscription", "Subscription relted notificaiton", 5, true);
CleverTapAPI.r(getApplicationContext(), "offers", "Offers", "Offer related information", 5, true);
CleverTapAPI.r(getApplicationContext(), "updates", "Updates", "General updates", 5, true);
CleverTapAPI.r(getApplicationContext(), "transactional", "Transactional", "All payment and subscription related comms", 5, true);
CleverTapAPI.r(getApplicationContext(), "promotional", "Promotional", "All offers related comms", 5, true);
}
public void Q2() {
ProgressBar progressBar = this.C0;
if (progressBar != null) {
progressBar.setVisibility(8);
}
l4(false);
}
public void Q4() {
ProgressBar progressBar = this.C0;
if (progressBar != null) {
progressBar.setVisibility(0);
l4(true);
}
}
public void R2() {
hd.h.b("SystemUI", "hide system UI");
getWindow().addFlags(1024);
if (ViewConfiguration.get(this).hasPermanentMenuKey()) {
return;
}
getWindow().getDecorView().setSystemUiVisibility(Build.VERSION.SDK_INT >= 19 ? 4098 : 2);
}
public void R3(String str, String str2, String str3, String str4, String str5, oc.x xVar) {
G3 = str;
hd.h.a("Offline_Download>>2", "Downloadssss::");
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).b3(str, str2, str3, str4, str5, xVar, this.s2);
}
}
public void S3(String str) {
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).c3(str);
}
}
public void S4(Object obj) {
if (this.B != null) {
getSupportFragmentManager().q().r(2131429901, this.B, "UpNextFragment").l();
new Handler().postDelayed(new v0(obj), 15L);
}
}
public void T1() {
this.Q2.M("USRSUB_PUSH_PRIMER_POPUP_SHOWTIME", System.currentTimeMillis());
J3.t0(CTLocalInApp.a().a(CTLocalInApp.InAppType.ALERT).a("Get Notified").a("Enable Notification permission").a(true).a("Allow").a("Cancel").b());
}
public boolean T2() {
RelativeLayout relativeLayout = com.yupptv.ott.activity.a.d;
return relativeLayout != null && relativeLayout.getVisibility() == 0;
}
public void T3() {
if (hd.e0.a) {
v5();
W3();
O4();
if (this.M1 || !hd.e0.f) {
return;
}
this.M1 = true;
V3();
}
}
public void U1() {
this.y2.t(getResources().getString(2131951685));
this.y2.D(String.format("#%06X", Integer.valueOf(getResources().getColor(2131100053) & 16777215)));
this.y2.C(String.format("#%06X", Integer.valueOf(getResources().getColor(2131100351) & 16777215)));
this.y2.B(String.format("#%06X", Integer.valueOf(getResources().getColor(2131100351) & 16777215)));
this.y2.F("#888888");
this.y2.r("#FFFFFF");
this.y2.y("#FFFFFF");
this.y2.w(getResources().getString(2131951961));
this.y2.v("#191919");
this.y2.u(String.format("#%06X", Integer.valueOf(getResources().getColor(2131100053) & 16777215)));
this.y2.A("#FFFFFF");
this.y2.z(getResources().getString(2131952397));
}
public boolean U2() {
TabLayout tabLayout = this.N0;
return tabLayout != null && tabLayout.getVisibility() == 0;
}
public void U3() {
Fragment fragment = this.s;
if (fragment == null || !(fragment instanceof tc.i)) {
return;
}
((tc.i) fragment).f3();
}
public void V1() {
Dialog dialog = this.u3;
if (dialog != null) {
dialog.dismiss();
}
}
public boolean V2() {
return this.v3;
}
void V3() {
new Handler().postDelayed(new z1(), 100L);
}
public void W1() {
if (!(getSupportFragmentManager().j0(2131427847) instanceof t2)) {
this.h1 = true;
return;
}
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof t2) {
((t2) j02).z0();
}
this.j1 = true;
this.k1 = true;
this.h1 = false;
}
public boolean W2() {
try {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 == null || !(j02 instanceof t2)) {
return false;
}
return ((t2) j02).w0();
} catch (NullPointerException unused) {
return false;
}
}
public void X1(boolean z2) {
NestedScrollView nestedScrollView = this.q0;
if (nestedScrollView != null) {
nestedScrollView.setVisibility(z2 ? 0 : 8);
}
}
public boolean X2() {
try {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 == null || !(j02 instanceof t2)) {
return false;
}
return ((t2) j02).x0();
} catch (NullPointerException unused) {
return false;
}
}
public void X3() {
hd.h.b("SSA>>", "reFreshDownloads");
xc.a t2 = ((OTTApplication) getApplication()).t();
this.s2 = t2;
t2.f(this);
try {
hd.h.b("MediaDownloadService", "DownloadService.start");
DownloadService.start(this, MediaDownloadService.class);
} catch (IllegalStateException unused) {
hd.h.b("MediaDownloadService", "DownloadService.startForeground");
DownloadService.startForeground(this, MediaDownloadService.class);
}
}
public void X4(Params params, boolean z2) {
if (params == null || params.getPopupTitle() == null || params.getPopupTitle().trim().length() <= 0 || params.getPopupMessage() == null || params.getPopupMessage().trim().length() <= 0) {
if (params.getUrl() == null || params.getUrl().trim().length() <= 0) {
return;
}
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(params.getUrl())));
return;
}
HashMap hashMap = new HashMap();
hashMap.put("title", params.getPopupTitle());
hashMap.put("message", params.getPopupMessage());
hashMap.put("ButtonText", params.getButtonTitle());
hd.u.J0(this, DialogType.WEBVIEW_NAVIGATION_DIALOG, hashMap, new m1(params, z2));
}
public void Y1(boolean z2, String str) {
new Handler().postDelayed(new l1(z2, str, hd.a.r(OTTApplication.o()).getLoggedUser()), 0L);
}
public void Y3() {
try {
if (Branch.J() != null && Branch.J().K() != null) {
JSONObject L = Branch.J().L();
try {
hd.h.a(this.i3, "sessionParams : " + L.toString());
if (L.has("$deeplink_path") && L.get("$deeplink_path") != null) {
String obj = L.get("$deeplink_path").toString();
hd.h.a(this.i3, "deepLinkPath : " + obj);
if (!TextUtils.isEmpty(obj)) {
v4(Uri.parse(obj));
}
}
} catch (JSONException e3) {
hd.h.a(this.i3, "JSONException : " + e3.getMessage());
}
}
} catch (Exception unused) {
}
}
public boolean Z2(String str) {
List<Menu> list = this.Q1;
if (list != null) {
int size = list.size();
for (int i2 = 0; i2 < size; i2++) {
if (str.equalsIgnoreCase(this.Q1.get(i2).getCode())) {
if (this.Q1.get(i2).getSubMenus() == null || this.Q1.get(i2).getSubMenus().size() <= 0) {
return false;
}
if (!this.U0) {
Y1(true, "");
}
return true;
}
}
}
return false;
}
public void Z3() {
TabLayout tabLayout = this.N0;
String obj = tabLayout.z(tabLayout.getSelectedTabPosition()).i().toString();
if (obj != null && obj.trim().equalsIgnoreCase("after_dark") && (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.a1)) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof com.yupptv.ott.fragments.a1) {
com.yupptv.ott.fragments.a1 a1Var = (com.yupptv.ott.fragments.a1) j02;
a1Var.d1 = true;
hd.a0.y(this).z(System.currentTimeMillis());
a1Var.T1(false);
}
}
}
public boolean a(Map<String, Object> map) {
if (map == null) {
return true;
}
hd.h.b("inAppBeforeShow:", "extras size : " + map.size());
for (int i2 = 0; i2 < map.size(); i2++) {
hd.h.b("inAppBeforeShow:", "extras key:value : " + map.get(Integer.valueOf(i2)));
}
return true;
}
public void a4() {
TabLayout tabLayout = this.N0;
String obj = tabLayout.z(tabLayout.getSelectedTabPosition()).i().toString();
if (obj != null && obj.trim().equalsIgnoreCase("favourites") && (getSupportFragmentManager().j0(2131427847) instanceof t2)) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof t2) {
((t2) j02).C0();
}
}
}
public void a5() {
hd.h.a("signout", "signout social logins");
try {
if (com.facebook.login.s.i() != null) {
com.facebook.login.s.i().p();
}
} catch (Exception unused) {
}
try {
if (OTTApplication.w().u() != null) {
if (OTTApplication.w().u().isConnected()) {
GoogleSignInApi googleSignInApi = Auth.GoogleSignInApi;
OptionalPendingResult silentSignIn = googleSignInApi.silentSignIn(OTTApplication.w().u());
if (silentSignIn.isDone()) {
silentSignIn.get();
googleSignInApi.signOut(OTTApplication.w().u()).setResultCallback(new m0());
}
} else {
OTTApplication.w().u().registerConnectionCallbacks(new n0());
OTTApplication.w().u().connect();
}
}
if (FirebaseAuth.getInstance() != null) {
FirebaseAuth.getInstance().i();
}
} catch (Exception unused2) {
}
}
@Override
public void b() {
Q4();
hd.a.a.b(OTTApplication.o()).getUserManager().getUserInfo(new l0());
bc.t tVar = this.D0;
if (tVar != null) {
tVar.A();
}
}
public void b4() {
if (this.i1 && (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.z0)) {
if (!((com.yupptv.ott.fragments.z0) getSupportFragmentManager().j0(2131427847)).e0 && !((com.yupptv.ott.fragments.z0) getSupportFragmentManager().j0(2131427847)).Z) {
RestAdapter.enableCache(false);
}
((com.yupptv.ott.fragments.z0) getSupportFragmentManager().j0(2131427847)).Z(false);
this.i1 = false;
}
}
public void b5(boolean z2) {
if (z2) {
getSupportActionBar().t(true);
return;
}
getSupportActionBar().t(false);
getSupportActionBar().z(true);
this.m.h(true);
this.m.j();
}
public void c() {
hd.h.c("CT_Inbox>>", "inboxMessagesDidUpdate() called");
}
public void c4() {
if (this.S1.equalsIgnoreCase(cc.c.u1)) {
r3();
return;
}
if (getSupportFragmentManager().k0("viewPagerFragment") != null) {
getSupportFragmentManager().q().p(getSupportFragmentManager().k0("viewPagerFragment")).j();
}
t2 t2Var = this.n1;
if (t2Var != null) {
t2Var.r0();
}
t2 t2Var2 = new t2();
this.n1 = t2Var2;
this.c1 = t2Var2;
getSupportFragmentManager().q().r(2131427847, this.n1, "viewPagerFragment").j();
new Handler().postDelayed(new k0(), 20L);
}
public void c5(boolean z2) {
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).m4(z2);
}
}
public void d2(String str, String str2, int i2) {
Q4();
hd.a.a.b(OTTApplication.o()).getPaymentManager().getActivePackages(new h1(str2, i2, str));
}
public void d5(List<String> list) {
this.W0 = list;
if (list.size() > 0) {
this.T0.setVisibility(0);
} else {
this.T0.setVisibility(8);
}
}
public id.b e2() {
return this.x;
}
public void e5() {
List<SubMenu> list;
t2 t2Var = this.n1;
if (t2Var != null && (list = t2Var.F) != null && list.size() == 1 && com.yupptv.ott.a.D && U2() && this.f2.getVisibility() == 0 && this.h2.getVisibility() == 8) {
O5(true);
} else {
O5(false);
}
}
public void f(CTInAppNotification cTInAppNotification) {
}
public String f2(String str) {
List<Menu> list = this.Q1;
if (list != null) {
int size = list.size();
for (int i2 = 0; i2 < size; i2++) {
if (str.equalsIgnoreCase(this.Q1.get(i2).getCode())) {
return this.Q1.get(i2).getTargetPath() != null ? this.Q1.get(i2).getTargetPath().trim() : "";
}
}
}
return "";
}
public void f4() {
if (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.c1) {
((com.yupptv.ott.fragments.c1) getSupportFragmentManager().j0(2131427847)).P0(false);
} else if (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.q0) {
((com.yupptv.ott.fragments.q0) getSupportFragmentManager().j0(2131427847)).Z1();
} else if (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.u0) {
((com.yupptv.ott.fragments.u0) getSupportFragmentManager().j0(2131427847)).U0();
}
}
public void f5(String str) {
try {
cc.d.d().f(str);
} catch (NullPointerException unused) {
}
}
public Carousel g2() {
return this.z;
}
public void g4() {
TabLayout tabLayout = this.N0;
String obj = tabLayout.z(tabLayout.getSelectedTabPosition()).i().toString();
if (obj != null) {
if ((obj.trim().equalsIgnoreCase("watchlist") || obj.trim().equalsIgnoreCase("my_watchlist")) && (getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.a1)) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof com.yupptv.ott.fragments.a1) {
((com.yupptv.ott.fragments.a1) j02).T1(true);
}
}
}
}
@Override
public void h(LoadAdError loadAdError) {
com.yupptv.ott.activity.a.d.setVisibility(8);
hd.h.b("DEBUG", "onBannerAdFailedToLoad " + loadAdError.toString());
}
public void h4() {
this.z3.a(new nb.r().h(true).g(ActivateDeviceFragment.class));
}
public int i2() {
NestedScrollView nestedScrollView = this.p0;
if (nestedScrollView != null) {
return nestedScrollView.getMeasuredHeight() * 2;
}
return 0;
}
@Override
public void j() {
hd.e.Q = true;
Fragment fragment = this.Z0;
if (fragment != null && (fragment instanceof com.yupptv.ott.fragments.r1) && ((com.yupptv.ott.fragments.r1) fragment).T != null && ((com.yupptv.ott.fragments.r1) fragment).T.v()) {
((com.yupptv.ott.fragments.r1) this.Z0).T.o();
((com.yupptv.ott.fragments.r1) this.Z0).T.clearFocus();
((com.yupptv.ott.fragments.r1) this.Z0).T.m.setVisibility(8);
P2();
}
cc.b.B0().P1("full");
if (hd.e0.i) {
setRequestedOrientation(0);
R2();
hd.y yVar = this.Z1;
if (yVar != null) {
yVar.b(true);
}
this.p.mIsFullscreen = true;
((tc.i) this.s).A3(120);
} else {
hd.y yVar2 = this.Z1;
if (yVar2 != null) {
yVar2.b(false);
}
}
this.E = 1.0f;
this.D = 1;
if (getResources().getConfiguration().orientation == 2 && !this.p.mIsFullscreen) {
M5(true);
}
Fragment fragment2 = this.s;
if (fragment2 instanceof tc.i) {
tc.i iVar = (tc.i) fragment2;
iVar.f4.setVisibility(8);
if (iVar.h4.getVisibility() == 0) {
iVar.T.setVisibility(0);
iVar.h4.setVisibility(8);
iVar.D2();
} else {
iVar.x4();
iVar.v4();
}
}
((tc.i) this.s).S3(true);
}
public int j2() {
TabLayout tabLayout = this.N0;
if (tabLayout != null) {
return tabLayout.getSelectedTabPosition();
}
return -1;
}
public void j4() {
if (this.W1 != null) {
this.W1 = "";
}
tc.i iVar = (tc.i) this.s;
ExoPlayer exoPlayer = iVar.g0;
if (exoPlayer == null || exoPlayer.getPlayWhenReady()) {
return;
}
iVar.i4.setVisibility(8);
iVar.g4.setVisibility(0);
}
public void j5(AdUrlResponse adUrlResponse, String str) {
if (hd.e0.a && adUrlResponse != null) {
if (this.K2 == null) {
this.K2 = new HashMap<>();
}
t2 t2Var = this.n1;
if (t2Var != null) {
int r02 = t2Var.r0();
if (r02 < 0) {
r02 = 0;
}
this.K2.put("adtab_" + str, adUrlResponse);
t2 t2Var2 = this.n1;
if (str.equalsIgnoreCase(t2Var2.v0(t2Var2.r0()))) {
W3();
} else if (!U2()) {
W3();
}
hd.h.b("DFP ADS", "adhash map key adtab_" + r02);
}
}
}
@Override
public void k(boolean z2) {
z4(z2);
}
public Fragment k2() {
return getSupportFragmentManager().j0(2131427847);
}
public void k4() {
Intent intent = getIntent();
intent.putExtra("fromSignup", false);
intent.putExtra("isRestarted", true);
intent.setAction("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
intent.addFlags(67108864);
intent.addFlags(268468224);
overridePendingTransition(0, 0);
finish();
startActivity(intent);
overridePendingTransition(0, 0);
}
@Override
public void l() {
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout.mState == 2) {
watchWhileLayout.maximize(false);
}
if (this.p.mState == 1) {
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).k4();
}
}
}
public void l0() {
List<String> list = this.W0;
if (list == null || list.size() <= 0) {
return;
}
Q4();
String str = "";
for (int i2 = 0; i2 < this.W0.size(); i2++) {
str = str + this.W0.get(i2);
if (i2 != this.W0.size() - 1) {
str = str + ",";
}
}
hd.a.a.b(OTTApplication.o()).getUserManager().removeUserFavourite(str, new w());
}
public Fragment l2() {
return getSupportFragmentManager().j0(2131428004);
}
public void l4(boolean z2) {
if (z2) {
getWindow().setFlags(16, 16);
} else {
getWindow().clearFlags(16);
}
}
public void l5(ContentPage contentPage) {
this.A.W0(contentPage);
}
@Override
public void m(float f3) {
float f4;
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
if (f3 == BitmapDescriptorFactory.HUE_RED) {
((tc.i) fragment).V3();
} else {
((tc.i) fragment).E2();
}
if (f3 > 2.0f) {
f4 = this.E * (3.0f - f3);
} else {
f4 = f3 > 1.0f ? ((2.0f - f3) * 0.75f) + 0.25f : 1.0f;
if (f3 >= BitmapDescriptorFactory.HUE_RED && f3 <= 1.0f) {
C5(1.0f - f3);
}
}
y5(f4);
this.E = f4;
}
}
public void m4() {
Fragment fragment = this.s;
if (fragment == null || !(fragment instanceof tc.i)) {
return;
}
((tc.i) fragment).s3();
}
public void m5() {
if (this.F) {
hd.a0 y2 = hd.a0.y(OTTApplication.o());
a.C0133a c0133a = hd.a.a;
PreferenceManager g3 = c0133a.g(OTTApplication.o());
SystemFeatures systemFeaturesData = g3 != null ? g3.getSystemFeaturesData() : null;
if (systemFeaturesData == null || systemFeaturesData.getSystemFeatures() == null || systemFeaturesData.getSystemFeatures().getUserfields() == null || systemFeaturesData.getSystemFeatures().getUserfields().getFields() == null) {
return;
}
FeaturesInfo userfields = systemFeaturesData.getSystemFeatures().getUserfields();
Fields fields = userfields.getFields();
if (fields.getAge() == null || fields.getAge().trim().isEmpty()) {
return;
}
if ((!fields.getAge().equals("1") && !fields.getAge().equals("2")) || fields.getGender() == null || fields.getGender().trim().isEmpty()) {
return;
}
if (fields.getGender().equals("1") || fields.getGender().equals("2")) {
c0133a.b(OTTApplication.o()).getUserManager().getUserInfo(new o1(userfields, y2));
}
}
}
public EPGProgramsData n2() {
return this.s1;
}
public void n4(JSONObject jSONObject) {
F3 = jSONObject;
}
public EPG o2() {
return this.q1;
}
public void o4(EPGUserChannels ePGUserChannels) {
this.r1 = ePGUserChannels;
}
public void o5(String str) {
jc.c cVar = (jc.c) getSupportFragmentManager().k0("filter");
if (cVar != null) {
cVar.T(str);
}
}
protected void onActivityResult(int r13, int r14, android.content.Intent r15) {
throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.MainActivity.onActivityResult(int, int, android.content.Intent):void");
}
public void onBackPressed() {
TabLayout tabLayout;
if (OTTApplication.j0) {
Toast.makeText((Context) this, (CharSequence) "Screen locked", 0).show();
return;
}
if (this.T0.getVisibility() == 0) {
this.T0.setVisibility(8);
}
Fragment j02 = getSupportFragmentManager().j0(2131427847);
Fragment j03 = getSupportFragmentManager().j0(2131428004);
if (j02 != null && (j02 instanceof com.yupptv.ott.fragments.a1) && !(j03 instanceof com.yupptv.ott.fragments.q0) && ((com.yupptv.ott.fragments.a1) j02).w0) {
c4();
z(true);
getSupportFragmentManager().e1();
return;
}
if (j02 != null && (j02 instanceof mc.b)) {
String u2 = this.Q2.u("onBackpress");
if (!this.b3.equals(this.a3)) {
this.b3.setTo(getResources().getConfiguration());
k4();
return;
} else if (u2 != null && !u2.isEmpty()) {
this.Q2.O("onBackpress");
k4();
return;
}
}
if (j02 != null && (j02 instanceof com.yupptv.ott.fragments.u1)) {
com.yupptv.ott.fragments.u1 u1Var = (com.yupptv.ott.fragments.u1) j02;
if (u1Var.z0 != null) {
cc.e.n().R(u1Var.z0);
cc.e.n().L("carousel");
}
}
getSupportFragmentManager().q0();
if (j02 != null && (j02 instanceof com.yupptv.ott.fragments.r1)) {
com.yupptv.ott.fragments.r1 r1Var = (com.yupptv.ott.fragments.r1) j02;
if (r1Var.T.v()) {
r1Var.i = true;
r1Var.T.o();
r1Var.T.m.setVisibility(8);
ImageView imageView = this.R;
if (imageView == null || imageView.getVisibility() != 0) {
z(true);
return;
}
z(false);
if (r1Var.o0 != null) {
cc.e.n().R(r1Var.o0);
}
cc.e.n().L("carousel");
}
}
if (j02 instanceof mc.l) {
mc.l lVar = (mc.l) j02;
if (lVar.K0()) {
lVar.b1();
this.O2 = !this.O2;
p4();
return;
}
}
if (L2()) {
return;
}
if (j02 == null || !(j02 instanceof xc.b) || hd.e0.h0(this)) {
if (this.o1) {
if (com.yupptv.ott.a.o) {
hd.w.e();
hd.w.r();
}
if (OttSDK.getInstance() != null) {
OttSDK.getInstance().cancelAllRequests();
}
super/*androidx.activity.ComponentActivity*/.onBackPressed();
return;
}
if (this.n1 != null && (tabLayout = this.N0) != null && tabLayout.getSelectedTabPosition() != 0) {
new Handler().postDelayed(new g0(), 10L);
return;
}
this.o1 = true;
Toast.makeText((Context) this, (CharSequence) getResources().getString(2131951708), 0).show();
new Handler().postDelayed(new h0(), 3000L);
}
}
@Override
public void onClick(View view) {
int id2 = view.getId();
if (id2 == 2131429644) {
DrawerLayout drawerLayout = this.l;
if (drawerLayout != null) {
drawerLayout.h();
}
f5(cc.d.c0);
F3(false, null, new String[0]);
}
switch (id2) {
case 2131429513:
case 2131429514:
DrawerLayout drawerLayout2 = this.l;
if (drawerLayout2 != null) {
drawerLayout2.h();
}
f5(cc.d.t);
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
String str = hd.r.i;
ScreenType screenType = ScreenType.SIGNIN;
intent.putExtra(str, screenType);
intent.putExtra(hd.r.y0, screenType.getValue());
intent.putExtra(hd.r.C0, cc.d.t);
startActivity(intent);
break;
case 2131429515:
DrawerLayout drawerLayout3 = this.l;
if (drawerLayout3 != null) {
drawerLayout3.h();
}
f5(cc.d.v);
if (!this.V1) {
this.V1 = true;
Z4();
break;
}
break;
case 2131429516:
DrawerLayout drawerLayout4 = this.l;
if (drawerLayout4 != null) {
drawerLayout4.h();
}
f5(cc.d.u);
Intent intent2 = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent2.putExtra(hd.r.y0, "home");
intent2.putExtra(hd.r.i, ScreenType.SIGNUP2);
intent2.putExtra(hd.r.C0, cc.d.u);
startActivity(intent2);
break;
}
}
public void onConfigurationChanged(@NonNull Configuration configuration) {
t2 t2Var;
super.onConfigurationChanged(configuration);
Fragment j02 = getSupportFragmentManager().j0(2131427847);
Fragment j03 = getSupportFragmentManager().j0(2131428004);
hd.a0 a0Var = this.Q2;
if (a0Var != null && a0Var.u("isThemeEnable") != null && this.Q2.u("isThemeEnable").equalsIgnoreCase("true")) {
this.e3 = true;
this.Q2.C("isConfigurationChanged", true);
int m2 = this.Q2.m("defaultThemeValue");
int i2 = this.R2;
ThemeEnum themeEnum = ThemeEnum.SYSTEM_DEFAULT_THEME;
if (i2 == themeEnum.getValue()) {
this.b3 = new Configuration(configuration);
}
if (j02 != null && !(j02 instanceof mc.b) && this.R2 == themeEnum.getValue()) {
if (this.d3 != m2) {
k4();
return;
}
this.c3 = new Configuration(configuration);
}
if (j02 != null && (j02 instanceof mc.b)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
mc.b bVar = new mc.b();
androidx.fragment.app.d0 q2 = supportFragmentManager.q();
q2.q(2131427847, bVar);
q2.i();
}
}
if (!OTTApplication.k0) {
if (j02 != null && (j02 instanceof t2) && (t2Var = this.n1) != null) {
t2Var.B0();
}
if ((j02 != null && (j02 instanceof com.yupptv.ott.fragments.q0)) || (j03 != null && (j03 instanceof com.yupptv.ott.fragments.q0))) {
n5();
}
}
if (OTTApplication.k0 || j02 == null || !(j02 instanceof xc.b) || !hd.e.T.equalsIgnoreCase("chaupal")) {
return;
}
((xc.b) j02).r0();
}
protected void onCreate(Bundle bundle) {
Configs c3;
E4();
super/*androidx.fragment.app.h*/.onCreate(bundle);
this.x2 = false;
setContentView(2131623969);
this.J2 = (int) getResources().getDimension(2131166083);
com.yupptv.ott.activity.a.d = (RelativeLayout) findViewById(2131427573);
MobileAds.initialize(this);
MobileAds.initialize(this, new k());
OTTApplication.y();
this.Q2 = hd.a0.y(this);
this.X2 = new Configuration(getResources().getConfiguration());
if (com.yupptv.ott.a.d) {
N2();
} else if (Build.VERSION.SDK_INT >= 33) {
androidx.core.app.b.h(this, new String[]{"android.permission.POST_NOTIFICATIONS"}, 1);
}
try {
hd.b.e(this);
} catch (Exception unused) {
}
this.G2 = (FrameLayout) findViewById(2131427847);
X3();
Fade fade = new Fade();
fade.excludeTarget(R.id.statusBarBackground, true);
fade.excludeTarget(R.id.navigationBarBackground, true);
if (Build.VERSION.SDK_INT >= 21) {
getWindow().setExitTransition(fade);
getWindow().setEnterTransition(fade);
}
hd.a0 a0Var = this.Q2;
if (a0Var != null) {
com.yupptv.ott.a.i = a0Var.e("wifi_enable_key").booleanValue();
}
this.Y1 = (int) getResources().getDimension(2131166219);
this.p3 = new Handler();
this.e2 = (RelativeLayout) findViewById(2131428651);
this.e = findViewById(2131429800);
this.f = (TextView) findViewById(2131429820);
this.k = findViewById(2131429813);
this.Z = (ImageView) findViewById(2131429815);
this.h0 = findViewById(2131429799);
this.f1 = (LinearLayout) findViewById(2131429810);
this.Y = (ImageView) findViewById(2131429811);
this.e0 = (ImageView) findViewById(2131428888);
this.f0 = (ImageView) findViewById(2131428634);
this.i0 = (TextView) findViewById(2131429812);
this.j0 = (TextView) findViewById(2131429816);
this.K = findViewById(2131429798);
this.L = findViewById(2131429797);
this.k0 = (TextView) findViewById(2131429818);
this.f2 = (RelativeLayout) findViewById(2131429814);
this.g2 = (TextView) findViewById(2131429805);
this.h2 = (TextView) findViewById(2131429806);
this.M = (ImageView) findViewById(2131429804);
this.m2 = (ImageView) findViewById(2131429807);
this.Q0 = findViewById(2131429836);
this.R0 = findViewById(2131429837);
this.S0 = findViewById(2131429680);
this.R0.setVisibility(8);
this.N = (ImageView) findViewById(2131429808);
this.G = (LinearLayout) findViewById(2131428415);
this.O = (ImageView) findViewById(2131429809);
this.R = (ImageView) findViewById(2131429432);
this.S = (ImageView) findViewById(2131429664);
this.U = (ImageView) findViewById(2131428873);
this.H = (LinearLayout) findViewById(2131429817);
this.V = (ImageView) findViewById(2131429821);
this.m0 = (TextView) findViewById(2131429822);
this.T = (ImageView) findViewById(2131428400);
this.j = (TextView) findViewById(2131429869);
this.R.setVisibility(8);
this.d2 = (RelativeLayout) findViewById(2131427390);
this.i2 = (TextView) findViewById(2131429926);
this.k2 = (RelativeLayout) findViewById(2131428574);
this.l2 = (ImageView) findViewById(2131428573);
RelativeLayout relativeLayout = (RelativeLayout) findViewById(2131429528);
LinearLayout linearLayout = (LinearLayout) findViewById(2131429520);
this.o2 = (ImageView) findViewById(2131429921);
this.p2 = (ImageView) findViewById(2131429928);
this.j2 = (TextView) findViewById(2131429931);
this.n2 = (ImageView) findViewById(2131429373);
this.R2 = this.Q2.m(this.W2);
this.N1 = findViewById(2131429090);
this.q0 = findViewById(2131429086);
this.g0 = (ImageView) findViewById(2131429087);
this.l0 = (TextView) findViewById(2131429088);
this.g3 = findViewById(2131429083);
this.l3 = (TextView) findViewById(2131428003);
this.c3 = getResources().getConfiguration();
this.e3 = this.Q2.e("isConfigurationChanged").booleanValue();
OTTApplication.H();
if (com.yupptv.ott.a.h || hd.d.s) {
this.U.setVisibility(0);
if (OTTApplication.w() != null) {
this.Z2 = OTTApplication.w().C();
}
} else {
this.U.setVisibility(8);
this.Z2 = "ENG";
}
if (this.L2 == null) {
x2();
}
hd.h.a("display_language2", "display_language " + this.Z2);
A5(this.Z2);
this.d3 = this.Q2.m("defaultThemeValue");
hd.a0 a0Var2 = this.Q2;
if (a0Var2 != null && a0Var2.u("isThemeEnable") != null && this.Q2.u("isThemeEnable").equalsIgnoreCase("true") && this.Q2.e("enableTheme").booleanValue() && !this.Q2.e("weburl_theme_key").booleanValue()) {
hd.h.a("Configuration>>", "currentConfigBeforeChange" + this.d3);
}
a.C0133a c0133a = hd.a.a;
if (c0133a.c(OTTApplication.o()) != null && (c3 = c0133a.c(OTTApplication.o())) != null && c3.getSupportDayNightTheme() != null) {
this.Q2.T("isThemeEnable", c3.getSupportDayNightTheme());
}
this.H.setVisibility(8);
this.R.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.h3(view);
}
});
this.m2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.i3(view);
}
});
View decorView = getWindow().getDecorView();
ViewGroup viewGroup = (ViewGroup) decorView.findViewById(R.id.content);
Drawable background = decorView.getBackground();
this.Q0.c(viewGroup, new sd.i(this)).d(background).a(D2()).g(20.0f);
this.Q0.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
this.Q0.setClipToOutline(true);
this.R0.c(viewGroup, new sd.i(this)).d(background).a(D2()).g(20.0f);
this.R0.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
this.R0.setClipToOutline(true);
this.d2.setOnClickListener(new c0());
this.P = (ImageView) findViewById(2131429217);
if (hd.e.T.equalsIgnoreCase("chaupal")) {
this.f2.setBackground(null);
this.P.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.j3(view);
}
});
User loggedUser = hd.a.r(OTTApplication.o()).getLoggedUser();
if (loggedUser == null || (loggedUser.getPackages() != null && loggedUser.getPackages().isEmpty())) {
this.P.setVisibility(0);
}
final String str = "https://paas-init.revlet.net/clients/chaupal/test/toolbarlottie.json";
if (!TextUtils.isEmpty("https://paas-init.revlet.net/clients/chaupal/test/toolbarlottie.json")) {
LottieDrawable lottieDrawable = this.Q;
if (lottieDrawable != null) {
lottieDrawable.r();
}
this.Q = new LottieDrawable();
final Handler handler = new Handler();
new Handler().post(new Runnable() {
@Override
public final void run() {
MainActivity.this.o3(str, handler);
}
});
}
}
this.S.setOnClickListener(new j0());
this.U.setOnClickListener(new u0());
if (!com.yupptv.ott.a.h) {
this.W = "ENG";
} else if (OTTApplication.w() != null) {
this.W = OTTApplication.w().C();
}
v5();
this.T.setOnClickListener(new e1());
setSupportActionBar(this.e);
relativeLayout.setVisibility(0);
linearLayout.setVisibility(8);
getSupportActionBar().t(false);
getSupportActionBar().z(false);
this.e.setVisibility(8);
this.e.setNavigationIcon((Drawable) null);
getSupportActionBar().k();
this.Z.setOnClickListener(new n1());
this.j0.setOnClickListener(new x1());
this.T0 = (RelativeLayout) findViewById(2131428196);
AppCompatButton findViewById = findViewById(2131429892);
this.V0 = findViewById;
findViewById.setOnClickListener(new d2());
this.w0 = (ImageView) findViewById(2131428301);
this.N0 = (TabLayout) findViewById(com.yupptv.ott.a.S ? 2131428921 : 2131428973);
BlurView findViewById2 = findViewById(2131427606);
this.O0 = findViewById2;
if (!OTTApplication.k0) {
ViewGroup.LayoutParams layoutParams = findViewById2.getLayoutParams();
layoutParams.width = (int) getResources().getDimension(2131166670);
this.O0.setLayoutParams(layoutParams);
}
this.P0 = findViewById(2131427969);
this.O0.c(viewGroup, new sd.i(this)).d(background).g(20.0f);
this.O0.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
this.O0.setClipToOutline(true);
this.P0.c(viewGroup, new sd.i(this)).d(background).g(20.0f);
this.P0.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
this.P0.setClipToOutline(true);
this.N0.d(this.n3);
this.M0 = (FrameLayout) findViewById(2131427847);
this.Z1 = new hd.y(this);
this.E1 = ec.c.A(this);
this.I1 = (RelativeLayout) findViewById(2131427621);
this.J1 = (MiniController) findViewById(2131427768);
this.D1 = (MiniController) findViewById(2131428756);
ViewStub viewStub = (ViewStub) findViewById(2131428755);
if (hd.g0.b(this)) {
viewStub.inflate();
}
this.Y.setOnClickListener(new a());
this.e0.setOnClickListener(new b());
this.f0.setOnClickListener(new c());
this.i0.setOnClickListener(new d());
this.K.setOnClickListener(new e());
this.L.setOnClickListener(new f());
DrawerLayout findViewById3 = findViewById(2131428058);
this.l = findViewById3;
androidx.appcompat.app.b bVar = new androidx.appcompat.app.b(this, findViewById3, this.e, 2131952493, 2131952492);
this.m = bVar;
this.l.a(bVar);
this.m.j();
this.l.a(new g());
this.l.setOnClickListener(new h());
w5();
try {
this.F = getIntent().getExtras().getBoolean("fromSignup");
if (getIntent().getExtras().containsKey(hd.r.y0) && getIntent().getExtras().getString(hd.r.y0).equalsIgnoreCase("content_filter")) {
getIntent().removeExtra(hd.r.y0);
this.x2 = true;
F3(false, "buy/packages-list", new String[0]);
}
} catch (Exception unused2) {
}
if (getIntent() != null && getIntent().hasExtra("isRestarted")) {
B3 = getIntent().getBooleanExtra("isRestarted", false);
}
try {
Bundle bundleExtra = getIntent().getBundleExtra("NOTIFICATION_DATA");
if (bundleExtra != null) {
this.t2 = (OfflineDownloadData) bundleExtra.getParcelable(hd.r.R1);
this.u2 = bundleExtra.containsKey("SERVICES_COMING_NOTIFICATION") ? bundleExtra.getBoolean("SERVICES_COMING_NOTIFICATION") : false;
this.v2 = bundleExtra.containsKey("SERVICES_COMING_CANCEL_NOTIFICATION") ? bundleExtra.getBoolean("SERVICES_COMING_CANCEL_NOTIFICATION") : false;
G3 = bundleExtra.containsKey("USER_ID") ? bundleExtra.getString("USER_ID") : "";
getIntent().removeExtra("NOTIFICATION_DATA");
}
} catch (Exception unused3) {
this.u2 = false;
this.v2 = false;
}
this.d1 = findViewById(2131429934);
this.e1 = findViewById(2131429933);
this.S2 = findViewById(2131428633);
this.U2 = (LinearLayout) findViewById(2131429930);
this.V2 = (RelativeLayout) findViewById(2131429929);
TextView textView = (TextView) this.d1.findViewById(2131429514);
AppCompatButton findViewById4 = this.d1.findViewById(2131429513);
AppCompatButton findViewById5 = this.d1.findViewById(2131429516);
this.T2 = (ImageView) this.e1.findViewById(2131429255);
this.h = (TextView) this.e1.findViewById(2131429935);
this.g = (TextView) this.e1.findViewById(2131429909);
this.i = (TextView) this.e1.findViewById(2131429879);
this.I = findViewById(2131429515);
this.J = findViewById(2131429644);
Typeface g3 = androidx.core.content.res.h.g(this, 2131296258);
this.L0 = androidx.core.content.res.h.g(this, 2131296261);
findViewById4.setTypeface(g3);
findViewById5.setTypeface(g3);
textView.setOnClickListener(this);
findViewById4.setOnClickListener(this);
findViewById5.setOnClickListener(this);
this.e1.setOnClickListener(this);
this.I.setOnClickListener(this);
this.J.setOnClickListener(this);
if (hd.e.p) {
this.V2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.p3(view);
}
});
this.S2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
MainActivity.this.q3(view);
}
});
}
this.B0 = findViewById(2131429326);
this.B0.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
this.B0.setItemAnimator(new androidx.recyclerview.widget.e());
this.D0 = new bc.t(this, ListType.MAIN_MENU, "", "", false, null);
this.H0 = (TextView) findViewById(2131429947);
this.I0 = (TextView) findViewById(2131428007);
this.H0.setText(getResources().getString(2131952957) + ": 204(3.2)" + hd.e0.c0(this));
TextView textView2 = this.I0;
StringBuilder sb2 = new StringBuilder();
sb2.append(getResources().getString(2131951994));
sb2.append(" ");
sb2.append(DeviceUtils.deviceManufacturer);
sb2.append(", ");
sb2.append(DeviceUtils.os_version);
textView2.setText(sb2.toString());
ProgressBar progressBar = (ProgressBar) findViewById(2131428059);
this.C0 = progressBar;
progressBar.setVisibility(8);
this.e.setNavigationOnClickListener(new i());
this.o = (AppBarLayout) findViewById(2131427504);
this.n = (CollapsingToolbarLayout) findViewById(2131427800);
this.c2 = getResources().getDisplayMetrics().widthPixels;
WatchWhileLayout watchWhileLayout = (WatchWhileLayout) findViewById(2131429993);
this.p = watchWhileLayout;
watchWhileLayout.setListener(this);
this.C = (FrameLayout) findViewById(2131429166);
this.s = new tc.i();
getSupportFragmentManager().q().q(2131429166, this.s).j();
a.C0133a c0133a2 = hd.a.a;
Configs c4 = c0133a2.c(OTTApplication.o());
if (c4 != null) {
String playLastChannelOnLaunch = c4.getPlayLastChannelOnLaunch();
hd.a0.y(this.Y2).L(true);
String u2 = hd.a0.y(this).u("lastchannel");
Bundle extras = getIntent() != null ? getIntent().getExtras() : null;
if (playLastChannelOnLaunch != null && playLastChannelOnLaunch.equalsIgnoreCase("true") && u2 != null && u2.trim().length() > 0 && extras != null && extras.getBoolean("splashscreen")) {
hd.e.n = Boolean.TRUE;
c0133a2.f(OTTApplication.o()).getPageContent(u2, new j());
}
}
String homeTestButtonText = c4.getHomeTestButtonText() != null ? c4.getHomeTestButtonText() : "Study Material";
this.h0.setText(homeTestButtonText);
String homePageTestUrl = c4.getHomePageTestUrl() != null ? c4.getHomePageTestUrl() : "";
this.h0.setVisibility(8);
this.h0.setOnClickListener(new l(homeTestButtonText, homePageTestUrl));
if (hd.e0.j) {
this.B1 = hd.g0.b(this);
} else {
this.B1 = false;
}
try {
if (this.B1) {
this.y1 = CastContext.getSharedInstance(this).getSessionManager();
this.z1 = CastContext.getSharedInstance(this);
}
} catch (Exception unused4) {
}
getSupportFragmentManager().l(new m());
if (com.yupptv.ott.a.w) {
this.N.setVisibility(0);
}
this.N.setOnClickListener(new n());
if (!com.yupptv.ott.a.w) {
this.l.setDrawerLockMode(1);
}
this.D0.y(new o(c4));
N5();
z4(false);
V4();
S2();
hd.a0 y2 = hd.a0.y(this);
int i2 = hd.e0.b ? 500 : 50;
if (hd.e0.h0(this) || y2 == null || !y2.i().booleanValue()) {
hd.e0.y0();
hd.d.a();
} else {
new Handler().postDelayed(new p(), i2);
}
a.C0133a c0133a3 = hd.a.a;
User loggedUser2 = c0133a3.g(OTTApplication.o()).getLoggedUser();
if (loggedUser2 != null && G3.equals(loggedUser2.getUserId().toString())) {
OfflineDownloadData offlineDownloadData = this.t2;
if (offlineDownloadData != null && this.u2) {
new Handler().postDelayed(new q(), i2);
} else if (offlineDownloadData != null && this.v2) {
new Handler().postDelayed(new r(), i2);
}
}
if (loggedUser2 != null && loggedUser2.getUserId() != null && !y2.e("greendaoDB_Version").booleanValue()) {
hd.e0.M(this);
}
if (c0133a3.g(OTTApplication.o()).getLoggedUser() == null || !Y4()) {
m5();
} else {
b2();
}
if (!y2.e("greendaoDB_Version").booleanValue()) {
y2.C("greendaoDB_Version", Boolean.TRUE);
}
HashMap hashMap = new HashMap();
hd.h.b("TAG", "#ATTRIBUTE_SOURCE_MENU : " + this.S1);
cc.c.d().m(ScreenType.HOME, null, null, null, this.S1, null, hashMap);
this.k.setOnClickListener(new s());
this.x0.setOnClickListener(new t());
this.y0.setOnClickListener(new u());
this.g3.setOnClickListener(new v());
new e2(this).execute(new Void[0]);
if (!y2.e("interstitial_static_popup").booleanValue()) {
P4();
}
hd.h.a(this.i3, "IS_FROM_BRANCH_IO_DEEPLINK : " + OTTApplication.f0);
if (OTTApplication.f0 && com.yupptv.ott.a.l) {
OTTApplication.f0 = false;
hd.h.a(this.i3, "IS_FROM_BRANCH_IO_DEEPLINK : ");
Y3();
}
}
public boolean onCreateOptionsMenu(android.view.Menu menu) {
getMenuInflater().inflate(2131689474, menu);
menu.findItem(2131429431).setVisible(false);
this.r3 = menu.findItem(2131428698);
this.q3 = menu.findItem(2131428699);
if (this.B1) {
CastButtonFactory.setUpMediaRouteButton(getApplicationContext(), menu, 2131428698);
}
menu.findItem(2131428698).getActionView();
this.q3.setVisible(this.E1.G());
if (this.E1.K()) {
ec.e.f().h(false);
this.q3.setIcon(2131231701);
} else {
this.r3.setVisible(true);
ec.e.f().h(true);
this.q3.setIcon(2131231697);
if (ec.e.f().g()) {
this.q3.setVisible(false);
}
}
this.q3.setVisible(false);
return true;
}
public void onDestroy() {
Runnable runnable;
AdManagerAdView adManagerAdView = this.I2;
if (adManagerAdView != null) {
adManagerAdView.destroy();
}
Fragment fragment = this.s;
if (fragment != null) {
((tc.i) fragment).I1();
}
super.onDestroy();
if (B3) {
B3 = false;
return;
}
xc.a aVar = this.s2;
if (aVar != null) {
aVar.o(this);
}
Handler handler = this.j3;
if (handler == null || (runnable = this.k3) == null) {
return;
}
handler.removeCallbacks(runnable);
}
protected void onNewIntent(Intent intent) {
String str;
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
hd.h.b(this.i3, "onNewIntent");
if (intent != null && intent.hasExtra("fromdeeplink") && (str = OTTApplication.A) != null) {
cc.e.n().M("Share");
hd.u.t0(this, str);
OTTApplication.A = "";
}
if (this.B1) {
E1();
this.y1.addSessionManagerListener(this.A1);
CastSession castSession = this.x1;
if (castSession != null && castSession.isConnected()) {
k5(true);
}
}
if (intent != null) {
try {
Bundle bundleExtra = getIntent().getBundleExtra("NOTIFICATION_DATA");
if (bundleExtra != null) {
this.t2 = (OfflineDownloadData) bundleExtra.getParcelable(hd.r.R1);
this.u2 = bundleExtra.containsKey("SERVICES_COMING_NOTIFICATION") ? bundleExtra.getBoolean("SERVICES_COMING_NOTIFICATION") : false;
this.v2 = bundleExtra.containsKey("SERVICES_COMING_CANCEL_NOTIFICATION") ? bundleExtra.getBoolean("SERVICES_COMING_CANCEL_NOTIFICATION") : false;
G3 = bundleExtra.containsKey("USER_ID") ? bundleExtra.getString("USER_ID") : "";
}
} catch (Exception unused) {
this.u2 = false;
this.v2 = false;
}
OfflineDownloadData offlineDownloadData = this.t2;
if (offlineDownloadData == null || !this.v2) {
if (offlineDownloadData == null || !this.u2 || hd.a.a.g(OTTApplication.o()).getLoggedUser() == null) {
return;
}
new Handler().postDelayed(new a0(), 500L);
return;
}
hd.h.b("SSA>>", "onCancelDownload2" + this.v2 + "mTargetPath" + this.t2);
try {
xc.a aVar = this.s2;
if (aVar != null) {
aVar.k(intent, this);
}
} catch (Exception unused2) {
}
if (hd.a.a.g(OTTApplication.o()).getLoggedUser() != null) {
new Handler().postDelayed(new z(), 500L);
}
}
}
public boolean onOptionsItemSelected(MenuItem menuItem) {
return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
}
public void onPause() {
hd.u.B0(this);
this.P2 = false;
SessionManager sessionManager = this.y1;
if (sessionManager != null) {
sessionManager.removeSessionManagerListener(this.A1);
}
this.x1 = null;
AdManagerAdView adManagerAdView = this.I2;
if (adManagerAdView != null) {
adManagerAdView.pause();
}
super/*androidx.fragment.app.h*/.onPause();
}
public void onPictureInPictureModeChanged(boolean z2, Configuration configuration) {
if (!z2) {
A3 = false;
if (this.D2) {
this.D2 = false;
unregisterReceiver(this.C2);
this.C2 = null;
}
cc.b.B0().P1(this.D == 2 ? "mini" : "full");
return;
}
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout != null) {
watchWhileLayout.slideTo(1);
}
cc.b.B0().P1("pip");
A3 = true;
this.C2 = new q1();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("media_control");
intentFilter.addAction("media_rewind_control");
if (!this.D2) {
hd.h.b("Mainactivity>>", "mRegistered in if" + this.D2);
if (Build.VERSION.SDK_INT >= 33) {
registerReceiver(this.C2, intentFilter, 2);
} else {
registerReceiver(this.C2, intentFilter);
}
this.D2 = true;
}
hd.h.b("Mainactivity>>", "mRegistered" + this.D2);
}
public void onRadioButtonClicked(View view) {
((RadioButton) view).isChecked();
}
public void onRequestPermissionsResult(int i2, @NonNull String[] strArr, @NonNull int[] iArr) {
super/*androidx.fragment.app.h*/.onRequestPermissionsResult(i2, strArr, iArr);
if (i2 == 1) {
for (int i3 = 0; i3 < strArr.length; i3++) {
String str = strArr[i3];
int i4 = iArr[i3];
str.equals("android.permission.POST_NOTIFICATIONS");
}
}
}
public void onResume() {
E4();
super/*androidx.fragment.app.h*/.onResume();
hd.u.C0(this);
e4();
TabLayout tabLayout = this.N0;
if (tabLayout != null && tabLayout.getSelectedTabPosition() != -1 && this.x2 && this.N0.getSelectedTabPosition() == t2("plans")) {
TabLayout tabLayout2 = this.N0;
tabLayout2.H(tabLayout2.z(t2("home")));
this.x2 = false;
}
AdManagerAdView adManagerAdView = this.I2;
if (adManagerAdView != null) {
adManagerAdView.resume();
}
N1(null);
this.P2 = true;
if (this.B1) {
E1();
this.y1.addSessionManagerListener(this.A1);
}
this.E1.p(this.t3);
this.E1.r(this.s3);
this.E1.s(this.D1);
HashMap<String, sc.b> hashMap = hd.e0.o;
if (hashMap == null || hashMap.size() != 0) {
return;
}
hd.u.m(OttSDK.getInstance());
}
protected void onStart() {
super.onStart();
}
public void onStop() {
Runnable runnable;
super.onStop();
Handler handler = this.j3;
if (handler == null || (runnable = this.k3) == null) {
return;
}
handler.removeCallbacks(runnable);
}
public void onTrimMemory(int i2) {
Fragment fragment;
super/*androidx.activity.ComponentActivity*/.onTrimMemory(i2);
try {
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
ActivityManager.getMyMemoryState(runningAppProcessInfo);
int i3 = runningAppProcessInfo.importance;
boolean z2 = i3 != 100;
if (i3 != 100 && (fragment = this.s) != null) {
((tc.i) fragment).g2 = false;
}
if ((i2 == 80 || i2 == 60) && z2) {
startActivity(getIntent());
}
} catch (Exception unused) {
}
}
public void onUserLeaveHint() {
Configs c3;
if (!getPackageManager().hasSystemFeature("android.software.picture_in_picture") || (c3 = hd.a.a.c(OTTApplication.o())) == null || c3.getIsPictureInPictureEnabled() == null || !c3.getIsPictureInPictureEnabled().equalsIgnoreCase("true") || Build.VERSION.SDK_INT < 26) {
return;
}
this.B2 = new PictureInPictureParams.Builder();
x5(2131231906, this.F2, 2, 2);
if (isInPictureInPictureMode()) {
return;
}
int i2 = this.D;
if (1 == i2 || 2 == i2) {
Fragment fragment = this.s;
if (((tc.i) fragment) == null || ((tc.i) fragment).g0 == null || !((tc.i) fragment).g0.getPlayWhenReady()) {
return;
}
((tc.i) this.s).H3(this.y3);
Fragment fragment2 = this.s;
if (((tc.i) fragment2) != null) {
((tc.i) fragment2).H2();
}
enterPictureInPictureMode(this.B2.build());
}
}
public void onWindowFocusChanged(boolean z2) {
super/*android.app.Activity*/.onWindowFocusChanged(z2);
hd.h.b("Mainactivity", "Window focus changes : has focus " + z2 + " player state " + this.D);
v5();
}
public HashMap<String, Boolean> p2() {
return this.u1;
}
public void p4() {
a.C0133a c0133a = hd.a.a;
if (c0133a.g(OTTApplication.o()) == null || c0133a.g(OTTApplication.o()).getLoggedUser() == null) {
this.n2.setBackground(getResources().getDrawable(2131232281));
} else if (this.O2) {
this.n2.setBackground(getResources().getDrawable(2131231913));
} else {
this.n2.setBackground(getResources().getDrawable(2131231595));
}
}
public void p5() {
if (hd.e0.h0(this)) {
wc.a aVar = this.A;
if (aVar != null) {
aVar.V0();
}
Fragment fragment = this.s;
if (fragment != null) {
((tc.i) fragment).t4();
}
}
}
@Override
public void q() {
this.Z0 = null;
this.R1 = "";
}
public int q2() {
NestedScrollView nestedScrollView = this.o0;
if (nestedScrollView != null) {
return nestedScrollView.getMeasuredHeight() * 2;
}
return 0;
}
public void q4(id.b bVar) {
this.x = bVar;
}
public void q5() {
this.x1 = this.z1.getSessionManager().getCurrentCastSession();
CastContext castContext = this.z1;
if (castContext != null && castContext.getCastState() == 4) {
N3();
return;
}
this.K1 = true;
CastSession castSession = this.x1;
if (castSession != null && castSession.getRemoteMediaClient() != null && this.x1.getRemoteMediaClient().getMediaInfo() != null) {
this.x1.getRemoteMediaClient().getMediaInfo().getContentId();
if (this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getStreamDuration() > 0) {
this.H1 = this.z1.getSessionManager().getCurrentCastSession().getRemoteMediaClient().getApproximateStreamPosition();
} else {
this.H1 = 0L;
}
}
OttLog.error("itemObjTemp", "++++++++++" + this.G1);
Object obj = this.G1;
try {
if (obj != null) {
if (a3(obj)) {
try {
Fragment fragment = this.s;
if (fragment instanceof tc.i) {
((tc.i) fragment).G = true;
}
} catch (Exception unused) {
}
((tc.i) this.s).F2();
H2(this.G1);
return;
}
Fragment fragment2 = this.s;
if (fragment2 == null || !(fragment2 instanceof tc.i)) {
return;
}
((tc.i) fragment2).C2();
return;
}
if (this.F1 != null || obj != null || F3 == null) {
if (w2() <= 0 || this.p == null) {
return;
}
if (w2() != 1) {
this.p.exitPlayer(this.x1);
return;
} else {
this.p.exitFullscreenToMinimize();
this.p.exitPlayer(this.x1);
return;
}
}
com.google.gson.d dVar = new com.google.gson.d();
ContentPage contentPage = (ContentPage) dVar.h(F3.toString(), ContentPage.class);
ContentPage contentPage2 = (contentPage == null || contentPage.getPageInfo() == null) ? (Card) dVar.h(F3.toString(), Card.class) : null;
if (contentPage == null || contentPage.getPageInfo() == null) {
contentPage = contentPage2;
}
if (!a3(contentPage)) {
Fragment fragment3 = this.s;
if (fragment3 == null || !(fragment3 instanceof tc.i)) {
return;
}
((tc.i) fragment3).C2();
return;
}
try {
Fragment fragment4 = this.s;
if (fragment4 instanceof tc.i) {
((tc.i) fragment4).G = true;
}
} catch (Exception unused2) {
}
if (w2() != 0) {
H2(contentPage);
}
} catch (Exception unused3) {
}
}
@Override
public void r(Object obj, int i2) {
boolean z2;
if (obj == null || !(obj instanceof ContentPage)) {
return;
}
Y1(false, "");
this.J0.setVisibility(0);
this.z0.setVisibility(0);
int i3 = 0;
while (true) {
ContentPage contentPage = (ContentPage) obj;
if (i3 >= contentPage.getPageData().size()) {
return;
}
PageData pageData = (PageData) contentPage.getPageData().get(i3);
PageInfo pageInfo = contentPage.getPageInfo();
if (pageData.getPaneType().equalsIgnoreCase("content")) {
this.r0.setVisibility(0);
this.p0.setVisibility(0);
this.o0.setVisibility(8);
if (pageInfo == null || pageInfo.getAttributes() == null || pageInfo.getAttributes().getContentType() == null || !pageInfo.getAttributes().getContentType().equalsIgnoreCase("movie")) {
if (pageInfo == null || pageInfo.getAttributes() == null || pageInfo.getAttributes().getContentType() == null || !pageInfo.getAttributes().getContentType().equalsIgnoreCase("network")) {
this.u0.setVisibility(0);
this.v0.setVisibility(8);
this.F0.setVisibility(0);
this.E0.setVisibility(8);
if (!isFinishing()) {
a.C0133a c0133a = hd.a.a;
if (c0133a.f(OTTApplication.o()) != null) {
try {
com.bumptech.glide.b.v(this).u(c0133a.f(OTTApplication.o()).getImageAbsolutePath(pageData.getContent().getBackgroundImage())).j(2131231139).P0(y2.d.i()).F0(this.u0);
} catch (IllegalArgumentException e3) {
Log.v("error", e3.getMessage());
}
}
}
} else if (hd.a.a.f(OTTApplication.o()) != null && pageData.getContent() != null && pageData.getContent().getDataRows() != null && pageData.getContent().getDataRows().size() > 0) {
this.y0.setVisibility(0);
Iterator it = pageData.getContent().getDataRows().iterator();
while (it.hasNext()) {
for (Content.Elements elements : ((Content.DataRow) it.next()).getElements()) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 == null || !(j02 instanceof com.yupptv.ott.fragments.u0)) {
this.s0.setVisibility(8);
} else {
this.p0.setVisibility(0);
this.u0.setVisibility(0);
this.F0.setVisibility(0);
this.s0.setVisibility(0);
if (elements.getElementType().equalsIgnoreCase("Image") && elements.getElementSubtype().equalsIgnoreCase("bgImage")) {
try {
com.bumptech.glide.b.v(this).u(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(elements.getData())).j(2131231139).P0(y2.d.i()).F0(this.u0);
} catch (IllegalArgumentException e4) {
Log.v("error", e4.getMessage());
}
}
}
}
}
}
z2 = false;
} else {
this.u0.setVisibility(0);
this.v0.setVisibility(8);
this.F0.setVisibility(0);
this.E0.setVisibility(8);
a.C0133a c0133a2 = hd.a.a;
if (c0133a2.f(OTTApplication.o()) != null) {
try {
com.bumptech.glide.b.v(this).u(c0133a2.f(OTTApplication.o()).getImageAbsolutePath(pageData.getContent().getBackgroundImage())).j(2131231140).P0(y2.d.i()).F0(this.u0);
} catch (IllegalArgumentException e5) {
Log.v("error", e5.getMessage());
}
}
z2 = true;
}
R1(pageData.getContent().getDataRows(), z2);
}
i3++;
}
}
public void r5(String str) {
int t2 = t2(str);
if (Z2(str)) {
t2 t2Var = new t2();
this.n1 = t2Var;
this.c1 = t2Var;
getSupportFragmentManager().q().r(2131427847, this.n1, "viewPagerFragment").j();
new Handler().postDelayed(new g1(str, t2), 20L);
return;
}
TabLayout tabLayout = this.N0;
if (tabLayout == null || t2 < 0 || t2 >= tabLayout.getTabCount()) {
return;
}
this.N0.z(t2).m();
}
@Override
public void s() {
CastSession castSession;
OttLog.error("exitMiniPlayer", "exitMiniPlayer");
if (this.B1) {
CastSession castSession2 = this.x1;
if (castSession2 != null && castSession2.isConnected() && this.x1.getRemoteMediaClient() != null && this.x1.getRemoteMediaClient().getMediaStatus() != null) {
int playerState = this.x1.getRemoteMediaClient().getMediaStatus().getPlayerState();
this.x1.getRemoteMediaClient().getMediaStatus();
if (playerState != 1) {
J4(true);
this.p.exitPlayer();
E1();
castSession = this.x1;
if (castSession == null && castSession.isConnected()) {
this.p.exitPlayer();
return;
}
}
}
J4(false);
E1();
castSession = this.x1;
if (castSession == null) {
}
}
}
public Drawable s2(Context context) {
TypedArray obtainStyledAttributes = new ContextThemeWrapper(context, 2132017801).obtainStyledAttributes(null, p0.l.a, 2130969415, 0);
Drawable drawable = obtainStyledAttributes.getDrawable(2);
obtainStyledAttributes.recycle();
return androidx.core.graphics.drawable.a.r(drawable);
}
public void s3(boolean z2) {
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent.putExtra(hd.r.i, ScreenType.VIEW_LANGUAGES);
if (z2) {
startActivityForResult(intent, 17);
} else {
startActivity(intent);
}
}
public void s4(ButtonType buttonType) {
this.n0 = buttonType;
}
public void s5() {
UpNextFragment upNextFragment = this.B;
if (upNextFragment != null) {
upNextFragment.P();
}
}
@Override
public void setTitle(String str) {
G4(str);
}
public void t(Map<String, Object> map, Map<String, Object> map2) {
if (map != null) {
hd.h.b("inAppAfterDismiss:", "extras size : " + map.size());
for (int i2 = 0; i2 < map.size(); i2++) {
hd.h.b("inAppAfterDismiss:", "extras key:value : " + map.get(Integer.valueOf(i2)));
}
}
}
public int t2(String str) {
List<Menu> list = this.Q1;
if (list != null) {
int size = list.size();
for (int i2 = 0; i2 < size; i2++) {
if (str.equalsIgnoreCase(this.Q1.get(i2).getCode())) {
return i2;
}
}
}
return 0;
}
public void t4(Carousel carousel) {
this.z = carousel;
}
public void t5(String str) {
if (str != null) {
this.g1 = str;
} else {
this.g1 = "";
}
}
@Override
public void u() {
tc.j jVar;
t2 t2Var;
List<Menu> list;
WatchWhileLayout watchWhileLayout;
t2 t2Var2;
ExoPlayer exoPlayer;
hd.e.Q = false;
Fragment fragment = this.Z0;
if (fragment != null && (fragment instanceof com.yupptv.ott.fragments.r1) && ((com.yupptv.ott.fragments.r1) fragment).T != null) {
((com.yupptv.ott.fragments.r1) fragment).T.requestFocus();
((com.yupptv.ott.fragments.r1) this.Z0).T.F(false);
((com.yupptv.ott.fragments.r1) this.Z0).T.r();
}
cc.b.B0().P1("mini");
OttLog.error("WWL_minimized", "+++++++++++");
setRequestedOrientation(1);
this.E = BitmapDescriptorFactory.HUE_RED;
this.D = 2;
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof ShortsFragment) {
ShortsFragment shortsFragment = (ShortsFragment) j02;
if (shortsFragment.isVisible()) {
this.p.exitPlayer();
gd.f.F(shortsFragment.i0);
}
}
tc.i iVar = (tc.i) this.s;
iVar.D2();
J5(this.Y1);
iVar.f4.setVisibility(0);
iVar.y4();
if (iVar.T.getVisibility() == 0) {
iVar.T.setVisibility(8);
iVar.i4.setVisibility(8);
iVar.g4.setVisibility(8);
iVar.h4.setVisibility(0);
} else {
ExoPlayer exoPlayer2 = iVar.g0;
if (exoPlayer2 == null || exoPlayer2.getPlayWhenReady()) {
if (iVar.h4.getVisibility() != 8 || iVar.c4) {
iVar.i4.setVisibility(8);
} else {
iVar.i4.setVisibility(0);
}
iVar.g4.setVisibility(8);
} else {
iVar.i4.setVisibility(8);
iVar.g4.setVisibility(0);
}
}
if ((iVar.T1 || ((exoPlayer = iVar.g0) != null && exoPlayer.isPlayingAd())) && (jVar = iVar.D0) != null) {
jVar.X();
}
if (iVar.N.getVisibility() == 0) {
iVar.N.setVisibility(8);
}
if (this.s instanceof tc.i) {
iVar.x();
}
if ((this.s instanceof tc.i) && iVar.Y3.getVisibility() == 0) {
iVar.Y3.setVisibility(8);
}
if ((this.s instanceof tc.i) && iVar.Z3.getVisibility() == 0) {
iVar.Z3.setVisibility(8);
}
if (getSupportFragmentManager().q0() == 0) {
z(true);
}
e5();
s();
if ((getSupportFragmentManager().j0(2131427847) instanceof com.yupptv.ott.fragments.z0) && getSupportFragmentManager().k0("favourites") != null && ((com.yupptv.ott.fragments.z0) getSupportFragmentManager().j0(2131427847)).e0) {
((com.yupptv.ott.fragments.z0) getSupportFragmentManager().j0(2131427847)).a0(false);
}
CastSession castSession = this.x1;
if (castSession == null || !castSession.isConnected()) {
TabLayout tabLayout = this.N0;
if (tabLayout != null && (t2Var = this.n1) != null && (list = t2Var.E) != null && list.get(tabLayout.getSelectedTabPosition()).getCode().equalsIgnoreCase("favourites")) {
this.n1.B0();
}
} else {
OttLog.error("Chromecast connected", "Do not refresh data");
}
if (this.N0 != null && (t2Var2 = this.n1) != null && t2Var2.r0() == 0 && this.l1) {
this.l1 = false;
this.n1.B0();
}
iVar.S3(false);
TabLayout tabLayout2 = this.N0;
if (tabLayout2 == null || tabLayout2.getVisibility() != 0 || (watchWhileLayout = this.p) == null) {
return;
}
watchWhileLayout.addBottomPadding(this, true);
if (U2()) {
this.J2 = (int) getResources().getDimension(2131166082);
} else {
this.J2 = (int) getResources().getDimension(2131166085);
}
r4();
TabLayout tabLayout3 = this.N0;
if (tabLayout3.z(tabLayout3.getSelectedTabPosition()) != null) {
TabLayout tabLayout4 = this.N0;
Z2(tabLayout4.z(tabLayout4.getSelectedTabPosition()).i().toString());
}
}
public String u2() {
String obj;
TabLayout tabLayout = this.N0;
if (tabLayout == null || tabLayout.getVisibility() != 0) {
return cc.c.M1;
}
hd.h.b("getPageEventName", "" + this.N0.getSelectedTabPosition());
obj = this.N0.z(this.N0.getSelectedTabPosition()).i().toString();
obj.hashCode();
switch (obj) {
case "tvguide":
case "guide":
return cc.c.Q;
case "watchlist":
case "my_watchlist":
return cc.c.U;
case "home":
return cc.c.S;
case "catchup":
return cc.c.R;
case "favourites":
return cc.c.V;
case "settings":
return cc.c.X;
default:
return obj;
}
}
public void u3() {
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent.putExtra(hd.r.i, ScreenType.PACKAGES_MAIN);
intent.putExtra(hd.r.y0, "button");
startActivityForResult(intent, 18);
}
public void u4(boolean z2) {
this.v3 = z2;
}
public void v(HashMap<String, String> hashMap) {
O2(hashMap, "InboxButtonClick");
}
public id.r0 v2() {
return this.u;
}
public void v3() {
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent.putExtra(hd.r.i, ScreenType.PAYMENTS);
startActivity(intent);
}
public void v4(Uri uri) {
OTTApplication.A = "";
String path = uri.getPath();
hd.h.b("BranchSDK_Tester", "deeplinkUri " + uri.toString());
hd.h.b("BranchSDK_Tester", "deeplinkUri.getPath " + path);
if (path != null && path.startsWith("/")) {
path = path.replaceFirst("/", "");
}
hd.a0.y(this.Y2).T("appsflyer_data", path);
if (path.contains(hd.e.y) || path.contains("OptionOutViewController") || path.contains(hd.e.w) || path.contains(hd.e.x)) {
OTTApplication.A = "isFromBranchIO";
} else {
OTTApplication.A = path;
}
hd.e.v = false;
}
@Override
public void w(Object obj, int i2) {
TextView textView;
boolean z2;
if (obj == null || !(obj instanceof ContentPage)) {
return;
}
int i3 = 0;
boolean z3 = false;
while (true) {
ContentPage contentPage = (ContentPage) obj;
if (i3 >= contentPage.getPageData().size()) {
return;
}
PageData pageData = (PageData) contentPage.getPageData().get(i3);
PageInfo pageInfo = contentPage.getPageInfo();
ImageView imageView = this.x0;
if (imageView != null) {
imageView.setVisibility(0);
}
if (pageData.getPaneType().equalsIgnoreCase("content")) {
this.r0.setVisibility(8);
this.o0.setVisibility(0);
this.p0.setVisibility(8);
if (pageInfo == null || pageInfo.getAttributes() == null || pageInfo.getAttributes().getContentType() == null || !pageInfo.getAttributes().getContentType().equalsIgnoreCase("movie")) {
if (pageInfo == null || pageInfo.getAttributes() == null || pageInfo.getAttributes().getContentType() == null || !pageInfo.getAttributes().getContentType().equalsIgnoreCase("network")) {
this.t0.setVisibility(0);
this.v0.setVisibility(8);
if (hd.d.x) {
this.E0.setVisibility(0);
this.G0.setVisibility(0);
}
if (hd.a.a.f(OTTApplication.o()) != null) {
String m2 = hd.a.m(OTTApplication.o(), pageData.getContent().getBackgroundImage());
this.x0.setVisibility(0);
Iterator it = pageData.getContent().getDataRows().iterator();
while (it.hasNext()) {
for (Content.Elements elements : ((Content.DataRow) it.next()).getElements()) {
if ("Image".equalsIgnoreCase(elements.getElementType()) && "bgImage".equalsIgnoreCase(elements.getElementSubtype())) {
m2 = hd.a.m(OTTApplication.o(), elements.getData());
} else if ("text".equalsIgnoreCase(elements.getElementType()) && "title".equalsIgnoreCase(elements.getElementSubtype()) && "artist_info".equalsIgnoreCase(elements.getContentCode()) && (textView = this.K0) != null) {
textView.setText(TextUtils.isEmpty(elements.getData()) ? "" : elements.getData());
z3 = true;
}
}
}
try {
com.bumptech.glide.b.v(this).u(m2).j(2131231139).P0(y2.d.i()).g(com.bumptech.glide.load.engine.h.a).F0(this.t0);
} catch (IllegalArgumentException e3) {
Log.v("error", e3.getMessage());
}
}
} else if (hd.a.a.f(OTTApplication.o()) != null && pageData.getContent() != null && pageData.getContent().getDataRows() != null && pageData.getContent().getDataRows().size() > 0) {
this.x0.setVisibility(0);
Iterator it2 = pageData.getContent().getDataRows().iterator();
while (it2.hasNext()) {
for (Content.Elements elements2 : ((Content.DataRow) it2.next()).getElements()) {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
Fragment j03 = getSupportFragmentManager().j0(2131428004);
if ((j02 == null || !(j02 instanceof com.yupptv.ott.fragments.q0)) && (j03 == null || !(j02 instanceof com.yupptv.ott.fragments.q0))) {
this.s0.setVisibility(8);
} else {
this.o0.setVisibility(0);
this.t0.setVisibility(0);
if (hd.d.x) {
this.E0.setVisibility(0);
this.G0.setVisibility(0);
}
this.s0.setVisibility(0);
if (elements2.getElementType().equalsIgnoreCase("Image") && elements2.getElementSubtype().equalsIgnoreCase("bgImage")) {
try {
com.bumptech.glide.b.v(this).u(hd.a.a.f(OTTApplication.o()).getImageAbsolutePath(elements2.getData())).j(2131231139).g(com.bumptech.glide.load.engine.h.a).P0(y2.d.i()).F0(this.t0);
} catch (IllegalArgumentException e4) {
Log.v("error", e4.getMessage());
}
}
}
}
}
}
z2 = false;
} else {
this.t0.setVisibility(0);
this.v0.setVisibility(8);
if (hd.d.x) {
this.E0.setVisibility(0);
this.G0.setVisibility(0);
}
a.C0133a c0133a = hd.a.a;
if (c0133a.f(OTTApplication.o()) != null) {
String a3 = c0133a.a(OTTApplication.o(), pageData.getContent().getBackgroundImage());
Iterator it3 = pageData.getContent().getDataRows().iterator();
while (it3.hasNext()) {
Iterator it4 = ((Content.DataRow) it3.next()).getElements().iterator();
while (true) {
if (it4.hasNext()) {
Content.Elements elements3 = (Content.Elements) it4.next();
if (elements3.getElementType().equalsIgnoreCase("Image") && elements3.getElementSubtype().equalsIgnoreCase("bgImage")) {
a3 = hd.a.m(OTTApplication.o(), elements3.getData());
break;
}
}
}
}
try {
com.bumptech.glide.b.v(this).u(a3).j(2131231139).P0(y2.d.i()).g(com.bumptech.glide.load.engine.h.a).F0(this.t0);
} catch (IllegalArgumentException e5) {
hd.h.b("error", e5.getMessage());
}
}
z2 = true;
}
this.l3.setVisibility(8);
this.P0.setVisibility(8);
if (!z3 || this.r0 == null) {
this.K0.setVisibility(8);
S1(pageData.getContent().getDataRows(), z2);
} else {
this.K0.setVisibility(0);
this.P0.setVisibility(8);
this.E0.setVisibility(8);
this.G0.setVisibility(8);
this.r0.setVisibility(8);
}
}
i3++;
}
}
public int w2() {
return this.D;
}
public void w3() {
hd.u.M(this, ScreenType.PAYMENTS, hd.r.f1, 29, "", "");
}
public void w4(EPGProgramsData ePGProgramsData) {
this.s1 = ePGProgramsData;
}
public void w5() {
hd.h.a("SSA>>", "updateOfflineDownloadList::");
try {
UpNextFragment upNextFragment = this.B;
if (upNextFragment != null) {
upNextFragment.P();
}
} catch (Exception unused) {
}
try {
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof xc.b) {
((xc.b) j02).n0();
}
} catch (Exception unused2) {
}
}
public void x3() {
Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
intent.putExtra(hd.r.i, ScreenType.REDEEM_VOUCHER);
intent.putExtra(hd.r.y0, "button");
startActivityForResult(intent, 18);
}
public void x4(EPG epg) {
this.q1 = epg;
}
void x5(int i2, String str, int i3, int i4) {
try {
ArrayList arrayList = new ArrayList();
if (Build.VERSION.SDK_INT >= 26) {
arrayList.add(new RemoteAction(Icon.createWithResource((Context) this, i2), str, str, PendingIntent.getBroadcast(this, i4, new Intent("media_control").putExtra("control_type", i3), 67108864)));
PictureInPictureParams.Builder builder = this.B2;
if (builder != null) {
builder.setActions(arrayList);
setPictureInPictureParams(this.B2.build());
}
}
} catch (Exception unused) {
}
}
@Override
public void y() {
t2 t2Var;
setRequestedOrientation(1);
J5(0);
cc.b.B0().P1("");
CastSession castSession = this.x1;
if (castSession != null && !castSession.isConnected()) {
this.F1 = null;
this.G1 = null;
}
Fragment j02 = getSupportFragmentManager().j0(2131427847);
if (j02 instanceof ShortsFragment) {
ShortsFragment shortsFragment = (ShortsFragment) j02;
if (shortsFragment.isVisible()) {
gd.f.F(shortsFragment.i0);
z(true);
}
}
if (this.s instanceof tc.i) {
CastSession castSession2 = this.x1;
if ((castSession2 == null || !castSession2.isConnected()) && (t2Var = this.n1) != null && t2Var.r0() == 0 && !this.N2) {
this.l1 = false;
this.n1.B0();
}
((tc.i) this.s).I1();
((tc.i) this.s).g4();
this.W1 = "";
}
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.screenBrightness = -1.0f;
getWindow().setAttributes(attributes);
if (com.yupptv.ott.a.M) {
Fragment j03 = getSupportFragmentManager().j0(2131427847);
if (getSupportFragmentManager().q0() == 0 && ((j03 instanceof com.yupptv.ott.fragments.a1) || (j03 instanceof t2))) {
Y1(true, "");
z(true);
}
new Handler().postDelayed(new s0(), 0L);
}
this.D = 0;
if (U2()) {
this.J2 = (int) getResources().getDimension(2131166083);
} else {
this.J2 = (int) getResources().getDimension(2131166084);
}
r4();
}
public void y3(boolean z2, int i2) {
Q3(new Intent((Context) this, (Class<?>) LoadScreenActivity.class), z2, i2);
}
public void y4(HashMap<String, Boolean> hashMap) {
this.u1 = hashMap;
}
@Override
public void z(boolean z2) {
this.J2 = (int) getResources().getDimension(2131166084);
TabLayout tabLayout = this.N0;
if (tabLayout != null) {
if (z2) {
if (tabLayout.z(tabLayout.getSelectedTabPosition()) != null && !this.L1) {
TabLayout tabLayout2 = this.N0;
Z2(tabLayout2.z(tabLayout2.getSelectedTabPosition()).i().toString());
}
this.J2 = (int) getResources().getDimension(2131166083);
}
WatchWhileLayout watchWhileLayout = this.p;
if (watchWhileLayout != null) {
if (z2) {
watchWhileLayout.addBottomPadding(this, true);
if (this.p.mState == 2) {
this.J2 = (int) getResources().getDimension(2131166082);
}
} else {
watchWhileLayout.addBottomPadding(this, false);
if (this.p.mState == 2) {
this.J2 = (int) getResources().getDimension(2131166085);
}
}
}
this.L1 = false;
this.N0.setVisibility(z2 ? 0 : 8);
this.O0.setVisibility((z2 && com.yupptv.ott.a.S) ? 0 : 8);
if (z2 && this.h1) {
d4();
}
r4();
}
}
public void z3(Intent intent) {
Intent intent2 = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
if (intent.hasExtra(hd.r.m1)) {
intent2.putExtra(hd.r.m1, true);
}
if (intent.hasExtra(hd.r.n1)) {
intent2.putExtra(hd.r.n1, intent.getStringExtra(hd.r.n1));
}
if (intent.hasExtra(hd.r.M1)) {
String str = hd.r.M1;
intent2.putExtra(str, intent.getStringExtra(str));
}
Q3(intent2, true, 10002);
}
}