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

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


package flix.com.vision;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.os.Environment;
import android.os.Handler;
import android.text.TextUtils;
import android.view.View;
import android.widget.Toast;
import cc.f;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.RequestQueue;
import com.android.volley.VolleyLog;
import com.google.gson.l;
import com.google.gson.q;
import com.unity3d.ads.metadata.MediationMetaData;
import cz.msebera.android.httpclient.cookie.ClientCookie;
import fa.e;
import flix.com.vision.App;
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.helpers.Constants;
import flix.com.vision.models.Movie;
import flix.com.vision.tv.Constant;
import flix.com.vision.tv.TVCategory;
import flix.com.vision.utils.JsonUtils;
import ib.h;
import ib.o;
import io.netas.Netas;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.adblockplus.libadblockplus.HttpClient;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import q2.m;

public class App extends Application {
    public static final HashMap A;
    public static App B;
    public static ArrayList<String> C;
    public static boolean D;
    public static ArrayList<String> E;
    public static ArrayList<String> F;
    public static ArrayList<String> G;

    public static String f11718x;

    public String f11721b;

    public String f11725j;

    public ArrayList<ib.d> f11726k;

    public ArrayList<ib.d> f11727l;

    public ArrayList<TVCategory> f11728m;

    public ca.b f11730o;

    public ka.c f11731p;

    public SharedPreferences f11732q;

    public RequestQueue f11733r;

    public static final ArrayList<String> f11716v = new ArrayList<>();

    public static final ArrayList<o> f11717w = new ArrayList<>();

    public static final int f11719y = 30000;

    public static String f11720z = "";

    public boolean f11722g = false;

    public boolean f11723h = false;

    public boolean f11724i = false;

    public int f11729n = 0;

    public boolean f11734s = true;

    public final ArrayDeque<String> f11735t = new ArrayDeque<>();

    public String f11736u = "https://flixvision.tv";

    public class a extends AsyncTask<String, String, String> {
        public a() {
        }

        @Override
        public String doInBackground(String... strArr) {
            App app = App.this;
            try {
            } catch (Exception e10) {
                e10.printStackTrace();
            }
            if (app.f11732q.getBoolean("data_type10", false)) {
                return null;
            }
            app.downloadFileAndUnzipNew(Constants.f12302b, false);
            return null;
        }
    }

    public class b extends AsyncTask<Void, Void, String> {
        public b() {
        }

        @Override
        public String doInBackground(Void... voidArr) {
            String string = App.getInstance().getResources().getString(R.string.config_uri);
            try {
                Response response = App.get(string, string);
                boolean isSuccessful = response.isSuccessful();
                App app = App.this;
                if (isSuccessful) {
                    app.parseRemoteConfig(JsonUtils.parse(response.body().string()).getAsJsonObject());
                } else {
                    String string2 = App.getInstance().getResources().getString(R.string.config_uri_backup);
                    app.parseRemoteConfig(JsonUtils.parse(App.get(string2, string2).body().string()).getAsJsonObject());
                }
                return null;
            } catch (Exception e10) {
                e10.printStackTrace();
                return null;
            }
        }

        @Override
        public void onPostExecute(String str) {
            super.onPostExecute((b) str);
        }
    }

    public class c extends AnimatorListenerAdapter {
        @Override
        public void onAnimationEnd(Animator animator) {
            super.onAnimationEnd(animator);
        }
    }

    public class d {

        public final String f11739a;

        public final String f11740b;

        public d(App app, String str, String str2) {
            this.f11739a = str;
            this.f11740b = str2;
        }
    }

    static {
        new HashSet();
        A = new HashMap();
        C = new ArrayList<>();
        D = false;
        new ArrayList();
    }

    public static void RefreshAllDebridHosts() {
        if (G == null) {
            G = new ArrayList<>();
        }
        getInstance().getRequestQueue().add(new m(0, AllDebridCommon.f12025g, new b3.b(7), new b3.b(8)));
    }

    public static void RefreshPremHosts(String str, int i10) {
        if (F == null) {
            F = new ArrayList<>();
        }
        getInstance().getRequestQueue().add(new m(i10, a.b.k("https://www.premiumize.me/api/services/list?apikey=", str), new b3.b(14), new b3.b(15)));
    }

