导航菜单

页面标题

页面副标题

24Six v66.1.24 - ActivityOfflineTooLong.java 源代码

正在查看: 24Six v66.1.24 应用的 ActivityOfflineTooLong.java JAVA 源代码文件

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


package app.tfs.activity;

import L0.v;
import Y0.l;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Observer;
import app.tfs.R;
import app.tfs.activity.ActivityOfflineTooLong;
import app.tfs.model.TfsProfile;
import app.tfs.web.error.ApiError;
import b0.k;
import b0.n;
import g.AbstractC0461d;
import g.C0458a;
import j.C0534b;
import java.util.Date;
import kotlin.jvm.internal.g;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.m;
import l0.H;
import r.C0690a;
import r.C0693d;
import r.C0707s;

public final class ActivityOfflineTooLong extends app.tfs.activity.c {

    public static final a f395t = new a(null);

    private C0534b f396r;

    private Integer f397s;

    public static final class a {
        public a(g gVar) {
            this();
        }

        private a() {
        }
    }

    public static final class b implements H {
        b() {
        }

        public void onSuccess(TfsProfile tfsProfile) {
            m.e(tfsProfile, "maxOfflineDaysResponse");
            ActivityOfflineTooLong.this.H(false);
            Integer num = tfsProfile.max_offline_days;
            if (num == null || num.intValue() <= 0) {
                return;
            }
            C0690a.f1699f.g(ActivityOfflineTooLong.this, num.intValue(), tfsProfile.checkCanLogout());
        }

        public void onError(Throwable th) {
            m.e(th, "e");
            ActivityOfflineTooLong.this.H(false);
            k.f("ActivityOfflineTooLong", th);
            new ApiError(th).handleAndShowDialog((FragmentActivity) ActivityOfflineTooLong.this);
        }

        public void onSubscribe(m0.c cVar) {
            m.e(cVar, "d");
            ActivityOfflineTooLong.this.l(cVar);
            ActivityOfflineTooLong.this.H(true);
        }
    }

    public static final class c extends Z.a {
        c() {
        }

        public void a(int i2) {
            if (C0690a.f1699f.c() <= 0 || ActivityOfflineTooLong.this.f397s != null) {
                return;
            }
            ActivityOfflineTooLong.this.startActivity(new Intent((Context) ActivityOfflineTooLong.this, (Class<?>) ActivityStartup.class));
            ActivityOfflineTooLong.this.finish();
        }

        public void onNext(Object obj) {
            a(((Number) obj).intValue());
        }

        public void onSubscribe(m0.c cVar) {
            m.e(cVar, "d");
            ActivityOfflineTooLong.this.l(cVar);
        }
    }

    public static final class d extends Z.a {
        d() {
        }

        public void a(boolean z2) {
            if (z2) {
                ActivityOfflineTooLong.this.z().o().l();
            }
        }

        public void onNext(Object obj) {
            a(((Boolean) obj).booleanValue());
        }

        public void onSubscribe(m0.c cVar) {
            m.e(cVar, "d");
            ActivityOfflineTooLong.this.l(cVar);
        }
    }

    static final class e implements Observer, h {
        private final l a;

