FLIX VISION v2.8.2版本的 MD5 值为:4d33b143293b36f23ce5a6a5834e6993

以下内容为反编译后的 LinksActivity.java 源代码,内容仅作参考


package flix.com.vision.activities;

import android.app.Activity;
import android.app.FragmentManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
import android.view.ContextThemeWrapper;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.d;
import androidx.recyclerview.widget.RecyclerView;
import ba.w;
import com.github.ybq.android.spinkit.SpinKitView;
import com.squareup.picasso.Picasso;
import flix.com.vision.App;
import flix.com.vision.R;
import flix.com.vision.activities.LinksActivity;
import flix.com.vision.activities.player.SimpleVideoPlayer;
import flix.com.vision.activities.player.WebPlayerActivity;
import flix.com.vision.api.alldebrid.AllDebridCommon;
import flix.com.vision.api.premiumize.PremiumizeCommon;
import flix.com.vision.api.realdebrid.RealDebridCommon;
import flix.com.vision.events.SystemEvent;
import flix.com.vision.helpers.CenterLayoutManager;
import flix.com.vision.helpers.Constants;
import flix.com.vision.models.Movie;
import flix.com.vision.models.MySourceArrayList;
import flix.com.vision.tv.Constant;
import gb.c;
import gb.h;
import hb.e;
import hb.f;
import hb.g;
import ib.o;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.Random;
import la.d;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import pc.b;
import rb.a0;
import rb.c0;
import rb.k;
import rb.m;
import rb.q;
import rb.s;
import sb.j;
import v9.r;
import v9.t;
import v9.u;
import v9.v;
import v9.x;
import v9.y;
import v9.z;
import xb.i;
import xb.l;
import xb.p;

public class LinksActivity extends x9.a implements e, g, f {

    public static final int f11759w0 = 0;
    public LinearLayout D;
    public LinearLayout E;
    public RelativeLayout F;
    public RelativeLayout G;
    public RelativeLayout H;
    public TextView I;
    public TextView J;
    public TextView K;
    public TextView L;
    public SpinKitView M;
    public p2.a N;
    public Typeface O;
    public Typeface P;
    public RecyclerView Q;
    public MySourceArrayList R;
    public Movie S;
    public w T;
    public ImageView U;
    public ImageView V;
    public ImageView W;
    public ImageView X;
    public int Y;
    public int Z;

    public int f11760a0;

    public ImageView f11761b0;

    public ImageView f11762c0;

    public TextView f11763d0;

    public TextView f11764e0;

    public TextView f11765f0;

    public b f11766g0;

    public String f11767h0 = null;

    public String f11768i0 = null;

    public String f11769j0 = App.getInstance().f11736u;

    public Bundle f11770k0;

    public boolean f11771l0;

    public Handler f11772m0;

    public r f11773n0;

    public boolean f11774o0;

    public int f11775p0;

    public String f11776q0;

    public String f11777r0;

    public int f11778s0;

    public Menu f11779t0;

    public ArrayList<o> f11780u0;

    public d f11781v0;

    public LinksActivity() {
        new ArrayList();
        this.f11775p0 = 0;
        this.f11777r0 = "";
        this.f11780u0 = new ArrayList<>();
        this.f11781v0 = null;
    }

    public static void PlayExternal(int i10, o oVar, String str, Movie movie, Activity activity, int i11) {
        if (movie != null) {
            App.getInstance().f11723h = true;
            try {
                App.getInstance().f11731p.addtoWatching(movie);
            } catch (Exception e10) {
                e10.printStackTrace();
            }
        }
        if (i10 == 1) {
            h.PlayMXPlayer(activity, str, oVar.f13838u, null, oVar.f13825h, i11);
        } else if (i10 == 2) {
            h.PlayVLC(activity, str, oVar.f13838u, null, oVar.f13825h, i11);
        } else {
            if (i10 != 3) {
                return;
            }
            h.PlayXPlayer(activity, null, oVar.f13838u);
        }
    }

    public static void setRDQtyLabel(o oVar) {
        String str;
        if (oVar == null || (str = oVar.f13838u) == null) {
            return;
        }
        if (str.contains("480p")) {
            oVar.f13837t = "480p - " + oVar.f13837t;
            oVar.f13828k = 480;
            return;
        }
        if (oVar.f13838u.contains("720p")) {
            oVar.f13828k = 720;
            oVar.f13837t = "720p - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.contains("1080p")) {
            oVar.f13828k = 1080;
            oVar.f13837t = "1080p - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.contains("1440")) {
            oVar.f13828k = 1440;
            oVar.f13837t = "1440 - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.contains("2160p")) {
            oVar.f13828k = 4000;
            oVar.f13837t = "4K - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.contains("4320p")) {
            oVar.f13828k = 8000;
            oVar.f13837t = "8K - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.toLowerCase().contains(".sd")) {
            oVar.f13828k = 720;
            oVar.f13837t = "720p - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.toLowerCase().contains(".4k")) {
            oVar.f13828k = 4000;
            oVar.f13837t = "4K - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.toLowerCase().contains(".hdtv")) {
            oVar.f13828k = 1080;
            oVar.f13837t = "1080p - " + oVar.f13837t;
            return;
        }
        if (oVar.f13838u.toLowerCase().contains(".hd")) {
            oVar.f13828k = 1080;
            oVar.f13837t = "1080p - " + oVar.f13837t;
        }
    }

