正在查看: MX Player v1.97.8 应用的 ExoPlayerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MX Player v1.97.8 应用的 ExoPlayerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mxtech.videoplayer.ad.online.mxexo;
import android.app.Activity;
import android.app.AppOpsManager;
import android.app.PendingIntent;
import android.app.PictureInPictureParams;
import android.app.RemoteAction;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.drawable.Icon;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Pair;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.m;
import com.google.ads.interactivemedia.v3.api.CompanionAdSlot;
import com.google.ads.interactivemedia.v3.api.ImaSdkFactory;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.m.x.player.pandora.common.fromstack.From;
import com.m.x.player.pandora.common.fromstack.FromStack;
import com.mxplay.interactivemedia.api.CompanionSlotType;
import com.mxplay.interactivemedia.internal.core.companion.CompanionAdContainer;
import com.mxtech.SkinViewInflater;
import com.mxtech.cast.bean.CastStateMessage;
import com.mxtech.videoplayer.ad.online.ad.link.AdPlacement;
import com.mxtech.videoplayer.ad.online.download.DownloadFlowEntranceActivity;
import com.mxtech.videoplayer.ad.online.features.more.OnlineFlowEntranceActivity;
import com.mxtech.videoplayer.ad.online.forceupdate.b;
import com.mxtech.videoplayer.ad.online.model.bean.ConfigBean;
import com.mxtech.videoplayer.ad.online.model.bean.Feed;
import com.mxtech.videoplayer.ad.online.model.bean.ICdnProvider;
import com.mxtech.videoplayer.ad.online.model.bean.Trailer;
import com.mxtech.videoplayer.ad.online.model.bean.TrailerPreview;
import com.mxtech.videoplayer.ad.online.model.bean.next.OnlineResource;
import com.mxtech.videoplayer.ad.online.model.bean.next.PlayInfo;
import com.mxtech.videoplayer.ad.online.model.bean.next.ResourceCollection;
import com.mxtech.videoplayer.ad.online.model.bean.next.ResourceFlow;
import com.mxtech.videoplayer.ad.online.model.bean.next.ResourceType;
import com.mxtech.videoplayer.ad.online.model.bean.next.VideoStatus;
import com.mxtech.videoplayer.ad.online.model.bean.next.adfree.model.BaseAdFreeRespBean;
import com.mxtech.videoplayer.ad.online.model.bean.next.adfree.model.RedeemAdFreeRespBean;
import com.mxtech.videoplayer.ad.online.model.bean.next.music.Album;
import com.mxtech.videoplayer.ad.online.model.bean.next.music.OttMusicPlayList;
import com.mxtech.videoplayer.ad.online.model.bean.next.tvshow.TvSeason;
import com.mxtech.videoplayer.ad.online.model.bean.next.tvshow.TvShow;
import com.mxtech.videoplayer.ad.online.mxexo.ExoPlayerActivity;
import com.mxtech.videoplayer.ad.online.mxexo.ScrollCoordinatorLayout;
import com.mxtech.videoplayer.ad.online.mxexo.b;
import com.mxtech.videoplayer.ad.online.mxexo.next.EpisodeEndCountDownView;
import com.mxtech.videoplayer.ad.online.mxexo.service.ExoPlayerService;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.IDetailModelStoreOwnerProvider;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.fragment.CommentDetailFragment;
import com.mxtech.videoplayer.ad.online.playback.poll.view.PollSheetView;
import com.mxtech.videoplayer.ad.online.skipintro.view.SkipAndPlayNextLayout;
import com.mxtech.videoplayer.ad.online.userjourney.beans.view_model.UserJourneyConfigBean;
import com.mxtech.videoplayer.ad.subscriptions.bean.view_model.SubscriptionGroupBean;
import com.mxtech.videoplayer.ad.utils.Const;
import com.mxtech.videoplayer.ad.view.PlayerParent;
import com.mxtech.videoplayer.ad.view.list.MXNestRecyclerView;
import com.mxtech.videoplayer.service.PlayService;
import defpackage.a7d;
import defpackage.al;
import defpackage.ao5;
import defpackage.b5c;
import defpackage.b9;
import defpackage.bg;
import defpackage.bl;
import defpackage.ccf;
import defpackage.cm;
import defpackage.cn;
import defpackage.cr5;
import defpackage.d1j;
import defpackage.dn5;
import defpackage.dod;
import defpackage.dq7;
import defpackage.ea2;
import defpackage.eqd;
import defpackage.f7f;
import defpackage.g7f;
import defpackage.gd8;
import defpackage.gfh;
import defpackage.gl;
import defpackage.gm;
import defpackage.h3i;
import defpackage.hf5;
import defpackage.hff;
import defpackage.hl;
import defpackage.hp5;
import defpackage.hsa;
import defpackage.i0g;
import defpackage.i25;
import defpackage.ifd;
import defpackage.ikd;
import defpackage.il;
import defpackage.inc;
import defpackage.iu7;
import defpackage.j1b;
import defpackage.j22;
import defpackage.jd8;
import defpackage.jf5;
import defpackage.jkd;
import defpackage.jl;
import defpackage.jp5;
import defpackage.js3;
import defpackage.km8;
import defpackage.krb;
import defpackage.lg0;
import defpackage.lm8;
import defpackage.mdg;
import defpackage.mf5;
import defpackage.nf5;
import defpackage.nfi;
import defpackage.nl;
import defpackage.ns3;
import defpackage.o0f;
import defpackage.ofh;
import defpackage.on8;
import defpackage.ooi;
import defpackage.op5;
import defpackage.p0f;
import defpackage.p75;
import defpackage.ph;
import defpackage.pl;
import defpackage.pp;
import defpackage.pp5;
import defpackage.qf0;
import defpackage.r18;
import defpackage.re8;
import defpackage.rp5;
import defpackage.rs2;
import defpackage.s0b;
import defpackage.s42;
import defpackage.s7f;
import defpackage.sbc;
import defpackage.se8;
import defpackage.shc;
import defpackage.sj8;
import defpackage.tbc;
import defpackage.te8;
import defpackage.tj5;
import defpackage.tk8;
import defpackage.tya;
import defpackage.ue8;
import defpackage.v26;
import defpackage.v93;
import defpackage.vi;
import defpackage.weh;
import defpackage.wg;
import defpackage.wn5;
import defpackage.woa;
import defpackage.xk4;
import defpackage.xm5;
import defpackage.xq5;
import defpackage.xsa;
import defpackage.xxc;
import defpackage.y0;
import defpackage.y82;
import defpackage.yq5;
import defpackage.z1;
import defpackage.z4i;
import defpackage.z6h;
import defpackage.zk;
import defpackage.zm3;
import defpackage.zra;
import defpackage.zx9;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.Stack;
import java.util.UUID;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.JvmClassMappingKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import okhttp3.l;
import okhttp3.p;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import org.json.JSONObject;
public class ExoPlayerActivity extends xxc implements ao5, wn5.b, AudioManager.OnAudioFocusChangeListener, v26, s42, td8, yj8, ck8, a, b.c, inc, MXNestRecyclerView.d, ve8, sd8, iqf, p75, ScrollCoordinatorLayout.a, s7f, mqd, a, ue8, ICdnProvider, SkipAndPlayNextLayout.d, IDetailModelStoreOwnerProvider, zk, sj8, j22, lm8, km8, hn8, c, se8, b {
public static final int c1 = 0;
public boolean A;
public poi A0;
public boolean B;
public bsa B0;
public String C;
public com.mxtech.videoplayer.ad.online.mxexo.next.b C0;
public String D;
public ikd D0;
public String E;
public ltg E0;
public hne F;
public vf3 F0;
public ofh G;
public com.mxtech.videoplayer.ad.online.ad.link.a G0;
public li H;
public final rai H0;
public CommentDetailFragment I;
@NonNull
public tj8 I0;
public jnh J;
public String J0;
public etf K;
public Feed K0;
public kg5 L;
public wn5 L0;
public nne M;
public final a M0;
public uqd N;
public ScrollCoordinatorLayout N0;
public p4b O;
public boolean O0;
public p0f P;
public boolean P0;
public ViewStub Q;
public long Q0;
public PollSheetView R;
public boolean R0;
public View S;
public ssd S0;
public View T;
public final f7f T0;
public View U;
public final xm5 U0;
public boolean V;
public final f V0;
public boolean W;
public final g W0;
public boolean X;
public pp5 X0;
public shc Y;
public boolean Y0;
public boolean Z0;
public boolean a0;
public op5 a1;
public int b1;
public final Locale c0;
public boolean d0;
public int e0;
public String f0;
public boolean g0;
public gm h0;
public final pj4 i0;
public boolean j0;
public boolean k0;
public boolean l0;
public e m0;
public Pair<dod, dod> n0;
public final ArrayList o0;
public boolean p0;
public lpd q0;
public boolean r0;
public boolean s0;
public boolean t0;
public boolean u0;
public String v;
public View v0;
public Fragment w;
public cog w0;
public OnlineResource x;
public mng x0;
public boolean y;
public boolean y0;
public i z;
public am9 z0;
public final uf0 u = new uf0(new ld3(3));
public boolean Z = false;
public int b0 = 0;
public static class PIPGrantedException extends Exception {
}
public static class PIPNotGrantedException extends Exception {
}
public class a implements iu7.b {
public a() {
}
@Override
public final void a(int i) {
if (i != 5) {
ExoPlayerActivity.this.I0.deactivate();
}
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public final void onClick(View view) {
ExoPlayerActivity exoPlayerActivity = ExoPlayerActivity.this;
if (exoPlayerActivity.getFeed() == null || !exoPlayerActivity.getFeed().isExoYoutube()) {
exoPlayerActivity.onBackPressed();
} else {
exoPlayerActivity.H6("manual", true);
}
}
}
public class c implements a {
public c() {
}
public final void b() {
hl.a.a.a();
int i = ExoPlayerActivity.c1;
ExoPlayerActivity.this.z6(true);
}
}
public class d {
public final boolean a;
public final boolean b;
public final boolean c;
public d(boolean z, boolean z2, boolean z3) {
this.a = z;
this.b = z2;
this.c = z3;
}
}
public class e implements f7f.c {
public e() {
}
@Override
public final void a() {
ExoPlayerActivity.this.C();
}
}
public class f extends Handler {
public f() {
}
@Override
public final void handleMessage(Message message) {
if (message.what != 2) {
return;
}
ExoPlayerActivity.this.H6("manual", true);
}
}
public class g implements ViewTreeObserver.OnGlobalLayoutListener {
public g() {
}
@Override
public final void onGlobalLayout() {
ExoPlayerActivity exoPlayerActivity = ExoPlayerActivity.this;
gm gmVar = exoPlayerActivity.h0;
if (gmVar != null) {
hne hneVar = exoPlayerActivity.F;
int i = 0;
if (hneVar != null && hneVar.isVisible()) {
hne hneVar2 = exoPlayerActivity.F;
if (hneVar2.getView() != null) {
i = hneVar2.getView().getHeight();
}
}
if (gmVar.l == null || i == 0 || gmVar.n == i) {
return;
}
BottomSheetBehavior bottomSheetBehavior = gmVar.p;
if (bottomSheetBehavior.J != 4) {
return;
}
bottomSheetBehavior.m(i);
gmVar.n = i;
}
}
}
public class h {
public h() {
}
}
public class i extends BroadcastReceiver {
public i() {
}
@Override
public final void onReceive(Context context, Intent intent) {
String action = intent.getAction();
boolean equals = "android.intent.action.HEADSET_PLUG".equals(action);
ExoPlayerActivity exoPlayerActivity = ExoPlayerActivity.this;
if (!equals) {
if ("android.media.AUDIO_BECOMING_NOISY".equals(action)) {
te8 te8Var = exoPlayerActivity.w;
if (te8Var instanceof te8) {
te8Var.I1();
return;
}
return;
}
return;
}
if (intent.hasExtra("state") && intent.getIntExtra("state", 0) == 1) {
te8 te8Var2 = exoPlayerActivity.w;
if (te8Var2 instanceof te8) {
te8Var2.s4();
}
}
}
}
public class j implements a3i<UserJourneyConfigBean> {
@NonNull
public final sn9 b;
@NonNull
public final Feed c;
public final long d;
public j(@NonNull Feed feed, @NonNull sn9 sn9Var, long j) {
this.c = feed;
this.b = sn9Var;
this.d = j;
}
public final void d(Object obj) {
j jVar = this;
Parcelable parcelable = (UserJourneyConfigBean) obj;
int i = d1j.a;
if (parcelable != null) {
lai laiVar = lai.b;
Feed feed = jVar.c;
boolean z = false;
if (CollectionsKt.G(0, a.b(feed).a.getAdFreeAccess().getSvod().packs()) != null) {
SubscriptionGroupBean groupBean = parcelable.getSvodRewardConfig().getGroupBean();
for (String str : a.b(feed).a.getAdFreeAccess().getSvod().packs()) {
groupBean.getCmsId();
int i2 = d1j.a;
if (str != null && groupBean.isIdEqualTo(str)) {
m mVar = ExoPlayerActivity.this;
if (mVar.K0 != null && !mVar.isDestroyed() && !jz9.L(mVar)) {
mVar.A0 = new poi(mVar.K0, parcelable, jVar.d);
if (mVar.B0 != null) {
dia.a(mVar).d(mVar.B0);
}
mVar.B0 = new bsa(mVar.A0);
dia.a(mVar).b(mVar.B0, new IntentFilter(com.facebook.accountkit.a.a().getAction()));
Feed feed2 = mVar.K0;
boolean d7 = ExoPlayerActivity.d7(((j1b) mVar.getResources()).a.getConfiguration());
rx0 rx0Var = new rx0(mVar);
jp5 jp5Var = new jp5(mVar, parcelable);
poi poiVar = mVar.A0;
int d = g7f.d(mVar);
String typeName = feed2.getType().typeName();
String id = feed2.getId();
String n = fuh.n(feed2.posterList(), d, (int) (d * 0.6f), true);
SharedPreferences sharedPreferences = ooi.a;
int i3 = ooi.a.a("min_ads_for_watch_page_login_reward_dialog").getValue() < 3 ? 2 : 1;
mdg mdgVar = new mdg("adFreeLoginShown", weh.c);
d0d.c(mdgVar, "time", Integer.valueOf(i3));
gfh.d(mdgVar);
sn9 sn9Var = jVar.b;
String P = sn9Var.f.P(parcelable);
bl blVar = new bl();
Bundle bundle = new Bundle();
bundle.putBoolean("IS_LANDSCAPE", d7);
bundle.putString("RESOURCE_TYPE", typeName);
bundle.putString("RESOURCE_ID", id);
blVar.setArguments(bundle);
SubscriptionGroupBean groupBean2 = parcelable.getSvodRewardConfig().getGroupBean();
String string = mVar.getString(2131886163, P, groupBean2.getName());
String string2 = mVar.getString(2131886164, P, groupBean2.getName());
yq5 yq5Var = new yq5();
Bundle bundle2 = new Bundle();
bundle2.putBoolean("IS_LANDSCAPE", d7);
bundle2.putBoolean("SHOW_LOGIN_AUTO", false);
bundle2.putString("BG_URL", n);
bundle2.putParcelable("REWARD_CONFIG", parcelable);
bundle2.putString("REWARD_DURATION", P);
bundle2.putString("TITLE", string);
yq5Var.setArguments(bundle2);
nl.a aVar = new nl.a(mVar, blVar, sn9Var, parcelable, rx0Var, jp5Var, poiVar);
String n9 = zra.n9(2131888584, tya.w());
groupBean2.getName();
String groupImageLogo = i0g.b().k() ? groupBean2.getGroupImageLogo() : groupBean2.getGroupImageLogoDark();
xsa xsaVar = new xsa();
xsaVar.b = aVar;
xsaVar.c = "adFree";
xsaVar.d = n9;
xsaVar.f = string2;
xsaVar.g = null;
xsaVar.h = null;
xsaVar.i = null;
xsaVar.j = false;
xsaVar.k = null;
xsaVar.l = null;
xsaVar.m = false;
xsaVar.n = groupImageLogo;
yq5Var.b = new jl(poiVar, jp5Var, mVar, xsaVar);
FragmentManager supportFragmentManager = mVar.getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar2 = new androidx.fragment.app.a(supportFragmentManager);
aVar2.g(2131365413, yq5Var, (String) null);
aVar2.j(true);
poi poiVar2 = mVar.A0;
if (poiVar2 != null) {
poiVar2.f(d0d.u("loginToContinue"));
}
}
mVar.V7();
return;
}
jVar = this;
z = z;
}
int i4 = d1j.a;
}
}
}
public final void e(@NonNull Throwable th) {
int i = d1j.a;
}
}
public ExoPlayerActivity() {
Locale locale = tya.r;
this.c0 = locale == null ? woa.d(3, vk4.i()) : locale;
this.e0 = 0;
pj4 pj4Var = new pj4();
pj4Var.a = new ArrayList();
this.i0 = pj4Var;
this.k0 = false;
this.l0 = false;
this.o0 = new ArrayList();
this.p0 = false;
this.s0 = false;
this.y0 = false;
this.E0 = new ltg();
this.G0 = null;
this.H0 = rai.a;
this.I0 = tj8.b;
this.J0 = null;
this.M0 = new a();
this.Q0 = 0L;
this.R0 = false;
this.T0 = new f7f(new e());
this.U0 = new xm5(this);
this.V0 = new f();
this.W0 = new g();
this.b1 = 0;
}
public static void L7(Activity activity, Feed feed, FromStack fromStack) {
M7(activity, feed, fromStack, false, null);
}
public static void M7(Activity activity, Feed feed, FromStack fromStack, boolean z, Bundle bundle) {
O7(activity, feed, fromStack, false, z, bundle, false);
}
public static void N6(Intent intent) {
if (intent != null) {
String scheme = intent.getScheme();
Uri data = intent.getData();
if (TextUtils.isEmpty(scheme) || !scheme.equals("mxplay") || data == null) {
return;
}
String queryParameter = data.getQueryParameter("id");
String queryParameter2 = data.getQueryParameter("type");
if (TextUtils.isEmpty(queryParameter) || TextUtils.isEmpty(queryParameter2)) {
return;
}
Feed feed = new Feed();
feed.setId(queryParameter);
feed.setType(OnlineResource.from(queryParameter2));
intent.putExtra("video", feed);
}
}
public static void O7(Activity activity, Feed feed, FromStack fromStack, boolean z, boolean z2, Bundle bundle, boolean z3) {
ExoPlayerService exoPlayerService;
if (feed == null) {
return;
}
xm3 xm3Var = com.mxtech.videoplayer.ad.online.forceupdate.b.d;
if (b.a.c(feed.getType())) {
return;
}
if (activity == null && (exoPlayerService = ExoPlayerService.Q0) != null && exoPlayerService.Z) {
exoPlayerService.z(feed, null, fromStack);
return;
}
if (y82.f() && y82.a()) {
tj5.c(new CastStateMessage(CastStateMessage.CastState.SAVE_POSITION));
}
a7d.a();
Intent intent = new Intent(activity, (Class<?>) ExoPlayerActivity.class);
intent.putExtra("video", feed);
intent.putExtra("make_init_full_screen", z2);
intent.putExtra("isScreenLocked", z);
intent.putExtra(FromStack.FROM_LIST, fromStack);
if (!z3) {
intent.setFlags(603979776);
} else if (activity instanceof ExoPlayerActivity) {
h6j.b().a();
}
dr5.b().h();
if (bundle != null) {
intent.putExtra("intents_key_extras", bundle);
}
p6(intent);
activity.startActivity(intent);
}
public static void P7(Activity activity, OnlineResource onlineResource, Feed feed, FromStack fromStack) {
S7(activity, onlineResource, feed, fromStack, false, false);
}
public static void S7(Activity activity, OnlineResource onlineResource, Feed feed, FromStack fromStack, boolean z, boolean z2) {
ExoPlayerService exoPlayerService;
if (onlineResource == null) {
throw new RuntimeException();
}
OnlineResource a2 = g34.a(onlineResource);
if (activity == null && (exoPlayerService = ExoPlayerService.Q0) != null && exoPlayerService.Z) {
exoPlayerService.z(feed, a2, fromStack);
return;
}
if (y82.f() && y82.a()) {
tj5.c(new CastStateMessage(CastStateMessage.CastState.SAVE_POSITION));
}
a7d.a();
Intent intent = new Intent(activity, (Class<?>) ExoPlayerActivity.class);
if (feed != null) {
intent.putExtra("video", feed);
}
intent.putExtra("container", a2);
intent.putExtra("make_init_full_screen", z2);
intent.putExtra(FromStack.FROM_LIST, fromStack);
p6(intent);
if (!z) {
intent.setFlags(603979776);
} else if (activity instanceof ExoPlayerActivity) {
h6j.b().a();
}
dr5.b().h();
activity.startActivity(intent);
}
public static void U7(Activity activity, Feed feed, boolean z, FromStack fromStack, boolean z2) {
Bundle bundle = new Bundle();
bundle.putBoolean("from_auto_play_next", true);
if (Build.VERSION.SDK_INT < 26 || !(activity instanceof ExoPlayerActivity) || !activity.isInPictureInPictureMode()) {
O7(activity, feed, fromStack, z, z2, bundle, false);
return;
}
Intent intent = activity.getIntent();
intent.putExtra("video", feed);
intent.putExtra("make_init_full_screen", false);
intent.putExtra("isScreenLocked", z);
intent.putExtra(FromStack.FROM_LIST, fromStack);
dr5.b().h();
intent.putExtra("intents_key_extras", bundle);
p6(intent);
ExoPlayerActivity exoPlayerActivity = (ExoPlayerActivity) activity;
Fragment fragment = exoPlayerActivity.w;
if (fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) {
((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).ua();
}
exoPlayerActivity.s6(intent);
}
public static boolean d7(Configuration configuration) {
return configuration.orientation == 2;
}
public static void p6(Intent intent) {
if (!(intent.getSerializableExtra("KEY_TAB_TYPE_AND_NAME") instanceof kotlin.Pair) || intent.getSerializableExtra("KEY_TAB_TYPE_AND_NAME").c == null) {
intent.putExtra("KEY_TAB_TYPE_AND_NAME", (Serializable) new kotlin.Pair("subscribeNowBlock", "subscribeNowBlock"));
}
}
@Override
public final Feed A() {
return this.L0.A();
}
@NonNull
public final tj8 A1() {
return this.I0;
}
public final void A6(boolean z, boolean z2, boolean z3) {
Feed feed = this.K0;
d dVar = new d(z, z2, z3);
if (feed == null) {
a7(z2, z3);
return;
}
String typeName = feed.getType().typeName();
String id = feed.getId();
il ilVar = new il(dVar, feed);
JSONObject jSONObject = new JSONObject();
String str = Const.YOU_DEV_KEEEEY;
new gl.c(zh6.a("https://androidapi.mxplay.com/v1/coin/adfree/query?resourceType=", typeName, "&resourceId=", id), jSONObject.toString(), ilVar, sgj.c()).executeOnExecutor(s0b.e(), new Void[0]);
}
public void A7(boolean z) {
if (this.K0 == null) {
return;
}
boolean z2 = false;
if (z) {
this.A = false;
setRequestedOrientation(7);
}
ResourceType type = this.K0.getType();
if (vue.d0(type)) {
if (cgh.c(this.K0)) {
Feed feed = this.K0;
boolean z3 = this.g0;
if ((this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.b) && this.u0) {
z2 = true;
}
snh v9 = snh.v9(feed, z3, z2, this.A, z);
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
aVar.g(2131363022, v9, (String) null);
aVar.j(true);
this.F = v9;
return;
}
Feed feed2 = this.K0;
boolean z4 = this.g0;
dtf dtfVar = new dtf();
Bundle bundle = new Bundle();
bundle.putSerializable("playFeed", feed2);
bundle.putBoolean("expand_detail", z4);
bundle.putBoolean("isResourceOffline", z);
dtfVar.setArguments(bundle);
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
supportFragmentManager2.getClass();
androidx.fragment.app.a aVar2 = new androidx.fragment.app.a(supportFragmentManager2);
aVar2.g(2131363022, dtfVar, (String) null);
aVar2.j(true);
this.F = dtfVar;
} else if (vue.B(type)) {
Feed feed3 = this.K0;
boolean z5 = this.g0;
boolean z6 = (this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.b) && this.u0;
boolean z7 = this.A;
vvb vvbVar = new vvb();
Bundle bundle2 = new Bundle();
bundle2.putSerializable("playFeed", feed3);
bundle2.putBoolean("expand_detail", z5);
bundle2.putBoolean("download_on_init", z6);
bundle2.putBoolean("makeInitFullScreen", z7);
bundle2.putBoolean("isResourceOffline", z);
vvbVar.setArguments(bundle2);
FragmentManager supportFragmentManager3 = getSupportFragmentManager();
supportFragmentManager3.getClass();
androidx.fragment.app.a aVar3 = new androidx.fragment.app.a(supportFragmentManager3);
aVar3.g(2131363022, vvbVar, (String) null);
aVar3.j(true);
this.F = vvbVar;
} else if (vue.F(type)) {
Feed feed4 = this.K0;
boolean z8 = this.g0;
ezb ezbVar = new ezb();
Bundle bundle3 = new Bundle();
bundle3.putSerializable("playFeed", feed4);
bundle3.putBoolean("expand_detail", z8);
bundle3.putBoolean("isResourceOffline", z);
ezbVar.setArguments(bundle3);
FragmentManager supportFragmentManager4 = getSupportFragmentManager();
supportFragmentManager4.getClass();
androidx.fragment.app.a aVar4 = new androidx.fragment.app.a(supportFragmentManager4);
aVar4.g(2131363022, ezbVar, (String) null);
aVar4.j(true);
this.F = ezbVar;
} else if (vue.g0(type)) {
snh v92 = snh.v9(this.K0, this.g0, (this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.b) && this.u0, this.A, z);
FragmentManager supportFragmentManager5 = getSupportFragmentManager();
supportFragmentManager5.getClass();
androidx.fragment.app.a aVar5 = new androidx.fragment.app.a(supportFragmentManager5);
aVar5.g(2131363022, v92, (String) null);
aVar5.j(true);
this.F = v92;
} else if (vue.o0(this.K0.getType())) {
Feed feed5 = this.K0;
boolean z9 = this.g0;
boolean z10 = this.A;
r0j r0jVar = new r0j();
Bundle bundle4 = new Bundle();
bundle4.putSerializable("playFeed", feed5);
bundle4.putBoolean("expand_detail", z9);
bundle4.putBoolean("makeInitFullScreen", z10);
bundle4.putBoolean("isResourceOffline", z);
r0jVar.setArguments(bundle4);
FragmentManager supportFragmentManager6 = getSupportFragmentManager();
supportFragmentManager6.getClass();
androidx.fragment.app.a aVar6 = new androidx.fragment.app.a(supportFragmentManager6);
aVar6.g(2131363022, r0jVar, (String) null);
aVar6.j(true);
this.F = r0jVar;
}
if (this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.b) {
this.u0 = false;
}
View findViewById = findViewById(2131363022);
this.U = findViewById;
if (findViewById != null) {
ViewTreeObserver viewTreeObserver = findViewById.getViewTreeObserver();
g gVar = this.W0;
viewTreeObserver.removeOnGlobalLayoutListener(gVar);
this.U.getViewTreeObserver().addOnGlobalLayoutListener(gVar);
}
}
public final void B7() {
aii c2;
p pVar = z4i.a;
if (!jz9.N(this) || getFeed() == null) {
return;
}
if (this.L == null) {
kg5 E = getSupportFragmentManager().E("EpisodeSeasonFragment");
if (E != null) {
this.L = E;
} else {
eii a2 = b.a(getApplication());
kii viewModelStore = getViewModelStore();
gw3 defaultViewModelCreationExtras = getDefaultViewModelCreationExtras();
mu9 kotlinClass = JvmClassMappingKt.getKotlinClass(b16.class);
String k = kotlinClass.k();
if (k == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
String concat = "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(k);
aii b2 = viewModelStore.b(concat);
if (!kotlinClass.i(b2)) {
o2c o2cVar = new o2c(defaultViewModelCreationExtras);
o2cVar.a(jii.a, concat);
try {
try {
c2 = a2.b(kotlinClass, o2cVar);
} catch (AbstractMethodError unused) {
c2 = a2.c(JvmClassMappingKt.getJavaClass(kotlinClass));
}
} catch (AbstractMethodError unused2) {
c2 = a2.a(JvmClassMappingKt.getJavaClass(kotlinClass), o2cVar);
}
b2 = c2;
aii aiiVar = (aii) viewModelStore.a.put(concat, b2);
if (aiiVar != null) {
aiiVar.clear$lifecycle_viewmodel_release();
}
}
if (((b16) b2).t() != null) {
this.L = D6();
} else {
z6h.b(2131889307, false);
}
}
}
b8(true);
if (this.L.isAdded()) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.q(this.L);
h2.e();
return;
}
try {
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
supportFragmentManager2.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager2);
aVar.h(2130772053, 2130772054, 0, 0);
aVar.g(2131366181, this.L, "EpisodeSeasonFragment");
aVar.e();
} catch (IllegalStateException e2) {
gfh.c(e2);
}
}
@Override
public final void C() {
throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.mxexo.ExoPlayerActivity.C():void");
}
public void C6() {
Feed feed;
if (this.F0 != null || (feed = this.K0) == null || TextUtils.isEmpty(feed.getId())) {
return;
}
Feed feed2 = this.K0;
lai laiVar = lai.b;
if (feed2.enableConcurrentStream(a.b(feed2).g()) && h3i.a.a.c()) {
this.F0 = new vf3(this.K0.getId(), this.K0.getType() != null ? this.K0.getType().typeName() : "", this);
}
}
public final void C7(String str) {
getViewModelStore().a();
boolean z = this.e0 % 2 == 1;
tya tyaVar = tya.m;
swd.f().edit().putBoolean("key_content_language_primary_clicked", z).apply();
swd.f().edit().putString("key_content_language_changed", str).apply();
this.f0 = str;
hne hneVar = this.F;
if (hneVar != null) {
this.g0 = ((u61) hneVar).k;
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.o(this.F);
h2.j(true);
}
this.K0 = getFeed();
a6((!this.d0 || TextUtils.isEmpty(this.f0)) ? this.c0 : woa.d(3, this.f0));
te8 te8Var = this.w;
if (te8Var instanceof te8) {
te8Var.s3();
}
Feed feed = getFeed();
te8 te8Var2 = this.w;
if ((te8Var2 instanceof te8) && feed != null) {
te8Var2.f(feed);
}
A7(VideoStatus.OFFLINE.equalsIgnoreCase(this.L0.f.getStatus()));
o7();
p7();
q7();
t7();
s7();
X7();
W7();
if (this.d0 && !TextUtils.isEmpty(this.f0)) {
String str2 = this.f0;
HashMap hashMap = xoa.a;
if (hashMap.size() <= 0) {
hashMap.clear();
hashMap.put("en", "Language of this page has been changed to English. To change the language of the entire app please go to Settings.");
hashMap.put("hi", "इस स्क्रीन की भाषा को हिंदी में बदल दिया गया है। संपूर्ण ऐप की भाषा बदलने के लिए कृपया सेटिंग्स में जाएं।");
hashMap.put("te", "ఈ పేజీ యొక్క భాష తెలుగుగా మార్చబడింది. మొత్తం అనువర్తనం యొక్క భాషను మార్చడానికి దయచేసి సెట్టింగ్\u200cలో వెళ్ళండి");
hashMap.put("ta", "இந்தப் பக்கத்தின் மொழி தமிழாக மாற்றப்பட்டுள்ளது. முழு பயன்பாட்டின் மொழியையும் மாற்ற தயவுசெய்து அமைப்புகளுக்குச் செல்லவும்");
hashMap.put("mr", "या स्क्रीनची भाषा मराठी मध्ये बदलली आहे. संपूर्ण अॅपची भाषा बदलण्यासाठी कृपया सेटिंग्ज मध्ये जा");
hashMap.put("ml", "ഈ പേജിന്റെ ഭാഷ മലയാളത്തിലേക്ക് മാറ്റി. മുഴുവൻ അപ്ലിക്കേഷന്റെയും ഭാഷ മാറ്റുന്നതിന് ദയവായി ക്രമീകരണങ്ങളിൽ പ്രവേശിക്കുക");
hashMap.put("kn", "ಈ ಪುಟದ ಭಾಷೆಯನ್ನು ಕನ್ನಡಕ್ಕೆ ಬದಲಾಯಿಸಲಾಗಿದೆ. ಸಂಪೂರ್ಣ ಅಪ್ಲಿಕೇಶನ್\u200cನ ಭಾಷೆಯನ್ನು ಬದಲಾಯಿಸಲು ದಯವಿಟ್ಟು ಸೆಟ್ಟಿಂಗ್\u200cಗಳಿಗೆ ಹೋಗಿ");
hashMap.put("pa", "ਇਸ ਸਕ੍ਰੀਨ ਦੀ ਭਾਸ਼ਾ ਨੂੰ ਅੰਗਰੇਜ਼ੀ ਵਿੱਚ ਬਦਲਿਆ ਗਿਆ ਹੈ. ਪੂਰੀ ਐਪ ਦੀ ਭਾਸ਼ਾ ਬਦਲਣ ਲਈ ਕਿਰਪਾ ਕਰਕੇ ਸੈਟਿੰਗਸ ਤੇ ਜਾਓ");
hashMap.put("bn", "এই পৃষ্ঠার ভাষা বাংলায় পরিবর্তন করা হয়েছে। পুরো অ্যাপ্লিকেশনটির ভাষা পরিবর্তন করতে দয়া করে সেটিংসে যান");
hashMap.put("gu", "આ પાનાની ભાષા બદલીને ગુજરાતી કરી દેવામાં આવી છે. સંપૂર્ણ એપ્લિકેશનની ભાષા બદલવા માટે, સેટિંગ્સ મા જાઓ");
}
String str3 = (String) hashMap.get(str2);
if (!TextUtils.isEmpty(str3)) {
g2g a2 = g2g.a(findViewById(2131365746), str3);
a2.f((int) (8.0f * xk4.b));
a2.h((int) (4.0f * xk4.b));
g2g.k();
}
}
r7();
}
@NonNull
public kg5 D6() {
return new kg5();
}
@Override
public final boolean E4() {
return this.b0 != 2 && J6("gesture", false, true) == 2;
}
public on8 E6(Feed feed) {
jd8 l;
ConfigBean configBean = dq7.a;
gd8 f2 = ((y0) vi.c()).f("isTechMetricLoggingEnabled");
boolean z = false;
if (f2 != null && (l = f2.l()) != null) {
z = l.f(false);
}
if (!z) {
return null;
}
zx9 zx9Var = zx9.b;
if (feed == null || !feed.isDownloaded()) {
krb krbVar = new krb(zx9Var);
asg asgVar = qf0.a;
return new tbc(krbVar, "Ol");
}
boolean b2 = shc.b(this);
krb krbVar2 = new krb(zx9Var);
asg asgVar2 = qf0.a;
return new sbc(krbVar2, "Dl".concat(b2 ? "On" : ""));
}
public final boolean E7() {
if (this.p0) {
return false;
}
Feed feed = this.K0;
if (feed != null && feed.isAdFreeOpen() && !this.y) {
return true;
}
if (w6()) {
Feed feed2 = this.K0;
if ((!((feed2 == null || vue.o0(feed2.getType())) ? false : this.K0.isFromDb()) || !shc.b(this)) && !this.j0) {
return false;
}
}
return true;
}
@NotNull
public final hod F6() {
jd8 l;
on8 E6 = E6(this.K0);
if (E6 != null) {
LinkedList linkedList = new LinkedList();
ConfigBean a2 = dq7.a();
linkedList.add(new kotlin.Pair("okhttp_datasource", String.valueOf(a2 == null ? true : a2.useOkHttpForPlayer())));
gd8 f2 = ((y0) vi.c()).f("shouldPreloadVideoAds");
boolean z = false;
if (f2 != null && (l = f2.l()) != null) {
z = l.f(false);
}
linkedList.add(new kotlin.Pair("ad_preloading", String.valueOf(z)));
((b9) E6).b.c = linkedList;
}
return new hod(this.J0, E6);
}
public final void F7() {
FragmentManager supportFragmentManager;
Feed feed = this.K0;
if ((feed == null || !fuh.C(feed)) && (supportFragmentManager = getSupportFragmentManager()) != null) {
lpd lpdVar = new lpd();
this.q0 = lpdVar;
c cVar = new c();
Feed feed2 = this.K0;
lpdVar.b = cVar;
lpdVar.c = feed2;
lpdVar.showAllowStateLost(supportFragmentManager, "PLAYER_RATING_DIALOG");
}
}
public final void G4(String str, boolean z, boolean z2, boolean z3) {
d0d.i2(this.K0, str, z, z2, z3, getX());
}
public final boolean G6() {
if (getSupportFragmentManager() != null) {
bl E = getSupportFragmentManager().E("AdFreeRedeemRetryDialog");
if (E instanceof bl) {
bl blVar = E;
if (!blVar.k9()) {
return true;
}
blVar.dismissAllowingStateLoss();
}
}
return this.w instanceof rr5;
}
public final void G7() {
mng mngVar = new mng();
mngVar.c = new h();
this.x0 = mngVar;
this.y0 = true;
gfh.d(d0d.u("deviceLogoutShown"));
this.x0.showAllowStateLost(getSupportFragmentManager(), "svodLimitLogout");
if (this.K0 == null) {
return;
}
if (!this.s0) {
Feed A = this.L0.A();
r18.g().i(eqd.a(this.K0, A, null));
}
Feed feed = this.K0;
lai laiVar = lai.b;
if (a.b(feed).a.getContentAccess().isPaid()) {
I7();
} else if (this.K0.isNeedLogin()) {
Fragment fragment = this.w;
if (fragment instanceof cr5) {
((cr5) fragment).nb();
}
}
this.s0 = false;
}
@Override
public final void H3() {
hne hneVar = this.F;
if (hneVar == null || !hneVar.isVisible()) {
return;
}
gm gmVar = this.h0;
if (gmVar == null || !gmVar.c()) {
hne hneVar2 = this.F;
if (hneVar2.getView() == null) {
return;
}
hneVar2.t9();
}
}
public final int H6(String str, boolean z) {
int J6 = J6(str, true, z);
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null && ((J6 == 2 || J6 == 3) && (Intrinsics.b(bVar.M, "STATE_RIGHT_AND_COUNTDOWN") || Intrinsics.b(bVar.M, "STATE_COUNTDOWN_ONLY") || Intrinsics.b(bVar.M, "STATE_RIGHT_ONLY") || Intrinsics.b(bVar.M, "STATE_END_RECOMMEND")))) {
bVar.L.getClass();
nf5.a();
}
if (J6 == 2 || J6 == 3) {
jkd.a(this);
finish();
overridePendingTransition(0, 2130771981);
}
return J6;
}
public final void I7() {
FromStack x = getX();
Feed feed = this.K0;
String str = this.v;
Serializable serializableExtra = getIntent() == null ? null : getIntent().getSerializableExtra("KEY_TAB_TYPE_AND_NAME");
kotlin.Pair pair = serializableExtra instanceof kotlin.Pair ? (kotlin.Pair) serializableExtra : new kotlin.Pair((Object) null, (Object) null);
String str2 = this.J0;
rr5 rr5Var = new rr5();
Bundle bundle = new Bundle();
bundle.putParcelable(FromStack.FROM_LIST, x);
bundle.putSerializable("KEY_TAB_TYPE_AND_NAME", pair);
bundle.putString("relativeId", str);
bundle.putSerializable("video", feed);
bundle.putString("streamId", str2);
rr5Var.setArguments(bundle);
rr5Var.g = this.Y0;
f6();
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
aVar.g(2131365413, rr5Var, (String) null);
aVar.j(true);
this.w = rr5Var;
V7();
}
@Override
public final Pair<dod, dod> J() {
return this.L0.f.J();
}
public final int J6(java.lang.String r17, boolean r18, boolean r19) {
throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.mxexo.ExoPlayerActivity.J6(java.lang.String, boolean, boolean):int");
}
public final void J7() {
p pVar = z4i.a;
if (jz9.N(this)) {
ofh ofhVar = this.G;
if (ofhVar == null) {
Feed feed = this.K0;
ofh ofhVar2 = new ofh();
Bundle bundle = new Bundle();
bundle.putSerializable("PARAM_FEED", feed);
ofhVar2.setArguments(bundle);
this.G = ofhVar2;
} else {
Feed feed2 = this.K0;
Bundle bundle2 = new Bundle();
bundle2.putSerializable("PARAM_FEED", feed2);
ofhVar.setArguments(bundle2);
}
b8(true);
if (this.G.isAdded()) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.q(this.G);
h2.j(true);
} else {
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
androidx.fragment.app.a h3 = km4.h(supportFragmentManager2, supportFragmentManager2);
h3.h(2130772053, 2130772054, 0, 0);
h3.g(2131366181, this.G, (String) null);
h3.e();
}
if (k0()) {
this.R.setForceHide(true);
l1();
}
}
}
@Override
public final void K(boolean z) {
gm gmVar = this.h0;
if (gmVar != null) {
gmVar.m = true;
gmVar.l.getViewTreeObserver().removeOnScrollChangedListener(gmVar.s);
Handler handler = gmVar.j;
cm cmVar = gmVar.u;
handler.removeCallbacks(cmVar);
if (z) {
gmVar.b();
} else {
handler.postDelayed(cmVar, 2000L);
}
}
}
@Override
public final void K3(Feed feed, FromStack fromStack, boolean z) {
if (!"samsung".equalsIgnoreCase(Build.BRAND) || Build.VERSION.SDK_INT < 28 || !"armeabi-v7a".equalsIgnoreCase(Build.CPU_ABI)) {
OnlineResource onlineResource = this.x;
if (onlineResource != null) {
S7(this, onlineResource, feed, fromStack, z, false);
return;
} else {
O7(this, feed, fromStack, false, false, null, z);
return;
}
}
Intent intent = getIntent();
if (this.x != null) {
if (feed != null) {
intent.putExtra("video", feed);
} else {
intent.removeExtra("video");
}
intent.putExtra("container", g34.a(this.x));
intent.putExtra("make_init_full_screen", false);
intent.putExtra(FromStack.FROM_LIST, fromStack);
} else {
intent.removeExtra("container");
intent.putExtra("video", feed);
intent.putExtra("make_init_full_screen", false);
intent.putExtra(FromStack.FROM_LIST, fromStack);
}
if (!z) {
intent.setFlags(603979776);
}
s6(intent);
}
public final void K7(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
g2g a2 = g2g.a(findViewById(2131365746), str);
a2.f((int) (8.0f * xk4.b));
a2.h((int) (4.0f * xk4.b));
g2g.k();
}
public k2b L6() {
te8 te8Var = this.w;
if (te8Var instanceof te8) {
return te8Var.c2();
}
return null;
}
@NonNull
public From M6() {
Feed feed = this.K0;
return From.create(feed.getId(), feed.getName(), "playback");
}
@Override
public final synchronized void N1() {
try {
if (this.V && this.X && !this.W) {
Feed feed = this.K0;
if (feed != null && !feed.isYoutube()) {
f7f f7fVar = this.T0;
f7fVar.b = this.P;
f7fVar.b(this);
}
this.W = true;
}
} catch (Throwable th) {
throw th;
}
}
@Override
public final boolean O5() {
return this.Y0;
}
public final void Q6() {
if (z4i.f(this.H)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.H);
h2.o(this.H);
h2.j(true);
if (k0()) {
this.R.setForceHide(false);
c3();
}
}
}
@Override
public final void R1(boolean z) {
this.X = z;
}
public final void R2(String str, String str2, boolean z) {
d0d.h2("pollVoted", this.K0, str, z, str2, getX());
}
public final void R6() {
if (z4i.f(this.I)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.I);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
}
}
public final void S6() {
if (z4i.f(this.J)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.J);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
}
if (z4i.f(this.K)) {
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
androidx.fragment.app.a h3 = km4.h(supportFragmentManager2, supportFragmentManager2);
h3.h(2130772053, 2130772054, 0, 0);
h3.n(this.K);
h3.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
}
}
@Override
public final ScrollCoordinatorLayout T() {
Feed feed = this.K0;
if (feed == null || !feed.isYoutube()) {
return this.N0;
}
return null;
}
@Override
public final void T4(String str) {
gm gmVar = this.h0;
if (gmVar != null) {
gmVar.e(str);
return;
}
ViewStub viewStub = (ViewStub) findViewById(2131361943);
if (viewStub != null) {
View inflate = viewStub.inflate();
hne hneVar = this.F;
int i2 = 0;
if (hneVar != null && hneVar.isVisible()) {
hne hneVar2 = this.F;
if (hneVar2.getView() != null) {
i2 = hneVar2.getView().getHeight();
}
}
gm gmVar2 = new gm(inflate, i2, this);
this.h0 = gmVar2;
gmVar2.e(str);
}
}
public final void U0() {
qsd e2 = this.L0.e();
String id = getFeed() == null ? null : getFeed().getId();
ssd ssdVar = new ssd(this, 0);
((com.google.android.material.bottomsheet.b) ssdVar).k = ssdVar.getContext().getTheme().obtainStyledAttributes(new int[]{2130969286}).getBoolean(0, false);
ssdVar.p = this;
ssdVar.setContentView(2131560568);
ssdVar.n = e2;
ssdVar.o = id;
ssdVar.show();
ssdVar.r = this;
this.S0 = ssdVar;
te8 te8Var = this.w;
if (te8Var instanceof te8) {
te8Var.I1();
}
}
@Override
public final void U5() {
if (Build.VERSION.SDK_INT < 26) {
qd6 d2 = qd6.d();
Context applicationContext = getApplicationContext();
d2.getClass();
if (!qd6.b(applicationContext)) {
return;
}
}
if (this.a1 == null) {
op5 op5Var = new op5(this);
this.a1 = op5Var;
zm3.a(this, op5Var, new IntentFilter("android.intent.action.CLOSE_SYSTEM_DIALOGS"), true);
}
}
public final void U6() {
PollSheetView pollSheetView = this.R;
if (pollSheetView != null) {
pollSheetView.G();
}
ViewStub viewStub = this.Q;
if (viewStub != null) {
viewStub.setVisibility(8);
}
}
public final void V7() {
this.I0.deactivate();
}
@Override
public final void W3(boolean z) {
jd8 l;
jd8 l2;
boolean z2 = this.R0;
this.R0 = z;
long b2 = ir2.b();
if (nl.b(b2, this.Q0)) {
int i2 = d1j.a;
return;
}
this.Q0 = b2;
if (h3i.a.a.c()) {
int i3 = d1j.a;
return;
}
vi viVar = vi.b;
gd8 f2 = ((y0) vi.c()).f("journey_id_login_watchpage");
String str = null;
String a2 = (f2 == null || (l2 = f2.l()) == null) ? null : l2.a();
if (a2 != null ? StringsKt.I(a2) : true) {
int i4 = d1j.a;
return;
}
Feed feed = getFeed();
if (feed != null) {
lai laiVar = lai.b;
if (CollectionsKt.G(0, a.b(feed).a.getAdFreeAccess().getSvod().packs()) != null) {
SharedPreferences sharedPreferences = ooi.a;
js3 a3 = ooi.a.a("min_ads_for_watch_page_login_reward_dialog");
if (!z2 || z) {
int i5 = d1j.a;
return;
}
a3.b(1L);
if (!a3.d()) {
int i6 = d1j.a;
return;
}
am9 am9Var = this.z0;
if (am9Var != null && am9Var.d()) {
int i7 = d1j.a;
return;
}
js3 a4 = ooi.a.a("min_interval_watch_page_login_reward_dialog");
js3 a5 = ooi.a.a("max_watch_page_login_reward_dialog_per_day");
js3 a6 = ooi.a.a("max_watch_page_login_reward_dialog_in_total");
if (a4.d()) {
int i8 = d1j.a;
return;
}
if (a5.d()) {
int i9 = d1j.a;
return;
}
if (a6.d()) {
int i10 = d1j.a;
return;
}
a5.b(1L);
a6.b(1L);
a4.c(ir2.b());
a3.c(0L);
gd8 f3 = ((y0) vi.c()).f("journey_id_login_watchpage");
if (f3 != null && (l = f3.l()) != null) {
str = l.a();
}
sn9 sn9Var = new sn9(this.u);
int i11 = d1j.a;
Objects.requireNonNull(str);
this.z0 = sn9Var.f.H(str, this, new j(this.K0, sn9Var, a3.getMetadata()));
return;
}
}
int i12 = d1j.a;
}
@Override
public final boolean W5() {
return true;
}
public final void W7() {
Feed feed = getFeed();
if (feed == null || !feed.isNext()) {
return;
}
z6h.e(getString(2131890830, Integer.valueOf(feed.getPreEpisodeNum())), false);
}
public final void X6() {
if (z4i.f(this.G)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.G);
h2.j(true);
if (k0()) {
this.R.setForceHide(false);
c3();
return;
}
return;
}
Fragment D = getSupportFragmentManager().D(2131366181);
if (D != null) {
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
supportFragmentManager2.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager2);
aVar.o(D);
aVar.j(true);
b8(false);
}
}
public final void X7() {
boolean k0 = k0();
if (!k0 || d7(((j1b) getResources()).a.getConfiguration())) {
PollSheetView pollSheetView = this.R;
if (pollSheetView != null) {
Handler handler = pollSheetView.J;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
pollSheetView.K(5);
pollSheetView.G();
pollSheetView.P = -1;
pollSheetView.I = null;
}
this.Q.setVisibility(8);
} else {
this.Q.setLayoutResource(2131560568);
if (this.R == null) {
PollSheetView inflate = this.Q.inflate();
if (!(inflate instanceof PollSheetView)) {
return;
} else {
this.R = inflate;
}
}
this.Q.setVisibility(0);
this.R.L(0);
this.R.H(this.L0.e(), this.K0.getId(), 4, true);
}
te8 te8Var = this.w;
if (te8Var instanceof te8) {
te8Var.W1(k0);
}
}
public final void Y6(int i2) {
int i3 = i2 | this.b1;
this.b1 = i3;
if ((i3 & 3) == 3 && this.C0 == null && (this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.b) && getFeed().getTvShow() != null) {
iii iiiVar = new iii(getViewModelStore(), getDefaultViewModelProviderFactory(), getDefaultViewModelCreationExtras());
mu9 kotlinClass = JvmClassMappingKt.getKotlinClass(jf5.class);
String k = kotlinClass.k();
if (k == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
final jf5 jf5Var = (jf5) iiiVar.a(kotlinClass, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(k));
jf5Var.b.observe(this, new hrc() {
public final void a(Object obj) {
com.mxtech.videoplayer.ad.online.mxexo.b bVar;
ResourceFlow resourceFlow = (ResourceFlow) obj;
int i4 = ExoPlayerActivity.c1;
ExoPlayerActivity exoPlayerActivity = ExoPlayerActivity.this;
exoPlayerActivity.getClass();
if (resourceFlow == null || ResourceCollection.isEmpty(resourceFlow) || exoPlayerActivity.C0 != null) {
return;
}
Fragment fragment = exoPlayerActivity.w;
if (!(fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.b) || (bVar = (com.mxtech.videoplayer.ad.online.mxexo.b) fragment) == null || bVar.x == null || bVar.c == null || !vm3.d(bVar)) {
return;
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar2 = new com.mxtech.videoplayer.ad.online.mxexo.next.b(exoPlayerActivity.getFeed(), exoPlayerActivity.F, (com.mxtech.videoplayer.ad.online.mxexo.b) exoPlayerActivity.w, jf5Var);
exoPlayerActivity.C0 = bVar2;
bVar2.J.setOnClickListener(new i(bVar2, 2));
ns3 ns3Var = bVar2.N;
ns3Var.h.add(bVar2.G);
ns3Var.h.add(bVar2.b());
rk0 rk0Var = bVar2.Z;
ns3Var.f = rk0Var;
Iterator<EpisodeEndCountDownView> it = ns3Var.h.iterator();
while (it.hasNext()) {
it.next().c = rk0Var;
}
exoPlayerActivity.C0.o(exoPlayerActivity.a0);
}
});
xfg.C(jf5Var.c, (CoroutineContext) null, (fs3) null, new hf5(jf5Var, getFeed().getTvShow().getId(), null), 3);
}
}
public final void Z6() {
wn5.a aVar = new wn5.a();
aVar.a = this.K0;
OnlineResource onlineResource = this.x;
if (onlineResource != null) {
if (onlineResource instanceof OttMusicPlayList) {
aVar.b = (OttMusicPlayList) onlineResource;
} else if (onlineResource instanceof Album) {
aVar.b = (Album) onlineResource;
} else if (onlineResource instanceof TvSeason) {
aVar.b = (TvSeason) onlineResource;
} else if (onlineResource instanceof TvShow) {
aVar.b = (TvShow) onlineResource;
} else if (onlineResource instanceof Trailer) {
aVar.b = (Trailer) onlineResource;
} else {
gfh.c(new IllegalArgumentException("Exo Player container type = " + this.x.getType().typeName()));
finish();
}
}
if (this.K0 == null && this.x == null) {
gfh.c(new IllegalArgumentException("Exo Player container and feed both null."));
finish();
}
aVar.e = this.i0;
f7(aVar);
aVar.c = findViewById(2131363022);
aVar.d = this;
this.L0 = new wn5(aVar);
this.y = false;
}
public final void Z7() {
From from;
if (this.K0 == null) {
return;
}
FromStack x = getX();
if (x != null && !x.isEmpty() && this.K0.isCompleted()) {
String name = x.getFirst().getName();
if (TextUtils.isEmpty(name) || !name.equals("wpLeaderboard")) {
String str = null;
if (x.size() >= 2) {
LinkedList linkedList = new LinkedList();
Iterator<From> it = x.iterator();
while (true) {
if (!it.hasNext()) {
from = null;
break;
}
from = it.next();
if (from.getType().equals("playback")) {
break;
} else {
linkedList.add(from);
}
}
if (from != null) {
Iterator it2 = linkedList.iterator();
while (true) {
if (!it2.hasNext()) {
str = from.getId();
break;
}
From from2 = (From) it2.next();
if (from2.getType().equals("publisherDetail") || from2.getType().equals("artistDetail") || from2.getType().equals("tvShowDetail")) {
break;
}
}
}
}
this.v = str;
} else {
this.v = "";
}
x = x.newAndPush(M6());
this.s = x;
}
if (x == null || x.isEmpty()) {
getIntent();
Feed feed = this.K0;
this.s = pzh.p(From.create(feed.getId(), feed.getName(), "fromBrowser"));
}
}
public final void a7(boolean z, boolean z2) {
Feed feed;
if (z && (feed = this.K0) != null && (feed.getCoinsCount() == 0 || this.K0.getRedeemed() == 1 || jng.a(this.K0))) {
b7(new boolean[0]);
return;
}
te8 te8Var = this.w;
if ((te8Var instanceof te8) && z2) {
te8Var.playVideo();
}
}
public void a8() {
Toolbar toolbar = this.q;
if (toolbar != null) {
toolbar.setNavigationOnClickListener(new b());
}
}
@Override
public final void b(List<Float> list) {
com.mxtech.videoplayer.ad.online.ad.carousel.m mVar;
hne hneVar = this.F;
if (hneVar == null || !hneVar.isVisible() || (mVar = ((u61) this.F).m) == null || mVar.n) {
return;
}
List<Float> list2 = list;
ArrayList arrayList = mVar.o;
if (list2 != null && !list2.isEmpty()) {
for (Float f2 : list) {
if (f2 != null) {
arrayList.add(Long.valueOf((long) f2.floatValue()));
}
}
}
com.mxtech.videoplayer.ad.online.ad.carousel.m.b(arrayList, mVar.i);
}
public void b7(boolean... zArr) {
Feed feed;
Feed feed2;
String str;
String str2;
String str3;
String str4;
boolean a2;
if (this.y0) {
return;
}
Feed feed3 = this.K0;
boolean z = feed3 != null && fuh.C(feed3);
if (E7() || ((feed2 = this.K0) != null && feed2.isYoutube())) {
xq5 xq5Var = new xq5();
if (z || ((feed = this.K0) != null && feed.isYoutube())) {
n6(2131235995);
xq5Var.j9(4);
xq5Var.g = this.K0;
V7();
} else {
f6();
xq5Var.j9(0);
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
aVar.g(2131365413, xq5Var, (String) null);
aVar.j(true);
this.w = xq5Var;
return;
}
Feed feed4 = this.K0;
lai laiVar = lai.b;
lai b2 = a.b(feed4);
if (b2.m()) {
I7();
V7();
return;
}
if (b2.a.getContentAccess().getPreventAutoPlay()) {
jph jphVar = new jph();
FromStack x = getX();
Feed feed5 = this.K0;
String str5 = this.v;
Serializable serializableExtra = getIntent() == null ? null : getIntent().getSerializableExtra("KEY_TAB_TYPE_AND_NAME");
kotlin.Pair pair = serializableExtra instanceof kotlin.Pair ? (kotlin.Pair) serializableExtra : new kotlin.Pair((Object) null, (Object) null);
String str6 = this.J0;
Bundle bundle = new Bundle();
bundle.putParcelable(FromStack.FROM_LIST, x);
bundle.putSerializable("KEY_TAB_TYPE_AND_NAME", pair);
bundle.putString("relativeId", str5);
bundle.putSerializable("video", feed5);
bundle.putString("streamId", str6);
jphVar.setArguments(bundle);
this.w = jphVar;
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager2, supportFragmentManager2);
h2.g(2131365413, this.w, (String) null);
h2.j(true);
V7();
return;
}
ltg ltgVar = this.E0;
Feed feed6 = getFeed();
FromStack fromStack = fromStack();
boolean d7 = d7(((j1b) getResources()).a.getConfiguration());
ph phVar = new ph(this, 5);
if (ltgVar.c) {
str = FromStack.FROM_LIST;
str2 = "relativeId";
str3 = "video";
str4 = "streamId";
a2 = false;
} else {
ltgVar.c = true;
str = FromStack.FROM_LIST;
str2 = "relativeId";
str3 = "video";
str4 = "streamId";
a2 = ltgVar.a(this, feed6, fromStack, false, d7, false, phVar);
}
if (a2) {
V7();
return;
}
C6();
vf3 vf3Var = this.F0;
if (vf3Var != null) {
if (vf3Var.i == 4) {
d5();
V7();
return;
}
}
if (vf3Var != null) {
vf3Var.b(0);
}
n6(2131235979);
boolean booleanExtra = getIntent().getBooleanExtra("isScreenLocked", false);
boolean z2 = zArr.length > 0 && zArr[0];
Feed feed7 = this.K0;
FromStack x2 = getX();
String str7 = this.v;
boolean z3 = (!this.A || this.t0 || z) ? false : true;
boolean z4 = this.B;
String str8 = this.C;
boolean z5 = this.r0;
boolean z6 = this.t0;
String str9 = this.J0;
com.mxtech.videoplayer.ad.online.mxexo.b bVar = new com.mxtech.videoplayer.ad.online.mxexo.b();
Bundle bundle2 = new Bundle();
bundle2.putSerializable(str3, feed7);
bundle2.putParcelable(str, x2);
bundle2.putString(str4, str9);
bundle2.putString(str2, str7);
bundle2.putBoolean("make_init_full_screen", z3);
bundle2.putBoolean("isScreenLocked", booleanExtra);
bundle2.putBoolean("need_login", z4);
bundle2.putString("loginMandateRule", str8);
bundle2.putBoolean("needSkipAd", z2);
bundle2.putBoolean("need_svod_mask", z5);
bundle2.putBoolean("dont_play_init", z6);
bVar.setArguments(bundle2);
bVar.E1 = this;
FragmentManager supportFragmentManager3 = getSupportFragmentManager();
supportFragmentManager3.getClass();
androidx.fragment.app.a aVar2 = new androidx.fragment.app.a(supportFragmentManager3);
aVar2.g(2131365413, bVar, (String) null);
aVar2.j(true);
this.A = false;
this.t0 = false;
this.w = bVar;
e eVar = this.m0;
if (eVar != null) {
bVar.o2((k2b) eVar.a);
this.m0 = null;
}
this.X = true;
N1();
e8();
}
public final void b8(boolean z) {
View findViewById = findViewById(2131366181);
if (findViewById == null) {
return;
}
float f2 = z ? 1.0f : 0.0f;
if (findViewById.getAlpha() != f2) {
findViewById.setAlpha(f2);
}
}
public final void c3() {
this.R.K(4);
}
public final void c8() {
PictureInPictureParams.Builder actions;
PictureInPictureParams build;
if (Build.VERSION.SDK_INT < 26) {
return;
}
try {
ArrayList<RemoteAction> t6 = t6();
if (t6.isEmpty()) {
return;
}
w30.b();
actions = wg.a().setActions(t6);
build = actions.build();
qy1.d(this, build);
} catch (Exception unused) {
int i2 = d1j.a;
}
}
@Override
public final void d3(ResourceFlow resourceFlow, OnlineResource onlineResource, boolean z, FromStack fromStack, boolean z2, ccf ccfVar) {
OnlineFlowEntranceActivity.D6(this, g34.b(resourceFlow), onlineResource, false, z, fromStack, z2, ccfVar, this.x, DownloadFlowEntranceActivity.class, false);
}
public final void d5() {
if (getSupportFragmentManager().D(2131365413) instanceof sp5) {
return;
}
V7();
int d2 = g7f.d(this);
String n = fuh.n(this.K0.posterList(), d2, (int) (d2 * 0.6f), true);
boolean z = this.a0;
sp5 sp5Var = new sp5();
Bundle bundle = new Bundle();
bundle.putBoolean("IS_LANDSCAPE", z);
bundle.putString("BG_URL", n);
bundle.putString("TITLE", "");
sp5Var.setArguments(bundle);
sp5Var.b = new to1(1, this, sp5Var);
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
aVar.g(2131365413, sp5Var, (String) null);
aVar.j(true);
vf3 vf3Var = this.F0;
if (vf3Var != null) {
mph mphVar = vf3Var.j;
mphVar.getClass();
mphVar.c(d0d.u("maxStreamErrorViewed"));
}
}
@Override
public From d6() {
return null;
}
public final boolean dispatchKeyEvent(KeyEvent keyEvent) {
te8 te8Var = this.w;
return (te8Var == null || !(te8Var instanceof te8)) ? super.dispatchKeyEvent(keyEvent) : te8Var.dispatchKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent);
}
@Override
public final f7f e5() {
return this.T0;
}
@Override
public final int e6() {
return i0g.b().h("online_player_activity");
}
public final void e8() {
if (this.q == null) {
return;
}
if (getFeed() == null || !getFeed().isExoYoutube()) {
this.q.setNavigationIcon(2131234207);
} else {
this.q.setNavigationIcon(2131235611);
}
}
public void g(int i2) {
Feed feed;
if (this.w instanceof xq5) {
n6(2131235995);
((xq5) this.w).j9(i2);
}
if (i2 == 4 && (feed = this.K0) != null) {
feed.setStatus(VideoStatus.OFFLINE);
}
String str = this.J0;
if (str != null) {
this.H0.getClass();
LinkedHashMap linkedHashMap = rai.b;
tai taiVar = (tai) linkedHashMap.get(str);
if (taiVar != null) {
taiVar.f();
}
linkedHashMap.remove(str);
}
this.I0.q(i2);
}
public final int g0(boolean z) {
View view = this.S;
int measuredHeight = view != null ? view.getMeasuredHeight() : 0;
return (this.S == null || measuredHeight == 0) ? z ? ((j1b) getResources()).a.getDimensionPixelSize(2131166215) : ((j1b) getResources()).a.getDimensionPixelSize(2131166040) : measuredHeight;
}
@Override
public final void g5() {
H6("gesture", true);
}
@Override
public final List<String> getCdnList() {
List<String> arrayList;
wn5 wn5Var = this.L0;
if (wn5Var != null) {
re8 re8Var = wn5Var.f;
arrayList = re8Var == null ? new ArrayList<>() : re8Var.getCdnList();
} else {
arrayList = new ArrayList<>();
}
boolean n = ti.n(arrayList);
ArrayList arrayList2 = this.o0;
if (n) {
return arrayList2;
}
arrayList2.clear();
arrayList2.addAll(arrayList);
return arrayList2;
}
@Override
public final Feed getFeed() {
return this.L0.f.getFeed() == null ? this.K0 : this.L0.f.getFeed();
}
public final OnlineResource getResource() {
return this.x;
}
public final List h1() {
return this.L0.f.N();
}
public final boolean h3() {
return this.R != null;
}
public final void h7() {
iii iiiVar = new iii(getViewModelStore(), getDefaultViewModelProviderFactory(), getDefaultViewModelCreationExtras());
mu9 kotlinClass = JvmClassMappingKt.getKotlinClass(ikd.class);
String k = kotlinClass.k();
if (k == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
ikd ikdVar = (ikd) iiiVar.a(kotlinClass, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(k));
ikd.f = new WeakReference<>(this);
this.D0 = ikdVar;
ikdVar.c.observe(this, new hrc() {
public final void a(Object obj) {
int i2 = ExoPlayerActivity.c1;
?? r0 = ExoPlayerActivity.this;
r0.getClass();
if (((Boolean) obj).booleanValue()) {
Feed feed = r0.K0;
int i3 = 0;
if (feed != null && !vue.w(feed.getType())) {
te8 te8Var = r0.w;
if ((te8Var instanceof te8) && !te8Var.t6()) {
i3 = r0.J6("auto_switch", true, false);
}
}
r0.D0.d = i3;
if (i3 == 2) {
r0.finish();
}
}
}
});
}
public final pj4 j1() {
return this.i0;
}
@Override
public int j6() {
return 2131560110;
}
public boolean k0() {
return (this.K0 == null || this.L0.e() == null || fuh.C(this.K0)) ? false : true;
}
@Override
public final List k4() {
return this.L0.f.f();
}
@Override
public final void k5() {
this.Y0 = false;
tya.m.m().b = false;
Fragment fragment = this.w;
if (fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) {
((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).oa(this.Y0);
}
sj8 sj8Var = this.w;
if (sj8Var instanceof sj8) {
sj8Var.k5();
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
int i2 = d1j.a;
if (Intrinsics.b(bVar.M, "STATE_END_RECOMMEND_ONLY_COUNTDOWN")) {
bVar.L.getClass();
mf5 mf5Var = mf5.m;
mf5.b.a().c(16);
}
bVar.P = false;
}
jkd.b();
}
public final boolean k7(Intent intent) {
k2b k2bVar;
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar;
if (!"android.intent.action.CLOSE_SYSTEM_DIALOGS".equals(intent.getAction())) {
return false;
}
String stringExtra = intent.getStringExtra("reason");
if (TextUtils.isEmpty(stringExtra) || isInPictureInPictureMode()) {
return false;
}
if (!"homekey".equals(stringExtra) && !"recentapps".equals(stringExtra) && !"backPress".equals(stringExtra)) {
return false;
}
Fragment fragment = this.w;
if (!(fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) || (k2bVar = ((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).p) == null || k2bVar.l() || G6()) {
return false;
}
if ("homekey".equals(stringExtra) && (bVar = this.C0) != null) {
int i2 = d1j.a;
if (Intrinsics.b(bVar.M, "STATE_RIGHT_AND_COUNTDOWN") || Intrinsics.b(bVar.M, "STATE_COUNTDOWN_ONLY")) {
bVar.m("middleHome");
} else if (Intrinsics.b(bVar.M, "STATE_END_RECOMMEND")) {
bVar.m("lastHome");
}
}
if (getLifecycle().b() != b.g) {
return false;
}
int H6 = H6("auto_switch", false);
if (Build.VERSION.SDK_INT >= 26) {
if (x6()) {
gfh.c(new PIPGrantedException());
} else {
gfh.c(new PIPNotGrantedException());
}
}
return H6 == 2 || H6 == 1;
}
public final void l1() {
this.R.K(5);
}
public final void l7(@NonNull Bundle bundle) {
Uri uri;
if (bundle == null) {
bundle = Bundle.EMPTY;
}
try {
uri = Uri.parse(bundle.getString("svodCallback", ""));
} catch (Exception unused) {
uri = Uri.EMPTY;
}
this.t0 = uri.getBooleanQueryParameter("dont_play_init", false);
this.u0 = uri.getBooleanQueryParameter("download_on_init", false);
wn5 wn5Var = this.L0;
if (wn5Var != null) {
this.y = false;
this.j0 = true;
wn5Var.f();
}
b7(new boolean[0]);
Feed feed = this.K0;
if (feed != null) {
Fragment fragment = this.w;
if (fragment instanceof xq5) {
xq5 xq5Var = (xq5) fragment;
xq5Var.g = feed;
xq5Var.j9(3);
}
}
}
@Override
public final void m5() {
te8 te8Var = this.w;
if (te8Var == null || !(te8Var instanceof te8)) {
return;
}
te8Var.I7();
}
public final void m7() {
String str;
jd8 l;
Feed feed = this.K0;
if (feed == null || feed.getId() == null) {
return;
}
gd8 f2 = ((y0) vi.c()).f("shouldPreloadVideoAds");
if (!((f2 == null || (l = f2.l()) == null) ? false : l.f(false)) || (str = this.J0) == null) {
return;
}
tj8 tj8Var = this.I0;
this.H0.getClass();
tai a2 = rai.a(str, tj8Var);
Feed feed2 = this.K0;
String id = feed2.getId();
Uri c2 = wf1.c(pp.g, "videoRoll");
cn cnVar = b5c.a;
nfi g2 = b5c.a.g(c2);
FromStack fromStack = fromStack();
hk i2 = pl.i(feed2, id, g2, null, false, (fromStack == null || fromStack.size() <= 1) ? null : fromStack.get(1).getType(), (fromStack() == null || fromStack().size() <= 1) ? null : fromStack().get(1).getName(), this.J0);
if (i2 != null) {
this.I0.i(i2);
String id2 = this.K0.getId();
if (a2.b) {
return;
}
a2.b = true;
a2.a.o();
if (i2.r == 2) {
ArrayList arrayList = new ArrayList((List) wod.g.getValue());
arrayList.add(nl1.f);
arrayList.add(n4h.f);
arrayList.add(h9d.f);
arrayList.add(rv8.f);
ArrayList arrayList2 = new ArrayList(h43.n(arrayList, 10));
Iterator it = arrayList.iterator();
while (it.hasNext()) {
ca3 ca3Var = (ca3) it.next();
CompanionAdContainer companionAdContainer = new CompanionAdContainer(this);
companionAdContainer.setTextAlignment(4);
v93 v93Var = new v93(companionAdContainer);
CompanionSlotType companionSlotType = ca3Var.c;
if (companionSlotType != null) {
v93Var.d = companionSlotType;
} else {
v93Var.setSize(ca3Var.a, ca3Var.b);
uai.a(companionAdContainer);
}
arrayList2.add(v93Var);
}
a2.e(i2, this, arrayList2);
} else {
List<ca3> list = (List) wod.g.getValue();
ArrayList arrayList3 = new ArrayList(h43.n(list, 10));
for (ca3 ca3Var2 : list) {
CompanionAdSlot createCompanionAdSlot = ImaSdkFactory.getInstance().createCompanionAdSlot();
createCompanionAdSlot.setContainer(new FrameLayout(this));
createCompanionAdSlot.setSize(ca3Var2.a, ca3Var2.b);
arrayList3.add(createCompanionAdSlot);
}
a2.d(i2, this, arrayList3);
}
at atVar = a2.c;
com.google.android.exoplayer2.upstream.a aVar = new com.google.android.exoplayer2.upstream.a(atVar.b);
?? r12 = atVar.a;
r12.l(new int[]{0, 1, 2, 3});
r12.d(aVar, id2, i2.k, i2.l, a2.c.c);
}
}
@Override
public final void n2(boolean z) {
hne hneVar = this.F;
if (hneVar == null || !hneVar.isVisible()) {
return;
}
this.F.q9(z);
}
public final void n7() {
if (this.w != null) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.o(this.w);
h2.e();
this.w = null;
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
int i2 = d1j.a;
ea2.d().f(bVar.U);
bVar.n.setControllerHideOtherReason(false);
bVar.L.getClass();
mf5 mf5Var = mf5.m;
c cVar = ((u9g) mf5.b.a()).a;
if (cVar != null) {
cVar.sendMessage(cVar.obtainMessage(-1, c.p));
}
mf5.m = null;
bVar.a();
}
this.C0 = null;
this.b1 = 0;
vf3 vf3Var = this.F0;
if (vf3Var != null) {
vf3Var.b(2);
}
}
}
public final void o7() {
if (z4i.e(this.I)) {
this.I = null;
return;
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.I);
h2.o(this.I);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.I = null;
}
public final void onAttachedToWindow() {
super/*android.app.Activity*/.onAttachedToWindow();
this.V = true;
N1();
}
@Override
public final void onAudioFocusChange(int i2) {
if (i2 != 1) {
te8 te8Var = this.w;
if (te8Var instanceof te8) {
te8Var.I1();
}
}
}
public void onBackPressed() {
m activity;
jd8 l;
m activity2;
gm gmVar = this.h0;
if (gmVar != null) {
BottomSheetBehavior bottomSheetBehavior = gmVar.p;
int i2 = bottomSheetBehavior.J;
if (i2 == 3) {
bottomSheetBehavior.n(4);
return;
} else if (i2 == 4) {
gmVar.b();
return;
}
}
Fragment D = getSupportFragmentManager().D(2131365413);
if (D instanceof rp5) {
rp5 rp5Var = (rp5) D;
if (rp5Var.C == 2 && (activity2 = rp5Var.getActivity()) != null && !activity2.isFinishing()) {
activity2.setRequestedOrientation(7);
return;
}
} else if (D instanceof yq5) {
yq5 yq5Var = (yq5) D;
if (yq5Var.f && (activity = yq5Var.getActivity()) != null && !activity.isFinishing()) {
activity.setRequestedOrientation(7);
return;
}
}
te8 te8Var = this.w;
if (te8Var instanceof te8) {
if (te8Var.s()) {
return;
}
} else if ((te8Var instanceof rr5) && ((rr5) te8Var).s()) {
return;
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
if (Intrinsics.b(bVar.M, "STATE_RIGHT_AND_COUNTDOWN")) {
bVar.m("middleBack");
} else if (Intrinsics.b(bVar.M, "STATE_END_RECOMMEND")) {
bVar.m("lastBack");
}
}
Intent intent = new Intent();
intent.setAction("android.intent.action.CLOSE_SYSTEM_DIALOGS");
intent.putExtra("reason", "backPress");
Fragment D2 = getSupportFragmentManager().D(2131366181);
vi viVar = vi.b;
gd8 f2 = ((y0) vi.c()).f("key_show_pip_on_back_press");
if (((f2 == null || (l = f2.l()) == null) ? false : l.f(false)) && !(this instanceof ExoTrailerPlayerActivity) && !y82.f() && !y82.a() && !this.a0 && ((D2 == null || !D2.isAdded() || !D2.isVisible()) && k7(intent))) {
this.D0.u(this);
b8(false);
} else {
this.D0.u(this);
b8(false);
super/*ub3*/.onBackPressed();
}
}
public final void onConfigurationChanged(Configuration configuration) {
ssd ssdVar;
super.onConfigurationChanged(configuration);
this.a0 = d7(configuration);
wn5 wn5Var = this.L0;
if (wn5Var == null || wn5Var.e() == null || this.a0 || !k0()) {
U6();
} else if (this.R != null) {
this.Q.setVisibility(0);
this.R.I(this.L0.e());
} else {
X7();
}
if (!this.a0 && (ssdVar = this.S0) != null) {
ssdVar.dismiss();
}
lpd lpdVar = this.q0;
if (lpdVar != null && lpdVar.isShowing()) {
this.q0.dismissAllowingStateLoss();
F7();
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
bVar.o(this.a0);
}
com.mxtech.videoplayer.ad.online.ad.link.a aVar = this.G0;
if (aVar != null) {
aVar.a(!this.a0);
}
}
@Override
public void onCreate(Bundle bundle) {
OnlineResource onlineResource;
this.K0 = (Feed) (bundle == null ? getIntent().getSerializableExtra("video") : bundle.getSerializable("video"));
Intent intent = getIntent();
String stringExtra = intent.getStringExtra("streamId");
if (TextUtils.isEmpty(stringExtra)) {
this.J0 = UUID.randomUUID().toString();
} else {
this.J0 = stringExtra;
}
intent.putExtra("streamId", this.J0);
iu7.e = new WeakReference<>(this.M0);
this.u.a();
h6j b2 = h6j.b();
b2.getClass();
boolean z = this instanceof ExoTrailerPlayerActivity;
if (!z) {
b2.a();
((Stack) b2.b).push(this);
}
dr5 b3 = dr5.b();
e eVar = b3.i;
if (eVar == null) {
eVar = null;
} else {
b3.i = null;
}
this.m0 = eVar;
if (eVar != null) {
this.n0 = eVar.c;
overridePendingTransition(0, 0);
this.p0 = true;
} else {
this.j0 = true;
}
this.P = new p0f(this);
N6(getIntent());
Intent intent2 = getIntent();
this.D = intent2.getStringExtra("cId");
this.E = intent2.getStringExtra("comment_url");
setTheme(e6());
vk4.j(this);
super.onCreate(bundle);
((tya) getApplication()).y(this);
a8();
PlayService.y();
ExoPlayerService.M();
if (!tj5.b(this)) {
tj5.e(this);
}
this.z = new i();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.intent.action.HEADSET_PLUG");
intentFilter.addAction("android.media.AUDIO_BECOMING_NOISY");
zm3.a(this, this.z, intentFilter, true);
new Handler(getMainLooper());
this.Y = new shc(this.U0);
this.x = (OnlineResource) getIntent().getSerializableExtra("container");
boolean booleanExtra = getIntent().getBooleanExtra("make_init_full_screen", false);
this.A = booleanExtra;
if (booleanExtra) {
setRequestedOrientation(6);
getWindow().addFlags(SkinViewInflater.FLAG_BUTTON_TINT);
}
this.B = getIntent().getBooleanExtra("need_login", false);
this.r0 = getIntent().getBooleanExtra("need_svod_mask", false);
this.C = getIntent().getStringExtra("login_mandate_rule");
this.s0 = getIntent().getBooleanExtra("show_svod_login", false);
if (this.K0 == null && this.x == null) {
finish();
return;
}
hod F6 = F6();
this.I0 = F6;
F6.f();
Feed feed = this.K0;
this.l0 = feed != null && feed.isStartWithAutoPlay();
if (this.m0 == null && !z) {
dn5.c = 1.0f;
dn5.d = -1.0f;
dn5.e = null;
}
h7();
if (this.K0 != null && (onlineResource = this.x) != null && ((onlineResource instanceof TvSeason) || (onlineResource instanceof TrailerPreview) || (onlineResource instanceof Trailer))) {
this.x = null;
}
n7();
pzh.n(getX());
u6(getIntent(), null, this.K0);
Z7();
Z6();
ArrayList arrayList = this.i0.a;
if (!arrayList.contains(this)) {
arrayList.add(this);
}
Feed feed2 = this.K0;
if (feed2 != null && feed2.isFromBanner() && vue.g0(this.K0.getType())) {
this.K0 = this.L0.f.getFeed();
}
this.L0.f.load();
b7(new boolean[0]);
this.Q = (ViewStub) findViewById(2131367717);
tya tyaVar = tya.m;
swd.f().edit().putBoolean("key_content_language_primary_clicked", false).apply();
ScrollCoordinatorLayout scrollCoordinatorLayout = (ScrollCoordinatorLayout) findViewById(2131365746);
this.N0 = scrollCoordinatorLayout;
scrollCoordinatorLayout.setPipStateProvider(this);
e8();
cog cogVar = new cog();
this.w0 = cogVar;
cogVar.h = true;
int i2 = d1j.a;
Handler handler = cogVar.e;
handler.postDelayed(new ti1(cogVar, 11), 1000L);
handler.postDelayed(cogVar.g, cogVar.f);
if (this.s0) {
G7();
}
i25.a();
m7();
}
@vgg(threadMode = ThreadMode.MAIN)
public void onDataReceived(kng kngVar) {
String str = kngVar.a;
if (!jz9.L(this) && str.equals("SubscriptionNavigatorFragment")) {
Bundle bundle = kngVar.b;
if (bundle.getBoolean("is_successful")) {
l7(bundle);
}
}
}
@Override
public final void onDestroy() {
o0f o0fVar;
this.u.j();
WeakReference<iu7.b> weakReference = iu7.e;
if (weakReference != null) {
weakReference.clear();
}
iu7.c();
if (tj5.b(this)) {
tj5.h(this);
}
View view = this.U;
if (view != null) {
view.getViewTreeObserver().removeOnGlobalLayoutListener(this.W0);
}
gm gmVar = this.h0;
if (gmVar != null) {
gmVar.d();
}
U6();
u7();
((Stack) h6j.b().b).remove(this);
ExoPlayerService exoPlayerService = ExoPlayerService.Q0;
if (exoPlayerService == null || !exoPlayerService.Z) {
wn5 wn5Var = this.L0;
if (wn5Var != null) {
wn5Var.d = null;
wn5Var.f.release();
}
if (!(this instanceof ExoTrailerPlayerActivity)) {
dn5.c = 1.0f;
dn5.d = -1.0f;
dn5.e = null;
}
}
this.T0.a();
p0f p0fVar = this.P;
if (p0fVar != null && (o0fVar = p0fVar.b) != null) {
o0fVar.removeCallbacksAndMessages(null);
p0fVar.b = null;
}
if (this.Z0) {
this.Z0 = false;
unregisterReceiver(this.X0);
}
try {
unregisterReceiver(this.z);
} catch (Exception unused) {
}
op5 op5Var = this.a1;
if (op5Var != null) {
unregisterReceiver(op5Var);
}
super.onDestroy();
tj5.c(new hff.f());
n7();
bg.h(this);
this.V0.removeCallbacksAndMessages(null);
shc shcVar = this.Y;
if (shcVar != null) {
shcVar.e();
this.Y.c();
}
this.i0.a.remove(this);
cog cogVar = this.w0;
if (cogVar != null) {
cogVar.h = false;
int i2 = d1j.a;
cogVar.e.removeCallbacks(cogVar.g);
}
vf3 vf3Var = this.F0;
if (vf3Var != null) {
vf3Var.c = null;
vf3Var.f.removeCallbacksAndMessages(null);
vf3Var.g.removeCallbacksAndMessages(null);
vf3Var.i = 2;
this.F0 = null;
}
if (this.B0 != null) {
dia.a(this).d(this.B0);
}
if (hsa.a != -1) {
tya tyaVar = tya.m;
xrf.f().edit().putInt("key_exit_online_player_num", xrf.f().getInt("key_exit_online_player_num", 1) + 1).apply();
}
this.I0.d();
this.I0.j(false);
V7();
this.H0.getClass();
LinkedHashMap linkedHashMap = rai.b;
Set entrySet = linkedHashMap.entrySet();
ArrayList arrayList = new ArrayList();
for (Object obj : entrySet) {
if (!((tai) ((Map.Entry) obj).getValue()).f) {
arrayList.add(obj);
}
}
ArrayList arrayList2 = new ArrayList(h43.n(arrayList, 10));
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
((tai) entry.getValue()).f();
arrayList2.add((String) entry.getKey());
}
Iterator it2 = arrayList2.iterator();
while (it2.hasNext()) {
linkedHashMap.remove((String) it2.next());
}
}
public final void onDismiss() {
te8 te8Var = this.w;
if (te8Var instanceof te8) {
te8Var.i3();
}
}
@vgg(priority = 2, threadMode = ThreadMode.MAIN)
public void onEvent(dog dogVar) {
cog cogVar;
if (tj5.a.contains(this) && (cogVar = this.w0) != null && cogVar.h) {
if (dogVar != null) {
tj5.a(dogVar);
}
if (d7(((j1b) getResources()).a.getConfiguration())) {
setRequestedOrientation(7);
}
G7();
}
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
s6(intent);
}
@Override
public final boolean onOptionsItemSelected(MenuItem menuItem) {
return menuItem.getItemId() == 16908332 && !(this.w instanceof com.mxtech.videoplayer.ad.online.mxexo.c) && super.onOptionsItemSelected(menuItem);
}
@Override
public final void onPause() {
k2b k2bVar;
super.onPause();
bg.i(this);
tj5.c(new hff.f());
Fragment fragment = this.w;
boolean z = fragment == null || !(fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) || (k2bVar = ((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).p) == null || k2bVar.l();
if (isFinishing() && !z) {
cce.n.c();
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
int i2 = d1j.a;
if (bVar.f()) {
ns3 ns3Var = bVar.N;
ns3Var.getClass();
if (ns3Var.d) {
ns3Var.e = true;
((Handler) ns3Var.a.getValue()).removeCallbacks(ns3Var.g);
}
}
}
vf3 vf3Var = this.F0;
if (vf3Var != null) {
vf3Var.f.removeCallbacksAndMessages(null);
}
}
@Override
public final void onPictureInPictureModeChanged(boolean z, Configuration configuration) {
super.onPictureInPictureModeChanged(z, configuration);
if (!z) {
k5();
if (this.Z0) {
this.Z0 = false;
unregisterReceiver(this.X0);
return;
}
return;
}
if (this.Z0) {
return;
}
this.Z0 = true;
if (this.X0 == null) {
this.X0 = new pp5(this, 0);
}
zm3.a(this, this.X0, new IntentFilter("media_control"), true);
}
@Override
public final void onResume() {
super.onResume();
bg.a(this, 3);
tj5.c(new hff.a());
if (this.Z) {
if (Build.MODEL.equals("MI PAD 4 PLUS") && Build.MANUFACTURER.equals("Xiaomi")) {
this.V0.sendEmptyMessageDelayed(2, 500L);
} else {
H6("manual", true);
}
this.Z = false;
}
if (!TextUtils.isEmpty(this.D) && !TextUtils.isEmpty(this.E)) {
String id = this.K0.getId();
String typeName = this.K0.getType().typeName();
String str = this.D;
String str2 = Const.YOU_DEV_KEEEEY;
l lVar = null;
try {
l.a aVar = new l.a();
aVar.f((l) null, "https://androidapi.mxplay.com/v1/message/pintop-comment");
lVar = aVar.c();
} catch (IllegalArgumentException unused) {
}
l.a f2 = lVar.f();
f2.b("vid", id);
f2.b("vtype", typeName);
f2.b("cid", str);
y7(this.E, this.K0, f2.toString(), this.D, false);
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
bVar.f.postDelayed(new defpackage.h(bVar, 4), 100L);
}
vf3 vf3Var = this.F0;
if (vf3Var == null || vf3Var.i != 1) {
return;
}
vf3Var.f.postDelayed(new uf3(vf3Var, 0), vf3.l);
}
public final void onSaveInstanceState(Bundle bundle) {
Feed feed;
super/*ub3*/.onSaveInstanceState(bundle);
if (bundle == null || (feed = this.K0) == null) {
return;
}
bundle.putSerializable("video", feed);
}
@Override
public final void onStart() {
super.onStart();
bg.j(this);
shc shcVar = this.Y;
if (shcVar != null) {
shcVar.d();
}
}
@Override
public final void onStop() {
lpd lpdVar = this.q0;
if (lpdVar != null && lpdVar.isShowing()) {
this.q0.dismissAllowingStateLoss();
}
super.onStop();
bg.k(this);
}
@Override
public final void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
if (z && this.G0 == null) {
com.mxtech.videoplayer.ad.online.ad.link.a aVar = new com.mxtech.videoplayer.ad.online.ad.link.a();
this.G0 = aVar;
aVar.d(AdPlacement.OTTDetailLink, getLifecycle(), (ViewGroup) findViewById(2131363541), this);
this.G0.a(!this.a0);
}
}
public final void p7() {
if (!z4i.e(this.J)) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.J);
h2.o(this.J);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.J = null;
}
if (z4i.e(this.K)) {
return;
}
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
androidx.fragment.app.a h3 = km4.h(supportFragmentManager2, supportFragmentManager2);
h3.h(2130772053, 2130772054, 0, 0);
h3.n(this.K);
h3.o(this.K);
h3.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.K = null;
}
public final lii provider() {
return getSupportFragmentManager().D(2131363022);
}
public final boolean q6() {
hne hneVar = this.F;
if (hneVar != null) {
return hneVar.q6();
}
return false;
}
public final void q7() {
if (z4i.e(this.L)) {
return;
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.L);
h2.o(this.L);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.L = null;
}
public final void r7() {
if (z4i.e(this.O)) {
return;
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.O);
h2.o(this.O);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.O = null;
}
public void s6(Intent intent) {
OnlineResource onlineResource;
String stringExtra = intent.getStringExtra("streamId");
if (TextUtils.isEmpty(stringExtra)) {
this.J0 = UUID.randomUUID().toString();
} else {
this.J0 = stringExtra;
}
intent.putExtra("streamId", this.J0);
if (getIntent() != null && intent.getSerializableExtra("KEY_TAB_TYPE_AND_NAME") == null) {
intent.putExtra("KEY_TAB_TYPE_AND_NAME", getIntent().getSerializableExtra("KEY_TAB_TYPE_AND_NAME"));
}
this.u0 = false;
this.t0 = false;
if (this.K0 != null) {
u7();
}
this.e0 = 0;
this.d0 = false;
this.g0 = false;
a6(this.c0);
PlayService.y();
ExoPlayerService.M();
N6(intent);
this.D = intent.getStringExtra("cId");
this.E = intent.getStringExtra("comment_url");
setIntent(intent);
this.k0 = false;
Feed feed = (Feed) intent.getSerializableExtra("video");
u6(intent, this.K0, feed);
this.K0 = feed;
this.I0.d();
this.I0.j(false);
this.I0.deactivate();
this.x = (OnlineResource) getIntent().getSerializableExtra("container");
this.A = getIntent().getBooleanExtra("make_init_full_screen", false);
vf3 vf3Var = this.F0;
e eVar = null;
if (vf3Var != null) {
vf3Var.c = null;
vf3Var.f.removeCallbacksAndMessages(null);
vf3Var.g.removeCallbacksAndMessages(null);
vf3Var.i = 2;
this.F0 = null;
}
if (this.K0 == null && this.x == null) {
finish();
return;
}
hod F6 = F6();
this.I0 = F6;
F6.f();
Feed feed2 = this.K0;
this.l0 = feed2 != null && feed2.isStartWithAutoPlay();
X6();
this.E0 = new ltg();
this.G = null;
if (this.K0 != null && (onlineResource = this.x) != null && ((onlineResource instanceof TvSeason) || (onlineResource instanceof TrailerPreview) || (onlineResource instanceof Trailer))) {
this.x = null;
}
n7();
Z7();
Z6();
ArrayList arrayList = this.i0.a;
if (!arrayList.contains(this)) {
arrayList.add(this);
}
dr5 b2 = dr5.b();
e eVar2 = b2.i;
if (eVar2 != null) {
b2.i = null;
eVar = eVar2;
}
this.m0 = eVar;
if (eVar != null) {
this.n0 = eVar.c;
this.p0 = true;
this.b0 = 0;
} else {
this.j0 = true;
}
this.L0.f();
b7(new boolean[0]);
Toolbar toolbar = this.q;
if (toolbar != null) {
toolbar.setAlpha(1.0f);
}
m7();
}
public final void s7() {
if (z4i.e(this.N)) {
return;
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.N);
h2.o(this.N);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.N = null;
}
public String source() {
return "detail";
}
@Override
public final boolean t0() {
return false;
}
@Override
public final boolean t1() {
return this.Z;
}
public final boolean t5(boolean z) {
return this.E0.a(this, getFeed(), fromStack(), z, d7(((j1b) getResources()).a.getConfiguration()), true, new z1(this, 5));
}
public final ArrayList<RemoteAction> t6() {
ArrayList<RemoteAction> arrayList = new ArrayList<>();
Fragment fragment = this.w;
if (!(fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c)) {
return arrayList;
}
k2b k2bVar = ((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).p;
Pair<dod, dod> J = J();
if (J != null && k2bVar != null) {
boolean z = tya.o.b.getBoolean("custom_pip_control", true);
Icon createWithResource = !z ? Icon.createWithResource((Context) this, 2131235031) : J.first != null ? Icon.createWithResource((Context) this, 2131235030) : Icon.createWithResource((Context) this, 2131235029);
boolean p = k2bVar.p();
Intent putExtra = new Intent("media_control").putExtra("control_type", 3);
int i2 = ifd.b;
arrayList.add(v30.b(createWithResource, PendingIntent.getBroadcast(this, 1, putExtra, i2)));
arrayList.add(v30.b(p ? Icon.createWithResource((Context) this, 2131234869) : Icon.createWithResource((Context) this, 2131234880), PendingIntent.getBroadcast(this, p ? 10 : 20, new Intent("media_control").putExtra("control_type", 1), ifd.c)));
arrayList.add(v30.b(!z ? Icon.createWithResource((Context) this, 2131235026) : J.second != null ? Icon.createWithResource((Context) this, 2131235028) : Icon.createWithResource((Context) this, 2131235027), PendingIntent.getBroadcast(this, 3, new Intent("media_control").putExtra("control_type", 4), i2)));
}
return arrayList;
}
public final void t7() {
if (z4i.e(this.M)) {
return;
}
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.n(this.M);
h2.o(this.M);
h2.e();
if (k0()) {
this.R.setForceHide(false);
c3();
}
this.M = null;
}
public final void u6(Intent intent, OnlineResource onlineResource, OnlineResource onlineResource2) {
From n = pzh.n(getX());
if (n != null) {
if ("homeHistory".equals(n.getId())) {
this.O0 = false;
return;
} else if ("trailerPlayback".equals(n.getType())) {
this.O0 = false;
this.P0 = true;
return;
}
}
Bundle bundleExtra = intent.getBundleExtra("intents_key_extras");
if (bundleExtra != null ? bundleExtra.getBoolean("from_auto_play_next") : false) {
this.O0 = false;
return;
}
if (onlineResource2 == null) {
this.O0 = false;
return;
}
if (onlineResource == null) {
this.O0 = true;
return;
}
if (TextUtils.equals(onlineResource.getId(), onlineResource2.getId())) {
this.O0 = false;
return;
}
if (!vue.g0(onlineResource.getType()) || !vue.g0(onlineResource2.getType())) {
this.O0 = true;
return;
}
TvSeason season = ((Feed) onlineResource).getSeason();
TvSeason season2 = ((Feed) onlineResource2).getSeason();
if (season == null || season2 == null) {
return;
}
this.O0 = !TextUtils.equals(season.getId(), season2.getId());
}
public final void u7() {
Feed feed;
te8 te8Var;
if (!this.k0 || (feed = this.K0) == null || feed.getType() == null || (te8Var = this.w) == null || !(te8Var instanceof te8) || te8Var.getPlayer() == null) {
return;
}
long contentPosition = this.w.getPlayer().getContentPosition();
long duration = this.w.getPlayer().getDuration();
Feed feed2 = this.K0;
hp5 hp5Var = new hp5(this);
long creditsStartTime = feed2.getCreditsStartTime();
if (creditsStartTime == 0) {
if (contentPosition <= duration - 5000) {
return;
}
} else if (contentPosition <= creditsStartTime * 1000) {
return;
}
String typeName = feed2.getType().typeName();
String id = feed2.getId();
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("resourceType", typeName);
jSONObject.put("resourceId", id);
} catch (JSONException unused) {
}
new gl.c("https://androidapi.mxplay.com/v1/coin/adfree/remove", jSONObject.toString(), hp5Var, new String[0]).executeOnExecutor(s0b.e(), new Void[0]);
}
public final void v2(qsd qsdVar) {
re8 re8Var;
wn5 wn5Var = this.L0;
if (wn5Var == null || (re8Var = wn5Var.f) != null) {
return;
}
re8Var.M(qsdVar);
}
@Override
public final void v4() {
hne hneVar = this.F;
if (hneVar == null || !hneVar.isVisible()) {
return;
}
this.F.o9();
}
public final void w4(String str, String str2, boolean z) {
d0d.h2("pollImpressions", this.K0, str, z, str2, getX());
}
public final boolean w6() {
Feed feed = this.K0;
if (feed == null) {
return false;
}
if (feed.isYoutube()) {
return true;
}
List<PlayInfo> playInfoList = this.K0.playInfoList();
if (playInfoList == null || playInfoList.isEmpty()) {
return false;
}
return !fuh.C(this.K0);
}
public final void w7(int i2) {
Toolbar toolbar = this.q;
toolbar.setPadding(i2, toolbar.getPaddingTop(), 0, this.q.getPaddingBottom());
View view = this.S;
if (view != null) {
view.setPadding(i2, view.getPaddingTop(), 0, this.S.getPaddingBottom());
}
View view2 = this.T;
if (view2 != null) {
view2.setPadding(i2, view2.getPaddingTop(), 0, this.T.getPaddingBottom());
}
View view3 = this.v0;
if (view3 != null) {
view3.setPadding(i2, view3.getPaddingTop(), 0, this.v0.getPaddingBottom());
}
}
@Override
public final void x3() {
if (this.Y0) {
return;
}
tya.m.m().b = true;
this.Y0 = true;
Fragment fragment = this.w;
if (fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) {
((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).oa(true);
}
sj8 sj8Var = this.w;
if (sj8Var instanceof sj8) {
sj8Var.x3();
}
com.mxtech.videoplayer.ad.online.mxexo.next.b bVar = this.C0;
if (bVar != null) {
if (Intrinsics.b(bVar.M, "STATE_RIGHT_AND_COUNTDOWN") || Intrinsics.b(bVar.M, "STATE_COUNTDOWN_ONLY") || Intrinsics.b(bVar.M, "STATE_RIGHT_ONLY") || Intrinsics.b(bVar.M, "STATE_END_RECOMMEND")) {
bVar.L.getClass();
nf5.a();
}
int i2 = d1j.a;
}
jkd.a(this);
}
public final boolean x6() {
AppOpsManager appOpsManager;
return Build.VERSION.SDK_INT >= 26 && (appOpsManager = (AppOpsManager) getSystemService("appops")) != null && appOpsManager.checkOpNoThrow("android:picture_in_picture", getApplicationInfo().uid, getPackageName()) == 0;
}
public final void x7(String str, String str2, String str3, Feed feed) {
p pVar = z4i.a;
if (jz9.N(this)) {
String typeName = (!vue.g0(feed.getType()) || feed.getTvShow() == null) ? feed.getType().typeName() : feed.getTvShow().getType().typeName();
li liVar = new li();
Bundle d2 = lg0.d("actorName", str, "actorId", str2);
d2.putString(ResourceType.TYPE_NAME_ACTOR, str3);
d2.putString("type", typeName);
liVar.setArguments(d2);
this.H = liVar;
Fragment E = getSupportFragmentManager().E("ActorRelatedVideoFragment");
if (E != null) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
supportFragmentManager.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
aVar.o(E);
aVar.j(true);
}
b8(true);
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
supportFragmentManager2.getClass();
androidx.fragment.app.a aVar2 = new androidx.fragment.app.a(supportFragmentManager2);
aVar2.h(2130772053, 2130772054, 0, 0);
aVar2.g(2131366181, this.H, "ActorRelatedVideoFragment");
aVar2.q(this.H);
aVar2.e();
if (k0()) {
this.R.setForceHide(true);
l1();
}
}
}
public final void y7(@NotNull String str, Feed feed, String str2, String str3, boolean z) {
p pVar = z4i.a;
if (jz9.N(this)) {
if (this.I == null) {
CommentDetailFragment E = getSupportFragmentManager().E(CommentDetailFragment.TAG);
if (E != null) {
this.I = E;
} else {
this.I = CommentDetailFragment.instance(feed.getId(), feed.getType().typeName(), str, str2, str3, z);
}
}
b8(true);
if (this.I.isAdded()) {
FragmentManager supportFragmentManager = getSupportFragmentManager();
androidx.fragment.app.a h2 = km4.h(supportFragmentManager, supportFragmentManager);
h2.h(2130772053, 2130772054, 0, 0);
h2.q(this.I);
h2.e();
} else {
try {
FragmentManager supportFragmentManager2 = getSupportFragmentManager();
supportFragmentManager2.getClass();
androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager2);
aVar.h(2130772053, 2130772054, 0, 0);
aVar.g(2131366181, this.I, CommentDetailFragment.TAG);
aVar.e();
} catch (IllegalStateException e2) {
gfh.c(e2);
}
}
if (k0()) {
this.R.setForceHide(true);
l1();
}
}
}
@Override
public final int z0() {
PlayerParent playerParent;
Fragment fragment = this.w;
if (!(fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) || (playerParent = ((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).x) == null) {
return -1;
}
return playerParent.getHeight();
}
public final void z6(final boolean z) {
final boolean z2 = getSupportFragmentManager().D(2131365413) instanceof xq5;
Feed feed = this.K0;
boolean z3 = feed != null && feed.isAdFreeOpen();
this.k0 = z3;
if (!z3 || jng.a(this.K0)) {
a7(z2, z);
return;
}
V7();
Fragment fragment = this.w;
if (fragment instanceof xq5) {
xq5 xq5Var = (xq5) fragment;
xq5Var.g = this.K0;
xq5Var.j9(3);
}
boolean z4 = al.a().getInt("key_ad_free_always", 0) == 1;
final boolean z5 = this.K0.getAdFreeCoins() > rs2.c();
if (!z4) {
A6(z5, z2, z);
} else if (z5) {
A6(z5, z2, z);
} else {
gl.c(this.K0.getType().typeName(), this.K0.getId(), new tk8() {
@Override
public final void L7(Object obj) {
BaseAdFreeRespBean baseAdFreeRespBean = (BaseAdFreeRespBean) obj;
int i2 = ExoPlayerActivity.c1;
ExoPlayerActivity exoPlayerActivity = ExoPlayerActivity.this;
exoPlayerActivity.getClass();
if ((baseAdFreeRespBean instanceof RedeemAdFreeRespBean) && baseAdFreeRespBean.isRespSuccess()) {
exoPlayerActivity.b7(true);
} else {
exoPlayerActivity.A6(z5, z2, z);
}
}
});
}
}
public final void onPictureInPictureModeChanged(boolean z) {
super/*ub3*/.onPictureInPictureModeChanged(z);
if (!z || G6()) {
return;
}
Fragment fragment = this.w;
if ((fragment instanceof com.mxtech.videoplayer.ad.online.mxexo.c) && ((com.mxtech.videoplayer.ad.online.mxexo.c) fragment).isCreated()) {
((com.mxtech.videoplayer.ad.online.mxexo.c) this.w).registerPlayerContext();
k2b k2bVar = ((com.mxtech.videoplayer.ad.online.mxexo.c) this.w).p;
if (k2bVar.p()) {
k2bVar.C();
}
}
}
public void f7(wn5.a aVar) {
}
}