        e(l lVar) {
            m.e(lVar, "function");
            this.a = lVar;
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof Observer) && (obj instanceof h)) {
                return m.a(getFunctionDelegate(), ((h) obj).getFunctionDelegate());
            }
            return false;
        }

        public final L0.c getFunctionDelegate() {
            return this.a;
        }

        public final int hashCode() {
            return getFunctionDelegate().hashCode();
        }

        public final void onChanged(Object obj) {
            this.a.invoke(obj);
        }
    }

    public static final v P(ActivityOfflineTooLong activityOfflineTooLong, Boolean bool) {
        C0534b c0534b = null;
        if (n.k(bool)) {
            C0534b c0534b2 = activityOfflineTooLong.f396r;
            if (c0534b2 == null) {
                m.w("viewBinding");
            } else {
                c0534b = c0534b2;
            }
            c0534b.f1196l.b.i();
        } else {
            C0534b c0534b3 = activityOfflineTooLong.f396r;
            if (c0534b3 == null) {
                m.w("viewBinding");
            } else {
                c0534b = c0534b3;
            }
            c0534b.f1196l.b.e();
        }
        return v.a;
    }

    public static final void Q(ActivityOfflineTooLong activityOfflineTooLong, View view) {
        activityOfflineTooLong.startActivity(new Intent("android.settings.WIFI_SETTINGS"));
    }

    public static final void R(ActivityOfflineTooLong activityOfflineTooLong, View view) {
        activityOfflineTooLong.z().v(activityOfflineTooLong, null);
    }

    public static final void S(ActivityOfflineTooLong activityOfflineTooLong, View view) {
        String str = (String) C0458a.d.a();
        Integer num = activityOfflineTooLong.f397s;
        if ((num == null || num == null || num.intValue() != 2) && !TextUtils.isEmpty(str)) {
            activityOfflineTooLong.H(true);
            s.e.a.d().C(b0.h.c().format(new Date()), (String) C0458a.e.a(), C0707s.q(), C0707s.m()).i(J0.a.d()).g(k0.c.d()).b(activityOfflineTooLong.new b());
        } else {
            activityOfflineTooLong.startActivity(new Intent((Context) activityOfflineTooLong, (Class<?>) ActivityStartup.class));
            activityOfflineTooLong.finish();
        }
    }

    protected boolean i() {
        return AbstractC0461d.d.booleanValue() || AbstractC0461d.b.booleanValue();
    }

    public String m() {
        return "ActivityOfflineTooLong";
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        C0534b c2 = C0534b.c(getLayoutInflater());
        this.f396r = c2;
        C0534b c0534b = null;
        if (c2 == null) {
            m.w("viewBinding");
            c2 = null;
        }
        setContentView(c2.getRoot());
        Intent intent = getIntent();
        if (intent != null && intent.hasExtra("fromMigrationResult")) {
            this.f397s = Integer.valueOf(intent.getIntExtra("fromMigrationResult", 0));
        }
        C().a.observe(this, new e(new l() {
            public final Object invoke(Object obj) {
                L0.v P;
                P = ActivityOfflineTooLong.P(ActivityOfflineTooLong.this, (Boolean) obj);
                return P;
            }
        }));
        C0534b c0534b2 = this.f396r;
        if (c0534b2 == null) {
            m.w("viewBinding");
            c0534b2 = null;
        }
        c0534b2.c.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActivityOfflineTooLong.Q(ActivityOfflineTooLong.this, view);
            }
        });
        C0534b c0534b3 = this.f396r;
        if (c0534b3 == null) {
            m.w("viewBinding");
            c0534b3 = null;
        }
        c0534b3.d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActivityOfflineTooLong.R(ActivityOfflineTooLong.this, view);
            }
        });
        C0534b c0534b4 = this.f396r;
        if (c0534b4 == null) {
            m.w("viewBinding");
            c0534b4 = null;
        }
        c0534b4.e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                ActivityOfflineTooLong.S(ActivityOfflineTooLong.this, view);
            }
        });
        C0690a.f1699f.d().subscribeOn(J0.a.d()).observeOn(k0.c.d()).subscribe(new c());
        C0693d.d.b().subscribeOn(J0.a.d()).observeOn(k0.c.d()).subscribe(new d());
        if (C0707s.y()) {
            C0534b c0534b5 = this.f396r;
            if (c0534b5 == null) {
                m.w("viewBinding");
                c0534b5 = null;
            }
            c0534b5.c.setVisibility(8);
            C0534b c0534b6 = this.f396r;
            if (c0534b6 == null) {
                m.w("viewBinding");
                c0534b6 = null;
            }
            c0534b6.f1193i.setText(R.i.offline_too_long_message_gold);
            if (C0693d.a.a.b(this)) {
                return;
            }
            C0534b c0534b7 = this.f396r;
            if (c0534b7 == null) {
                m.w("viewBinding");
            } else {
                c0534b = c0534b7;
            }
            c0534b.d.setVisibility(8);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        z().o().l();
    }
}