导航菜单

页面标题

页面副标题

MX Player v1.97.8 - SonyLivePlayerActivity.java 源代码

正在查看: MX Player v1.97.8 应用的 SonyLivePlayerActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mxtech.videoplayer.ad.online.live;

import android.app.Activity;
import android.app.AppOpsManager;
import android.app.PictureInPictureParams;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewStub;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.m;
import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser;
import com.m.x.player.pandora.common.fromstack.From;
import com.m.x.player.pandora.common.fromstack.FromStack;
import com.m.x.player.pandora.common.fromstack.FromStackProvider;
import com.mxtech.videoplayer.ad.online.live.d;
import com.mxtech.videoplayer.ad.online.model.bean.Feed;
import com.mxtech.videoplayer.ad.online.model.bean.next.OnlineResource;
import com.mxtech.videoplayer.ad.online.model.bean.next.SonyLiveProgramTypeUtil;
import com.mxtech.videoplayer.ad.online.model.bean.next.livetv.TVChannel;
import com.mxtech.videoplayer.ad.online.model.bean.next.livetv.TVProgram;
import com.mxtech.videoplayer.ad.online.mxexo.ScrollCoordinatorLayout;
import com.mxtech.videoplayer.ad.online.mxexo.service.ExoPlayerService;
import com.mxtech.videoplayer.ad.view.PlayerParent;
import com.mxtech.videoplayer.service.PlayService;
import defpackage.bg;
import defpackage.c7d;
import defpackage.d1j;
import defpackage.e4g;
import defpackage.f7f;
import defpackage.hff;
import defpackage.i0g;
import defpackage.i4g;
import defpackage.inc;
import defpackage.j4g;
import defpackage.j92;
import defpackage.jnc;
import defpackage.k4g;
import defpackage.o0f;
import defpackage.ofa;
import defpackage.p0f;
import defpackage.pfa;
import defpackage.qfa;
import defpackage.r18;
import defpackage.r4g;
import defpackage.s7f;
import defpackage.sfa;
import defpackage.sj8;
import defpackage.tj5;
import defpackage.tya;
import defpackage.w18;
import defpackage.wg;
import defpackage.wp5;
import defpackage.xe0;
import defpackage.xj8;
import defpackage.xq5;
import defpackage.xxc;
import defpackage.y82;
import defpackage.z6h;
import defpackage.zm3;
import java.util.ArrayList;
import java.util.HashMap;

public class SonyLivePlayerActivity extends xxc implements FromStackProvider, bk8, xj8, ck8, inc, d.h, d.c, ScrollCoordinatorLayout.a, s7f, sj8 {
    public boolean A;
    public View B;
    public d C;
    public View D;
    public wp5 E;
    public p0f F;
    public e I;
    public boolean K;
    public ScrollCoordinatorLayout L;
    public c O;
    public boolean P;
    public boolean Q;
    public j4g R;
    public OnlineResource u;
    public boolean v;
    public TVChannel w;
    public TVProgram x;
    public pfa y;
    public OnlineResource z;
    public boolean G = false;
    public int H = 0;
    public boolean J = false;
    public final a M = new a();
    public final f7f N = new f7f(new b());

    public class a extends Handler {
        public a() {
        }

        @Override
        public final void handleMessage(Message message) {
            if (message.what != 1) {
                return;
            }
            SonyLivePlayerActivity.this.t6(true);
        }
    }

    public class b implements f7f.c {
        public b() {
        }

        @Override
        public final void a() {
            SonyLivePlayerActivity.this.C();
        }
    }

    public class c extends BroadcastReceiver {
        public c() {
        }

        @Override
        public final void onReceive(Context context, Intent intent) {
            k2b k2bVar;
            PictureInPictureParams build;
            if (intent == null || !"media_control".equals(intent.getAction())) {
                return;
            }
            SonyLivePlayerActivity sonyLivePlayerActivity = SonyLivePlayerActivity.this;
            wp5 wp5Var = sonyLivePlayerActivity.E;
            if (!(wp5Var instanceof k4g) || (k2bVar = ((k4g) wp5Var).p) == null || k2bVar.o() || sonyLivePlayerActivity.E.N9() || Build.VERSION.SDK_INT < 26) {
                return;
            }
            build = wg.a().build();
            pa.d(sonyLivePlayerActivity, build);
        }
    }