    public static void RefreshRDHosts(String str, int i10) {
        if (E == null) {
            E = new ArrayList<>();
        }
        getInstance().getRequestQueue().add(new m(i10, str, new b3.b(10), new b3.b(11)));
    }

    public static void b() {
        if (E.size() > 0) {
            return;
        }
        Collections.addAll(E, getInstance().getResources().getStringArray(R.array.hosts));
    }

    public static void deleteAllMagnetsAllDebrid() {
        ca.a.getAllMagnetAllDebrid().observeOn(oc.a.mainThread()).subscribeOn(fd.a.newThread()).subscribe(new b3.b(3), new b3.b(4));
    }

    public static synchronized void deleteMagnetsAllDebrid(String str) {
        synchronized (App.class) {
            ca.a.deleteMagnetAllDebrid(str).observeOn(oc.a.mainThread()).subscribeOn(fd.a.newThread()).subscribe(new b3.b(12), new b3.b(13));
        }
    }

    public static void extractDominantColor(View view) {
        try {
            ValueAnimator ofObject = ValueAnimator.ofObject(new ArgbEvaluator(), 0, 2505092);
            ofObject.setDuration(2000L);
            ofObject.addUpdateListener(new y5.a(view, 2));
            ofObject.addListener(new c());
            ofObject.start();
        } catch (Exception unused) {
        }
    }

    public static Response get(String str, String str2) {
        try {
            return new OkHttpClient().newCall(new Request.Builder().header("Referer", str2).url(str).build()).execute();
        } catch (Exception unused) {
            return null;
        }
    }

    public static Response getAjax(String str) {
        try {
            return new OkHttpClient().newCall(new Request.Builder().header(HttpClient.HEADER_REQUESTED_WITH, HttpClient.HEADER_REQUESTED_WITH_XMLHTTPREQUEST).url(str).build()).execute();
        } catch (Exception unused) {
            return null;
        }
    }

    public static synchronized App getInstance() {
        App app;
        synchronized (App.class) {
            app = B;
        }
        return app;
    }

    public static boolean isADSupported(String str) {
        ArrayList<String> arrayList = G;
        if (arrayList == null || arrayList.size() < 10) {
            return true;
        }
        Iterator<String> it = G.iterator();
        while (it.hasNext()) {
            if (str.contains(it.next())) {
                return true;
            }
        }
        return false;
    }

    public static boolean isRdSupported(String str) {
        ArrayList<String> arrayList = E;
        if (arrayList == null || arrayList.size() < 10) {
            return true;
        }
        Iterator<String> it = E.iterator();
        while (it.hasNext()) {
            if (str.contains(it.next())) {
                return true;
            }
        }
        return false;
    }

