导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - PrepareNetworkSpeedTestActivity.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 PrepareNetworkSpeedTestActivity.java JAVA 源代码文件

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


package com.fancyclean.boost.networkspeed.ui.activity;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import com.airbnb.lottie.LottieAnimationView;
import com.facebook.internal.i0;
import com.fancyclean.boost.networkspeed.ui.presenter.PrepareNetworkSpeedTestPresenter;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.view.TitleBar;
import gl.d;
import java.util.Locale;
import java.util.Objects;
import t4.g;
import u9.c;

@d(PrepareNetworkSpeedTestPresenter.class)
public class PrepareNetworkSpeedTestActivity extends v7.a<c> implements u9.d {
    public static final int v = 0;
    public TextView l;
    public TextView m;
    public TextView n;
    public TextView o;
    public LottieAnimationView p;
    public View q;
    public View r;
    public View s;
    public View t;
    public boolean u = false;

    public class a extends AnimatorListenerAdapter {
        public a() {
        }

        @Override
        public final void onAnimationEnd(Animator animator) {
            ?? r32 = PrepareNetworkSpeedTestActivity.this;
            r32.t.setVisibility(4);
            r32.startActivity(new Intent((Context) r32, (Class<?>) NetworkSpeedTestMainActivity.class));
            r32.finish();
        }
    }

    public static class b extends com.thinkyeah.common.ui.dialog.c<PrepareNetworkSpeedTestActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(@Nullable Bundle bundle) {
            c.a aVar = new c.a(getActivity());
            aVar.g(2131886728);
            aVar.c(2131886685);
            aVar.e(2131887775, new g(this, 9));
            aVar.d(2131886274, new t4.c(this, 5));
            return aVar.a();
        }

        public final void onStart() {
            super/*androidx.fragment.app.DialogFragment*/.onStart();
            Context context = getContext();
            if (context != null) {
                try {
                    AlertDialog dialog = getDialog();
                    Objects.requireNonNull(dialog);
                    dialog.getButton(-2).setTextColor(ContextCompat.getColor(context, 2131100607));
                } catch (NullPointerException unused) {
                }
            }
        }
    }

    @Override
    public final void K0(String str, boolean z10) {
        if (!z10) {
            this.n.setText(str);
        } else {
            this.n.setText(new Locale(ml.d.c().getLanguage(), str).getDisplayCountry());
        }
    }

    @Override
    public final void W1(String str) {
        this.m.setText(str);
    }

    public final void X2() {
        this.q.animate().x(-this.q.getWidth()).alpha(0.0f).setDuration(300L).start();
        this.r.animate().x(-this.r.getWidth()).alpha(0.0f).setDuration(300L).setStartDelay(100L).start();
        this.s.animate().x(-this.s.getWidth()).alpha(0.0f).setDuration(300L).setStartDelay(100L).start();
        this.t.animate().x(-this.t.getWidth()).alpha(0.0f).setDuration(300L).setStartDelay(200L).setListener(new a()).start();
    }

    public final void Y2() {
        NetworkInfo activeNetworkInfo;
        NetworkInfo.State state;
        ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService("connectivity");
        char c = 0;
        if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null && activeNetworkInfo.isAvailable()) {
            c = 1;
            NetworkInfo networkInfo = connectivityManager.getNetworkInfo(1);
            if (networkInfo == null || (state = networkInfo.getState()) == null || (state != NetworkInfo.State.CONNECTED && state != NetworkInfo.State.CONNECTING)) {
                TelephonyManager telephonyManager = (TelephonyManager) getSystemService("phone");
                if (ContextCompat.checkSelfPermission(this, "android.permission.READ_PHONE_STATE") == 0) {
                    switch (telephonyManager.getNetworkType()) {
                        case 1:
                        case 2:
                        case 4:
                        case 7:
                        case 11:
                        case 16:
                            c = 2;
                            break;
                        case 3:
                        case 5:
                        case 6:
                        case 8:
                        case 9:
                        case 10:
                        case 12:
                        case 14:
                        case 15:
                        case 17:
                            c = 3;
                            break;
                        case 13:
                        case 18:
                        case 19:
                            c = 4;
                            break;
                        case 20:
                            c = 5;
                            break;
                    }
                }
                c = 6;
            }
        }
        if (c == 0) {
            this.l.setText(2131887262);
        } else if (c == 2) {
            this.l.setText(2131887636);
        } else if (c == 3) {
            this.l.setText(2131887637);
        } else if (c == 4) {
            this.l.setText(2131887638);
        } else if (c != 5) {
            this.l.setText(2131886277);
        } else {
            this.l.setText(2131887639);
        }
        this.r.setVisibility(8);
        this.o.setText(2131887262);
        ((u9.c) W2()).Z0();
    }

    @Override
    public final void a(boolean z10) {
        if (z10) {
            ((u9.c) W2()).w();
        } else {
            finish();
        }
    }

    @Override
    public final void j() {
        this.u = false;
        Y2();
    }

    @Override
    public final void n(String str) {
        this.u = true;
        this.o.setText(str);
        this.l.setText(2131888189);
        ((u9.c) W2()).Z0();
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558506);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.f(getString(2131887952));
        configure.g(new i0(this, 21));
        configure.a();
        this.l = (TextView) findViewById(2131363619);
        this.o = (TextView) findViewById(2131363722);
        this.n = (TextView) findViewById(2131363606);
        this.m = (TextView) findViewById(2131363594);
        this.q = findViewById(2131362865);
        this.r = findViewById(2131363885);
        this.s = findViewById(2131362620);
        this.t = findViewById(2131362381);
        this.p = findViewById(2131362622);
        findViewById(2131362979).setOnClickListener(new t4.b(this, 21));
        if (bundle == null) {
            ((u9.c) W2()).a();
        }
    }

    public final void onDestroy() {
        this.p.a();
        super/*il.b*/.onDestroy();
    }

    @Override
    public final void q() {
        this.u = false;
        Y2();
    }
}