导航菜单

页面标题

页面副标题

Chaupal v3.2 - SplashScreenActivity.java 源代码

正在查看: Chaupal v3.2 应用的 SplashScreenActivity.java JAVA 源代码文件

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


package com.yupptv.ott;

import android.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.VideoView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.yupptv.ott.activity.LoadScreenActivity;
import com.yupptv.ott.enums.DialogType;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ott.fragments.b1;
import com.yupptv.ott.fragments.i0;
import com.yupptv.ott.fragments.v0;
import com.yupptv.ottsdk.OttSDK;
import com.yupptv.ottsdk.managers.Application.AppManager;
import com.yupptv.ottsdk.managers.Preferences.PreferenceManager;
import com.yupptv.ottsdk.managers.User.UserManager;
import com.yupptv.ottsdk.model.Country;
import com.yupptv.ottsdk.model.Error;
import com.yupptv.ottsdk.model.LocationInfo;
import com.yupptv.ottsdk.model.User;
import com.yupptv.ottsdk.model.systemfeatures.Features;
import com.yupptv.ottsdk.model.systemfeatures.SystemFeatures;
import com.yupptv.ottsdk.model.user.Configs;
import com.yupptv.ottsdk.utils.OttLog;
import hd.a;
import hd.e0;
import java.io.File;
import java.util.HashMap;
import java.util.List;

public class SplashScreenActivity extends com.yupptv.ott.activity.a implements oc.k, oc.m {
    private Dialog f;
    private ProgressBar g;
    private VideoView h;
    ImageView k;
    ImageView l;
    ImageView m;
    private TextView p;
    private hd.a0 r;
    int s;
    int t;
    RelativeLayout w;
    private String e = getClass().getSimpleName();
    private boolean i = false;
    private boolean j = false;
    private int n = 0;
    private boolean o = false;
    private boolean q = false;
    private String u = "-1";
    String v = "THEME_PREFERENCE";
    private boolean x = false;
    private String y = "";
    private boolean z = false;
    private boolean A = false;

    class a implements UserManager.UserCallback<User> {
        a() {
        }

        @Override
        public void onSuccess(User user) {
        }

        @Override
        public void onFailure(Error error) {
        }
    }

    class b implements oc.h {
        b() {
        }

        @Override
        public void o(boolean z, int i, HashMap hashMap) {
            if (i == 0) {
                SplashScreenActivity.this.finish();
            } else {
                SplashScreenActivity.this.n0();
                SplashScreenActivity.this.finish();
            }
        }

        @Override
        public void y(boolean z, int i, int i2) {
        }
    }

    class c implements oc.h {
        c() {
        }

        @Override
        public void o(boolean z, int i, HashMap hashMap) {
            if (i == 0) {
                SplashScreenActivity.this.s0();
            } else {
                SplashScreenActivity.this.n0();
                SplashScreenActivity.this.finish();
            }
        }

        @Override
        public void y(boolean z, int i, int i2) {
        }
    }

    class d implements AppManager.AppManagerCallback<List<Country>> {
        d() {
        }

        public void onSuccess(List<Country> list) {
        }

        public void onFailure(Error error) {
        }
    }

    class e implements OnCompleteListener<String> {
        e() {
        }

        @Override
        public void onComplete(@NonNull Task<String> task) {
            if (!task.isSuccessful()) {
                hd.h.a(SplashScreenActivity.this.e, "Unable to get Installation ID");
                return;
            }
            hd.a0.y(SplashScreenActivity.this).T("pref_key_firebase_installation_id", task.getResult());
            hd.h.a(SplashScreenActivity.this.e, "Installation ID: " + task.getResult());
        }
    }

    class f implements UserManager.UserCallback<String> {
        final String a;

        f(String str) {
            this.a = str;
        }

        @Override
        public void onSuccess(String str) {
            String str2 = this.a;
            str2.hashCode();
            switch (str2) {
                case "BEN":
                    OTTApplication.N(SplashScreenActivity.this);
                    hd.a.a.b(OTTApplication.o()).setLocaleBengali(SplashScreenActivity.this);
                    break;
                case "ENG":
                    OTTApplication.O(SplashScreenActivity.this);
                    OttSDK.setLocaleEnglish(SplashScreenActivity.this);
                    break;
                case "HIN":
                    OTTApplication.Q(SplashScreenActivity.this);
                    hd.a.a.b(OTTApplication.o()).setLocaleHindi(SplashScreenActivity.this);
                    break;
                case "TAM":
                    OTTApplication.S(SplashScreenActivity.this);
                    hd.a.a.b(OTTApplication.o()).setLocaleTamil(SplashScreenActivity.this);
                    break;
                case "TEL":
                    OTTApplication.T(SplashScreenActivity.this);
                    hd.a.a.b(OTTApplication.o()).setLocaleTelugu(SplashScreenActivity.this);
                    break;
            }
        }