    @Override
    public void OnM3USuccess(ArrayList<o> arrayList) {
        d dVar = this.f11781v0;
        if (dVar != null) {
            try {
                dVar.dismiss();
            } catch (Exception unused) {
            }
        }
        this.f11780u0 = arrayList;
        try {
            ArrayList arrayList2 = new ArrayList();
            int i10 = 0;
            for (int i11 = 0; i11 < arrayList.size(); i11++) {
                arrayList2.add(arrayList.get(i11).f13837t.toUpperCase(Locale.ROOT));
            }
            CharSequence[] charSequenceArr = (CharSequence[]) arrayList2.toArray(new CharSequence[arrayList2.size()]);
            d.a aVar = new d.a(new ContextThemeWrapper(this, R.style.AlertDialogNoHeader));
            aVar.setSingleChoiceItems(charSequenceArr, -1, new v9.w(this, arrayList, i10));
            aVar.setOnDismissListener(new x(0));
            aVar.show();
        } catch (Exception unused2) {
        }
    }

    @Override
    public void OnSuccess(o oVar) {
        boolean z10 = oVar.f13832o;
        int i10 = 0;
        if (z10) {
            this.f11775p0++;
            this.R.add(0, oVar);
        } else if (oVar.f13829l) {
            if (RealDebridCommon.f12034j && (oVar.f13833p || App.isRdSupported(oVar.f13838u))) {
                ca.a.getLinkRealDebrid(oVar.f13838u, RealDebridCommon.f12032h, RealDebridCommon.f12030b).observeOn(oc.a.mainThread()).subscribeOn(fd.a.newThread()).subscribe(new u(this, i10), new v(i10, oVar));
            }
            if (AllDebridCommon.f12026h) {
                unlockLinkAllRebrid(oVar.f13838u);
            }
        } else {
            if (z10) {
                this.f11775p0++;
            }
            this.R.add(oVar);
        }
        if ((oVar.f13835r || oVar.f13834q || oVar.f13836s) && oVar.f13832o) {
            this.f11774o0 = true;
        }
    }

    @Override
    public void OnSuccess(ArrayList<o> arrayList) {
        if (arrayList.size() > 0) {
            Iterator<o> it = arrayList.iterator();
            while (it.hasNext()) {
                o next = it.next();
                if (next.f13838u.contains("google")) {
                    next.f13832o = true;
                    if (new Random().nextBoolean()) {
                        next.f13837t = "720p -  " + next.f13837t;
                    } else {
                        next.f13837t = "1080p -  " + next.f13837t;
                    }
                }
                if (next.f13838u.contains("loadvid") || next.f13838u.contains("vidcloud") || next.f13838u.contains("vcstream")) {
                    EventBus.getDefault().post(next);
                }
                if (next.f13837t.contains("HLS")) {
                    this.R.add(next);
                } else if (next.f13832o) {
                    this.R.add(0, next);
                } else {
                    this.R.add(next);
                }
                if (next.f13832o) {
                    this.f11775p0++;
                }
            }
        }
    }