    public static void L6(Activity activity, OnlineResource onlineResource, OnlineResource onlineResource2, OnlineResource onlineResource3, FromStack fromStack, int i, boolean z) {
        ExoLivePlayerActivity.F6(activity, onlineResource, onlineResource2, onlineResource3, i, fromStack, z, SonyLivePlayerActivity.class);
    }

    public final void A6() {
        OnlineResource onlineResource = this.z;
        if (onlineResource == null) {
            return;
        }
        if (onlineResource instanceof TVChannel) {
            this.w = (TVChannel) onlineResource;
            this.x = null;
        } else if (onlineResource instanceof TVProgram) {
            this.x = (TVProgram) onlineResource;
        }
        if (onlineResource == null) {
            this.A = false;
        } else {
            this.A = vue.e0(onlineResource.getType()) || vue.f0(this.z.getType());
        }
    }

    @Override
    public final void C() {
        f7f f7fVar = this.N;
        if (f7fVar.d) {
            if (!jnc.b().d(this)) {
                this.B = findViewById(2131362853);
                int i = f7fVar.f;
                if (i == 0) {
                    F6(0, 0);
                    return;
                } else if (i == 1) {
                    F6(0, 0);
                    return;
                } else {
                    if (i != 3) {
                        return;
                    }
                    F6(0, 0);
                    return;
                }
            }
            int c2 = jnc.b().c(this);
            this.B = findViewById(2131362853);
            int i2 = f7fVar.f;
            if (i2 == 0) {
                F6(0, 0);
            } else if (i2 == 1) {
                F6(c2, 0);
            } else {
                if (i2 != 3) {
                    return;
                }
                F6(0, c2);
            }
        }
    }

    public final void C6(TVChannel tVChannel, TVProgram tVProgram) {
        TVChannel tVChannel2 = this.w;
        if (tVChannel2 != null && this.x != null && tVChannel2.getId().equals(tVChannel.getId()) && this.x.getId().equals(tVProgram.getId())) {
            this.w = tVChannel;
            this.x = tVProgram;
            return;
        }
        if (tVChannel != null) {
            tVChannel.getPlayUrl();
        }
        tVProgram.getPlayUrl();
        int i = d1j.a;
        if (this.A) {
            provider().n(tVProgram);
        }
        this.v = false;
        this.w = tVChannel;
        this.x = tVProgram;
        M6();
        w6(tVChannel, tVProgram);
        G6();
    }

    public final void D6() {
        Fragment D = getSupportFragmentManager().D(2131365413);
        if (D != null) {
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            supportFragmentManager.getClass();
            androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
            aVar.o(D);
            aVar.j(true);
        }
    }

    @Override
    public final boolean E4() {
        return this.H != 2 && x6(false, true) == 2;
    }

    public final void E6() {
        if (this.D != null) {
            ((FrameLayout) findViewById(2131365413)).removeAllViews();
            this.D = null;
        }
    }

    public final void F6(int i, int i2) {
        Toolbar toolbar = this.q;
        toolbar.setPadding(i, toolbar.getPaddingTop(), i2, this.q.getPaddingBottom());
        View view = this.B;
        if (view != null) {
            view.setPadding(i, view.getPaddingTop(), i2, this.B.getPaddingBottom());
        }
    }

    public final void G4(String str, boolean z, boolean z2, boolean z3) {
        d0d.i2(Z4(), str, z, z2, z3, getX());
    }