        @Override
        public void onFailure(Error error) {
            androidx.appcompat.app.e eVar = SplashScreenActivity.this;
            if (eVar == null || eVar.isDestroyed()) {
                return;
            }
            SplashScreenActivity.this.isFinishing();
        }
    }

    class g implements OnCompleteListener<String> {
        g() {
        }

        @Override
        public void onComplete(@NonNull Task<String> task) {
            hd.a0.y(SplashScreenActivity.this.getApplicationContext()).G(task.getResult());
        }
    }

    class h implements OttSDK.OttSDKCallback<String> {
        h() {
        }

        public void onSuccess(String str) {
            a.C0133a c0133a = hd.a.a;
            if (c0133a.b(OTTApplication.o()) == null) {
                return;
            }
            SplashScreenActivity.this.A = false;
            if (c0133a.g(OTTApplication.o()).getInitialLaunch()) {
                SplashScreenActivity.this.u0();
            } else {
                SplashScreenActivity.this.u0();
            }
            hd.h.b(SplashScreenActivity.this.e, "on success : " + str);
            hd.u.x0(SplashScreenActivity.this);
        }

        public void onFailure(Error error) {
            SplashScreenActivity.this.g.setVisibility(8);
            OttSDK.sInstance = null;
            SplashScreenActivity.this.z = true;
            if (e0.h0(SplashScreenActivity.this.getApplicationContext())) {
                ?? r0 = SplashScreenActivity.this;
                r0.y0(r0.getString(2131952063), error.getMessage());
            } else {
                ?? r02 = SplashScreenActivity.this;
                r02.z0(r02.getString(2131952517), error.getMessage());
            }
            hd.h.b(SplashScreenActivity.this.e, "on failure");
        }

        public void onProgressChanged(double d) {
        }
    }

    class i implements View.OnClickListener {
        i() {
        }

        @Override
        public void onClick(View view) {
            SplashScreenActivity.this.o = false;
            SplashScreenActivity.this.i = true;
            SplashScreenActivity.this.h.stopPlayback();
            SplashScreenActivity.this.s0();
        }
    }

    class j implements MediaPlayer.OnCompletionListener {
        j() {
        }

        @Override
        public void onCompletion(MediaPlayer mediaPlayer) {
            SplashScreenActivity.this.i = true;
            androidx.appcompat.app.e eVar = SplashScreenActivity.this;
            if (eVar != null && !eVar.isFinishing() && SplashScreenActivity.this.z && SplashScreenActivity.this.f != null) {
                SplashScreenActivity.this.f.show();
            } else if (SplashScreenActivity.this.j) {
                SplashScreenActivity.this.s0();
            }
        }
    }

    class k implements MediaPlayer.OnErrorListener {
        k() {
        }

        @Override
        public boolean onError(MediaPlayer mediaPlayer, int i, int i2) {
            SplashScreenActivity.this.i = true;
            SplashScreenActivity.this.h.setVisibility(8);
            SplashScreenActivity splashScreenActivity = SplashScreenActivity.this;
            if (splashScreenActivity.k != null && !splashScreenActivity.j) {
                SplashScreenActivity.this.k.setVisibility(0);
            }
            if (SplashScreenActivity.this.j) {
                SplashScreenActivity.this.s0();
            }
            if (i == 1) {
                new File(new File(OTTApplication.o().getFilesDir().getAbsolutePath() + "/"), "welcome_video_.mp4").delete();
            }
            return true;
        }
    }

    class l implements View.OnClickListener {
        l() {
        }

        @Override
        public void onClick(View view) {
            SplashScreenActivity.this.f.dismiss();
            SplashScreenActivity.this.finish();
        }
    }

    class m implements View.OnClickListener {
        m() {
        }

