APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Նվագարկիչ
版本号:9.9.9
包名称:com.iptv.player

MD5 校验值:d7f913ab91d7343430e85d5ce2e5aff0

反编译源代码说明

EpgSourceActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.ottplay.ottplay.epg;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.appcompat.widget.f1;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.material.switchmaterial.SwitchMaterial;
import com.iptv.player.R;
import com.ottplay.ottplay.MainActivity;
import com.ottplay.ottplay.database.EpgDatabase;
import com.ottplay.ottplay.epg.EpgSource;
import com.ottplay.ottplay.epg.EpgSourceActivity;
import com.ottplay.ottplay.settings.OptionsActivity;
import d9.b51;
import d9.n70;
import ig.c;
import java.util.Objects;
import n3.g;
import nf.d;
import of.e;
import of.m;
import pg.b;
import rf.i;
import xa.w0;

public class EpgSourceActivity extends xe.a implements d.InterfaceC0215d {
    public static int W;
    public static int X;
    public final jg.a A = new jg.a(0);
    public final Handler B = new Handler(Looper.getMainLooper());
    public final Runnable C = new a();

    public n70 f20337p;

    public Intent f20338q;

    public boolean f20339r;

    public boolean f20340s;

    public boolean f20341t;

    public long f20342u;

    public int f20343v;

    public int f20344w;

    public String f20345x;

    public String f20346y;

    public String f20347z;

    public class a implements Runnable {
        public a() {
        }

        @Override
        public void run() {
            n70 n70Var = EpgSourceActivity.this.f20337p;
            if (n70Var != null) {
                ((TextView) ((b51) n70Var.f25361g).f21101c).setText(R.string.f65860_resource_name_obfuscated_res_0x7f13029c);
                ((ConstraintLayout) ((b51) EpgSourceActivity.this.f20337p.f25361g).f21100b).setVisibility(0);
                ((ConstraintLayout) ((b51) EpgSourceActivity.this.f20337p.f25361g).f21100b).requestFocus();
            }
        }
    }

    public class b implements c {

        public final int f20349a;

        public b(int i10) {
            this.f20349a = i10;
        }

        @Override
        public void a(jg.b bVar) {
            EpgSourceActivity.this.A.b(bVar);
        }

        @Override
        public void b(Throwable th2) {
            EpgSourceActivity epgSourceActivity = EpgSourceActivity.this;
            epgSourceActivity.B.removeCallbacks(epgSourceActivity.C);
            ((ConstraintLayout) ((b51) EpgSourceActivity.this.f20337p.f25361g).f21100b).setVisibility(8);
            EpgSourceActivity.this.f20341t = false;
            th2.printStackTrace();
            if (cg.a.a0(th2.getLocalizedMessage()).equals(EpgSourceActivity.this.getString(R.string.f61140_resource_name_obfuscated_res_0x7f1300c4))) {
                EpgSourceActivity epgSourceActivity2 = EpgSourceActivity.this;
                cg.a.W(epgSourceActivity2, epgSourceActivity2.getString(R.string.f61140_resource_name_obfuscated_res_0x7f1300c4), 1);
            } else {
                EpgSourceActivity epgSourceActivity3 = EpgSourceActivity.this;
                cg.a.W(epgSourceActivity3, epgSourceActivity3.getString(R.string.f61470_resource_name_obfuscated_res_0x7f1300e5), 1);
            }
        }

        @Override
        public void c() {
            EpgSourceActivity epgSourceActivity = EpgSourceActivity.this;
            epgSourceActivity.B.removeCallbacks(epgSourceActivity.C);
            ((ConstraintLayout) ((b51) EpgSourceActivity.this.f20337p.f25361g).f21100b).setVisibility(8);
            EpgSourceActivity epgSourceActivity2 = EpgSourceActivity.this;
            epgSourceActivity2.f20341t = false;
            if (this.f20349a == 0 && !epgSourceActivity2.f20339r && epgSourceActivity2.f20338q.getFlags() == 67108864) {
                EpgSourceActivity.this.navigateUpTo(new Intent(EpgSourceActivity.this.getBaseContext(), (Class<?>) MainActivity.class));
            }
            EpgSourceActivity.this.finish();
        }
    }