    public final void G6() {
        if (this.y == null) {
            if (this.A) {
                OnlineResource onlineResource = this.u;
                FromStack x = getX();
                com.mxtech.videoplayer.ad.online.live.a aVar = new com.mxtech.videoplayer.ad.online.live.a();
                Bundle bundle = new Bundle();
                bundle.putSerializable("card", onlineResource);
                bundle.putParcelable(FromStack.FROM_LIST, x);
                aVar.setArguments(bundle);
                this.y = aVar;
            } else {
                OnlineResource onlineResource2 = this.u;
                FromStack x2 = getX();
                qfa qfaVar = new qfa();
                Bundle bundle2 = new Bundle();
                bundle2.putSerializable("card", onlineResource2);
                bundle2.putParcelable(FromStack.FROM_LIST, x2);
                qfaVar.setArguments(bundle2);
                this.y = qfaVar;
            }
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            androidx.fragment.app.a h = km4.h(supportFragmentManager, supportFragmentManager);
            h.g(2131363022, this.y, (String) null);
            h.j(true);
        }
    }

    public final void H6() {
        if (this.w == null) {
            J6();
            return;
        }
        this.v = true;
        d provider = provider();
        d.C0079d c0079d = provider.h;
        TVProgram e = d.e(c0079d == null ? new ArrayList() : c0079d.b);
        if (e != null) {
            provider.n(e);
        }
        this.x = e;
        if (!this.J) {
            u6(this.w);
        }
        this.J = false;
    }

    public final void J6() {
        Fragment D = getSupportFragmentManager().D(2131363022);
        if (D instanceof sfa) {
            sfa sfaVar = (sfa) D;
            sfaVar.b.setVisibility(8);
            sfaVar.f.setVisibility(0);
            sfaVar.c.setOnClickListener(new v51(sfaVar, 3));
        }
    }

    public final void M6() {
        int i;
        int i2;
        int i3;
        long b2 = ir2.b();
        TVProgram tVProgram = this.x;
        if (tVProgram == null) {
            i = 1;
            i2 = 0;
        } else {
            long j = ((l61) tVProgram.getStartTime()).b;
            long j2 = ((l61) this.x.getStopTime()).b;
            int a2 = ofa.a(b2, j);
            i = (b2 >= j2 || b2 <= j) ? 0 : 1;
            i2 = a2;
        }
        TVChannel tVChannel = this.w;
        TVProgram tVProgram2 = this.x;
        OnlineResource onlineResource = this.u;
        FromStack x = getX();
        TVProgram tVProgram3 = this.x;
        HashMap<String, Boolean> hashMap = d.v;
        if (tVProgram3 != null && vue.f0(tVProgram3.getType()) && SonyLiveProgramTypeUtil.isSonyLiveProgramTvShow(tVProgram3.getCategory().getName())) {
            i3 = d.i(tVProgram3) ? 1 : 2;
        } else {
            i3 = 0;
        }
        d0d.l2(tVChannel, tVProgram2, (OnlineResource) null, onlineResource, x, i2, i, i3, "player");
    }

    public final void N6() {
        if (this.A) {
            TVChannel tVChannel = this.w;
            if (tVChannel == null || tVChannel.playInfoList() == null || this.w.playInfoList().isEmpty()) {
                this.w = provider().f;
            }
        }
    }

    @Override
    public final boolean O5() {
        return this.P;
    }

    @Override
    public final void Q2() {
        J6();
    }

    public final void R2(String str, String str2, boolean z) {
        d0d.h2("pollVoted", Z4(), str, z, str2, getX());
    }

    @Override
    public final ScrollCoordinatorLayout T() {
        return this.L;
    }

    @Override
    public final void U3(TVProgram tVProgram) {
        k2b k2bVar;
        Fragment D = getSupportFragmentManager().D(2131365413);
        if (D instanceof k4g) {
            k4g k4gVar = (k4g) D;
            if (k4gVar.c1 != tVProgram && (k2bVar = k4gVar.p) != null) {
                tVProgram.setWatchedDuration(Math.max(k2bVar.i(), tVProgram.getWatchedDuration()));
                r18.g().t(tVProgram);
                r18.g().h(tVProgram);
            }
            k4gVar.c1 = tVProgram;
            e4g e4gVar = k4gVar.b1;
            if (e4gVar != null) {
                m activity = k4gVar.getActivity();
                FromStack x = k4gVar.getX();
                cga cgaVar = e4gVar.P;
                if (cgaVar != null) {
                    cgaVar.c();
                }
                cga b2 = cga.b(activity, tVProgram, x);
                e4gVar.P = b2;
                if (b2 == null) {
                    return;
                }
                b2.k = e4gVar;
            }
        }
    }