        @Override
        public void onClick(View view) {
            SplashScreenActivity.this.f.dismiss();
            Intent intent = new Intent((Context) SplashScreenActivity.this, (Class<?>) MainActivity.class);
            intent.putExtra("splashscreen", true);
            SplashScreenActivity.this.startActivity(intent);
            SplashScreenActivity.this.finish();
        }
    }

    class n implements View.OnClickListener {
        n() {
        }

        @Override
        public void onClick(View view) {
            SplashScreenActivity.this.f.dismiss();
            SplashScreenActivity.this.initSDK();
            SplashScreenActivity.this.A = true;
        }
    }

    static {
        androidx.appcompat.app.i.S(true);
    }

    private void A0(boolean z, String str) {
        this.g.setVisibility(8);
        HashMap hashMap = new HashMap();
        if (z) {
            hashMap.put("msg1", getResources().getString(2131952204));
            if (str == null || str.length() <= 0) {
                hashMap.put("msg2", getResources().getString(2131952201));
            } else {
                hashMap.put("msg2", str);
            }
            hashMap.put("forceupdate", Boolean.TRUE);
            x0(DialogType.APP_UPDATE, hashMap, z, new b());
            return;
        }
        hashMap.put("msg1", getResources().getString(2131952940));
        if (str == null || str.length() <= 0) {
            hashMap.put("msg2", getResources().getString(2131952934));
        } else {
            hashMap.put("msg2", str);
        }
        hashMap.put("forceupdate", Boolean.FALSE);
        x0(DialogType.APP_UPDATE, hashMap, z, new c());
    }

    private void B0() {
        String str;
        if (!this.o || (str = OTTApplication.A) == null || !str.trim().isEmpty()) {
            this.o = false;
            this.g.setVisibility(0);
            this.k.setVisibility(0);
            return;
        }
        this.h = (VideoView) findViewById(2131430003);
        this.p.setVisibility(4);
        this.p.setOnClickListener(new i());
        String str2 = null;
        int identifier = getResources().getIdentifier("welcome_video", "raw", getPackageName());
        if (identifier != 0) {
            str2 = "android.resource://" + getPackageName() + "/" + identifier;
        }
        if (str2 != null) {
            v0(str2);
            return;
        }
        this.o = false;
        this.g.setVisibility(0);
        this.k.setVisibility(0);
    }

    public void initSDK() {
        OttSDK.setLogEnabled(false);
        OttSDK.sInstance = null;
        this.z = false;
        OttSDK.init(OTTApplication.o(), hd.e.z, e0.b0(this), String.valueOf(204), this.y, new h());
    }

    private void m0() {
        throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.SplashScreenActivity.m0():void");
    }

