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

应用版本信息
应用名称:CycleView
版本号:4.40
包名称:com.esd.laundrylink.cycleview

MD5 校验值:230b791cc707d42fd585468f66a30851

反编译源代码说明

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


package com.esd.laundrylink.activities;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.os.Looper;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.f;
import androidx.core.app.b;
import com.esd.laundrylink.SharedApplication;
import com.esd.laundrylink.cycleview.R;
import com.esd.laundrylink.l0.j;
import com.esd.laundrylink.usersession.b;
import com.google.android.gms.location.LocationAvailability;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationResult;
import com.google.android.gms.maps.model.LatLng;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Locale;

@SuppressLint({"CustomSplashScreen"})
public class SplashActivity extends androidx.appcompat.app.g implements b.e {
    private com.google.android.gms.location.b O;
    private com.esd.laundrylink.f P;
    private com.google.android.gms.tasks.g<Void> Q;
    private d.b.b.c R;
    private d.b.b.c S;
    private d.b.b.c T;
    private d.b.b.c U;
    private d.b.b.c V;
    private d.b.b.c W;
    private d.b.b.c X;
    private LatLng b0;
    private boolean Y = false;
    private boolean Z = false;
    private boolean a0 = false;
    private l1 c0 = new l1(1);

    public class a implements Runnable {
        final String p;

        a(String str) {
            this.p = str;
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.P0().setText(this.p);
        }
    }