    @Override
    public final void U5() {
        if (Build.VERSION.SDK_INT < 26) {
            qd6 d = qd6.d();
            Context applicationContext = getApplicationContext();
            d.getClass();
            if (!qd6.b(applicationContext)) {
                return;
            }
        }
        if (this.R == null) {
            j4g j4gVar = new j4g(this, 0);
            this.R = j4gVar;
            zm3.a(this, j4gVar, new IntentFilter("android.intent.action.CLOSE_SYSTEM_DIALOGS"), true);
        }
    }

    @Override
    public final boolean W5() {
        return true;
    }

    public final TVProgram Z4() {
        pfa pfaVar = this.y;
        if (pfaVar != null) {
            return pfaVar.j9();
        }
        return null;
    }

    @Override
    public final void d() {
        Fragment D = getSupportFragmentManager().D(2131363022);
        if (D instanceof sfa) {
            ((sfa) D).j9();
        }
    }

    @Override
    public final From d6() {
        OnlineResource onlineResource = this.x;
        if (onlineResource == null && (onlineResource = provider().i) == null) {
            onlineResource = this.z;
        }
        return From.create(onlineResource.getId(), onlineResource.getName(), "sonyLivePlayback");
    }

    public final boolean dispatchKeyEvent(KeyEvent keyEvent) {
        Fragment D = getSupportFragmentManager().D(2131365413);
        return (D == null || !(D instanceof r4g)) ? (D == null || !(D instanceof k4g)) ? super.dispatchKeyEvent(keyEvent) : ((k4g) D).dispatchKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent) : ((r4g) D).dispatchKeyEvent(keyEvent) || super.dispatchKeyEvent(keyEvent);
    }

    @Override
    public final f7f e5() {
        return this.N;
    }

    @Override
    public final int e6() {
        return i0g.b().h("online_player_activity");
    }

    @Override
    public final void g5() {
        t6(true);
    }

    @Override
    public final void initToolBar() {
        super.initToolBar();
        ActionBar actionBar = this.p;
        if (actionBar != null) {
            actionBar.u(2131234209);
        }
    }

    @Override
    public final int j6() {
        return 2131559700;
    }

    @Override
    public final void k5() {
        this.P = false;
        wp5 wp5Var = this.E;
        if (wp5Var != null) {
            wp5Var.oa(false);
        }
        wp5 wp5Var2 = this.E;
        if (wp5Var2 != null) {
            wp5Var2.k5();
        }
    }

    @Override
    public final void m(Object obj, boolean z) {
        this.q.setVisibility(0);
        this.q.setVisibility(0);
        OnlineResource onlineResource = this.z;
        if (onlineResource == null) {
            return;
        }
        if (onlineResource instanceof TVChannel) {
            this.w = (TVChannel) onlineResource;
            N6();
            H6();
        } else if (onlineResource instanceof TVProgram) {
            TVProgram tVProgram = (TVProgram) onlineResource;
            this.x = tVProgram;
            if (tVProgram.playInfoList() == null || this.x.playInfoList().isEmpty()) {
                this.x = provider().i;
            }
            if (this.x == null) {
                J6();
                return;
            }
            this.w = provider().f;
            if (this.x.isStatusFuture()) {
                TVProgram tVProgram2 = this.x;
                ((ViewStub) findViewById(2131367714)).setVisibility(0);
                ImageView imageView = (ImageView) findViewById(2131363609);
                TextView textView = (TextView) findViewById(2131363612);
                if (tVProgram2.getStartTime() != null) {
                    textView.setText(getResources().getString(2131887771, tt1.m(((l61) tVProgram2.getStartTime()).b)));
                } else {
                    textView.setText(getResources().getString(2131887771, ""));
                }
                if (tVProgram2.posterList() != null) {
                    sx9.l(this, imageView, tVProgram2.posterList(), 2131167559, 2131167579, kr4.r(0, false));
                }
                findViewById(2131363608).setOnClickListener(new ard(this, tVProgram2, 1));
            } else if (this.x.isStatusExpired()) {
                z6h.b(2131890952, false);
                r18 g = r18.g();
                g.d.execute(new w18(g, this.x));
                H6();
            } else if (this.x.isStatusLive()) {
                H6();
            } else {
                this.v = false;
                if (!this.J) {
                    w6(this.w, this.x);
                }
                this.J = false;
            }
        }
        G6();
    }

    public final void onAttachedToWindow() {
        super/*android.app.Activity*/.onAttachedToWindow();
        p0f p0fVar = this.F;
        f7f f7fVar = this.N;
        f7fVar.b = p0fVar;
        f7fVar.b(this);
    }

    public final void onBackPressed() {
        Fragment D = getSupportFragmentManager().D(2131365413);
        if (D instanceof k4g) {
            if (((k4g) D).s()) {
                return;
            }
        } else if ((D instanceof r4g) && ((r4g) D).s()) {
            return;
        }
        super/*ub3*/.onBackPressed();
    }

    @Override
    public final void onCreate(Bundle bundle) {
        c7d c7dVar;
        d.w = false;
        dr5 b2 = dr5.b();
        e eVar = b2.i;
        if (eVar == null) {
            eVar = null;
        } else {
            b2.i = null;
        }
        this.I = eVar;
        if (eVar != null) {
            overridePendingTransition(0, 0);
        }
        this.F = new p0f(this);
        Intent intent = getIntent();
        if (intent != null) {
            String scheme = intent.getScheme();
            Uri data = intent.getData();
            if (!TextUtils.isEmpty(scheme) && scheme.equals("mxplay") && data != null) {
                String queryParameter = data.getQueryParameter("id");
                String queryParameter2 = data.getQueryParameter("type");
                if (!TextUtils.isEmpty(queryParameter) && !TextUtils.isEmpty(queryParameter2)) {
                    Feed feed = new Feed();
                    feed.setId(queryParameter);
                    feed.setType(OnlineResource.from(queryParameter2));
                    intent.putExtra("video", feed);
                }
            }
        }
        this.z = (OnlineResource) getIntent().getSerializableExtra("video");
        setTheme(e6());
        vk4.j(this);
        super.onCreate(bundle);
        ((tya) getApplication()).y(this);
        Toolbar toolbar = this.q;
        if (toolbar != null) {
            toolbar.setNavigationOnClickListener(new i4g(this));
        }
        PlayService.y();
        ExoPlayerService.M();
        this.u = (OnlineResource) getIntent().getSerializableExtra("from_card");
        this.K = getIntent().getBooleanExtra("make_init_full_screen", false);
        this.y = null;
        FragmentManager supportFragmentManager = getSupportFragmentManager();
        androidx.fragment.app.a h = km4.h(supportFragmentManager, supportFragmentManager);
        h.g(2131363022, new sfa(), (String) null);
        h.j(true);
        Fragment D = getSupportFragmentManager().D(2131363022);
        if (D instanceof sfa) {
            ((sfa) D).j9();
        }
        y82.o(this, j92.a.a);
        A6();
        provider().m(this);
        e eVar2 = this.I;
        if (eVar2 == null || (c7dVar = eVar2.b) == null) {
            FragmentManager supportFragmentManager2 = getSupportFragmentManager();
            androidx.fragment.app.a h2 = km4.h(supportFragmentManager2, supportFragmentManager2);
            h2.g(2131365413, new xq5(), (String) null);
            h2.j(true);
        } else {
            TVChannel tVChannel = c7dVar.a;
            this.w = tVChannel;
            this.x = c7dVar.b;
            boolean z = c7dVar.c;
            this.v = z;
            if (z) {
                u6(tVChannel);
            } else {
                provider().n(this.x);
                w6(this.w, this.x);
            }
            this.q.setVisibility(0);
            this.J = true;
        }
        ScrollCoordinatorLayout scrollCoordinatorLayout = (ScrollCoordinatorLayout) findViewById(2131365746);
        this.L = scrollCoordinatorLayout;
        scrollCoordinatorLayout.setPipStateProvider(this);
    }

    @Override
    public final void onDestroy() {
        o0f o0fVar;
        this.N.a();
        p0f p0fVar = this.F;
        if (p0fVar != null && (o0fVar = p0fVar.b) != null) {
            o0fVar.removeCallbacksAndMessages(null);
            p0fVar.b = null;
        }
        super.onDestroy();
        j4g j4gVar = this.R;
        if (j4gVar != null) {
            unregisterReceiver(j4gVar);
        }
        bg.h(this);
        this.M.removeCallbacksAndMessages(null);
        D6();
        d dVar = this.C;
        if (dVar != null) {
            dVar.c();
            xe0 xe0Var = dVar.p;
            if (xe0Var != null) {
                xe0Var.c();
                dVar.q = false;
            }
        }
        d.v.clear();
        HlsPlaylistParser.c = false;
    }

    @Override
    public final void onNewIntent(Intent intent) {
        this.z = (OnlineResource) intent.getSerializableExtra("video");
        super.onNewIntent(intent);
        d.w = false;
        PlayService.y();
        ExoPlayerService.M();
        this.u = (OnlineResource) intent.getSerializableExtra("from_card");
        this.K = intent.getBooleanExtra("make_init_full_screen", false);
        d dVar = this.C;
        if (dVar != null) {
            dVar.c();
            xe0 xe0Var = dVar.p;
            if (xe0Var != null) {
                xe0Var.c();
                dVar.q = false;
            }
            this.C = null;
        }
        pfa s6 = s6();
        if (s6 != null) {
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            supportFragmentManager.getClass();
            androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
            aVar.o(s6);
            aVar.j(true);
        }
        this.y = null;
        A6();
        provider().m(this);
    }

    @Override
    public final boolean onOptionsItemSelected(MenuItem menuItem) {
        menuItem.getItemId();
        return false;
    }

    @Override
    public final void onPause() {
        k2b k2bVar;
        super.onPause();
        bg.i(this);
        tj5.c(new hff.f());
        wp5 wp5Var = this.E;
        boolean z = wp5Var == null || (k2bVar = wp5Var.p) == null || k2bVar.l();
        if (!isFinishing() || z) {
            return;
        }
        cce.n.c();
    }

    @Override
    public final void onPictureInPictureModeChanged(boolean z, Configuration configuration) {
        super.onPictureInPictureModeChanged(z, configuration);
        if (z) {
            if (this.Q) {
                return;
            }
            this.Q = true;
            zm3.a(this, this.O, new IntentFilter("media_control"), false);
            return;
        }
        k5();
        if (this.Q) {
            this.Q = false;
            unregisterReceiver(this.O);
        }
    }

    @Override
    public final void onResume() {
        super.onResume();
        bg.a(this, 3);
        tj5.c(new hff.a());
        if (this.G) {
            if (Build.MODEL.equals("MI PAD 4 PLUS") && Build.MANUFACTURER.equals("Xiaomi")) {
                this.M.sendEmptyMessageDelayed(1, 500L);
            } else {
                t6(true);
            }
            this.G = false;
        }
    }

    @Override
    public final void onStart() {
        super.onStart();
        bg.j(this);
    }

    public final boolean p6() {
        AppOpsManager appOpsManager;
        return Build.VERSION.SDK_INT >= 26 && (appOpsManager = (AppOpsManager) getSystemService("appops")) != null && appOpsManager.checkOpNoThrow("android:picture_in_picture", getApplicationInfo().uid, getPackageName()) == 0;
    }

    @Override
    public final d provider() {
        if (this.C == null) {
            TVChannel tVChannel = this.w;
            TVProgram tVProgram = this.x;
            d dVar = new d(tVProgram);
            dVar.r = new HashMap<>();
            dVar.s = new HashMap<>();
            dVar.t = new ArrayList<>(1);
            dVar.u = new ArrayList<>(1);
            dVar.f = tVChannel;
            dVar.g = tVProgram;
            this.C = dVar;
        }
        return this.C;
    }

    public final pfa s6() {
        Fragment D = getSupportFragmentManager().D(2131363022);
        if (D instanceof pfa) {
            return (pfa) D;
        }
        return null;
    }

    @Override
    public final boolean t1() {
        return this.G;
    }

    public final int t6(boolean z) {
        int x6 = x6(true, z);
        if (x6 == 2 || x6 == 3) {
            finish();
            overridePendingTransition(0, 2130771981);
        }
        return x6;
    }

    public final void u6(TVChannel tVChannel) {
        FromStack x = getX();
        boolean z = this.K;
        k4g k4gVar = new k4g();
        Bundle bundle = new Bundle();
        bundle.putSerializable("channel", tVChannel);
        bundle.putBoolean("make_init_full_screen", z);
        bundle.putParcelable(FromStack.FROM_LIST, x);
        k4gVar.setArguments(bundle);
        this.E = k4gVar;
        e eVar = this.I;
        if (eVar != null) {
            d.w = true;
            k4gVar.q = eVar.a;
            this.I = null;
        }
        E6();
        FragmentManager supportFragmentManager = getSupportFragmentManager();
        supportFragmentManager.getClass();
        androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
        aVar.g(2131365413, k4gVar, (String) null);
        aVar.e();
        this.K = false;
    }

    public final void w4(String str, String str2, boolean z) {
        d0d.h2("pollImpressions", Z4(), str, z, str2, getX());
    }

    public final void w6(TVChannel tVChannel, TVProgram tVProgram) {
        FromStack x = getX();
        boolean z = this.K;
        r4g r4gVar = new r4g();
        Bundle bundle = new Bundle();
        bundle.putSerializable("program", tVProgram);
        bundle.putSerializable("channel", tVChannel);
        bundle.putBoolean("make_init_full_screen", z);
        bundle.putParcelable(FromStack.FROM_LIST, x);
        r4gVar.setArguments(bundle);
        this.E = r4gVar;
        e eVar = this.I;
        if (eVar != null) {
            r4gVar.q = eVar.a;
            this.I = null;
        }
        E6();
        FragmentManager supportFragmentManager = getSupportFragmentManager();
        supportFragmentManager.getClass();
        androidx.fragment.app.a aVar = new androidx.fragment.app.a(supportFragmentManager);
        aVar.g(2131365413, r4gVar, (String) null);
        aVar.e();
        this.K = false;
    }

    @Override
    public final void x3() {
        if (this.P) {
            return;
        }
        this.P = true;
        wp5 wp5Var = this.E;
        if (wp5Var != null) {
            wp5Var.oa(true);
        }
        wp5 wp5Var2 = this.E;
        if (wp5Var2 != null) {
            wp5Var2.x3();
        }
        if (this.O == null) {
            this.O = new c();
        }
    }

    public final int x6(boolean r14, boolean r15) {
        throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.live.SonyLivePlayerActivity.x6(boolean, boolean):int");
    }

    @Override
    public final int z0() {
        PlayerParent playerParent;
        wp5 wp5Var = this.E;
        if (wp5Var == null || (playerParent = wp5Var.x) == null) {
            return -1;
        }
        return playerParent.getHeight();
    }

    public final void z6() {
        if (this.v) {
            return;
        }
        this.v = true;
        N6();
        d provider = provider();
        d.C0079d c0079d = provider.h;
        TVProgram e = d.e(c0079d == null ? new ArrayList() : c0079d.b);
        if (e != null) {
            provider.n(e);
        }
        this.x = e;
        u6(this.w);
        if (this.A) {
            provider().getClass();
        }
        s6().m9();
    }
}