    public void n0() {
        finish();
        startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + getPackageName())));
    }

    private void o0() {
        try {
            hd.a.a.b(OTTApplication.o()).getUserManager().getUserInfo(new a());
        } catch (NullPointerException unused) {
        }
    }

    private void p0() {
        hd.a.a.d(OTTApplication.o()).getCountriesList(new d());
    }

    private void q0() {
        OTTApplication.A = "";
        OTTApplication.D = "";
        Intent intent = getIntent();
        if (intent != null) {
            String action = intent.getAction();
            Uri data = intent.getData();
            if (data == null || data.toString() == null || !data.toString().startsWith("http") || !data.toString().contains(".html")) {
                OTTApplication.D = intent.getStringExtra("payload");
                if (data != null && action != null && action.equalsIgnoreCase("android.intent.action.VIEW")) {
                    hd.h.a("oneLink>>", "sharedintent objToStr::" + data.toString());
                    hd.e.u = false;
                    String host = data.getHost();
                    cc.e.n().M("Share");
                    if (host == null || host.trim().length() <= 0 || !(host.contains("watcho.onelink.me") || host.contains("open"))) {
                        String path = data.getPath();
                        OTTApplication.B = data.getQueryParameter("source_path");
                        if (path != null && path.contains("sharedLink/")) {
                            path = path.replace("sharedLink/", "");
                        }
                        if (path != null && path.startsWith("/")) {
                            path = path.replaceFirst("/", "");
                        }
                        hd.h.b(this.e, "path=" + data.getPath());
                        if ((path == null || !path.contains("apps.html")) && (TextUtils.isEmpty(host) || !host.contains("chaupal.tv"))) {
                            OTTApplication.A = path;
                            OTTApplication.G = intent.getData().toString();
                        } else {
                            OTTApplication.A = "";
                        }
                    } else {
                        hd.e.v = false;
                        if (data.getQueryParameter("deep_link_value") == null || data.getQueryParameter("deep_link_value").trim().length() <= 0) {
                            OTTApplication.A = "watchoonelink";
                        } else {
                            String queryParameter = data.getQueryParameter("deep_link_value");
                            hd.h.a(this.e, " deepLinkValue::" + queryParameter);
                            if (queryParameter.contains(hd.e.y) || queryParameter.contains("OptionOutViewController")) {
                                OTTApplication.A = "watchoonelink";
                            } else {
                                OTTApplication.A = queryParameter;
                            }
                        }
                    }
                } else if (intent.hasExtra("launchurl")) {
                    hd.e.u = false;
                    this.q = true;
                    hd.e.s = true;
                    cc.e.n().M("Notification");
                    cc.e.n().L("Notification");
                    OTTApplication.A = intent.getStringExtra("launchurl");
                }
            } else {
                OTTApplication.A = data.toString();
            }
            hd.h.b("SplashActivity>>", "sharedPath>>>" + OTTApplication.A);
        }
        FirebaseAnalytics.getInstance(this).a().addOnCompleteListener(new g());
    }

    public void r0(DialogInterface dialogInterface, int i2) {
        finish();
        System.exit(0);
    }

    public void s0() {
        boolean z;
        hd.a0 a0Var;
        String str;
        if (this.o && (str = OTTApplication.A) != null && str.trim().isEmpty()) {
            this.j = true;
            this.p.setVisibility(8);
            this.k.setVisibility(8);
            this.g.setVisibility(8);
            if (!this.i) {
                this.g.setVisibility(8);
                return;
            }
        }
        this.g.setVisibility(8);
        Features features = null;
        cc.c.d().w(OTTApplication.y, null);
        if (isFinishing()) {
            return;
        }
        e0.y0();
        hd.d.a();
        a.C0133a c0133a = hd.a.a;
        Configs c2 = c0133a.c(OTTApplication.o()) != null ? c0133a.c(OTTApplication.o()) : null;
        if (c2 != null) {
            hd.h.a("myDownloads", "enableOfflineDownloads " + c2.getEnableOfflineDownloads());
            if (hd.d.r && c2.getEnableOfflineDownloads() != null && c2.getEnableOfflineDownloads().equalsIgnoreCase("true")) {
                this.r.F(Boolean.TRUE);
            } else {
                this.r.F(Boolean.FALSE);
            }
        }
        if (c2 != null && c2.getSiteURL() != null) {
            cc.b.B0().c2(c2.getSiteURL());
        }
        String allowedCountriesList = c2 != null ? c2.getAllowedCountriesList() : "";
        String[] split = allowedCountriesList != null ? allowedCountriesList.contains(",") ? allowedCountriesList.split(",") : new String[]{allowedCountriesList} : null;
        int length = split != null ? split.length : 0;
        PreferenceManager g2 = c0133a.g(OTTApplication.o());
        LocationInfo.IpInfo ipInfo = g2 != null ? g2.getIpInfo() : null;
        String countryCode = (ipInfo == null || ipInfo.getCountryCode() == null) ? "" : ipInfo.getCountryCode();
        int i2 = 0;
        while (true) {
            if (i2 >= length) {
                z = false;
                break;
            } else {
                if (countryCode.equalsIgnoreCase(split[i2])) {
                    z = true;
                    break;
                }
                i2++;
            }
        }
        HashMap hashMap = new HashMap();
        hashMap.put(cc.a.D0, ipInfo.getCountry());
        cc.c.d().r(cc.a.S, null);
        cc.c.d().v(cc.a.S, hashMap);
        if (!hd.a0.y(this).e(hd.a0.g).booleanValue()) {
            cc.c.d().r(cc.a.T, null);
            cc.c.d().v(cc.a.u0, hashMap);
            hd.a0.y(this).C(hd.a0.g, Boolean.TRUE);
        }
        if (!z && length > 0) {
            v0 v0Var = new v0();
            Bundle bundle = new Bundle();
            bundle.putString(hd.r.y0, "CountryRestriction");
            bundle.putString(hd.r.q, getString(2131951929));
            v0Var.setArguments(bundle);
            getSupportFragmentManager().q().s(R.anim.fade_in, R.anim.fade_out).q(2131428489, v0Var).j();
            return;
        }
        User loggedUser = g2 != null ? g2.getLoggedUser() : null;
        SystemFeatures systemFeaturesData = g2 != null ? g2.getSystemFeaturesData() : null;
        if (systemFeaturesData != null && systemFeaturesData.getSystemFeatures() != null) {
            features = systemFeaturesData.getSystemFeatures();
        }
        if (features != null && features.getUserprofiles() != null && features.getUserprofiles().getFields() != null && features.getUserprofiles().getFields().getIsUserprofilesSupported() != null && features.getUserprofiles().getFields().getIsUserprofilesSupported().trim().equalsIgnoreCase("true")) {
            if (features.getUserprofiles().getFields().getMaxProfileLimit() != null && !features.getUserprofiles().getFields().getMaxProfileLimit().trim().isEmpty()) {
                hd.e.o = Integer.parseInt(features.getUserprofiles().getFields().getMaxProfileLimit());
            }
            hd.e.p = true;
        }
        if (features != null && features.getGlobalsettings() != null && features.getGlobalsettings().getFields() != null && features.getGlobalsettings().getFields().getIsMobileSupported() != null && features.getGlobalsettings().getFields().getIsMobileSupported().trim().equalsIgnoreCase("true")) {
            com.yupptv.ott.a.a = true;
        }
        if (features != null && features.getGlobalsettings() != null && features.getGlobalsettings().getFields() != null && features.getGlobalsettings().getFields().getIsEmailSupported() != null && features.getGlobalsettings().getFields().getIsEmailSupported().trim().equalsIgnoreCase("true")) {
            com.yupptv.ott.a.b = true;
        }
        if (features != null && features.getGlobalsettings() != null && features.getGlobalsettings().getFields() != null && features.getGlobalsettings().getFields().getSignInPrimary() != null && features.getGlobalsettings().getFields().getSignInPrimary().trim().length() > 0) {
            com.yupptv.ott.a.A = features.getGlobalsettings().getFields().getSignInPrimary().trim();
        }
        if (features != null && features.getParentalcontrol() != null && features.getParentalcontrol().getFields() != null && features.getParentalcontrol().getFields().getPin_expiry_duration_in_sec_client() != null) {
            hd.e.q = Long.parseLong(features.getParentalcontrol().getFields().getPin_expiry_duration_in_sec_client()) * 1000;
        }
        if (loggedUser != null) {
            if (loggedUser.getUserId() != null) {
                OttLog.error(this.e, "setting userid to firebase " + loggedUser.getUserId());
                com.google.firebase.crashlytics.a.b().f(loggedUser.getUserId() + "");
            }
            if (loggedUser.getProfileId() == null || (a0Var = this.r) == null || !a0Var.n()) {
                hd.e.u = true;
            } else {
                hd.e.u = false;
            }
            if (hd.e.p && hd.e.u) {
                t0();
                return;
            }
        }
        String str2 = OTTApplication.A;
        if (str2 != null && str2.isEmpty()) {
            a.C0133a c0133a2 = hd.a.a;
            if (c0133a2.g(OTTApplication.o()) != null) {
                c0133a2.g(OTTApplication.o()).getInitialLaunch();
            }
            Intent intent = new Intent((Context) this, (Class<?>) MainActivity.class);
            intent.putExtra("splashscreen", true);
            startActivity(intent);
            finish();
            return;
        }
        if (this.q && OTTApplication.A.startsWith("http") && OTTApplication.A.contains("play.google.com")) {
            cc.e.n().M("Share");
            startActivity(new Intent("android.intent.action.VIEW", Uri.parse(OTTApplication.A)));
            finish();
        } else {
            Intent intent2 = new Intent((Context) this, (Class<?>) MainActivity.class);
            intent2.putExtra("fromdeeplink", true);
            intent2.putExtra("splashscreen", true);
            startActivity(intent2);
            finish();
        }
    }

    private void t0() {
        Intent intent = new Intent((Context) this, (Class<?>) LoadScreenActivity.class);
        intent.putExtra(hd.r.i, ScreenType.USER_PROFILES);
        intent.putExtra(hd.r.y0, hd.r.l);
        startActivity(intent);
        finish();
    }

    public void u0() {
        if (isFinishing()) {
            return;
        }
        this.g.setVisibility(0);
        if (cc.d.d() != null) {
            cc.d.d().b();
        }
        o0();
        p0();
        m0();
    }

    private void x0(DialogType dialogType, HashMap hashMap, boolean z, oc.h hVar) {
        try {
            FragmentManager supportFragmentManager = getSupportFragmentManager();
            i0 C0 = i0.C0(DialogType.APP_UPDATE, hashMap, hVar);
            supportFragmentManager.q().e(C0, "appupdate");
            supportFragmentManager.q().j();
            C0.show(supportFragmentManager, "appupdate");
        } catch (IllegalStateException unused) {
            if (!z) {
                s0();
            } else {
                Toast.makeText((Context) this, (CharSequence) getResources().getString(2131952941), 1).show();
                finish();
            }
        }
    }

    public void y0(String str, String str2) {
        if (isFinishing()) {
            return;
        }
        Dialog dialog = new Dialog(this, 2132017384);
        this.f = dialog;
        dialog.setCancelable(false);
        this.f.requestWindowFeature(1);
        this.f.setContentView(2131624080);
        TextView textView = (TextView) this.f.findViewById(2131428022);
        TextView textView2 = (TextView) this.f.findViewById(2131428018);
        TextView textView3 = (TextView) this.f.findViewById(2131428019);
        textView.setText(str);
        textView2.setText(str2);
        textView3.setOnClickListener(new l());
    }

    public void z0(String str, String str2) {
        Dialog dialog = new Dialog(this, 2132017384);
        this.f = dialog;
        dialog.setCancelable(false);
        this.f.requestWindowFeature(1);
        this.f.setContentView(2131624306);
        if (!OTTApplication.k0) {
            this.f.getWindow().setLayout(-1, -2);
        }
        TextView textView = (TextView) this.f.findViewById(2131428022);
        TextView textView2 = (TextView) this.f.findViewById(2131428018);
        TextView textView3 = (TextView) this.f.findViewById(2131428321);
        a.C0133a c0133a = hd.a.a;
        Configs c2 = c0133a.c(OTTApplication.o());
        if (!hd.d.r || c0133a.g(OTTApplication.o()).getLoggedUser() == null || c2 == null || c2.getEnableOfflineDownloads() == null || !c2.getEnableOfflineDownloads().equalsIgnoreCase("true")) {
            textView3.setVisibility(8);
        } else {
            textView3.setVisibility(0);
        }
        LinearLayout linearLayout = (LinearLayout) this.f.findViewById(2131429363);
        textView.setText(str);
        textView2.setText(str2);
        textView3.setOnClickListener(new m());
        linearLayout.setOnClickListener(new n());
        if (this.A || !this.o) {
            this.f.show();
        }
    }

    public void C0(String str) {
        hd.a.a.b(OTTApplication.o()).getUserManager().updateUserDisplayPreference(str, new f(str));
    }

    @Override
    public void g() {
        hd.x.b().c(null);
        Intent intent = new Intent((Context) this, (Class<?>) MainActivity.class);
        intent.putExtra("splashscreen", true);
        startActivity(intent);
        finish();
    }

    protected void onActivityResult(int i2, int i3, Intent intent) {
        super/*androidx.fragment.app.h*/.onActivityResult(i2, i3, intent);
        if (i2 == 102) {
            hd.h.b("AppUpdate", "ACTIVITY_RESULT_APP_UPDATE with result code : " + i3);
            if (i3 != -1) {
                Toast.makeText((Context) this, (CharSequence) getResources().getString(2131951694), 0).show();
            }
        }
        if (i2 == 2 && i3 == -1) {
            u0();
        }
    }

    public void onBackPressed() {
        a.C0133a c0133a = hd.a.a;
        if (c0133a.b(OTTApplication.o()) != null) {
            c0133a.b(OTTApplication.o()).cancelAllRequests();
        }
        Fragment j0 = getSupportFragmentManager().j0(2131428489);
        if (getSupportFragmentManager().q0() <= 0) {
            super/*androidx.activity.ComponentActivity*/.onBackPressed();
            return;
        }
        getSupportFragmentManager().h1();
        if (j0 instanceof b1) {
            ((b1) j0).onResume();
        }
    }

    protected void onCreate(Bundle bundle) {
        w0();
        super/*androidx.fragment.app.h*/.onCreate(bundle);
        setContentView(2131623973);
        cc.e.n().M("AppOpen");
        boolean m2 = new hd.b0(this).m();
        String string = getResources().getString(2131952731);
        if (m2) {
            AlertDialog.Builder builder = new AlertDialog.Builder(this, 2132017153);
            builder.setMessage(string).setCancelable(false).setTitle("App cant run on rooted device.").setPositiveButton("OK", new DialogInterface.OnClickListener() {
                @Override
                public final void onClick(DialogInterface dialogInterface, int i2) {
                    SplashScreenActivity.this.r0(dialogInterface, i2);
                }
            });
            builder.create().show();
            return;
        }
        hd.a0 y = hd.a0.y(this);
        this.r = y;
        this.t = y.m("defaultThemeValue");
        this.s = this.r.m(this.v);
        if (this.r.h() != null) {
            this.y = this.r.h();
        }
        hd.h.a("display_language1", "display_language " + this.y);
        this.w = (RelativeLayout) findViewById(2131429573);
        ProgressBar progressBar = (ProgressBar) findViewById(com.razorpay.R.id.progressBar);
        this.g = progressBar;
        if (progressBar != null) {
            progressBar.setVisibility(8);
        }
        this.l = (ImageView) findViewById(2131429833);
        this.m = (ImageView) findViewById(2131427624);
        this.k = (ImageView) findViewById(2131428646);
        this.p = (TextView) findViewById(2131429538);
        this.o = true;
        this.r.B(Boolean.FALSE);
        hd.a0 a0Var = this.r;
        if (a0Var != null) {
            a0Var.C("CLEAR_EPG_FILTER_PREFERENCES", Boolean.TRUE);
        }
        if (getIntent().getExtras() == null || !(getIntent().getExtras().getBoolean("signout") || getIntent().getExtras().getBoolean("reset"))) {
            initSDK();
            B0();
            q0();
        } else {
            this.i = true;
            s0();
        }
        try {
            C0(this.y);
        } catch (Exception unused) {
        }
        com.google.firebase.installations.c.p().getId().addOnCompleteListener(new e());
    }

    protected void onDestroy() {
        super.onDestroy();
        hd.h.a("destroy>>", "SplashActivityDestroyed");
    }

    protected void onPause() {
        VideoView videoView;
        super/*androidx.fragment.app.h*/.onPause();
        if (this.o && (videoView = this.h) != null && videoView.isPlaying()) {
            this.n = this.h.getCurrentPosition();
            this.h.pause();
        }
    }

    protected void onResume() {
        w0();
        super/*androidx.fragment.app.h*/.onResume();
        if (this.o) {
            VideoView videoView = this.h;
            if (videoView != null && !this.i) {
                videoView.seekTo(this.n);
                this.h.start();
            } else if (!this.j) {
                if (videoView != null) {
                    videoView.setVisibility(8);
                }
                ImageView imageView = this.k;
                if (imageView != null) {
                    imageView.setVisibility(0);
                }
            }
        }
        OTTApplication.H();
    }

    protected void onSaveInstanceState(Bundle bundle) {
        super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
        hd.h.b(this.e, "onsave instance state");
    }

    protected void onStart() {
        super.onStart();
        if (this.o) {
            VideoView videoView = this.h;
            if (videoView != null && !this.i) {
                videoView.seekTo(this.n);
                this.h.start();
            } else {
                if (this.j) {
                    return;
                }
                if (videoView != null) {
                    videoView.setVisibility(8);
                }
                ImageView imageView = this.k;
                if (imageView != null) {
                    imageView.setVisibility(0);
                }
            }
        }
    }

    protected void onStop() {
        VideoView videoView;
        super.onStop();
        if (this.o && (videoView = this.h) != null && videoView.isPlaying()) {
            this.n = this.h.getCurrentPosition();
            this.h.pause();
        }
    }

    @Override
    public void setTitle(String str) {
    }

    void v0(String str) {
        this.h.setVisibility(0);
        this.h.setKeepScreenOn(true);
        this.h.setVideoURI(Uri.parse(str));
        this.h.setOnCompletionListener(new j());
        this.h.setOnErrorListener(new k());
        this.h.start();
    }

    public void w0() {
        setRequestedOrientation(1);
    }
}