    public final void d(o oVar) {
        if (!oVar.f13839v && oVar.isSplitable() && !App.getInstance().f11732q.getBoolean("pref_adult_zone_always_play_best", true)) {
            FragmentManager fragmentManager = getFragmentManager();
            la.d newInstance = la.d.newInstance(this, false);
            this.f11781v0 = newInstance;
            newInstance.setloading();
            try {
                this.f11781v0.show(fragmentManager, "");
            } catch (Exception e10) {
                e10.printStackTrace();
            }
            qb.b bVar = new qb.b(this, this);
            bVar.setHindiM3uSpliCallBack(this);
            bVar.process(oVar);
            return;
        }
        int i10 = App.getInstance().f11732q.getInt("player_index", 0);
        if (i10 <= 0 || i10 >= 4) {
            if (i10 != 4) {
                e(oVar);
                return;
            }
            try {
                App.getInstance().f11723h = true;
                try {
                    App.getInstance().f11731p.addtoWatching(this.S);
                } catch (Exception e11) {
                    e11.printStackTrace();
                }
                Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(oVar.f13838u));
                intent.setDataAndType(Uri.parse(oVar.f13838u), "video/mp4");
                startActivity(intent);
                return;
            } catch (Exception e12) {
                cc.d.makeToast(this, e12.getMessage(), false);
                return;
            }
        }
        String title = this.S.getTitle();
        if (this.S.isSeries()) {
            StringBuilder r10 = a.b.r(title, " - S");
            r10.append(this.Y);
            r10.append("E");
            r10.append(this.Z);
            r10.append(" - ");
            r10.append(this.f11777r0);
            title = r10.toString();
        }
        String str = title;
        try {
            PlayExternal(i10, oVar, str, this.S, this, App.getInstance().f11732q.getInt(this.f11768i0, -1));
        } catch (Exception unused) {
            Toast.makeText(getBaseContext(), "Failed to load external Player, Make sure it is installed", 1).show();
            e(oVar);
        }
    }

    public final void e(o oVar) {
        if (oVar.f13824g) {
            FragmentManager fragmentManager = getFragmentManager();
            la.d newInstance = la.d.newInstance(this, true);
            newInstance.setTitle("Play With VLC");
            newInstance.setMessage("This File Format can only be played with VLC. \nPlease make sure VLC is installed");
            newInstance.setButton1("CANCEL", new y(0));
            newInstance.setButton2("PLAY WITH VLC", new z(0, this, oVar));
            try {
                newInstance.show(fragmentManager, "");
                return;
            } catch (Exception e10) {
                e10.printStackTrace();
                return;
            }
        }
        String title = this.S.getTitle();
        if (this.S.isSeries()) {
            StringBuilder r10 = a.b.r(title, " · S");
            r10.append(this.Y);
            r10.append("E");
            r10.append(this.Z);
            title = r10.toString();
        }
        App.getInstance().f11723h = true;
        try {
            App.getInstance().f11731p.addtoWatching(this.S);
        } catch (Exception e11) {
            e11.printStackTrace();
        }
        Intent intent = new Intent(this, (Class<?>) SimpleVideoPlayer.class);
        intent.putExtra("mimeType", oVar.f13827j);
        intent.putExtra("movie", this.S);
        intent.putExtra("title", title);
        intent.putExtra("language", oVar.f13830m);
        ArrayList<? extends Parcelable> arrayList = new ArrayList<>();
        if (oVar.f13823b) {
            Iterator<o> it = this.R.iterator();
            while (it.hasNext()) {
                o next = it.next();
                if (next.f13832o && next.f13823b && next.f13839v) {
                    arrayList.add(next);
                }
            }
            ArrayList<o> arrayList2 = this.f11780u0;
            if (arrayList2 != null) {
                Iterator<o> it2 = arrayList2.iterator();
                while (it2.hasNext()) {
                    o next2 = it2.next();
                    if (next2.f13832o && next2.f13823b && next2.f13839v) {
                        arrayList.add(next2);
                    }
                }
            }
        } else {
            Iterator<o> it3 = this.R.iterator();
            while (it3.hasNext()) {
                o next3 = it3.next();
                if (next3.f13832o && !next3.f13824g) {
                    arrayList.add(next3);
                }
            }
        }
        intent.putExtra("current_index", arrayList.indexOf(oVar));
        intent.putParcelableArrayListExtra("sources", arrayList);
        if (this.S.isAnime()) {
            this.f11776q0 = "Episode " + this.Z;
        }
        intent.putExtra("title_episode", this.f11776q0);
        intent.putExtra("season_number", this.Y);
        intent.putExtra("episode_number", this.Z);
        intent.putExtra("episode_count", this.f11760a0);
        intent.putExtra("episode", this.f11777r0);
        int i10 = this.f11778s0;
        if (i10 <= 0) {
            i10 = this.S.getDuration();
        }
        intent.putExtra("runtime", i10);
        intent.putExtra("streamUrl", oVar.f13838u);
        intent.putExtra("movie_id", this.f11768i0);
        if (cc.f.notNull(oVar.f13825h)) {
            intent.putExtra("referer", oVar.f13825h);
        }
        String str = this.S.f12379h;
        if (str != null && !str.isEmpty()) {
            intent.putExtra("movie_rating", this.S.f12379h + "");
        }
        startActivity(intent);
    }

    public final void f(String str, String str2, String str3, String str4) {
        this.f11776q0 = str3;
        if (this.f11762c0 == null || this.f11763d0 == null || this.S.getType() != 1) {
            return;
        }
        if (str.length() > 0) {
            try {
                Picasso.get().load(str).fit().centerCrop().into(this.f11762c0);
            } catch (OutOfMemoryError e10) {
                e10.printStackTrace();
            }
        }
        if (str2.length() > 0) {
            this.f11763d0.setText(str2);
        }
        if (str3.length() > 0) {
            this.f11764e0.setText("S" + this.Y + "E" + this.Z + " · " + str3);
        }
        if (str4 == null || str4.length() <= 0) {
            return;
        }
        this.f11765f0.setText(str4);
    }

    public void linkClicked(o oVar, boolean z10) {
        String title = this.S.getTitle();
        if (this.S.isSeries()) {
            StringBuilder r10 = a.b.r(title, " · S");
            r10.append(this.Y);
            r10.append("E");
            r10.append(this.Z);
            title = r10.toString();
        }
        App.getInstance().f11724i = true;
        if (oVar.f13832o) {
            d(oVar);
            return;
        }
        Intent intent = new Intent(this, (Class<?>) WebPlayerActivity.class);
        String image_url = this.S.getType() > 2 ? this.S.getImage_url() : this.S.getCover();
        if (getResources().getConfiguration().orientation == 1) {
            image_url = this.S.getImage_url() != null ? this.S.getImage_url().replace("w185", "w500").replace("w342", "w500") : this.S.getCover();
        }
        String str = this.S.f12379h;
        if (str != null && !str.isEmpty()) {
            intent.putExtra("movie_rating", this.S.f12379h + "");
        }
        intent.putExtra("url", oVar.f13838u);
        intent.putExtra("move_clock", false);
        intent.putExtra("poster", image_url);
        intent.putExtra("episode_number", this.Z);
        intent.putExtra("season_number", this.Y);
        intent.putExtra("title", title);
        if (this.S.isAnime()) {
            this.f11776q0 = "Episode " + this.Z;
        }
        intent.putExtra("title_episode", this.f11776q0);
        intent.putExtra("movie_url", this.S.getUrl());
        intent.putExtra("movie", this.S);
        intent.putExtra("title_simple", this.S.getTitle());
        intent.putExtra("img_url", this.S.getImage_url());
        intent.putExtra("movie_url", this.S.getUrl());
        App.getInstance().f11723h = true;
        try {
            App.getInstance().f11731p.addtoWatching(this.S);
        } catch (Exception e10) {
            e10.printStackTrace();
        }
        int i10 = this.f11778s0;
        if (i10 <= 0) {
            i10 = this.S.getDuration();
        }
        intent.putExtra("runtime", i10);
        intent.putExtra("BIG_POSTER_URL", "");
        startActivity(intent);
    }

    @Override
    public void onActivityResult(int i10, int i11, Intent intent) {
        String stringExtra;
        super.onActivityResult(i10, i11, intent);
        if (i10 == 6261) {
            if (i11 != -1 || intent == null || (stringExtra = intent.getStringExtra("end_by")) == null) {
                return;
            }
            if (!stringExtra.equals("user")) {
                if (stringExtra.equals("playback_completion")) {
                    App.getInstance().f11731p.markAsWatched(this.S);
                    App.getInstance().f11732q.edit().remove(this.f11768i0).apply();
                    cc.d.makeToast(this, "Playback completed. Marking as Watched", false);
                    return;
                }
                return;
            }
            long longExtra = intent.getLongExtra("position", -1L);
            if (longExtra > 0) {
                if (((int) (((float) (100 * longExtra)) / (this.S.getDuration() * 60000))) > 95) {
                    App.getInstance().f11731p.markAsWatched(this.S);
                    App.getInstance().f11732q.edit().remove(this.f11768i0).apply();
                    return;
                }
                String str = this.f11768i0;
                if (str == null || str.isEmpty()) {
                    return;
                }
                App.getInstance().f11732q.edit().putInt(this.f11768i0, (int) longExtra).apply();
                return;
            }
            return;
        }
        if (i10 == 6565) {
            if (i11 == -1) {
                if (intent != null) {
                    long longExtra2 = intent.getLongExtra("extra_position", -1L);
                    if (longExtra2 > 0) {
                        if (((int) (((float) (100 * longExtra2)) / (this.S.getDuration() * 60000))) > 95) {
                            App.getInstance().f11731p.markAsWatched(this.S);
                            App.getInstance().f11732q.edit().remove(this.f11768i0).apply();
                            return;
                        }
                        String str2 = this.f11768i0;
                        if (str2 == null || str2.isEmpty()) {
                            return;
                        }
                        App.getInstance().f11732q.edit().putInt(this.f11768i0, (int) longExtra2).apply();
                        return;
                    }
                    return;
                }
                return;
            }
            if (i11 == 0) {
                cc.d.makeToast(this, "No compatible cpu, incorrect VLC abi variant installed", false);
                return;
            }
            if (i11 == 2) {
                cc.d.makeToast(this, "Connection failed to audio service", false);
                return;
            }
            if (i11 == 3) {
                cc.d.makeToast(this, "Error with hardware acceleration, user refused to switch to software decoding", false);
            } else if (i11 == 4) {
                cc.d.makeToast(this, "VLC is not able to play this file, it could be incorrect path/uri, not supported codec or broken file", false);
            } else {
                if (i11 != 5) {
                    return;
                }
                cc.d.makeToast(this, "VLC continues playback, but for audio track only. (Audio file detected or user chose to)", false);
            }
        }
    }

    @Override
    public void onAdded() {
        SystemEvent systemEvent = new SystemEvent();
        systemEvent.f12167a = SystemEvent.ACTION.REFRESH_COUNTER;
        EventBus.getDefault().post(systemEvent);
    }

    @Override
    public void onBackPressed() {
        HashSet hashSet;
        super.onBackPressed();
        EventBus.getDefault().post(new Constants.a());
        if (AllDebridCommon.f12026h && (hashSet = AllDebridCommon.f12024b) != null && hashSet.size() > 0) {
            App.deleteAllMagnetsAllDebrid();
        }
        if (!RealDebridCommon.f12034j || RealDebridCommon.f12033i == null || AllDebridCommon.f12024b.size() <= 0) {
            return;
        }
        App.getInstance().deleteTorrentsRealDebridNew();
    }

    @Override
    public void onCreate(Bundle bundle) {
        MenuItem findItem;
        boolean z10;
        Movie movie;
        RelativeLayout relativeLayout;
        SpinKitView spinKitView;
        super.onCreate(bundle);
        this.f11770k0 = bundle;
        final int i10 = 1;
        final int i11 = 0;
        if (bundle == null) {
            ArrayList<String> arrayList = App.C;
            if (arrayList == null) {
                App.C = new ArrayList<>();
            } else {
                arrayList.clear();
            }
            if (App.getInstance().f11732q.getBoolean("IS_RD_LOGGED_IN", false)) {
                App.getInstance().refreshTokenRD();
            }
            if (App.getInstance().f11732q.getBoolean("PREM_LOGGED_IN", false)) {
                PremiumizeCommon.f12028b = true;
                SharedPreferences sharedPreferences = App.getInstance().f11732q;
                String str = Constants.f12301a;
                PremiumizeCommon.f12029g = sharedPreferences.getString("prem_apikey", null);
            }
            if (App.getInstance().f11732q.getBoolean("ALL_DEBRID_LOGGED_IN", false)) {
                AllDebridCommon.f12026h = true;
                SharedPreferences sharedPreferences2 = App.getInstance().f11732q;
                String str2 = Constants.f12301a;
                AllDebridCommon.f12027i = sharedPreferences2.getString("all_debrid_apikey", null);
            }
        }
        this.f11769j0 = Constants.f12301a;
        this.S = (Movie) getIntent().getSerializableExtra("movie");
        SharedPreferences sharedPreferences3 = App.getInstance().f11732q;
        String str3 = Constant.f12431b;
        this.f11767h0 = sharedPreferences3.getString("autoembed_url", "https://autoembed.co");
        RealDebridCommon.f12034j = App.getInstance().f11732q.getBoolean("IS_RD_LOGGED_IN", false);
        Movie movie2 = this.S;
        if (movie2 == null || !movie2.isSeries()) {
            setContentView(R.layout.activity_links_movies);
        } else {
            setContentView(R.layout.activity_links);
        }
        this.f11772m0 = new Handler();
        this.f11773n0 = new r(this, i11);
        App.getInstance().f11732q.getInt("mouse_toggle_mode", 0);
        this.O = Typeface.createFromAsset(getAssets(), "fonts/pproduct_sans_rregular.ttf");
        this.P = Typeface.createFromAsset(getAssets(), "fonts/product_sans_bold.ttf");
        this.N = new p2.a();
        EventBus.getDefault().register(this);
        this.W = (ImageView) findViewById(R.id.settings_image_view);
        this.X = (ImageView) findViewById(R.id.reload_image_view);
        this.D = (LinearLayout) findViewById(R.id.settings_button_movies_page);
        this.E = (LinearLayout) findViewById(R.id.reload_button_movies_page);
        this.H = (RelativeLayout) findViewById(R.id.stop_rd_fetch_button);
        this.Q = (RecyclerView) findViewById(R.id.listview_links);
        this.L = (TextView) findViewById(R.id.links_act_page_title_rd);
        this.f11762c0 = (ImageView) findViewById(R.id.mini_poster);
        this.U = (ImageView) findViewById(R.id.refresh_button_imageview);
        this.J = (TextView) findViewById(R.id.links_act_page_title);
        this.K = (TextView) findViewById(R.id.links_act_reload_text);
        this.V = (ImageView) findViewById(R.id.settings_button_imageview);
        this.F = (RelativeLayout) findViewById(R.id.settings_button_links_act);
        this.I = (TextView) findViewById(R.id.links_act__settings_text);
        this.f11763d0 = (TextView) findViewById(R.id.plot_text);
        this.G = (RelativeLayout) findViewById(R.id.reload_button_links_act);
        this.M = (SpinKitView) findViewById(R.id.spin_kit_2);
        this.f11764e0 = (TextView) findViewById(R.id.episode_title);
        this.f11765f0 = (TextView) findViewById(R.id.aired_on);
        this.R = new MySourceArrayList(this);
        this.f11761b0 = (ImageView) findViewById(R.id.background_image);
        if (bundle != null && (spinKitView = this.M) != null) {
            spinKitView.setVisibility(8);
            this.H.setVisibility(8);
        }
        w wVar = new w(this, this.R);
        this.T = wVar;
        wVar.setHasStableIds(true);
        this.Q.setAdapter(this.T);
        this.Q.setLayoutManager(new CenterLayoutManager(this, 1, false));
        this.Q.addItemDecoration(new c(8));
        if (this.W != null) {
            this.D.setOnFocusChangeListener(new View.OnFocusChangeListener(this) {

                public final LinksActivity f18931g;

                {
                    this.f18931g = this;
                }

                @Override
                public final void onFocusChange(View view, boolean z11) {
                    int i12 = i11;
                    LinksActivity linksActivity = this.f18931g;
                    switch (i12) {
                        case 0:
                            if (z11) {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 1:
                            if (z11) {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 2:
                            if (z11) {
                                linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.G.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.G.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.G.animate().scaleX(1.0f).start();
                            linksActivity.G.animate().scaleY(1.0f).start();
                            return;
                        default:
                            if (z11) {
                                linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.F.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.F.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.F.animate().scaleX(1.0f).start();
                            linksActivity.F.animate().scaleY(1.0f).start();
                            return;
                    }
                }
            });
        }
        if (this.X != null) {
            this.E.setOnFocusChangeListener(new View.OnFocusChangeListener(this) {

                public final LinksActivity f18931g;

                {
                    this.f18931g = this;
                }

                @Override
                public final void onFocusChange(View view, boolean z11) {
                    int i12 = i10;
                    LinksActivity linksActivity = this.f18931g;
                    switch (i12) {
                        case 0:
                            if (z11) {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 1:
                            if (z11) {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 2:
                            if (z11) {
                                linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.G.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.G.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.G.animate().scaleX(1.0f).start();
                            linksActivity.G.animate().scaleY(1.0f).start();
                            return;
                        default:
                            if (z11) {
                                linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.F.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.F.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.F.animate().scaleX(1.0f).start();
                            linksActivity.F.animate().scaleY(1.0f).start();
                            return;
                    }
                }
            });
        }
        LinearLayout linearLayout = this.D;
        if (linearLayout != null) {
            linearLayout.setOnClickListener(new t(this, 0));
        }
        LinearLayout linearLayout2 = this.E;
        if (linearLayout2 != null) {
            linearLayout2.setOnClickListener(new t(this, 1));
        }
        Movie movie3 = this.S;
        if (movie3 == null) {
            return;
        }
        final int i12 = 2;
        String image_url = movie3.getType() > 2 ? this.S.getImage_url() : this.S.getCover();
        if (getResources().getConfiguration().orientation == 1 && this.S.getImage_url() != null) {
            image_url = this.S.getImage_url().replace("w185", "w500").replace("w342", "w500");
        }
        try {
            Picasso.get().load(image_url).fit().centerCrop().into(this.f11761b0);
        } catch (OutOfMemoryError e10) {
            e10.printStackTrace();
        }
        if (this.S.isSeries()) {
            b bVar = this.f11766g0;
            if (bVar != null) {
                bVar.dispose();
            }
            String str4 = getIntent().getIntExtra("episode_id", -1) + "";
            this.f11766g0 = ca.a.getEpisode(this, this.S.getMovieId() + "", getIntent().getIntExtra("season", -1) + "", str4).subscribeOn(fd.a.newThread()).observeOn(oc.a.mainThread()).subscribe(new u(this, i12), new b3.b(21));
        }
        if (this.S.isSeries() || this.S.isAnime()) {
            this.Y = getIntent().getIntExtra("season", 0);
            this.Z = getIntent().getIntExtra("episode_number", 0);
            this.f11760a0 = getIntent().getIntExtra("episode_count", 0);
            this.S.f12395x = a.b.m(new StringBuilder(), this.Y, "");
        }
        final int i13 = 3;
        if (bundle != null) {
            try {
                this.R.addAll(bundle.getParcelableArrayList("sources"));
                this.T.notifyDataSetChanged();
                this.Q.setItemAnimator(null);
                Menu menu = this.f11779t0;
                if (menu != null && (findItem = menu.findItem(R.id.action_count)) != null) {
                    findItem.setTitle(this.R.size() + "");
                }
            } catch (Exception unused) {
            }
        } else if (this.S.getType() == 3) {
            String stringExtra = getIntent().getStringExtra("url");
            if (stringExtra != null) {
                stringExtra = stringExtra.replace("www9.gogoanime.io", "gogoanime.pe").replace("gogoanime.io", "gogoanime.pe");
            }
            this.Z = getIntent().getIntExtra("episode_number", 0);
            if (stringExtra != null) {
                new rb.d(this, this, this.S).Process(stringExtra);
            }
        } else if (!App.getInstance().f11732q.getBoolean("pref_show_debrid_links_only", false)) {
            boolean z11 = App.getInstance().f11732q.getBoolean("hindi_include_english", true);
            if (this.S.getType() == 0) {
                new Handler().postDelayed(new r(this, i12), 3000L);
                if (this.S.getImdbID() != null && this.S.getImdbID().length() > 0) {
                    new Handler().postDelayed(new r(this, i13), 2000L);
                    String str5 = this.f11767h0 + "/movie/imdb/" + this.S.getImdbID();
                    o oVar = new o();
                    oVar.f13838u = str5;
                    oVar.f13837t = "1080p - 720p - 480p-[FLIXVISION3]";
                    this.R.add(oVar);
                }
                if (this.S.getMovieId() > 0 && z11) {
                    new Handler().postDelayed(new r(this, 4), 5000L);
                }
                if (App.getInstance().f11732q.getBoolean("pref_show_hindi_dubbed", false)) {
                    new vb.f(this, this.S, this).process();
                    new vb.h(this, this.S, this).process();
                    new vb.b(this, this.S, this).process();
                    new vb.d(this, this.S, this).process();
                }
                if (z11) {
                    if (RealDebridCommon.f12034j || PremiumizeCommon.f12028b || AllDebridCommon.f12026h) {
                        new p(this, this.S, this).process(1);
                        new i(this, this.S, this).process(1);
                        new xb.c(this, this.S, this).process(1);
                        new wb.g(this, this.S, this).process(1);
                        new wb.b(this, this.S, this).process(1);
                    }
                    new sb.d(this, this.S, this).process();
                    new sb.f(this, this.S, this).process();
                    new sb.h(this, this.S, this).process();
                    new j(this, this.S, this).process();
                    new sb.b(this, this.S, this).process();
                    new rb.w(this, this.S, this).process();
                    new rb.g(this, this.S, this).process();
                    new s(this, this.S, this).process();
                    new rb.b(this, this.S, this).process();
                    new k(this, this.S, this).process();
                    new rb.o(this, this.S, this).Process();
                    new a0(this, this.S, this).process();
                }
            } else {
                new Handler().postDelayed(new r(this, 5), 3000L);
                if (this.S.getImdbID() != null && this.S.getImdbID().length() > 0) {
                    new Handler().postDelayed(new r(this, 6), 2000L);
                }
                if (RealDebridCommon.f12034j || PremiumizeCommon.f12028b || AllDebridCommon.f12026h) {
                    new xb.s(this, this.S, this).process(this.Y, this.Z, 1);
                    new l(this, this.S, this).process(this.Y, this.Z, 1);
                    new xb.f(this, this.S, this).process(this.Y, this.Z, 1);
                    new wb.i(this, this.S, this).process(this.Y, this.Z);
                    new wb.e(this, this.S, this).process(this.Y, this.Z);
                }
                new tb.d(this, this.S, this).process(this.Y, this.Z);
                new tb.f(this, this.S, this).process(this.Y, this.Z);
                new tb.h(this, this.S, this).process(this.Y, this.Z);
                new tb.j(this, this.S, this).process(this.Y, this.Z);
                new tb.b(this, this.S, this).process(this.Y, this.Z);
                new rb.y(this, this.S, this).process(this.Y, this.Z);
                new m(this, this.S, this).process(this.Y, this.Z);
                new c0(this, this.S, this).process(this.Y, this.Z);
                new rb.u(this, this.S, this).Process(this.Y, this.Z);
                new rb.i(this, this.S, this).process(this.Y, this.Z);
                new q(this, this.S, this).Process(this.Z, this.Y);
                if (this.S.getMovieId() > 0) {
                    new Handler().postDelayed(new r(this, 7), 5000L);
                }
                if (this.S.getImdbID() != null && this.S.getImdbID().length() > 0) {
                    StringBuilder sb2 = new StringBuilder("https://vidsrc.to/embed/tv/");
                    sb2.append(this.S.getImdbID());
                    sb2.append("/");
                    sb2.append(this.Y);
                    sb2.append("/");
                    String m10 = a.b.m(sb2, this.Z, "/");
                    o oVar2 = new o();
                    oVar2.f13838u = m10;
                    oVar2.f13837t = "1080p - 720p - 480p [FLIXVISION5]";
                    this.R.add(oVar2);
                }
            }
        } else if (this.S.isSeries()) {
            if (this.S.getImdbID() != null && this.S.getImdbID().length() > 0) {
                SharedPreferences sharedPreferences4 = App.getInstance().f11732q;
                String str6 = Constant.f12431b;
                new ub.g(this, this, sharedPreferences4.getString("pref_ml_host", getString(R.string.ml_host))).process(this.S.getImdbID(), this.Y, this.Z);
            }
            if (RealDebridCommon.f12034j || PremiumizeCommon.f12028b || AllDebridCommon.f12026h) {
                new xb.s(this, this.S, this).process(this.Y, this.Z, 1);
                new l(this, this.S, this).process(this.Y, this.Z, 1);
                new xb.f(this, this.S, this).process(this.Y, this.Z, 1);
                new wb.i(this, this.S, this).process(this.Y, this.Z);
                new wb.e(this, this.S, this).process(this.Y, this.Z);
            }
        } else {
            SharedPreferences sharedPreferences5 = App.getInstance().f11732q;
            String str7 = Constant.f12431b;
            new ub.c(this, this, sharedPreferences5.getString("pref_ml_host", getString(R.string.ml_host))).process(this.S.getImdbID());
            if (RealDebridCommon.f12034j || PremiumizeCommon.f12028b || AllDebridCommon.f12026h) {
                new p(this, this.S, this).process(1);
                new i(this, this.S, this).process(1);
                new xb.c(this, this.S, this).process(1);
                new wb.g(this, this.S, this).process(1);
                new wb.b(this, this.S, this).process(1);
            }
        }
        Movie movie4 = this.S;
        if (movie4 != null) {
            if (movie4.isSeries()) {
                this.f11768i0 = this.S.getMovieId() + "" + this.Y + "" + this.Z;
            } else {
                this.f11768i0 = this.S.getMovieId() + "";
            }
        }
        this.Q.requestFocus();
        TextView textView = this.K;
        if (textView != null) {
            this.N.applyFontToView(textView, this.O);
        }
        TextView textView2 = this.I;
        if (textView2 != null) {
            this.N.applyFontToView(textView2, this.O);
        }
        TextView textView3 = this.J;
        if (textView3 != null) {
            this.N.applyFontToView(textView3, this.O);
        }
        this.N.applyFontToView(this.f11763d0, this.O);
        this.N.applyFontToView(this.f11764e0, this.P);
        this.N.applyFontToView(this.f11765f0, this.O);
        RelativeLayout relativeLayout2 = this.F;
        if (relativeLayout2 != null) {
            relativeLayout2.setOnClickListener(new t(this, 2));
        }
        if (this.G != null) {
            z10 = true;
            new Handler().postDelayed(new r(this, 1 == true ? 1 : 0), 10000L);
            this.G.setOnFocusChangeListener(new View.OnFocusChangeListener(this) {

                public final LinksActivity f18931g;

                {
                    this.f18931g = this;
                }

                @Override
                public final void onFocusChange(View view, boolean z112) {
                    int i122 = i12;
                    LinksActivity linksActivity = this.f18931g;
                    switch (i122) {
                        case 0:
                            if (z112) {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 1:
                            if (z112) {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 2:
                            if (z112) {
                                linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.G.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.G.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.G.animate().scaleX(1.0f).start();
                            linksActivity.G.animate().scaleY(1.0f).start();
                            return;
                        default:
                            if (z112) {
                                linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.F.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.F.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.F.animate().scaleX(1.0f).start();
                            linksActivity.F.animate().scaleY(1.0f).start();
                            return;
                    }
                }
            });
            this.F.setOnFocusChangeListener(new View.OnFocusChangeListener(this) {

                public final LinksActivity f18931g;

                {
                    this.f18931g = this;
                }

                @Override
                public final void onFocusChange(View view, boolean z112) {
                    int i122 = i13;
                    LinksActivity linksActivity = this.f18931g;
                    switch (i122) {
                        case 0:
                            if (z112) {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.W.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 1:
                            if (z112) {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                return;
                            } else {
                                linksActivity.X.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                                return;
                            }
                        case 2:
                            if (z112) {
                                linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.G.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.G.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.U.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.K.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.G.animate().scaleX(1.0f).start();
                            linksActivity.G.animate().scaleY(1.0f).start();
                            return;
                        default:
                            if (z112) {
                                linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.black), PorterDuff.Mode.SRC_IN));
                                linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.black));
                                linksActivity.F.animate().setDuration(100L).scaleX(1.03f).start();
                                linksActivity.F.animate().setDuration(100L).scaleY(1.03f).start();
                                return;
                            }
                            linksActivity.V.setColorFilter(new PorterDuffColorFilter(y.a.getColor(linksActivity, R.color.white), PorterDuff.Mode.SRC_IN));
                            linksActivity.I.setTextColor(linksActivity.getResources().getColor(R.color.white));
                            linksActivity.F.animate().scaleX(1.0f).start();
                            linksActivity.F.animate().scaleY(1.0f).start();
                            return;
                    }
                }
            });
        } else {
            z10 = true;
        }
        RelativeLayout relativeLayout3 = this.H;
        if (relativeLayout3 != null) {
            relativeLayout3.setOnClickListener(new t(this, 3));
        }
        if (!RealDebridCommon.f12034j && !AllDebridCommon.f12026h && !PremiumizeCommon.f12028b) {
            z10 = false;
        }
        this.f11771l0 = z10;
        if (!z10 || (movie = this.S) == null || movie.isAnime() || (relativeLayout = this.H) == null) {
            return;
        }
        relativeLayout.setVisibility(0);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.links, menu);
        this.f11779t0 = menu;
        return true;
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(SystemEvent systemEvent) {
        RelativeLayout relativeLayout;
        TextView textView;
        try {
            SystemEvent.ACTION action = systemEvent.f12167a;
            if (action == SystemEvent.ACTION.RELOAD_LIST || action == SystemEvent.ACTION.REFRESH_COUNTER) {
                this.T.notifyDataSetChanged();
                this.Q.setItemAnimator(null);
                SpinKitView spinKitView = this.M;
                if (spinKitView != null) {
                    spinKitView.setVisibility(0);
                }
                if (RealDebridCommon.f12034j && (relativeLayout = this.H) != null) {
                    relativeLayout.setVisibility(0);
                }
                this.f11772m0.removeCallbacks(this.f11773n0);
                this.f11772m0.postDelayed(this.f11773n0, this.f11771l0 ? 35000L : 12000L);
                TextView textView2 = this.J;
                if (textView2 != null) {
                    textView2.setText("" + this.f11775p0);
                }
                TextView textView3 = this.L;
                if (textView3 != null && this.R.f12398b > 0) {
                    textView3.setText(this.R.f12398b + "");
                }
            }
            if (!this.f11774o0 || (textView = this.L) == null) {
                return;
            }
            textView.setVisibility(0);
        } catch (Exception unused) {
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(o oVar) {
        if (oVar.f13832o) {
            this.f11775p0++;
        }
        this.R.add(oVar);
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onMessageEvent(ma.c cVar) {
        throw null;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != 16908332) {
            return true;
        }
        finish();
        return true;
    }

    @Override
    public void onResume() {
        if (this.f11770k0 == null && App.getInstance().f11723h) {
            SharedPreferences sharedPreferences = App.getInstance().f11732q;
            if (((int) ((sharedPreferences.getInt(this.S.getMovieId() + "", -1) * 100) / (this.S.getDuration() * 60000))) > 95) {
                App.getInstance().f11731p.markAsWatched(this.S);
                App.getInstance().f11732q.edit().remove(this.f11768i0).apply();
            }
        }
        super.onResume();
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putParcelableArrayList("sources", this.R);
    }

    public void unlockLinkAllRebrid(String str) {
        if (App.isADSupported(str)) {
            str.contains("rapidgator.net");
            ca.a.unlockLinkAllDebrid(str).observeOn(oc.a.mainThread()).subscribeOn(fd.a.newThread()).subscribe(new u(this, 1), new b3.b(20));
        }
    }
}