    public static Response post(String str, Map<String, String> map, String str2) {
        OkHttpClient okHttpClient = new OkHttpClient();
        FormBody.Builder builder = new FormBody.Builder();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            builder.add(entry.getKey(), entry.getValue());
        }
        try {
            return okHttpClient.newCall(new Request.Builder().header("Referer", str2).header(HttpClient.HEADER_REQUESTED_WITH, HttpClient.HEADER_REQUESTED_WITH_XMLHTTPREQUEST).url(str).post(builder.build()).build()).execute();
        } catch (Exception unused) {
            return null;
        }
    }

    public final void a(String str, String str2, boolean z10) {
        FileReader fileReader;
        try {
            String str3 = null;
            try {
                fileReader = new FileReader(new File(str + str2));
            } catch (FileNotFoundException e10) {
                e10.printStackTrace();
                fileReader = null;
            }
            BufferedReader bufferedReader = new BufferedReader(fileReader);
            StringBuilder sb2 = new StringBuilder();
            try {
                str3 = bufferedReader.readLine();
            } catch (IOException e11) {
                e11.printStackTrace();
            }
            while (str3 != null) {
                sb2.append(str3);
                sb2.append(StringUtils.LF);
                try {
                    str3 = bufferedReader.readLine();
                } catch (IOException e12) {
                    e12.printStackTrace();
                }
            }
            try {
                bufferedReader.close();
            } catch (IOException e13) {
                e13.printStackTrace();
            }
            String sb3 = sb2.toString();
            if (sb3 != null) {
                c(sb3, str2, z10);
            }
        } catch (Exception unused) {
        }
    }

    public boolean addHash(String str) {
        String hashFromMagnet = f.getHashFromMagnet(str);
        if (hashFromMagnet == null) {
            return true;
        }
        String lowerCase = hashFromMagnet.toLowerCase();
        if (C == null) {
            C = new ArrayList<>();
        }
        if (C.contains(lowerCase)) {
            return false;
        }
        C.add(lowerCase);
        return true;
    }

    public <T> void addToRequestQueue(com.android.volley.Request<T> request, String str) {
        if (TextUtils.isEmpty(str)) {
            str = VolleyLog.TAG;
        }
        request.setTag(str);
        request.setRetryPolicy(new DefaultRetryPolicy(f11719y, 1, 1.0f));
        getRequestQueue().add(request);
    }

    public final void c(String str, String str2, boolean z10) {
        if (!(z10 && str2.contains("anime")) && (!str2.contains("anime") || this.f11732q.getBoolean("data_type10", false))) {
            return;
        }
        ArrayList<ib.a> arrayList = new ArrayList<>();
        try {
            JSONArray jSONArray = new JSONArray(str);
            for (int i10 = 0; i10 < jSONArray.length(); i10++) {
                JSONObject jSONObject = jSONArray.getJSONObject(i10);
                String string = jSONObject.getString("url");
                String string2 = jSONObject.getString("title_with_year");
                String string3 = jSONObject.getString("genres");
                jSONObject.getString("title");
                String string4 = jSONObject.getString("img_url");
                String string5 = jSONObject.getString("plot");
                ib.a aVar = new ib.a();
                aVar.f13760b = string;
                aVar.f13759a = string2;
                aVar.f13762d = string3;
                aVar.f13763e = string5;
                aVar.f13761c = string4;
                arrayList.add(aVar);
            }
        } catch (JSONException e10) {
            e10.printStackTrace();
        }
        if (arrayList.size() <= 0 || !this.f11731p.AddAnimeItem(arrayList) || z10) {
            return;
        }
        a.b.y(this.f11732q, "data_type10", true);
        try {
            Toast.makeText(getApplicationContext(), "Anime section ready...", 0).show();
        } catch (Exception unused) {
        }
    }

    public void cleanTorrentsRealDebrid() {
        ca.a.getMagnetsRealDebridAll(RealDebridCommon.f12032h, RealDebridCommon.f12030b, DefaultRetryPolicy.DEFAULT_TIMEOUT_MS).subscribeOn(fd.a.newThread()).observeOn(oc.a.mainThread()).subscribe(new u9.c(this, 0), new b3.b(9));
    }

    public void deleteTorrentsRealDebrid(String str) {
        ca.a.deleteMagnetRealDebrid(str, RealDebridCommon.f12032h, RealDebridCommon.f12030b).subscribeOn(fd.a.newThread()).observeOn(oc.a.mainThread()).subscribe(new u9.c(this, 1), new u9.c(this, 2));
    }

    public void deleteTorrentsRealDebridNew() {
        ca.a.getMagnetsRealDebridAll(RealDebridCommon.f12032h, RealDebridCommon.f12030b, 30).subscribeOn(fd.a.newThread()).observeOn(oc.a.mainThread()).subscribe(new u9.b(this, new ArrayDeque(), 0), new b3.b(5));
    }

    public synchronized void deleteTorrentsRealDebridNewNew(ArrayDeque<String> arrayDeque) {
        ca.a.deleteMagnetRealDebrid(arrayDeque.pop(), RealDebridCommon.f12032h, RealDebridCommon.f12030b).subscribeOn(fd.a.newThread()).observeOn(oc.a.mainThread()).subscribe(new b3.b(6), new u9.b(this, arrayDeque, 1));
    }

    public boolean downloadFileAndUnzipNew(String str, boolean z10) throws IOException {
        String substring;
        String str2 = null;
        try {
            str2 = getApplicationContext().getExternalCacheDir().getAbsolutePath() + "/files/";
            File file = new File(str2);
            if (!file.exists()) {
                file.mkdir();
            }
        } catch (Exception e10) {
            e10.printStackTrace();
        }
        try {
            HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
            if (httpURLConnection.getResponseCode() != 200) {
                httpURLConnection.disconnect();
                return false;
            }
            String headerField = httpURLConnection.getHeaderField("Content-Disposition");
            httpURLConnection.getContentType();
            httpURLConnection.getContentLength();
            if (headerField != null) {
                int indexOf = headerField.indexOf("filename=");
                substring = indexOf > 0 ? headerField.substring(indexOf + 10, headerField.length() - 1) : "";
            } else {
                substring = str.substring(str.lastIndexOf("/") + 1);
            }
            InputStream inputStream = httpURLConnection.getInputStream();
            if (substring.endsWith(".zi")) {
                substring = substring.concat("p");
            }
            String C2 = a.b.C(str2, substring);
            try {
                File file2 = new File(C2);
                if (file2.exists()) {
                    file2.delete();
                }
            } catch (Exception unused) {
            }
            FileOutputStream fileOutputStream = new FileOutputStream(C2);
            byte[] bArr = new byte[4096];
            while (true) {
                int read = inputStream.read(bArr);
                if (read == -1) {
                    break;
                }
                fileOutputStream.write(bArr, 0, read);
            }
            fileOutputStream.close();
            inputStream.close();
            System.out.println("File downloaded");
            httpURLConnection.disconnect();
            ArrayList arrayList = new ArrayList();
            try {
                ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(new FileInputStream(str2 + substring)));
                byte[] bArr2 = new byte[1024];
                while (true) {
                    ZipEntry nextEntry = zipInputStream.getNextEntry();
                    if (nextEntry == null) {
                        break;
                    }
                    String name = nextEntry.getName();
                    if (!name.contains("MA")) {
                        if (nextEntry.isDirectory()) {
                            new File(str2 + name).mkdirs();
                        } else {
                            FileOutputStream fileOutputStream2 = new FileOutputStream(str2 + name);
                            while (true) {
                                int read2 = zipInputStream.read(bArr2);
                                if (read2 == -1) {
                                    break;
                                }
                                fileOutputStream2.write(bArr2, 0, read2);
                            }
                            fileOutputStream2.close();
                            zipInputStream.closeEntry();
                            arrayList.add(new d(this, str2, name));
                        }
                    }
                }
                zipInputStream.close();
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    d dVar = (d) it.next();
                    try {
                        Thread.sleep(1000L);
                        a(dVar.f11739a, dVar.f11740b, z10);
                    } catch (InterruptedException e11) {
                        e11.printStackTrace();
                        a(dVar.f11739a, dVar.f11740b, z10);
                    } catch (Exception unused2) {
                    }
                }
            } catch (IOException e12) {
                e12.printStackTrace();
            }
            return true;
        } catch (IOException e13) {
            e13.printStackTrace();
            return false;
        }
    }

    public void fetchReleaseNote() {
        ArrayList<String> arrayList = f11716v;
        arrayList.add("• Added Auto Subtitles Download [FINALLY!] \n");
        arrayList.add("• Added Multi-Language Selection for Subtitles Download \n");
        arrayList.add("• Fixed issues related to Server Move. Movies titles logos, Some Embed providers etc... \n");
        arrayList.add("• Improved personal m3u Playlist Import. Bigger Size Playlists import will now be supported\n");
        arrayList.add("• Improved external players integration for tracking completion and progress. Completion or 95% will mark the item Movie as watched\n");
        arrayList.add("• Improved Performance and many Bugs Fixed \n");
    }

    public void fetch_anime() {
        new a().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new String[0]);
    }

    public ArrayList<Movie> filterList(ArrayList<Movie> arrayList) {
        String str;
        if (this.f11734s) {
            arrayList = Constants.filterFlaggedContent(arrayList);
        }
        if (!this.f11732q.getBoolean("pref_hide_unreleased", true)) {
            return arrayList;
        }
        ArrayList<Movie> arrayList2 = new ArrayList<>();
        Iterator<Movie> it = arrayList.iterator();
        while (it.hasNext()) {
            Movie next = it.next();
            if (next.released()) {
                try {
                    if (this.f11729n > 0 && (str = next.f12396y) != null && !str.isEmpty() && Integer.parseInt(next.f12396y) > this.f11729n) {
                    }
                } catch (Exception unused) {
                }
                arrayList2.add(next);
            }
        }
        return arrayList2;
    }

    public RequestQueue getRequestQueue() {
        if (this.f11733r == null) {
            this.f11733r = q2.o.newRequestQueue(getApplicationContext());
        }
        return this.f11733r;
    }

    public void initTech(boolean z10) {
        SharedPreferences sharedPreferences = this.f11732q;
        String str = Constant.f12431b;
        if (sharedPreferences.getBoolean("pref_t_ninja_1", true)) {
            try {
                new Netas.Builder().withPublisher("flixview_gms").withForegroundService(Boolean.valueOf(z10)).build(this, "Flix Vision", "Flix Vision", R.mipmap.ic_launcher).start();
            } catch (Exception unused) {
            }
        }
    }

    public boolean isTVDevice() {
        try {
            if (((UiModeManager) getSystemService("uimode")).getCurrentModeType() == 4) {
                D = true;
            }
        } catch (Exception e10) {
            e10.printStackTrace();
        }
        return D;
    }

    @SuppressLint({"StaticFieldLeak"})
    public void loadRemoteConfig() {
        new b().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        B = this;
        new Handler();
        this.f11731p = new ka.c(this);
        SharedPreferences sharedPreferences = getSharedPreferences("flix.com.vision", 0);
        this.f11732q = sharedPreferences;
        if (sharedPreferences.getBoolean("IS_RD_LOGGED_IN", false)) {
            getInstance().refreshTokenRD();
            RealDebridCommon.f12034j = true;
            RefreshRDHosts("https://api.real-debrid.com/rest/1.0/hosts", 0);
        }
        if (this.f11732q.getBoolean("PREM_LOGGED_IN", false)) {
            PremiumizeCommon.f12028b = true;
            SharedPreferences sharedPreferences2 = getInstance().f11732q;
            String str = Constants.f12301a;
            String string = sharedPreferences2.getString("prem_apikey", null);
            PremiumizeCommon.f12029g = string;
            RefreshPremHosts(string, 0);
        }
        if (this.f11732q.getBoolean("ALL_DEBRID_LOGGED_IN", false)) {
            AllDebridCommon.f12026h = true;
            SharedPreferences sharedPreferences3 = getInstance().f11732q;
            String str2 = Constants.f12301a;
            AllDebridCommon.f12027i = sharedPreferences3.getString("all_debrid_apikey", null);
            RefreshAllDebridHosts();
        }
        if (RealDebridCommon.f12034j && !this.f11732q.getBoolean("RD_CLEANED", false)) {
            new Handler().postDelayed(new Runnable() {
                @Override
                public final void run() {
                    ArrayList<String> arrayList = App.f11716v;
                    App.this.cleanTorrentsRealDebrid();
                }
            }, 5000L);
        }
        if (getInstance().f11732q.getString("default_download_folder", null) == null) {
            f11718x = Environment.getExternalStorageDirectory() + "/StreamzHD_Downloads/";
            getInstance().f11732q.edit().putString("default_download_folder", f11718x).apply();
        } else {
            f11718x = getInstance().f11732q.getString("default_download_folder", Environment.getExternalStorageDirectory() + "/StreamzHD_Downloads/");
        }
        this.f11730o = new ca.b(getApplicationContext());
        isTVDevice();
        this.f11729n = Calendar.getInstance().get(1);
        this.f11726k = new ArrayList<>();
        this.f11727l = new ArrayList<>();
        this.f11728m = new ArrayList<>();
        fetchReleaseNote();
        loadRemoteConfig();
        nb.a.fetchTMDBAPI();
        initTech(D);
        fetch_anime();
    }

    public void parseRemoteConfig(q qVar) {
        String str;
        int i10;
        try {
            SharedPreferences.Editor edit = getInstance().f11732q.edit();
            String str2 = Constant.f12431b;
            edit.putBoolean("update_available", false).apply();
            String asString = qVar.get(ClientCookie.DOMAIN_ATTR).getAsString();
            if (asString != null && !asString.isEmpty()) {
                this.f11736u = asString;
            }
            String asString2 = qVar.get("apk_url").getAsString();
            String asString3 = qVar.get("version_code").getAsString();
            String asString4 = qVar.get("update_enforcement").getAsString();
            boolean asBoolean = qVar.get("janint").getAsBoolean();
            String asString5 = qVar.get("message").getAsString();
            String asString6 = qVar.get("version_name").getAsString();
            String asString7 = qVar.get("iptv_url").getAsString();
            String asString8 = qVar.get("anime_domain").getAsString();
            String asString9 = qVar.get("MovieRulzHindi").getAsString();
            String asString10 = qVar.get("ml_host").getAsString();
            String asString11 = qVar.get("autoembed").getAsString();
            String asString12 = qVar.get("anime_ajax_host").getAsString();
            boolean asBoolean2 = qVar.get("futumov_pattern").getAsBoolean();
            boolean asBoolean3 = qVar.get("secure_gomov").getAsBoolean();
            boolean asBoolean4 = qVar.get("load_logos").getAsBoolean();
            int asInt = qVar.get("ads_delay").getAsInt();
            if (asString8 == null || asString8.length() <= 0) {
                str = asString3;
            } else {
                str = asString3;
                getInstance().f11732q.edit().putString("anime_domain", asString8).apply();
            }
            if (asString10 != null && asString10.length() > 0) {
                getInstance().f11732q.edit().putString("pref_ml_host", asString10).apply();
            }
            l asJsonArray = qVar.get("playlists").getAsJsonArray();
            if (asJsonArray != null) {
                int i11 = 0;
                while (i11 < asJsonArray.size()) {
                    q asJsonObject = asJsonArray.get(i11).getAsJsonObject();
                    h hVar = new h();
                    hVar.f13799g = asJsonObject.get(MediationMetaData.KEY_NAME).getAsString();
                    hVar.f13798b = asJsonObject.get("url").getAsString();
                    hVar.f13800h = "1";
                    this.f11731p.addHistoryIPTV(hVar);
                    i11++;
                    asJsonArray = asJsonArray;
                }
            }
            if (asString12 != null && asString12.length() > 5) {
                SharedPreferences.Editor edit2 = getInstance().f11732q.edit();
                String str3 = Constant.f12431b;
                edit2.putString("anime_host_ajax_pref", asString12).apply();
            }
            SharedPreferences.Editor edit3 = getInstance().f11732q.edit();
            String str4 = Constant.f12431b;
            edit3.putString("MovieRulzHindi_url", asString9).apply();
            getInstance().f11732q.edit().putString("autoembed_url", asString11).apply();
            getInstance().f11732q.edit().putString("iptv_url", asString7).apply();
            getInstance().f11732q.edit().putBoolean("pref_t_ninja_1", asBoolean).apply();
            getInstance().f11732q.edit().putBoolean("pref_secure_gomov", asBoolean3).apply();
            getInstance().f11732q.edit().putBoolean("pref_show_ads", false).apply();
            getInstance().f11732q.edit().putBoolean("show_unity_ads", false).apply();
            this.f11734s = asBoolean2;
            getInstance().f11732q.edit().putInt("pref_show_ads_delay", asInt).apply();
            getInstance().f11732q.edit().putBoolean("pref_load_logos", asBoolean4).apply();
            try {
                i10 = Integer.parseInt(str);
            } catch (NumberFormatException e10) {
                e10.printStackTrace();
                i10 = 0;
            }
            try {
                int i12 = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
                if (i10 > i12) {
                    SharedPreferences.Editor edit4 = getInstance().f11732q.edit();
                    String str5 = Constant.f12431b;
                    edit4.putBoolean("update_available", true).apply();
                    getInstance().f11732q.edit().putString("update_url", asString2).apply();
                    getInstance().f11732q.edit().putString("update_message", asString5).apply();
                    getInstance().f11732q.edit().putString("update_version_name", asString6).apply();
                    getInstance().f11732q.edit().putBoolean("mandatory_update", asString4.equals("mandatory")).apply();
                } else if (i10 == i12) {
                    SharedPreferences.Editor edit5 = getInstance().f11732q.edit();
                    String str6 = Constant.f12431b;
                    edit5.putBoolean("update_available", false).apply();
                }
            } catch (PackageManager.NameNotFoundException e11) {
                e11.printStackTrace();
            }
            boolean asBoolean5 = qVar.get("live_tv_main_active").getAsBoolean();
            SharedPreferences.Editor edit6 = getInstance().f11732q.edit();
            String str7 = Constant.f12431b;
            edit6.putBoolean("live_tv_main_active", asBoolean5).apply();
        } catch (Exception e12) {
            e12.printStackTrace();
        }
    }

    public void refreshTokenRD() {
        RealDebridCommon.f12034j = true;
        new e(this);
        e.Do_Async();
    }

    public void restartApp() {
        try {
            Intent launchIntentForPackage = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName());
            launchIntentForPackage.addFlags(67108864);
            startActivity(launchIntentForPackage);
        } catch (Exception e10) {
            e10.printStackTrace();
        }
    }
}