导航菜单

页面标题

页面副标题

Chaupal v3.2 - LoadScreenActivity.java 源代码

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

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


package com.yupptv.ott.activity;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import com.facebook.login.s;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInApi;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.OptionalPendingResult;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.Status;
import com.google.android.material.appbar.AppBarLayout;
import com.razorpay.PaymentData;
import com.razorpay.PaymentResultWithDataListener;
import com.yupptv.ott.MainActivity;
import com.yupptv.ott.OTTApplication;
import com.yupptv.ott.enums.ListType;
import com.yupptv.ott.enums.OTPType;
import com.yupptv.ott.enums.ScreenType;
import com.yupptv.ott.fragments.h1;
import com.yupptv.ott.fragments.m;
import com.yupptv.ott.fragments.n1;
import com.yupptv.ott.fragments.onboarding.SignInFragment;
import com.yupptv.ott.fragments.onboarding.SignupFragmentStep2;
import com.yupptv.ott.fragments.payment.NewPackageFragment;
import com.yupptv.ottsdk.OttSDK;
import com.yupptv.ottsdk.managers.Preferences.PreferenceManager;
import com.yupptv.ottsdk.model.User;
import com.yupptv.ottsdk.model.systemfeatures.Features;
import com.yupptv.ottsdk.model.systemfeatures.FeaturesInfo;
import com.yupptv.ottsdk.model.systemfeatures.Fields;
import com.yupptv.ottsdk.model.systemfeatures.SystemFeatures;
import hd.a;
import hd.a0;
import hd.r;
import hd.u;
import java.util.ArrayList;
import java.util.List;
import nc.j;
import oc.k;

public class LoadScreenActivity extends com.yupptv.ott.activity.a implements k, PaymentResultWithDataListener {
    public static boolean C = false;
    public Toolbar e;
    public ImageView f;
    private boolean g;
    public TextView h;
    public TextView i;
    public TextView j;
    public TextView k;
    AppBarLayout l;
    public RelativeLayout q;
    private ImageView r;
    public ImageView s;
    private boolean m = false;
    public String n = "";
    public boolean o = false;
    public List<ld.a> p = new ArrayList();
    private boolean t = false;
    public List u = new ArrayList();
    public boolean v = true;
    public Handler w = new Handler();
    public Runnable x = new a();
    public boolean y = false;
    public boolean z = false;
    public boolean A = false;
    private boolean B = false;

    class a implements Runnable {
        a() {
        }

        @Override
        public void run() {
            LoadScreenActivity.this.v = true;
        }
    }

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