    public class a0 implements Runnable {
        a0() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.P0().setText(R.string.splash_scanning_for_machines);
        }
    }

    public class a1 implements DialogInterface.OnClickListener {
        a1() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class b implements Runnable {
        b() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.c0 = new l1(16);
        }
    }

    public class b0 implements Runnable {
        final d.b.b.d p;

        b0(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.c0 = new l1(11);
                SplashActivity.this.F1();
                return;
            }
            this.p.b(true);
        }
    }

    public class b1 implements DialogInterface.OnClickListener {
        b1() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class c implements Runnable {
        final d.b.b.f p;

        class a implements DialogInterface.OnClickListener {
            a() {
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                Intent intent = new Intent(SplashActivity.this, (Class<?>) MainActivity.class);
                intent.setFlags(32768);
                intent.setFlags(1073741824);
                intent.setFlags(268435456);
                SplashActivity.this.c0 = new l1(17);
                SplashActivity.this.startActivity(intent);
                SplashActivity.this.finish();
            }
        }

        c(d.b.b.f fVar) {
            this.p = fVar;
        }

        @Override
        public void run() {
            AlertDialog.Builder builder = new AlertDialog.Builder(SplashActivity.this);
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            builder.setMessage((CharSequence) this.p.a()).setCancelable(false).setPositiveButton(R.string.theme_ok, new a());
            builder.show();
        }
    }

    public class c0 implements Runnable {
        final d.b.b.d p;

        c0(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.P0().setText(R.string.droid_only_splash_requesting_bluetooth_permissions);
                SplashActivity.this.c0 = new l1(10);
                return;
            }
            this.p.b(true);
        }
    }

    public class c1 implements Runnable {
        c1() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.c0 = new l1(3);
            SplashActivity.this.f2();
        }
    }

    public class d implements Runnable {
        d() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.c0 = new l1(17);
        }
    }

    public class d0 implements Runnable {
        final d.b.b.d p;

        d0(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.c0 = new l1(14);
                SplashActivity.this.E1();
                return;
            }
            this.p.b(true);
        }
    }

    public class d1 implements DialogInterface.OnClickListener {
        d1() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class e implements Runnable {
        e() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.c0 = new l1(17);
        }
    }

    public class e0 implements Runnable {
        final d.b.b.d p;

        e0(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.P0().setText(R.string.droid_only_splash_requesting_bluetooth_permissions);
                SplashActivity.this.c0 = new l1(13);
                return;
            }
            this.p.b(true);
        }
    }

    public class e1 implements Runnable {
        final d.b.b.d p;

        e1(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.P0().setText(R.string.splash_requesting_location_permissions);
                SplashActivity.this.c0 = new l1(6);
                return;
            }
            this.p.b(true);
        }
    }

    public class f implements Runnable {
        f() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.G1();
        }
    }

    public class f0 implements DialogInterface.OnClickListener {
        f0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(8);
            SplashActivity.this.T.b();
        }
    }

    public class f1 extends Thread {
        f1() {
        }

        @Override
        public void run() {
            SplashActivity.this.d2();
        }
    }

    public class g implements Runnable {
        g() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.T1();
        }
    }

    public class g0 implements Runnable {
        g0() {
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed() && c.h.d.a.a(SplashActivity.this, "android.permission.ACCESS_FINE_LOCATION") == 0) {
                SplashActivity splashActivity = SplashActivity.this;
                splashActivity.Q = splashActivity.O.c(SplashActivity.this.D1(), SplashActivity.this.P, Looper.getMainLooper());
            }
        }
    }

    public class g1 extends Thread {
        g1() {
        }

        @Override
        public void run() {
            SplashActivity.this.a2();
        }
    }

    public class h implements Runnable {
        h() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.M1();
        }
    }

    public class h0 implements DialogInterface.OnClickListener {
        h0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(12);
            SplashActivity.this.U.b();
        }
    }

    public class h1 implements Runnable {
        h1() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            Intent intent = new Intent(SplashActivity.this, (Class<?>) LoginActivity.class);
            intent.putExtra("AccountDisabled", false);
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.startActivity(intent);
            SplashActivity.this.finish();
        }
    }

    public class i implements Runnable {
        i() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.P1();
        }
    }

    public class i0 implements DialogInterface.OnClickListener {
        i0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(15);
            SplashActivity.this.W.b();
        }
    }

    public class i1 implements Runnable {
        final d.b.b.d p;

        i1(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.c0 = new l1(5);
            } else {
                this.p.b(true);
            }
        }
    }

    public class j implements Runnable {
        j() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.K1();
        }
    }

    public class j0 implements DialogInterface.OnClickListener {
        j0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class j1 implements Runnable {
        final d.b.b.d p;

        j1(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.c0 = new l1(7);
                SplashActivity.this.H1();
                return;
            }
            this.p.b(true);
        }
    }

    class k extends com.bumptech.glide.r.k.c<Drawable> {
        k() {
        }

        @Override
        public void f(Drawable drawable) {
        }

        @Override
        public void b(Drawable drawable, com.bumptech.glide.r.l.b<? super Drawable> bVar) {
            SplashActivity.this.findViewById(R.id.linearLayoutSplash).setBackground(drawable);
        }
    }

    public class k0 implements DialogInterface.OnClickListener {
        k0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class k1 implements Runnable {
        final d.b.b.d p;

        k1(d.b.b.d dVar) {
            this.p = dVar;
        }

        @Override
        public void run() {
            if (!SplashActivity.this.isDestroyed()) {
                SplashActivity.this.P0().setText(R.string.splash_detecting_laundry_location);
                SplashActivity.this.c0 = new l1(9);
                return;
            }
            this.p.b(true);
        }
    }

    class l extends com.google.android.gms.location.d {

        class a extends Thread {
            final Location p;

            class RunnableC0142a implements Runnable {
                RunnableC0142a() {
                }

                @Override
                public void run() {
                    if (SplashActivity.this.isDestroyed() || SplashActivity.this.b0 != null) {
                        return;
                    }
                    SplashActivity.this.b0 = new LatLng(a.this.p.getLatitude(), a.this.p.getLongitude());
                    SplashActivity.this.R.b();
                }
            }

            a(Location location) {
                this.p = location;
            }

            @Override
            public void run() {
                SplashActivity.this.i2();
                com.esd.laundrylink.c0.a(SplashActivity.this, new RunnableC0142a());
            }
        }

        class b extends Thread {
            b() {
            }

            @Override
            public void run() {
                SplashActivity.this.i2();
            }
        }

        l() {
        }

        @Override
        public void a(LocationAvailability locationAvailability) {
            if (locationAvailability.d()) {
                return;
            }
            b bVar = new b();
            bVar.setName("Location Unavailable Thread");
            bVar.start();
        }

        @Override
        public void b(LocationResult locationResult) {
            if (locationResult.d().size() == 0) {
                return;
            }
            a aVar = new a(locationResult.d().get(0));
            aVar.setName("Location Found Thread");
            aVar.start();
        }
    }

    public class l0 implements DialogInterface.OnClickListener {
        l0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public static class l1 {
        final int a;

        l1(int i) {
            this.a = i;
        }

        public String toString() {
            int i = this.a;
            switch (i) {
                case 1:
                    return "INITIALIZE";
                case 2:
                    return "INITIALIZING";
                case 3:
                    return "ATTEMPT_LOGIN";
                case 4:
                    return "ATTEMPTING_LOGIN";
                case 5:
                    return "CHECK_LOCATION_PERMISSIONS";
                case 6:
                    return "REQUESTING_LOCATION_PERMISSIONS";
                case 7:
                    return "SHOWING_LOCATION_PERMISSION_REQUEST_RATIONALE";
                case 8:
                    return "FINISHED_SHOWING_LOCATION_PERMISSION_REQUEST_RATIONALE";
                case 9:
                    return "DETECTING_LOCATION";
                case 10:
                    return "REQUESTING_BLUETOOTH_SCAN_PERMISSIONS";
                case 11:
                    return "SHOWING_BLUETOOTH_SCAN_PERMISSION_REQUEST_RATIONALE";
                case 12:
                    return "FINISHED_SHOWING_BLUETOOTH_SCAN_PERMISSION_REQUEST_RATIONALE";
                case 13:
                    return "REQUESTING_BLUETOOTH_CONNECT_PERMISSIONS";
                case 14:
                    return "SHOWING_BLUETOOTH_CONNECT_PERMISSION_REQUEST_RATIONALE";
                case 15:
                    return "FINISHED_SHOWING_BLUETOOTH_CONNECT_PERMISSION_REQUEST_RATIONALE";
                case 16:
                    return "SHOWING_LOGIN_MESSAGE";
                case 17:
                    return "FINISHED";
                default:
                    return String.format(Locale.US, "%d", Integer.valueOf(i));
            }
        }
    }

    public class m implements Runnable {
        m() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.I1();
        }
    }

    public class m0 implements DialogInterface.OnClickListener {
        m0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class n implements Runnable {
        n() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.J1();
        }
    }

    public class n0 implements DialogInterface.OnClickListener {
        n0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class o implements Runnable {
        o() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.O1();
        }
    }

    public class o0 implements DialogInterface.OnClickListener {
        o0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class p implements Runnable {
        p() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.N1();
        }
    }

    public class p0 implements DialogInterface.OnClickListener {
        p0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class q implements Runnable {
        q() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.L1();
        }
    }

    public class q0 implements DialogInterface.OnClickListener {
        q0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class r implements Runnable {
        r() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.S1();
        }
    }

    public class r0 implements Runnable {
        r0() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SharedApplication.G().R();
        }
    }

    public class s implements Runnable {
        s() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.R1();
        }
    }

    public class s0 implements DialogInterface.OnClickListener {
        s0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class t implements Runnable {
        t() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.Q1();
        }
    }

    public class t0 implements DialogInterface.OnClickListener {
        t0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class u implements Runnable {
        u() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.X1();
        }
    }

    public class u0 implements DialogInterface.OnClickListener {
        u0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class v implements Runnable {
        v() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.W1();
        }
    }

    public class v0 implements DialogInterface.OnClickListener {
        v0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class w implements Runnable {
        w() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.U1();
        }
    }

    public class w0 implements DialogInterface.OnClickListener {
        w0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class x implements Runnable {
        x() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.V1();
        }
    }

    public class x0 implements DialogInterface.OnClickListener {
        x0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class y implements Runnable {
        y() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.Y1();
        }
    }

    public class y0 implements DialogInterface.OnClickListener {
        y0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    public class z implements Runnable {
        z() {
        }

        @Override
        public void run() {
            if (SplashActivity.this.isDestroyed()) {
                return;
            }
            SplashActivity.this.Z1();
        }
    }

    public class z0 implements DialogInterface.OnClickListener {
        z0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            SplashActivity.this.c0 = new l1(17);
            SplashActivity.this.finish();
        }
    }

    private boolean C1() {
        String[] strArr = {"android.permission.BLUETOOTH_SCAN"};
        String[] strArr2 = {"android.permission.BLUETOOTH_CONNECT"};
        d.b.b.d dVar = new d.b.b.d();
        if (c.h.d.a.a(this, "android.permission.BLUETOOTH_SCAN") == -1) {
            if (shouldShowRequestPermissionRationale(strArr[0])) {
                com.esd.laundrylink.c0.c(this, new b0(dVar));
                if (dVar.a()) {
                    return false;
                }
                this.U.c();
            }
            com.esd.laundrylink.c0.c(this, new c0(dVar));
            if (dVar.a()) {
                return false;
            }
            androidx.core.app.b.m(this, strArr, 102);
            this.V.c();
        } else {
            this.Z = true;
        }
        if (!this.Z) {
            return false;
        }
        if (c.h.d.a.a(this, "android.permission.BLUETOOTH_CONNECT") == -1) {
            if (shouldShowRequestPermissionRationale(strArr2[0])) {
                com.esd.laundrylink.c0.c(this, new d0(dVar));
                if (dVar.a()) {
                    return false;
                }
                this.W.c();
            }
            com.esd.laundrylink.c0.c(this, new e0(dVar));
            if (dVar.a()) {
                return false;
            }
            androidx.core.app.b.m(this, strArr2, 103);
            this.X.c();
        } else {
            this.a0 = true;
        }
        return this.a0;
    }

    public LocationRequest D1() {
        LocationRequest.a aVar = new LocationRequest.a(100, 10000L);
        aVar.d(5000L);
        return aVar.a();
    }

    public void E1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.droid_only_splash_detect_location_bluetooth_connect_permission_requested).g(R.string.droid_only_splash_detect_location_bluetooth_connect_permission_requested_description).d(false).n(R.string.theme_ok, new i0());
        aVar.s();
    }

    public void F1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.droid_only_splash_detect_location_bluetooth_scan_permission_requested).g(R.string.droid_only_splash_detect_location_bluetooth_scan_permission_requested_description).d(false).n(R.string.theme_ok, new h0());
        aVar.s();
    }

    public void G1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new j0());
        aVar.s();
    }

    public void H1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.droid_only_splash_detect_location_gps_permission_requested).g(R.string.droid_only_splash_detect_location_gps_permission_requested_description).d(false).n(R.string.theme_ok, new f0());
        aVar.s();
    }

    public void I1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.account_disabled).g(R.string.account_disabled_description).d(false).n(R.string.theme_ok, new v0());
        aVar.s();
    }

    public void J1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new w0());
        aVar.s();
    }

    public void K1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new u0());
        aVar.s();
    }

    public void L1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new z0());
        aVar.s();
    }

    public void M1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new s0());
        aVar.s();
    }

    public void N1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new y0());
        aVar.s();
    }

    public void O1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_no_internet_cycle_view).g(R.string.login_no_internet_cycle_view_description).d(false).n(R.string.theme_ok, new x0());
        aVar.s();
    }

    public TextView P0() {
        return (TextView) findViewById(R.id.textView1);
    }

    public void P1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new t0());
        aVar.s();
    }

    public void Q1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new d1());
        aVar.s();
    }

    public void R1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new b1());
        aVar.s();
    }

    public void S1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new a1());
        aVar.s();
    }

    public void T1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new k0());
        aVar.s();
    }

    public void U1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new n0());
        aVar.s();
    }

    public void V1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new o0());
        aVar.s();
    }

    public void W1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new m0());
        aVar.s();
    }

    public void X1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new l0());
        aVar.s();
    }

    public void Y1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new p0());
        aVar.s();
    }

    public void Z1() {
        f.a aVar = new f.a(this);
        aVar.q(R.string.login_failed_cycle_view).g(R.string.login_failed_cycle_view_description).d(false).n(R.string.theme_ok, new q0());
        aVar.s();
    }

    public void a2() {
        if (SharedApplication.G().H().i0()) {
            e2();
        } else if (!com.esd.laundrylink.b.a()) {
            com.esd.laundrylink.c0.a(this, new h1());
        } else {
            c2();
        }
    }

    private void b2() {
        j.t tVar;
        SharedApplication G = SharedApplication.G();
        if (G.getPackageManager().hasSystemFeature("android.hardware.bluetooth_le")) {
            tVar = com.esd.laundrylink.l0.j.d0(this);
        } else {
            tVar = j.t.BluetoothNotSupported;
        }
        if (tVar != j.t.BluetoothTurnedOn) {
            return;
        }
        if (Build.VERSION.SDK_INT < 31 || C1()) {
            com.esd.laundrylink.c0.c(this, new a0());
            try {
                ArrayList<com.esd.laundrylink.l0.o> arrayList = new ArrayList<>();
                ArrayList<String> arrayList2 = new ArrayList<>();
                if (!G.D().q0(5000, this, arrayList) || arrayList.size() <= 0) {
                    return;
                }
                Iterator<com.esd.laundrylink.l0.o> it = arrayList.iterator();
                while (it.hasNext()) {
                    arrayList2.add(it.next().a());
                }
                G.H().i(arrayList2);
                b.m mVar = b.m.LocationChangedAndLoginSuccessful;
            } catch (Exception e2) {
                e2.printStackTrace();
                com.google.firebase.crashlytics.g.a().d(e2);
            }
        }
    }

    private void c2() {
        SharedApplication G = SharedApplication.G();
        String format = String.format("%s@cycleview.com", SharedApplication.G().H().p0());
        String a2 = d.b.a.c.a(format);
        b.k A1 = G.H().A1("Cycle", "View", "", format, a2);
        if (A1 == b.k.RegisteredAndLoginSuccessful) {
            e2();
            return;
        }
        if (A1 == b.k.RegisteredAndLoginFailed) {
            com.esd.laundrylink.c0.a(this, new g());
            return;
        }
        if (A1 == b.k.AlreadyRegistered) {
            b.g f2 = G.H().f(format, a2, new d.b.b.f<>(null));
            if (f2 == b.g.Success) {
                e2();
                return;
            }
            if (f2 == b.g.SuccessBadBundleDetected) {
                e2();
                return;
            }
            if (f2 == b.g.InvalidLogin) {
                com.esd.laundrylink.c0.a(this, new h());
                return;
            }
            if (f2 == b.g.LoginUnavailable) {
                com.esd.laundrylink.c0.a(this, new i());
                return;
            }
            if (f2 == b.g.PrivateDatabaseTemporarilyUnavailable) {
                com.esd.laundrylink.c0.a(this, new j());
                return;
            }
            if (f2 == b.g.AccountDisabled) {
                com.esd.laundrylink.c0.a(this, new m());
                return;
            }
            if (f2 == b.g.CannotDownloadEncryptionKeys) {
                com.esd.laundrylink.c0.a(this, new n());
                return;
            }
            if (f2 == b.g.NoInternet) {
                com.esd.laundrylink.c0.a(this, new o());
                return;
            }
            if (f2 == b.g.InvalidResponse) {
                com.esd.laundrylink.c0.a(this, new p());
                return;
            }
            if (f2 == b.g.HttpError) {
                com.esd.laundrylink.c0.a(this, new q());
                return;
            }
            if (f2 == b.g.UnknownRequestStatus) {
                com.esd.laundrylink.c0.a(this, new r());
                return;
            } else if (f2 == b.g.UnknownException) {
                com.esd.laundrylink.c0.a(this, new s());
                return;
            } else {
                com.esd.laundrylink.c0.a(this, new t());
                return;
            }
        }
        if (A1 == b.k.InvalidPhoneNumber) {
            com.esd.laundrylink.c0.a(this, new u());
            return;
        }
        if (A1 == b.k.InvalidEmailAddress) {
            com.esd.laundrylink.c0.a(this, new v());
            return;
        }
        if (A1 == b.k.CannotCreateAccount) {
            com.esd.laundrylink.c0.a(this, new w());
            return;
        }
        if (A1 == b.k.DatabaseTemporarilyUnavailable) {
            com.esd.laundrylink.c0.a(this, new x());
        } else if (A1 == b.k.RegistrationUnavailable) {
            com.esd.laundrylink.c0.a(this, new y());
        } else {
            com.esd.laundrylink.c0.a(this, new z());
        }
    }

    public void d2() {
        SharedApplication.G().J();
        com.esd.laundrylink.c0.c(this, new r0());
        com.esd.laundrylink.c0.a(this, new c1());
    }

    private void e2() {
        b.g g2;
        Intent intent;
        SharedApplication G = SharedApplication.G();
        String[] strArr = {"android.permission.ACCESS_FINE_LOCATION"};
        d.b.b.f<String> fVar = new d.b.b.f<>(null);
        d.b.b.d dVar = new d.b.b.d();
        if (G.H().m0()) {
            g2 = b.g.Success;
        } else {
            g2 = G.H().g(G.H().i1(), fVar);
        }
        if (g2 == b.g.Success) {
            if (!d.b.b.h.r(G.H().e0())) {
                com.esd.laundrylink.c0.c(this, new i1(dVar));
                if (dVar.a()) {
                    return;
                }
                if (G.getPackageManager().hasSystemFeature("android.hardware.location.gps")) {
                    if (G.E().isProviderEnabled("gps")) {
                        if (c.h.d.a.a(this, strArr[0]) == -1) {
                            if (shouldShowRequestPermissionRationale(strArr[0])) {
                                com.esd.laundrylink.c0.c(this, new j1(dVar));
                                if (dVar.a()) {
                                    return;
                                }
                                this.T.c();
                                g2(strArr);
                            } else {
                                g2(strArr);
                            }
                        } else {
                            this.Y = true;
                        }
                    } else {
                        this.Y = false;
                    }
                } else {
                    this.Y = false;
                }
                if (this.Y) {
                    h2();
                    com.esd.laundrylink.c0.c(this, new k1(dVar));
                    if (dVar.a()) {
                        i2();
                        return;
                    }
                    if (this.R.d(10000L)) {
                        this.R.a();
                        i2();
                        if (this.b0 != null) {
                            ArrayList<com.esd.laundrylink.defs.h> arrayList = new ArrayList<>();
                            com.esd.laundrylink.usersession.b H = G.H();
                            LatLng latLng = this.b0;
                            if (H.J(latLng.p, latLng.q, 2, arrayList) == b.e.FoundLocations && arrayList.size() == 1) {
                                if (G.H().R1(arrayList.get(0).f()) == b.m.LocationChangedAndLoginSuccessful) {
                                    String b12 = G.H().b1();
                                    if (!TextUtils.isEmpty(b12)) {
                                        com.esd.laundrylink.c0.c(this, new a(b12));
                                        try {
                                            Thread.sleep(1000L);
                                        } catch (Exception e2) {
                                            e2.printStackTrace();
                                            com.google.firebase.crashlytics.g.a().d(e2);
                                        }
                                    }
                                }
                            } else {
                                b2();
                            }
                        }
                    } else {
                        i2();
                    }
                }
            }
            if (!d.b.b.h.r(G.H().e0())) {
                intent = new Intent(this, (Class<?>) ChangeLocationActivity.class);
                intent.putExtra("MustChooseLocation", true);
            } else if (TextUtils.isEmpty(fVar.a())) {
                intent = new Intent(this, (Class<?>) MainActivity.class);
                intent.setFlags(32768);
                intent.setFlags(1073741824);
            } else {
                com.esd.laundrylink.c0.c(this, new b());
                com.esd.laundrylink.c0.a(this, new c(fVar));
                return;
            }
            com.esd.laundrylink.c0.c(this, new d());
            intent.setFlags(268435456);
            startActivity(intent);
            finish();
            return;
        }
        boolean z2 = g2 == b.g.AccountDisabled;
        com.esd.laundrylink.c0.c(this, new e());
        if (com.esd.laundrylink.b.a()) {
            com.esd.laundrylink.c0.a(this, new f());
            return;
        }
        Intent intent2 = new Intent(this, (Class<?>) LoginActivity.class);
        intent2.putExtra("AccountDisabled", z2);
        startActivity(intent2);
        finish();
    }

    public void f2() {
        if (this.c0.a == 1) {
            this.c0 = new l1(2);
            f1 f1Var = new f1();
            f1Var.setName("Splash Initializing");
            f1Var.start();
        }
        if (this.c0.a == 3) {
            this.c0 = new l1(4);
            g1 g1Var = new g1();
            g1Var.setName("Splash Attempting Login");
            g1Var.start();
        }
    }

    private void g2(String[] strArr) {
        d.b.b.d dVar = new d.b.b.d();
        com.esd.laundrylink.c0.c(this, new e1(dVar));
        if (dVar.a()) {
            return;
        }
        androidx.core.app.b.m(this, strArr, 101);
        this.S.c();
    }

    private void h2() {
        com.esd.laundrylink.c0.a(this, new g0());
    }

    public synchronized void i2() {
        com.google.android.gms.location.b bVar = this.O;
        if (bVar == null) {
            return;
        }
        try {
            com.google.android.gms.tasks.j.a(bVar.b());
        } catch (Exception e2) {
            com.google.firebase.crashlytics.g.a().d(e2);
            e2.printStackTrace();
        }
        try {
            com.google.android.gms.tasks.j.a(this.O.d(this.P));
        } catch (Exception e3) {
            com.google.firebase.crashlytics.g.a().d(e3);
            e3.printStackTrace();
        }
        try {
            com.google.android.gms.tasks.j.a(this.Q);
        } catch (Exception e4) {
            com.google.firebase.crashlytics.g.a().d(e4);
            e4.printStackTrace();
        }
        this.O = null;
        this.P = null;
        this.Q = null;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null) {
            this.c0 = new l1(bundle.getInt("ActivityState", 1));
        }
        setContentView(R.layout.activity_splash);
        com.esd.laundrylink.i.c(this).E(Integer.valueOf(R.drawable.activity_background_waves2)).v0(new k());
        ImageView imageView = (ImageView) findViewById(R.id.imageViewAppLogo);
        ImageView imageView2 = (ImageView) findViewById(R.id.imageViewPoweredBy);
        com.esd.laundrylink.i.c(this).E(Integer.valueOf(R.drawable.logo_default_2)).y0(imageView);
        com.esd.laundrylink.i.c(this).E(Integer.valueOf(R.drawable.esdlogo1)).y0(imageView2);
        this.R = new d.b.b.c(false);
        this.S = new d.b.b.c(false);
        this.T = new d.b.b.c(false);
        this.U = new d.b.b.c(false);
        this.V = new d.b.b.c(false);
        this.W = new d.b.b.c(false);
        this.X = new d.b.b.c(false);
        this.O = com.google.android.gms.location.e.a(this);
        this.P = new com.esd.laundrylink.f(new l());
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        int i2 = this.c0.a;
        if (i2 == 7) {
            this.T.b();
            return;
        }
        if (i2 == 9) {
            this.R.b();
        } else if (i2 == 11) {
            this.U.b();
        } else if (i2 == 14) {
            this.W.b();
        }
    }

    @Override
    public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
        if (i2 == 101) {
            if (iArr[0] == 0) {
                this.Y = true;
            }
            this.S.b();
        } else if (i2 == 102) {
            if (iArr[0] == 0) {
                this.Z = true;
            }
            this.V.b();
        } else if (i2 == 103) {
            if (iArr[0] == 0) {
                this.a0 = true;
            }
            this.X.b();
        }
        super.onRequestPermissionsResult(i2, strArr, iArr);
    }

    @Override
    public void onResume() {
        super.onResume();
        f2();
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putInt("ActivityState", this.c0.a);
    }
}