    public final void P() {
        String trim = ((EditText) this.f20337p.f25360f).getText().toString().trim();
        String trim2 = ((EditText) this.f20337p.f25363i).getText().toString().trim();
        this.f20339r = false;
        if ((this.f20338q.getExtras() != null && this.f20342u > 0) || trim.length() > 0 || trim2.length() > 0) {
            if (trim.isEmpty()) {
                ((EditText) this.f20337p.f25360f).setError(getString(R.string.f61390_resource_name_obfuscated_res_0x7f1300dd));
                this.f20339r = true;
                return;
            } else if (trim2.isEmpty()) {
                ((EditText) this.f20337p.f25363i).setError(getString(R.string.f61390_resource_name_obfuscated_res_0x7f1300dd));
                this.f20339r = true;
                return;
            }
        }
        if ((trim.length() == 0) && (trim2.length() == 0)) {
            return;
        }
        boolean z10 = this.f20338q.getExtras() != null;
        long j10 = this.f20342u;
        if ((j10 > 0) && z10) {
            Q(1, Long.valueOf(j10), trim, trim2, Integer.valueOf(W), Integer.valueOf(X), Boolean.valueOf(((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).isChecked()));
        } else {
            Q(0, null, trim, trim2, Integer.valueOf(W), Integer.valueOf(X), Boolean.valueOf(((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).isChecked()));
        }
        com.ottplay.ottplay.b.h(getApplicationContext()).f20086a = 0L;
    }

    public final void Q(final int i10, final Long l10, final String str, final String str2, final Integer num, final Integer num2, final Boolean bool) {
        this.B.postDelayed(this.C, 500L);
        EpgDatabase w10 = EpgDatabase.w(this);
        final m v10 = w10.v();
        final e s4 = w10.s();
        new pg.b(new ig.d() {
            @Override
            public final void d(ig.b bVar) {
                EpgSourceActivity epgSourceActivity = EpgSourceActivity.this;
                int i11 = i10;
                String str3 = str;
                String str4 = str2;
                Integer num3 = num;
                Integer num4 = num2;
                Boolean bool2 = bool;
                of.m mVar = v10;
                Long l11 = l10;
                of.e eVar = s4;
                int i12 = EpgSourceActivity.W;
                Objects.requireNonNull(epgSourceActivity);
                b.a aVar = (b.a) bVar;
                if (aVar.f()) {
                    return;
                }
                if (i11 != 0) {
                    if (i11 != 1) {
                        if (i11 == 2) {
                            if (l11 == null) {
                                aVar.b(new Throwable("Delete error!"));
                            } else {
                                long f10 = eVar.f(l11.longValue());
                                if (f10 > 0) {
                                    epgSourceActivity.f20341t = true;
                                    int h10 = eVar.h(l11.longValue(), 200);
                                    int i13 = h10;
                                    while (h10 > 0 && epgSourceActivity.f20341t) {
                                        h10 = eVar.h(l11.longValue(), 200);
                                        if (h10 > 0) {
                                            i13 += h10;
                                            if (h10 < 200) {
                                                if (cg.a.H(epgSourceActivity)) {
                                                    epgSourceActivity.f20347z = "%100";
                                                } else {
                                                    epgSourceActivity.f20347z = "100%";
                                                }
                                            } else if (cg.a.H(epgSourceActivity)) {
                                                epgSourceActivity.f20347z = "%".concat(String.valueOf(cg.a.u(i13, f10)));
                                            } else {
                                                epgSourceActivity.f20347z = String.valueOf(cg.a.u(i13, f10)).concat("%");
                                            }
                                            epgSourceActivity.runOnUiThread(new f1(epgSourceActivity));
                                        }
                                    }
                                    if (epgSourceActivity.f20341t) {
                                        mVar.b(l11.longValue());
                                    }
                                } else {
                                    mVar.b(l11.longValue());
                                }
                            }
                        }
                    } else if (l11 == null || str3 == null || str4 == null || num3 == null || num4 == null || bool2 == null) {
                        aVar.b(new Throwable("Update error!"));
                    } else {
                        long k10 = mVar.k(str4);
                        if (k10 == epgSourceActivity.f20342u || k10 == 0) {
                            mVar.n(l11.longValue(), str3, str4, num3.intValue(), num4.intValue(), bool2.booleanValue());
                        } else {
                            aVar.b(new Throwable(epgSourceActivity.getString(R.string.f61140_resource_name_obfuscated_res_0x7f1300c4)));
                        }
                    }
                } else if (str3 == null || str4 == null || num3 == null || num4 == null || bool2 == null) {
                    aVar.b(new Throwable("Insert error!"));
                } else if (mVar.k(str4) == 0) {
                    EpgDatabase.w(epgSourceActivity).v().f(new EpgSource(str3, str4, num3.intValue(), bool2.booleanValue(), num4.intValue()));
                } else {
                    aVar.b(new Throwable(epgSourceActivity.getString(R.string.f61140_resource_name_obfuscated_res_0x7f1300c4)));
                }
                aVar.a();
            }
        }).e(wg.a.f44054c).b(hg.b.a()).c(new b(i10));
    }

    @Override
    public void h(androidx.fragment.app.m mVar) {
        mVar.r0();
        if (this.f20338q.getFlags() == 67108864) {
            navigateUpTo(new Intent(getBaseContext(), (Class<?>) MainActivity.class));
        }
        String str = mVar.f10110x;
        if (str == null || !str.equals("epg_insert_update")) {
            return;
        }
        finish();
    }

    @Override
    public void onBackPressed() {
        if (this.f20338q.getExtras() == null) {
            if ((((EditText) this.f20337p.f25360f).getText().toString().trim().length() == 0) & (((EditText) this.f20337p.f25363i).getText().toString().trim().length() == 0)) {
                if (this.f20338q.getFlags() == 67108864) {
                    navigateUpTo(new Intent(getBaseContext(), (Class<?>) MainActivity.class));
                    return;
                } else {
                    this.f8792g.b();
                    return;
                }
            }
        }
        if (!this.f20345x.equals(((EditText) this.f20337p.f25363i).getText().toString()) || !this.f20346y.equals(((EditText) this.f20337p.f25360f).getText().toString()) || this.f20343v != W || this.f20344w != X || this.f20340s != ((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).isChecked()) {
            new d((Activity) this, false, 2, true).w0(H(), "epg_insert_update");
        } else if (this.f20338q.getFlags() == 67108864) {
            navigateUpTo(new Intent(getBaseContext(), (Class<?>) MainActivity.class));
        } else {
            this.f8792g.b();
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        final int i10 = 0;
        View inflate = getLayoutInflater().inflate(R.layout.f55970_resource_name_obfuscated_res_0x7f0e0022, (ViewGroup) null, false);
        int i11 = R.id.f45560_resource_name_obfuscated_res_0x7f0b01a0;
        View e10 = w0.e(inflate, R.id.f45560_resource_name_obfuscated_res_0x7f0b01a0);
        if (e10 != null) {
            u7.a a10 = u7.a.a(e10);
            i11 = R.id.f45570_resource_name_obfuscated_res_0x7f0b01a1;
            Button button = (Button) w0.e(inflate, R.id.f45570_resource_name_obfuscated_res_0x7f0b01a1);
            if (button != null) {
                i11 = R.id.f45590_resource_name_obfuscated_res_0x7f0b01a3;
                TextView textView = (TextView) w0.e(inflate, R.id.f45590_resource_name_obfuscated_res_0x7f0b01a3);
                if (textView != null) {
                    i11 = R.id.f45650_resource_name_obfuscated_res_0x7f0b01a9;
                    EditText editText = (EditText) w0.e(inflate, R.id.f45650_resource_name_obfuscated_res_0x7f0b01a9);
                    if (editText != null) {
                        i11 = R.id.f45660_resource_name_obfuscated_res_0x7f0b01aa;
                        View e11 = w0.e(inflate, R.id.f45660_resource_name_obfuscated_res_0x7f0b01aa);
                        if (e11 != null) {
                            b51 b10 = b51.b(e11);
                            i11 = R.id.f45670_resource_name_obfuscated_res_0x7f0b01ab;
                            ScrollView scrollView = (ScrollView) w0.e(inflate, R.id.f45670_resource_name_obfuscated_res_0x7f0b01ab);
                            if (scrollView != null) {
                                i11 = R.id.f45680_resource_name_obfuscated_res_0x7f0b01ac;
                                EditText editText2 = (EditText) w0.e(inflate, R.id.f45680_resource_name_obfuscated_res_0x7f0b01ac);
                                if (editText2 != null) {
                                    i11 = R.id.f45690_resource_name_obfuscated_res_0x7f0b01ad;
                                    View e12 = w0.e(inflate, R.id.f45690_resource_name_obfuscated_res_0x7f0b01ad);
                                    if (e12 != null) {
                                        g c10 = g.c(e12);
                                        i11 = R.id.f45700_resource_name_obfuscated_res_0x7f0b01ae;
                                        View e13 = w0.e(inflate, R.id.f45700_resource_name_obfuscated_res_0x7f0b01ae);
                                        if (e13 != null) {
                                            u7.a a11 = u7.a.a(e13);
                                            i11 = R.id.f45710_resource_name_obfuscated_res_0x7f0b01af;
                                            Toolbar toolbar = (Toolbar) w0.e(inflate, R.id.f45710_resource_name_obfuscated_res_0x7f0b01af);
                                            if (toolbar != null) {
                                                n70 n70Var = new n70((ConstraintLayout) inflate, a10, button, textView, editText, b10, scrollView, editText2, c10, a11, toolbar);
                                                this.f20337p = n70Var;
                                                setContentView(n70Var.a());
                                                this.f20338q = getIntent();
                                                ((EditText) this.f20337p.f25363i).setImeOptions(6);
                                                ((EditText) this.f20337p.f25363i).setRawInputType(786433);
                                                ((EditText) this.f20337p.f25363i).setOnEditorActionListener(new i(this));
                                                N((Toolbar) this.f20337p.f25366l);
                                                ((Toolbar) this.f20337p.f25366l).setNavigationOnClickListener(new View.OnClickListener(this, i10) {

                                                    public final int f40120a;

                                                    public final EpgSourceActivity f40121b;

                                                    {
                                                        this.f40120a = i10;
                                                        if (i10 == 1 || i10 != 2) {
                                                        }
                                                        this.f40121b = this;
                                                    }

                                                    @Override
                                                    public final void onClick(View view) {
                                                        switch (this.f40120a) {
                                                            case 0:
                                                                EpgSourceActivity epgSourceActivity = this.f40121b;
                                                                int i12 = EpgSourceActivity.W;
                                                                epgSourceActivity.onBackPressed();
                                                                return;
                                                            case 1:
                                                                EpgSourceActivity epgSourceActivity2 = this.f40121b;
                                                                int i13 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity2);
                                                                Intent intent = new Intent(epgSourceActivity2, (Class<?>) OptionsActivity.class);
                                                                intent.putExtra("OptionsType", 13);
                                                                epgSourceActivity2.startActivity(intent);
                                                                return;
                                                            case 2:
                                                                EpgSourceActivity epgSourceActivity3 = this.f40121b;
                                                                int i14 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity3);
                                                                new nf.d((Activity) epgSourceActivity3, false, 2, true).w0(epgSourceActivity3.H(), "epg_delete");
                                                                return;
                                                            case 3:
                                                                EpgSourceActivity epgSourceActivity4 = this.f40121b;
                                                                int i15 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity4);
                                                                Intent intent2 = new Intent(epgSourceActivity4, (Class<?>) OptionsActivity.class);
                                                                intent2.putExtra("OptionsType", 5);
                                                                epgSourceActivity4.startActivity(intent2);
                                                                return;
                                                            default:
                                                                ((SwitchMaterial) ((n3.g) this.f40121b.f20337p.f25364j).f36682d).setChecked(!r5.isChecked());
                                                                return;
                                                        }
                                                    }
                                                });
                                                final int i12 = 1;
                                                if (this.f20338q.getExtras() == null) {
                                                    ((ScrollView) this.f20337p.f25362h).setFillViewport(false);
                                                    ((Button) this.f20337p.f25358d).setVisibility(8);
                                                } else {
                                                    ((ScrollView) this.f20337p.f25362h).setFillViewport(true);
                                                    ((Button) this.f20337p.f25358d).setVisibility(0);
                                                }
                                                final int i13 = 2;
                                                ((Button) this.f20337p.f25358d).setOnClickListener(new View.OnClickListener(this, i13) {

                                                    public final int f40120a;

                                                    public final EpgSourceActivity f40121b;

                                                    {
                                                        this.f40120a = i13;
                                                        if (i13 == 1 || i13 != 2) {
                                                        }
                                                        this.f40121b = this;
                                                    }

                                                    @Override
                                                    public final void onClick(View view) {
                                                        switch (this.f40120a) {
                                                            case 0:
                                                                EpgSourceActivity epgSourceActivity = this.f40121b;
                                                                int i122 = EpgSourceActivity.W;
                                                                epgSourceActivity.onBackPressed();
                                                                return;
                                                            case 1:
                                                                EpgSourceActivity epgSourceActivity2 = this.f40121b;
                                                                int i132 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity2);
                                                                Intent intent = new Intent(epgSourceActivity2, (Class<?>) OptionsActivity.class);
                                                                intent.putExtra("OptionsType", 13);
                                                                epgSourceActivity2.startActivity(intent);
                                                                return;
                                                            case 2:
                                                                EpgSourceActivity epgSourceActivity3 = this.f40121b;
                                                                int i14 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity3);
                                                                new nf.d((Activity) epgSourceActivity3, false, 2, true).w0(epgSourceActivity3.H(), "epg_delete");
                                                                return;
                                                            case 3:
                                                                EpgSourceActivity epgSourceActivity4 = this.f40121b;
                                                                int i15 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity4);
                                                                Intent intent2 = new Intent(epgSourceActivity4, (Class<?>) OptionsActivity.class);
                                                                intent2.putExtra("OptionsType", 5);
                                                                epgSourceActivity4.startActivity(intent2);
                                                                return;
                                                            default:
                                                                ((SwitchMaterial) ((n3.g) this.f40121b.f20337p.f25364j).f36682d).setChecked(!r5.isChecked());
                                                                return;
                                                        }
                                                    }
                                                });
                                                ((TextView) ((g) this.f20337p.f25364j).f36683e).setText(getString(R.string.f61360_resource_name_obfuscated_res_0x7f1300da));
                                                ((FrameLayout) ((g) this.f20337p.f25364j).f36681c).setFocusable(true);
                                                ((FrameLayout) ((g) this.f20337p.f25364j).f36681c).setClickable(true);
                                                final int i14 = 4;
                                                ((FrameLayout) ((g) this.f20337p.f25364j).f36681c).setOnClickListener(new View.OnClickListener(this, i14) {

                                                    public final int f40120a;

                                                    public final EpgSourceActivity f40121b;

                                                    {
                                                        this.f40120a = i14;
                                                        if (i14 == 1 || i14 != 2) {
                                                        }
                                                        this.f40121b = this;
                                                    }

                                                    @Override
                                                    public final void onClick(View view) {
                                                        switch (this.f40120a) {
                                                            case 0:
                                                                EpgSourceActivity epgSourceActivity = this.f40121b;
                                                                int i122 = EpgSourceActivity.W;
                                                                epgSourceActivity.onBackPressed();
                                                                return;
                                                            case 1:
                                                                EpgSourceActivity epgSourceActivity2 = this.f40121b;
                                                                int i132 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity2);
                                                                Intent intent = new Intent(epgSourceActivity2, (Class<?>) OptionsActivity.class);
                                                                intent.putExtra("OptionsType", 13);
                                                                epgSourceActivity2.startActivity(intent);
                                                                return;
                                                            case 2:
                                                                EpgSourceActivity epgSourceActivity3 = this.f40121b;
                                                                int i142 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity3);
                                                                new nf.d((Activity) epgSourceActivity3, false, 2, true).w0(epgSourceActivity3.H(), "epg_delete");
                                                                return;
                                                            case 3:
                                                                EpgSourceActivity epgSourceActivity4 = this.f40121b;
                                                                int i15 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity4);
                                                                Intent intent2 = new Intent(epgSourceActivity4, (Class<?>) OptionsActivity.class);
                                                                intent2.putExtra("OptionsType", 5);
                                                                epgSourceActivity4.startActivity(intent2);
                                                                return;
                                                            default:
                                                                ((SwitchMaterial) ((n3.g) this.f40121b.f20337p.f25364j).f36682d).setChecked(!r5.isChecked());
                                                                return;
                                                        }
                                                    }
                                                });
                                                W = 0;
                                                ((TextView) ((u7.a) this.f20337p.f25357c).f41841f).setText(getString(R.string.f66370_resource_name_obfuscated_res_0x7f1302cf));
                                                ((FrameLayout) ((u7.a) this.f20337p.f25357c).f41838c).setFocusable(true);
                                                ((FrameLayout) ((u7.a) this.f20337p.f25357c).f41838c).setClickable(true);
                                                final int i15 = 3;
                                                ((FrameLayout) ((u7.a) this.f20337p.f25357c).f41838c).setOnClickListener(new View.OnClickListener(this, i15) {

                                                    public final int f40120a;

                                                    public final EpgSourceActivity f40121b;

                                                    {
                                                        this.f40120a = i15;
                                                        if (i15 == 1 || i15 != 2) {
                                                        }
                                                        this.f40121b = this;
                                                    }

                                                    @Override
                                                    public final void onClick(View view) {
                                                        switch (this.f40120a) {
                                                            case 0:
                                                                EpgSourceActivity epgSourceActivity = this.f40121b;
                                                                int i122 = EpgSourceActivity.W;
                                                                epgSourceActivity.onBackPressed();
                                                                return;
                                                            case 1:
                                                                EpgSourceActivity epgSourceActivity2 = this.f40121b;
                                                                int i132 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity2);
                                                                Intent intent = new Intent(epgSourceActivity2, (Class<?>) OptionsActivity.class);
                                                                intent.putExtra("OptionsType", 13);
                                                                epgSourceActivity2.startActivity(intent);
                                                                return;
                                                            case 2:
                                                                EpgSourceActivity epgSourceActivity3 = this.f40121b;
                                                                int i142 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity3);
                                                                new nf.d((Activity) epgSourceActivity3, false, 2, true).w0(epgSourceActivity3.H(), "epg_delete");
                                                                return;
                                                            case 3:
                                                                EpgSourceActivity epgSourceActivity4 = this.f40121b;
                                                                int i152 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity4);
                                                                Intent intent2 = new Intent(epgSourceActivity4, (Class<?>) OptionsActivity.class);
                                                                intent2.putExtra("OptionsType", 5);
                                                                epgSourceActivity4.startActivity(intent2);
                                                                return;
                                                            default:
                                                                ((SwitchMaterial) ((n3.g) this.f40121b.f20337p.f25364j).f36682d).setChecked(!r5.isChecked());
                                                                return;
                                                        }
                                                    }
                                                });
                                                X = 0;
                                                ((TextView) ((u7.a) this.f20337p.f25365k).f41841f).setText(getString(R.string.f66630_resource_name_obfuscated_res_0x7f1302e9));
                                                ((FrameLayout) ((u7.a) this.f20337p.f25365k).f41838c).setFocusable(true);
                                                ((FrameLayout) ((u7.a) this.f20337p.f25365k).f41838c).setClickable(true);
                                                ((FrameLayout) ((u7.a) this.f20337p.f25365k).f41838c).setOnClickListener(new View.OnClickListener(this, i12) {

                                                    public final int f40120a;

                                                    public final EpgSourceActivity f40121b;

                                                    {
                                                        this.f40120a = i12;
                                                        if (i12 == 1 || i12 != 2) {
                                                        }
                                                        this.f40121b = this;
                                                    }

                                                    @Override
                                                    public final void onClick(View view) {
                                                        switch (this.f40120a) {
                                                            case 0:
                                                                EpgSourceActivity epgSourceActivity = this.f40121b;
                                                                int i122 = EpgSourceActivity.W;
                                                                epgSourceActivity.onBackPressed();
                                                                return;
                                                            case 1:
                                                                EpgSourceActivity epgSourceActivity2 = this.f40121b;
                                                                int i132 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity2);
                                                                Intent intent = new Intent(epgSourceActivity2, (Class<?>) OptionsActivity.class);
                                                                intent.putExtra("OptionsType", 13);
                                                                epgSourceActivity2.startActivity(intent);
                                                                return;
                                                            case 2:
                                                                EpgSourceActivity epgSourceActivity3 = this.f40121b;
                                                                int i142 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity3);
                                                                new nf.d((Activity) epgSourceActivity3, false, 2, true).w0(epgSourceActivity3.H(), "epg_delete");
                                                                return;
                                                            case 3:
                                                                EpgSourceActivity epgSourceActivity4 = this.f40121b;
                                                                int i152 = EpgSourceActivity.W;
                                                                Objects.requireNonNull(epgSourceActivity4);
                                                                Intent intent2 = new Intent(epgSourceActivity4, (Class<?>) OptionsActivity.class);
                                                                intent2.putExtra("OptionsType", 5);
                                                                epgSourceActivity4.startActivity(intent2);
                                                                return;
                                                            default:
                                                                ((SwitchMaterial) ((n3.g) this.f40121b.f20337p.f25364j).f36682d).setChecked(!r5.isChecked());
                                                                return;
                                                        }
                                                    }
                                                });
                                                if (this.f20338q.getExtras() != null) {
                                                    ((Toolbar) this.f20337p.f25366l).setTitle(getString(R.string.f61110_resource_name_obfuscated_res_0x7f1300c1));
                                                    this.f20342u = this.f20338q.getLongExtra("id", -1L);
                                                    ((EditText) this.f20337p.f25360f).setText(this.f20338q.getStringExtra(EpgSource.EPG_NAME));
                                                    ((EditText) this.f20337p.f25363i).setText(this.f20338q.getStringExtra(EpgSource.EPG_URL));
                                                    W = this.f20338q.getIntExtra(EpgSource.EPG_UPDATE_DAYS, 0);
                                                    X = this.f20338q.getIntExtra(EpgSource.EPG_TIME_OFFSET, 0);
                                                    ((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).setChecked(this.f20338q.getBooleanExtra(EpgSource.EPG_IS_ACTIVE, true));
                                                    getWindow().setSoftInputMode(3);
                                                } else {
                                                    ((Toolbar) this.f20337p.f25366l).setTitle(getString(R.string.f59600_resource_name_obfuscated_res_0x7f13002a));
                                                    ((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).setChecked(true);
                                                    ((EditText) this.f20337p.f25360f).requestFocus();
                                                    getWindow().setSoftInputMode(4);
                                                }
                                                this.f20346y = ((EditText) this.f20337p.f25360f).getText().toString();
                                                this.f20345x = ((EditText) this.f20337p.f25363i).getText().toString();
                                                this.f20343v = W;
                                                this.f20344w = X;
                                                this.f20340s = ((SwitchMaterial) ((g) this.f20337p.f25364j).f36682d).isChecked();
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i11)));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.f59050_resource_name_obfuscated_res_0x7f0f0009, menu);
        return true;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.f20341t = false;
        jg.a aVar = this.A;
        if (aVar == null || aVar.f()) {
            return;
        }
        this.A.e();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != R.id.f51720_resource_name_obfuscated_res_0x7f0b0408) {
            return super.onOptionsItemSelected(menuItem);
        }
        P();
        return true;
    }

    @Override
    public void onResume() {
        ArrayIndexOutOfBoundsException e10;
        String str;
        super.onResume();
        String str2 = "";
        try {
            str = getResources().getStringArray(R.array.f980_resource_name_obfuscated_res_0x7f030006)[W];
            try {
                str2 = String.valueOf(-X).concat(" ").concat(getResources().getStringArray(R.array.f990_resource_name_obfuscated_res_0x7f030007)[Math.abs(-X)]);
            } catch (ArrayIndexOutOfBoundsException e11) {
                e10 = e11;
                e10.printStackTrace();
                ((TextView) ((u7.a) this.f20337p.f25357c).f41840e).setText(str);
                ((TextView) ((u7.a) this.f20337p.f25365k).f41840e).setText(str2);
            }
        } catch (ArrayIndexOutOfBoundsException e12) {
            e10 = e12;
            str = "";
        }
        ((TextView) ((u7.a) this.f20337p.f25357c).f41840e).setText(str);
        ((TextView) ((u7.a) this.f20337p.f25365k).f41840e).setText(str2);
    }

    @Override
    public void onStop() {
        super.onStop();
        jg.a aVar = this.A;
        if (aVar == null || aVar.f()) {
            return;
        }
        this.A.c();
    }

    @Override
    public void u(androidx.fragment.app.m mVar) {
        mVar.r0();
        String str = mVar.f10110x;
        if (str == null) {
            return;
        }
        if (str.equals("epg_insert_update")) {
            P();
        } else if (this.f20338q.getExtras() != null) {
            long j10 = this.f20342u;
            if (j10 > 0) {
                Q(2, Long.valueOf(j10), null, null, null, null, null);
            }
        }
    }

    @Override
    public void z(androidx.fragment.app.m mVar, TextView textView, Button button, Button button2) {
        button.setText(R.string.f67530_resource_name_obfuscated_res_0x7f130343);
        button2.setText(R.string.f67520_resource_name_obfuscated_res_0x7f130342);
        String str = mVar.f10110x;
        if (str == null) {
            return;
        }
        if (str.equals("epg_insert_update")) {
            textView.setText(R.string.f61020_resource_name_obfuscated_res_0x7f1300b8);
            button.requestFocus();
        } else {
            textView.setText(R.string.f59620_resource_name_obfuscated_res_0x7f13002c);
            button2.requestFocus();
        }
    }
}