        @Override
        public void onClick(View view) {
            LoadScreenActivity loadScreenActivity = LoadScreenActivity.this;
            if (loadScreenActivity.v) {
                loadScreenActivity.v = false;
                loadScreenActivity.w.postDelayed(loadScreenActivity.x, 2000L);
            }
        }
    }

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

        @Override
        public void onClick(View view) {
            LoadScreenActivity.this.onBackPressed();
        }
    }

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

        @Override
        public void onClick(View view) {
            LoadScreenActivity loadScreenActivity = LoadScreenActivity.this;
            if (loadScreenActivity.v) {
                loadScreenActivity.v = false;
                loadScreenActivity.w.postDelayed(loadScreenActivity.x, 1000L);
                u.e0(LoadScreenActivity.this, r.b1, null);
            }
        }
    }

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

        @Override
        public void onClick(View view) {
            LoadScreenActivity loadScreenActivity = LoadScreenActivity.this;
            if (loadScreenActivity.v) {
                loadScreenActivity.v = false;
                loadScreenActivity.w.postDelayed(loadScreenActivity.x, 1000L);
                cc.c.d().o(cc.c.V0, cc.b.B0().K(null));
                LoadScreenActivity.this.Z();
            }
        }
    }

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

        @Override
        public void onClick(View view) {
            LoadScreenActivity.this.onBackPressed();
        }
    }

    class g implements Runnable {
        g() {
        }

        @Override
        public void run() {
            LoadScreenActivity.this.t = false;
        }
    }

    class h implements ResultCallback<Status> {
        h() {
        }

        public void onResult(Status status) {
            OTTApplication.w().u().disconnect();
            OTTApplication.w().M(null);
        }
    }

    class i implements GoogleApiClient.ConnectionCallbacks {

        class a implements ResultCallback<Status> {
            a() {
            }

            public void onResult(Status status) {
                OTTApplication.w().u().disconnect();
                OTTApplication.w().M(null);
            }
        }

        i() {
        }

        public void onConnected(Bundle bundle) {
            GoogleSignInApi googleSignInApi = Auth.GoogleSignInApi;
            OptionalPendingResult silentSignIn = googleSignInApi.silentSignIn(OTTApplication.w().u());
            if (silentSignIn.isDone()) {
                silentSignIn.get();
                googleSignInApi.signOut(OTTApplication.w().u()).setResultCallback(new a());
            }
        }

        public void onConnectionSuspended(int i) {
        }
    }

    public void W() {
        try {
            getSupportFragmentManager().j1((String) null, 1);
        } catch (IllegalStateException unused) {
        }
        setResult(-1);
        finish();
    }

    public void X() {
        ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(new View(this).getWindowToken(), 2);
    }

    public boolean Y() {
        return this.v;
    }

    public void Z() {
        if (hd.d.a) {
            finish();
            return;
        }
        Intent intent = new Intent((Context) this, (Class<?>) MainActivity.class);
        intent.setAction("android.intent.action.MAIN");
        intent.addCategory("android.intent.category.LAUNCHER");
        intent.addFlags(67108864);
        intent.addFlags(268468224);
        startActivity(intent);
        finish();
    }

    public void a0() {
        try {
            getSupportFragmentManager().g1("selectedpaymentsfragment", 1);
        } catch (IllegalStateException unused) {
        }
    }

    public void b0(boolean z) {
        if (z) {
            getWindow().setFlags(16, 16);
        } else {
            getWindow().clearFlags(16);
        }
    }

    public void c0(boolean z) {
        this.v = z;
    }

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

    public void e0() {
        this.e.setBackgroundColor(getResources().getColor(2131100484));
    }

    public void f0(String str) {
        this.q.setVisibility(8);
        this.h.setText(str);
        this.e.setBackgroundColor(getResources().getColor(2131100484));
        if (getSupportActionBar() != null) {
            getSupportActionBar().C("");
        }
    }

    public void g0() {
        try {
            if (s.i() != null) {
                s.i().p();
            }
        } catch (Exception unused) {
        }
        try {
            if (OTTApplication.w().u() != null) {
                if (!OTTApplication.w().u().isConnected()) {
                    OTTApplication.w().u().registerConnectionCallbacks(new i());
                    OTTApplication.w().u().connect();
                    return;
                }
                GoogleSignInApi googleSignInApi = Auth.GoogleSignInApi;
                OptionalPendingResult silentSignIn = googleSignInApi.silentSignIn(OTTApplication.w().u());
                if (silentSignIn.isDone()) {
                    silentSignIn.get();
                    googleSignInApi.signOut(OTTApplication.w().u()).setResultCallback(new h());
                }
            }
        } catch (Exception unused2) {
        }
    }

    public void hideKeyBoard(View view) {
        ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(view.getWindowToken(), 0);
    }

    protected void onActivityResult(int i2, int i3, Intent intent) {
        super/*androidx.fragment.app.h*/.onActivityResult(i2, i3, intent);
        Fragment j0 = getSupportFragmentManager().j0(2131428566);
        if (j0 instanceof SignupFragmentStep2) {
            ((SignupFragmentStep2) j0).onActivityResult(i2, i3, intent);
        }
        if (j0 instanceof SignInFragment) {
            ((SignInFragment) j0).onActivityResult(i2, i3, intent);
        }
        if (i3 != -2) {
            int i4 = -1;
            if (i3 == -1) {
                if (i2 != 101) {
                    if (i2 == 20 || i2 == 12) {
                        W();
                        return;
                    }
                    if (intent == null) {
                        W();
                        return;
                    }
                    String string = intent.getExtras().getString(r.t0);
                    if (j0 instanceof h1) {
                        ((h1) j0).e0(string);
                    }
                    if (j0 instanceof m) {
                        ((m) j0).e0(string);
                        return;
                    }
                    return;
                }
                Bundle bundle = new Bundle();
                User loggedUser = hd.a.a.g(OTTApplication.o()).getLoggedUser();
                if (!loggedUser.getEmail().trim().isEmpty()) {
                    bundle.putString("profile_name", loggedUser.getEmail());
                } else if (!loggedUser.getPhoneNumber().trim().isEmpty()) {
                    bundle.putString("profile_name", loggedUser.getPhoneNumber());
                    if (loggedUser.getProfileId() != null) {
                        i4 = loggedUser.getProfileId().intValue();
                    } else if (loggedUser.getProfileParentalDetails() != null && loggedUser.getProfileParentalDetails().size() > 0) {
                        i4 = ((User.ProfileParentalDetails) loggedUser.getProfileParentalDetails().get(0)).getProfileId().intValue();
                    }
                    bundle.putInt("profile_id", i4);
                }
                if (this.B) {
                    u.Y(this, ScreenType.CREATE_USER_PROFILES, bundle);
                    return;
                } else {
                    Z();
                    return;
                }
            }
            if (i3 == 12 || i3 == 14) {
                if (j0 instanceof nc.h) {
                    ((nc.h) j0).G0();
                }
                if (j0 instanceof h1) {
                    ((h1) j0).B0();
                    setResult(19);
                    return;
                } else {
                    if (j0 instanceof NewPackageFragment) {
                        ((NewPackageFragment) j0).U0();
                        return;
                    }
                    return;
                }
            }
            if (i3 != 36) {
                if (i3 == 99) {
                    Bundle extras = intent.getExtras();
                    if (j0 instanceof h1) {
                        ((h1) j0).u0(extras);
                    }
                    if (j0 instanceof j) {
                        ((j) j0).l0(extras);
                        return;
                    }
                    return;
                }
                if (i2 == 12 || i2 == 14) {
                    if (j0 instanceof NewPackageFragment) {
                        ((NewPackageFragment) j0).a1();
                    }
                    setResult(19);
                    return;
                } else {
                    if (i2 == 20) {
                        W();
                        return;
                    }
                    if (i2 != 34) {
                        if (i2 != 101) {
                            return;
                        }
                        if (j0 instanceof n1) {
                            Z();
                        }
                    }
                    Z();
                    return;
                }
            }
            a0 y = a0.y(this);
            boolean booleanValue = y.e("isProfileNameRequired").booleanValue();
            Bundle bundle2 = new Bundle();
            if (!booleanValue) {
                u.Y(this, ScreenType.USER_PROFILES, bundle2);
                return;
            }
            User loggedUser2 = hd.a.a.g(OTTApplication.o()).getLoggedUser();
            if (loggedUser2 == null) {
                u.Y(this, ScreenType.USER_PROFILES, bundle2);
                return;
            }
            if (!loggedUser2.getEmail().trim().isEmpty()) {
                hd.h.a("DEBUG", "otp master profile name " + loggedUser2.getEmail());
                bundle2.putString("profile_name", loggedUser2.getEmail());
            } else if (!loggedUser2.getPhoneNumber().trim().isEmpty()) {
                hd.h.a("DEBUG", "otp master profile name " + loggedUser2.getPhoneNumber());
                bundle2.putString("profile_name", loggedUser2.getPhoneNumber());
                bundle2.putInt("profile_id", loggedUser2.getProfileId().intValue());
            }
            y.C("isProfileNameRequired", Boolean.FALSE);
            u.Y(this, ScreenType.CREATE_USER_PROFILES, bundle2);
        }
    }

    public void onBackPressed() {
        throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.activity.LoadScreenActivity.onBackPressed():void");
    }

    protected void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.h*/.onCreate(bundle);
        d0();
        setContentView(2131624394);
        this.e = findViewById(2131429800);
        this.f = (ImageView) findViewById(2131429804);
        this.h = (TextView) findViewById(2131429820);
        this.i = (TextView) findViewById(2131428387);
        this.j = (TextView) findViewById(2131429535);
        this.r = (ImageView) findViewById(2131428301);
        this.s = (ImageView) findViewById(2131429807);
        this.k = (TextView) findViewById(2131429819);
        if (!OTTApplication.k0) {
            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.f.getLayoutParams();
            layoutParams.width = (int) getResources().getDimension(2131166190);
            layoutParams.height = (int) getResources().getDimension(2131166190);
            int dimension = (int) getResources().getDimension(2131166676);
            this.f.setPadding(0, dimension, 0, dimension);
            this.f.setLayoutParams(layoutParams);
        }
        this.r.setVisibility(8);
        this.r.setOnClickListener(new b());
        this.q = (RelativeLayout) findViewById(2131427780);
        setSupportActionBar(this.e);
        getSupportActionBar().t(true);
        this.s.setVisibility(8);
        getSupportActionBar().v(true);
        this.l = (AppBarLayout) findViewById(2131427506);
        this.n = "";
        a.C0133a c0133a = hd.a.a;
        if (c0133a.b(OTTApplication.o()) == null) {
            OttSDK.getNewInstance(this, hd.e.z);
        }
        this.s.setOnClickListener(new c());
        this.i.setOnClickListener(new d());
        this.j.setOnClickListener(new e());
        if (getIntent() != null && getIntent().getExtras() != null) {
            this.g = getIntent().getExtras().getBoolean("listType");
            if (getIntent().hasExtra(r.z0)) {
                this.o = getIntent().getBooleanExtra(r.z0, false);
            }
        }
        if (this.g) {
            getSupportActionBar().t(true);
            getSupportActionBar().r(new ColorDrawable(getResources().getColor(2131099810)));
            this.h.setVisibility(0);
            this.q.setVisibility(8);
            this.n = getIntent().getExtras().getString(r.y0);
            u.W(this, (ListType) getIntent().getExtras().get(r.j), getIntent().getExtras());
        } else if (getIntent().hasExtra(r.y0)) {
            this.n = getIntent().getExtras().getString(r.y0);
            if (!getIntent().getExtras().getString(r.y0).equalsIgnoreCase(r.g1) && !this.n.equalsIgnoreCase(r.h1) && !getIntent().getExtras().getString(r.y0).equalsIgnoreCase(r.k1)) {
                u.X(this, getIntent().getExtras(), (ScreenType) getIntent().getExtras().get(r.i));
            } else if (((ScreenType) getIntent().getExtras().getSerializable(r.i)) == ScreenType.OTP_VERIFY) {
                PreferenceManager g2 = c0133a.g(OTTApplication.o());
                SystemFeatures systemFeaturesData = g2 != null ? g2.getSystemFeaturesData() : null;
                Features systemFeatures = systemFeaturesData != null ? systemFeaturesData.getSystemFeatures() : null;
                FeaturesInfo otpAuthentication = systemFeatures != null ? systemFeatures.getOtpAuthentication() : null;
                Fields fields = otpAuthentication != null ? otpAuthentication.getFields() : null;
                String otpVerificationOrder = fields != null ? fields.getOtpVerificationOrder() : null;
                if (otpVerificationOrder == null || otpVerificationOrder.trim().isEmpty()) {
                    u.a0(this, g2.getLoggedUser().getPhoneNumber(), OTPType.VERIFY_MOBILE, r.g1, getIntent().getExtras().getString(r.C0) != null ? getIntent().getExtras().getString(r.C0) : "", getIntent().getExtras());
                } else if (otpVerificationOrder.equals("email")) {
                    u.a0(this, g2.getLoggedUser().getEmail(), OTPType.VERIFY_EMAIL, r.g1, getIntent().getExtras().getString(r.C0) != null ? getIntent().getExtras().getString(r.C0) : "", getIntent().getExtras());
                } else if (otpVerificationOrder.equals("mobile")) {
                    u.a0(this, g2.getLoggedUser().getPhoneNumber(), OTPType.VERIFY_MOBILE, r.g1, getIntent().getExtras().getString(r.C0) != null ? getIntent().getExtras().getString(r.C0) : "", getIntent().getExtras());
                } else {
                    u.a0(this, g2.getLoggedUser().getPhoneNumber(), OTPType.VERIFY_MOBILE, r.g1, getIntent().getExtras().getString(r.C0) != null ? getIntent().getExtras().getString(r.C0) : "", getIntent().getExtras());
                }
            } else {
                u.X(this, getIntent().getExtras(), (ScreenType) getIntent().getExtras().get(r.i));
            }
        } else if (getIntent().hasExtra(r.l) || getIntent().hasExtra(r.m)) {
            u.Y(this, (ScreenType) getIntent().getExtras().get(r.i), getIntent().getExtras());
        } else {
            if (((ScreenType) getIntent().getExtras().getSerializable(r.i)) == ScreenType.PAYMENTS) {
                getSupportActionBar().t(true);
                getSupportActionBar().r(new ColorDrawable(getResources().getColor(2131099810)));
                this.h.setVisibility(0);
                this.q.setVisibility(8);
            }
            u.X(this, getIntent().getExtras(), (ScreenType) getIntent().getExtras().get(r.i));
        }
        this.e.setNavigationOnClickListener(new f());
    }

    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        hd.h.b("onTouch", "onTouch");
        return super.onKeyDown(i2, keyEvent);
    }

    @Override
    public void onPaymentError(int i2, String str, PaymentData paymentData) {
        Fragment j0 = getSupportFragmentManager().j0(2131428566);
        if (j0 instanceof nc.g) {
            ((nc.g) j0).X0(i2, str);
        } else if (j0 instanceof NewPackageFragment) {
            ((NewPackageFragment) j0).i1(i2, str);
        } else if (j0 instanceof nc.e) {
            ((nc.e) j0).k1(i2, str);
        }
    }

    @Override
    public void onPaymentSuccess(String str, PaymentData paymentData) {
        Fragment j0 = getSupportFragmentManager().j0(2131428566);
        if (j0 instanceof nc.g) {
            ((nc.g) j0).e0(str, paymentData.getSignature());
        } else if (j0 instanceof NewPackageFragment) {
            ((NewPackageFragment) j0).j1(str, paymentData.getSignature());
        } else if (j0 instanceof nc.e) {
            ((nc.e) j0).l1(str, paymentData.getSignature());
        }
    }

    public void onResume() {
        super/*androidx.fragment.app.h*/.onResume();
        d0();
        if (hd.a.a.b(OTTApplication.o()) == null) {
            OttSDK.getNewInstance(this, hd.e.z);
        }
    }

    @Override
    public void setTitle(String str) {
        f0(str);
    }
}