导航菜单

页面标题

页面副标题

SpeedCash v6.5.1482 - BottomNavigationActivity.java 源代码

正在查看: SpeedCash v6.5.1482 应用的 BottomNavigationActivity.java JAVA 源代码文件

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


package com.bm.sc.kotlin.ui;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.IntentSender;
import android.graphics.drawable.ColorDrawable;
import android.location.Location;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.v4.media.session.PlaybackStateCompat;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.ActionBar;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.exifinterface.media.ExifInterface;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.view.result.ActivityResult;
import androidx.view.result.ActivityResultCallback;
import androidx.view.result.ActivityResultLauncher;
import androidx.view.result.IntentSenderRequest;
import androidx.view.result.contract.ActivityResultContracts;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.adapter.list.CashWdTokenAdapter;
import com.bm.sc.bebasbayar.handler.FirebaseProcessor;
import com.bm.sc.bebasbayar.handler.MessageComposer;
import com.bm.sc.bebasbayar.handler.MessageSender;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.helper.EventHelper;
import com.bm.sc.bebasbayar.iface.BBCallback;
import com.bm.sc.bebasbayar.message.BusMessage;
import com.bm.sc.bebasbayar.message.MPMessage;
import com.bm.sc.bebasbayar.message.api.APIMessageWrapper;
import com.bm.sc.bebasbayar.message.mp.MenuMessage;
import com.bm.sc.bebasbayar.setting.ApiConfig;
import com.bm.sc.bebasbayar.setting.MenuConfig;
import com.bm.sc.bebasbayar.setting.Privilege;
import com.bm.sc.bebasbayar.setting.Variant;
import com.bm.sc.bebasbayar.setting.session.AppSession;
import com.bm.sc.bebasbayar.ui.activity.account.DetailDocumentActivity;
import com.bm.sc.bebasbayar.ui.activity.cash.QRScanner2Activity;
import com.bm.sc.bebasbayar.ui.activity.cash.SourceOfFundActivity;
import com.bm.sc.bebasbayar.ui.activity.info.ReportingActivity;
import com.bm.sc.bebasbayar.ui.activity.info.TransactionReportNewActivity;
import com.bm.sc.bebasbayar.ui.fragment.home.MissionFragment;
import com.bm.sc.bebasbayar.ui.fragment.home.ProfileFragment;
import com.bm.sc.bebasbayar.ui.fragment.home.ScannerFragment;
import com.bm.sc.bebasbayar.ui.widget.SwipeDisabledViewPager;
import com.bm.sc.kotlin.ui.BottomNavigationActivity;
import com.bm.sc.kotlin.ui.cs.LiveChatActivity;
import com.bm.sc.kotlin.ui.home.HomeFragment1;
import com.bm.sc.util.android.Compat;
import com.bm.sc.util.common.Var;
import com.bm.sc.util.format.Mapper;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationCallback;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationResult;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.play.core.appupdate.AppUpdateInfo;
import com.google.android.play.core.appupdate.AppUpdateManager;
import com.google.android.play.core.appupdate.AppUpdateManagerFactory;
import com.google.android.play.core.appupdate.AppUpdateOptions;
import com.google.android.play.core.common.IntentSenderForResultStarter;
import com.google.android.play.core.install.InstallState;
import com.google.android.play.core.install.InstallStateUpdatedListener;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.rabbitmq.client.AMQP;
import dagger.hilt.android.AndroidEntryPoint;
import defpackage.CASE_INSENSITIVE_ORDER;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Objects;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.SourceDebugExtension;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONObject;

@Metadata(d1 = {"\u0000Â\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\b\u0007\u0018\u0000 s2\u00020\u00012\u00020\u00022\b\u0012\u0004\u0012\u00020\u00040\u0003:\u0001sB\u0007¢\u0006\u0004\bq\u0010rJ\b\u0010\u0006\u001a\u00020\u0005H\u0002J\u0010\u0010\t\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u0007H\u0002J\u0010\u0010\f\u001a\u00020\u00052\u0006\u0010\u000b\u001a\u00020\nH\u0002J\b\u0010\r\u001a\u00020\u0005H\u0002J\b\u0010\u000e\u001a\u00020\u0005H\u0002J\b\u0010\u000f\u001a\u00020\u0005H\u0002J\b\u0010\u0011\u001a\u00020\u0010H\u0002J\b\u0010\u0012\u001a\u00020\u0005H\u0002J\u0010\u0010\u0015\u001a\u00020\u00102\u0006\u0010\u0014\u001a\u00020\u0013H\u0002J\u0010\u0010\u0017\u001a\u00020\u00052\u0006\u0010\u0016\u001a\u00020\u0004H\u0002J\u0010\u0010\u0018\u001a\u00020\u00052\u0006\u0010\u0016\u001a\u00020\u0004H\u0002J\b\u0010\u0019\u001a\u00020\u0005H\u0002J\b\u0010\u001a\u001a\u00020\u0005H\u0002J\u0012\u0010\u001d\u001a\u00020\u00052\b\u0010\u001c\u001a\u0004\u0018\u00010\u001bH\u0014J\b\u0010\u001e\u001a\u00020\u0005H\u0014J\b\u0010\u001f\u001a\u00020\u0005H\u0014J\b\u0010 \u001a\u00020\u0005H\u0014J\u0010\u0010#\u001a\u00020\u00052\u0006\u0010\"\u001a\u00020!H\u0007J\b\u0010$\u001a\u00020\u0005H\u0017J\u0010\u0010'\u001a\u00020\u00072\u0006\u0010&\u001a\u00020%H\u0016J\u0010\u0010*\u001a\u00020\u00052\u0006\u0010)\u001a\u00020(H\u0016J\b\u0010,\u001a\u00020+H\u0014J\b\u0010-\u001a\u00020\u0007H\u0016J\b\u0010.\u001a\u00020\u0010H\u0014J\u0010\u00101\u001a\u00020\u00072\u0006\u00100\u001a\u00020/H\u0016J\u0012\u00103\u001a\u00020\u00052\b\u00102\u001a\u0004\u0018\u00010\u0004H\u0016J\u000e\u00104\u001a\u00020\u00052\u0006\u0010\u0016\u001a\u00020\u0004J\u0006\u00105\u001a\u00020\u0005J\u0006\u00106\u001a\u00020\u0005R\u0016\u0010:\u001a\u0002078\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b8\u00109R\u0016\u0010>\u001a\u00020;8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b<\u0010=R&\u0010C\u001a\u0012\u0012\u0004\u0012\u00020\u00130?j\b\u0012\u0004\u0012\u00020\u0013`@8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bA\u0010BR\u0018\u0010\u0016\u001a\u0004\u0018\u00010\u00048\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bD\u0010ER\u0018\u0010I\u001a\u0004\u0018\u00010F8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bG\u0010HR\u0018\u0010M\u001a\u0004\u0018\u00010J8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bK\u0010LR\u0018\u0010P\u001a\u0004\u0018\u00010\u001b8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bN\u0010OR\u0016\u0010T\u001a\u00020Q8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bR\u0010SR\u0016\u0010W\u001a\u00020\u00108\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bU\u0010VR\u0016\u0010Y\u001a\u00020\u00108\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bX\u0010VR\u0018\u0010\\\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bZ\u0010[R\u0016\u0010^\u001a\u00020\u00078\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b]\u0010\u0006R\u0016\u0010b\u001a\u00020_8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b`\u0010aR\u0016\u0010f\u001a\u00020c8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\bd\u0010eR\u0014\u0010j\u001a\u00020g8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bh\u0010iR\"\u0010p\u001a\u0010\u0012\f\u0012\n m*\u0004\u0018\u00010l0l0k8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bn\u0010o¨\u0006t"}, d2 = {"Lcom/bm/sc/kotlin/ui/BottomNavigationActivity;", "Lcom/bm/sc/bebasbayar/ui/BaseActivity;", "Lcom/google/android/material/bottomnavigation/BottomNavigationView$OnNavigationItemSelectedListener;", "Lcom/google/android/gms/tasks/OnSuccessListener;", "Lcom/google/android/play/core/appupdate/AppUpdateInfo;", "", "Z", "", "isMock", "H", "Landroid/net/Uri;", "paymentUri", "M", "d0", "J", ExifInterface.GPS_MEASUREMENT_INTERRUPTED, "", "L", ExifInterface.GPS_DIRECTION_TRUE, "Landroidx/fragment/app/Fragment;", "fragment", "K", "appUpdateInfo", "Y", "X", "a0", ExifInterface.LONGITUDE_WEST, "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "onStart", "onStop", "onResume", "Lcom/bm/sc/bebasbayar/message/BusMessage;", "event", "onMessageEvent", "onBackPressed", "Landroid/view/Menu;", FirebaseProcessor.TYPE_MENU, "onCreateOptionsMenu", "Landroid/view/View;", "view", "onClick", "", "getLayoutResource", "isEligibleForFavorit", "getWikiNameSpace", "Landroid/view/MenuItem;", "item", "onNavigationItemSelected", "p0", "onSuccess", "startUpdateAfterCheckSukses", "checkUpdateAppOnGooglePlayStore", "updatePrivilegedContent", "Lcom/bm/sc/bebasbayar/ui/widget/SwipeDisabledViewPager;", "f", "Lcom/bm/sc/bebasbayar/ui/widget/SwipeDisabledViewPager;", "viewPager", "Lcom/bm/sc/kotlin/ui/VpAdapter;", "g", "Lcom/bm/sc/kotlin/ui/VpAdapter;", "adapter", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "h", "Ljava/util/ArrayList;", "fragments", "i", "Lcom/google/android/play/core/appupdate/AppUpdateInfo;", "Lcom/google/android/play/core/appupdate/AppUpdateManager;", "j", "Lcom/google/android/play/core/appupdate/AppUpdateManager;", "appUpdateManager", "Lcom/google/android/play/core/install/InstallStateUpdatedListener;", "k", "Lcom/google/android/play/core/install/InstallStateUpdatedListener;", "installStateUpdatedListener", "l", "Landroid/os/Bundle;", "bundle", "Lcom/google/android/material/bottomnavigation/BottomNavigationView;", "m", "Lcom/google/android/material/bottomnavigation/BottomNavigationView;", "bottomNavigationView", "n", "Ljava/lang/String;", "strNav", "o", "newLogin", "p", "Ljava/lang/Boolean;", "newRegisterUser", "q", "allowedToExit", "Lcom/google/android/gms/location/FusedLocationProviderClient;", "r", "Lcom/google/android/gms/location/FusedLocationProviderClient;", "fusedLocationClient", "Lcom/google/android/gms/location/LocationCallback;", "s", "Lcom/google/android/gms/location/LocationCallback;", "locationCallback", "Lcom/google/android/play/core/common/IntentSenderForResultStarter;", "t", "Lcom/google/android/play/core/common/IntentSenderForResultStarter;", "updateResultStarter", "Landroidx/activity/result/ActivityResultLauncher;", "Landroidx/activity/result/IntentSenderRequest;", "kotlin.jvm.PlatformType", "u", "Landroidx/activity/result/ActivityResultLauncher;", "updateLauncher", "<init>", "()V", "Companion", "app_release"}, k = 1, mv = {1, 8, 0})
@AndroidEntryPoint
@SourceDebugExtension({"SMAP\nBottomNavigationActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BottomNavigationActivity.kt\ncom/bm/sc/kotlin/ui/BottomNavigationActivity\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,998:1\n1#2:999\n*E\n"})
public final class BottomNavigationActivity extends Hilt_BottomNavigationActivity implements BottomNavigationView.OnNavigationItemSelectedListener, OnSuccessListener<AppUpdateInfo> {

    @NotNull
    public static final Companion INSTANCE = new Companion(null);
    public static final int v = 531;
    public static final int w = DetailDocumentActivity.REQUEST_CAMERA_PERMISSIONS;
    public static final int x = AMQP.NOT_ALLOWED;

    public SwipeDisabledViewPager viewPager;

    public VpAdapter adapter;

    public ArrayList<Fragment> fragments;

    @Nullable
    public AppUpdateInfo appUpdateInfo;

    @Nullable
    public AppUpdateManager appUpdateManager;

    @Nullable
    public InstallStateUpdatedListener installStateUpdatedListener;

    @Nullable
    public Bundle bundle;

    public BottomNavigationView bottomNavigationView;

    public String strNav;

    public String newLogin;

    @Nullable
    public Boolean newRegisterUser;

    public boolean allowedToExit;

    public FusedLocationProviderClient fusedLocationClient;

    public LocationCallback locationCallback;

    @NotNull
    public final IntentSenderForResultStarter updateResultStarter = new IntentSenderForResultStarter() {
        @Override
        public final void startIntentSenderForResult(IntentSender intentSender, int i, Intent intent, int i2, int i3, int i4, Bundle bundle) {
            BottomNavigationActivity.c0(BottomNavigationActivity.this, intentSender, i, intent, i2, i3, i4, bundle);
        }
    };

    @NotNull
    public final ActivityResultLauncher<IntentSenderRequest> updateLauncher;

    @Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082D¢\u0006\u0002\n\u0000R\u0014\u0010\u0006\u001a\u00020\u0004X\u0086D¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/bm/sc/kotlin/ui/BottomNavigationActivity$Companion;", "", "()V", "REQUEST_CAMERA_PERMISSIONS", "", "REQ_CODE_VERSION_UPDATE", "SWITCH_TO_PROFILE_FRAGMENT", "getSWITCH_TO_PROFILE_FRAGMENT", "()I", "app_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Companion {
        public Companion() {
        }

        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final int getSWITCH_TO_PROFILE_FRAGMENT() {
            return BottomNavigationActivity.v;
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Lcom/google/android/play/core/appupdate/AppUpdateInfo;", "kotlin.jvm.PlatformType", "appUpdateInfo", "", "a", "(Lcom/google/android/play/core/appupdate/AppUpdateInfo;)V"}, k = 3, mv = {1, 8, 0})
    public static final class a extends Lambda implements Function1<AppUpdateInfo, Unit> {
        public a() {
            super(1);
        }

        public final void a(AppUpdateInfo appUpdateInfo) {
            if (appUpdateInfo.updateAvailability() == 2) {
                BottomNavigationActivity.this.appUpdateInfo = appUpdateInfo;
                BottomNavigationActivity bottomNavigationActivity = BottomNavigationActivity.this;
                Intrinsics.checkNotNullExpressionValue(appUpdateInfo, "appUpdateInfo");
                bottomNavigationActivity.startUpdateAfterCheckSukses(appUpdateInfo);
            }
        }

        @Override
        public Unit invoke(AppUpdateInfo appUpdateInfo) {
            a(appUpdateInfo);
            return Unit.INSTANCE;
        }
    }

    public BottomNavigationActivity() {
        ActivityResultLauncher<IntentSenderRequest> registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartIntentSenderForResult(), new ActivityResultCallback() {
            @Override
            public final void onActivityResult(Object obj) {
                BottomNavigationActivity.b0(BottomNavigationActivity.this, (ActivityResult) obj);
            }
        });
        Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…        }\n        }\n    }");
        this.updateLauncher = registerForActivityResult;
    }

    public static final void F(BottomNavigationActivity this$0, InstallState state) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(state, "state");
        if (state.installStatus() == 1) {
            this$0.appSession.remove(AppSession.DEFAULT_ASAP_DENOM);
            this$0.appSession.remove(AppSession.LIST_ASAP_DATA);
            this$0.sendBroadcast(new Intent("Proses pembaruan " + this$0.getApplicationContext().getString(R.string.app_name)));
            return;
        }
        if (state.installStatus() == 2) {
            long bytesDownloaded = state.bytesDownloaded();
            long j = state.totalBytesToDownload() / PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED;
            long j2 = bytesDownloaded / PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED;
            return;
        }
        if (state.installStatus() == 11) {
            AppUpdateManager appUpdateManager = this$0.appUpdateManager;
            if (appUpdateManager != null) {
                Intrinsics.checkNotNull(appUpdateManager);
                appUpdateManager.completeUpdate();
                return;
            }
            return;
        }
        if (state.installStatus() != 3) {
            if (state.installStatus() == 4) {
                this$0.W();
            } else if (state.installStatus() == 5) {
                Toast.makeText(this$0.getApplicationContext(), "Pembaruan SpeedCash gagal", 1).show();
            } else if (state.installStatus() == 6) {
                Toast.makeText(this$0.getApplicationContext(), "Pembaruan SpeedCash dibatalkan", 1).show();
            }
        }
    }

    public static final void G(Function1 tmp0, Object obj) {
        Intrinsics.checkNotNullParameter(tmp0, "$tmp0");
        tmp0.invoke(obj);
    }

    public static final void I(BottomNavigationActivity this$0, int i, Boolean bool) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.finish();
    }

    public static final void N(BottomNavigationActivity this$0, Bundle bundle) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(bundle, "$bundle");
        Affinity.launch(this$0, SourceOfFundActivity.class, bundle);
    }

    public static final void O(BottomNavigationActivity this$0, Toast finalToast) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(finalToast, "$finalToast");
        this$0.allowedToExit = false;
        finalToast.cancel();
    }

    public static final void P(int i, String str) {
        Intrinsics.areEqual(Var.toString(Mapper.jsonToMap(str).get("is_active"), "0"), "1");
    }

    public static final void Q(BottomNavigationActivity this$0, int i, String str) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        LinkedHashMap<String, Object> jsonToMap = Mapper.jsonToMap(str);
        if (Var.toBoolean(jsonToMap.get("is_active"), false)) {
            Affinity.showDialogPromoNewRegister(this$0, jsonToMap);
        }
    }

    public static final void R(BottomNavigationActivity this$0, View view) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Affinity.launch(this$0, QRScanner2Activity.class);
    }

    public static final void S(String str, BottomNavigationActivity this$0, int i, String str2) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        try {
            JSONObject jSONObject = new JSONObject(str2);
            ArrayList arrayList = new ArrayList();
            JSONArray jSONArray = jSONObject.getJSONArray("allowed");
            int length = jSONArray.length();
            for (int i2 = 0; i2 < length; i2++) {
                arrayList.add(jSONArray.getString(i2));
            }
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                if (CASE_INSENSITIVE_ORDER.equals((String) it.next(), str, true)) {
                    this$0.appSession.store(AppSession.PROPERTY_IS_USER_TESTER, "1");
                }
            }
        } catch (Exception unused) {
        }
    }

    public static final void U(BottomNavigationActivity this$0, int i, boolean z) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        if (z) {
            try {
                VpAdapter vpAdapter = this$0.adapter;
                if (vpAdapter == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("adapter");
                    vpAdapter = null;
                }
                Fragment item = vpAdapter.getItem(0);
                Intrinsics.checkNotNull(item, "null cannot be cast to non-null type com.bm.sc.kotlin.ui.home.HomeFragment1");
                ((HomeFragment1) item).setBalanceText();
            } catch (Exception e) {
                StringBuilder sb = new StringBuilder();
                sb.append("Balance Update error : ");
                sb.append(e);
            }
        }
    }

    public static final void b0(BottomNavigationActivity this$0, ActivityResult activityResult) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        if (activityResult.getData() != null && activityResult.getResultCode() == x) {
            if (activityResult.getResultCode() == -1) {
                Toast.makeText(this$0.getApplicationContext(), "Anda memulai pembaruan SpeedCash", 0).show();
            } else if (activityResult.getResultCode() == 0) {
                Toast.makeText(this$0.getApplicationContext(), "Anda membatalkan pembaruan SpeedCash", 0).show();
            } else {
                Toast.makeText(this$0.getApplicationContext(), "Downloading failed", 0).show();
            }
        }
    }

    public static final void c0(BottomNavigationActivity this$0, IntentSender intent, int i, Intent intent2, int i2, int i3, int i4, Bundle bundle) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        Intrinsics.checkNotNullParameter(intent, "intent");
        this$0.updateLauncher.launch(new IntentSenderRequest.Builder(intent).setFillInIntent(intent2).setFlags(i3, i2).build());
    }

    public static final void e0(AlertDialog alertDialog, View view) {
        alertDialog.dismiss();
    }

    public static final void f0(AlertDialog alertDialog, View view) {
        alertDialog.dismiss();
    }

    public static final void g0(BottomNavigationActivity this$0, AlertDialog alertDialog, View view) {
        Intrinsics.checkNotNullParameter(this$0, "this$0");
        this$0.J();
        alertDialog.dismiss();
    }

    public final void H(boolean isMock) {
        FusedLocationProviderClient fusedLocationProviderClient = this.fusedLocationClient;
        LocationCallback locationCallback = null;
        if (fusedLocationProviderClient == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fusedLocationClient");
            fusedLocationProviderClient = null;
        }
        LocationCallback locationCallback2 = this.locationCallback;
        if (locationCallback2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("locationCallback");
        } else {
            locationCallback = locationCallback2;
        }
        fusedLocationProviderClient.removeLocationUpdates(locationCallback);
        if (isMock) {
            Affinity.info(this, 2, "Penggunaan Fake GPS Terdeteksi", "Mohon tidak menggunakan aplikasi Fake GPS", new BBCallback() {
                @Override
                public final void do_callback(int i, Object obj) {
                    BottomNavigationActivity.I(BottomNavigationActivity.this, i, (Boolean) obj);
                }
            });
        }
    }

    public final void J() {
        APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper();
        AppSession appSession = this.appSession;
        Intrinsics.checkNotNull(appSession);
        aPIMessageWrapper.setItem("id", appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID));
        aPIMessageWrapper.setItem("action", "akses");
        MessageComposer messageComposer = new MessageComposer(2, "login/privileges");
        messageComposer.setData_type(1);
        messageComposer.setRequest_method("POST");
        messageComposer.setIs_encrypted(false);
        messageComposer.setShowProgressRegular(false);
        messageComposer.setMessageProcess(new BottomNavigationActivity$getAccess$1(this));
        MessageSender messageSender = new MessageSender(this, messageComposer);
        messageSender.setRequestMessage(aPIMessageWrapper);
        messageSender.execute();
    }

    public final String K(Fragment fragment) {
        String simpleName = fragment.getClass().getSimpleName();
        Intrinsics.checkNotNullExpressionValue(simpleName, "fragment.javaClass.simpleName");
        return CASE_INSENSITIVE_ORDER.replace$default(simpleName, "Fragment", "", false, 4, (Object) null);
    }

    public final String L() {
        return Variant.isSpeedCash() ? Privilege.LEVEL_STANDARD : "103";
    }

    public final void M(Uri paymentUri) {
        paymentUri.toString();
        final Bundle bundle = new Bundle();
        bundle.putString("app_id", Var.toString(paymentUri.getQueryParameter("app_id"), ""));
        bundle.putString("package_name", Var.toString(paymentUri.getQueryParameter("package_name"), ""));
        bundle.putString("product_code", Var.toString(paymentUri.getQueryParameter("product_code"), ""));
        bundle.putString("nominal", Var.toString(paymentUri.getQueryParameter("nominal"), ""));
        bundle.putString("description", Var.toString(paymentUri.getQueryParameter("description"), ""));
        bundle.putString(MPMessage.IncludeMessage.REFF_ID, Var.toString(paymentUri.getQueryParameter(MPMessage.IncludeMessage.REFF_ID), ""));
        new Handler().postDelayed(new Runnable() {
            @Override
            public final void run() {
                BottomNavigationActivity.N(BottomNavigationActivity.this, bundle);
            }
        }, 3000L);
    }

    public final void T() {
        Affinity.refreshBalance(this, new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                BottomNavigationActivity.U(BottomNavigationActivity.this, i, ((Boolean) obj).booleanValue());
            }
        });
    }

    public final void V() {
        MenuMessage menuMessage = new MenuMessage(this.appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID), this.appSession.retrieve(AppSession.PROPERTY_MERCHANT_PIN), this.appSession.retrieve(AppSession.PROPERTY_AUTH_TOKEN));
        MessageComposer messageComposer = new MessageComposer(1, "");
        messageComposer.setIs_credential(true);
        messageComposer.setData_type(1);
        messageComposer.setRequest_method("POST");
        messageComposer.setMessageProcess(new BottomNavigationActivity$reload$1(this));
        MessageSender messageSender = new MessageSender(this, messageComposer);
        messageSender.setRequestMessage(menuMessage);
        messageSender.execute();
    }

    public final void W() {
        InstallStateUpdatedListener installStateUpdatedListener;
        AppUpdateManager appUpdateManager = this.appUpdateManager;
        if (appUpdateManager == null || (installStateUpdatedListener = this.installStateUpdatedListener) == null) {
            return;
        }
        Intrinsics.checkNotNull(appUpdateManager);
        appUpdateManager.unregisterListener(installStateUpdatedListener);
    }

    public final void X(AppUpdateInfo appUpdateInfo) {
        try {
            AppUpdateManager appUpdateManager = this.appUpdateManager;
            if (appUpdateManager != null) {
                appUpdateManager.startUpdateFlowForResult(appUpdateInfo, this.updateResultStarter, AppUpdateOptions.newBuilder(0).build(), x);
            }
        } catch (IntentSender.SendIntentException e) {
            e.printStackTrace();
            a0();
            Toast.makeText(getApplicationContext(), "Error startAppUpdateFlexible " + e, 1).show();
        }
    }

    public final void Y(AppUpdateInfo appUpdateInfo) {
        try {
            AppUpdateManager appUpdateManager = this.appUpdateManager;
            if (appUpdateManager != null) {
                appUpdateManager.startUpdateFlowForResult(appUpdateInfo, this.updateResultStarter, AppUpdateOptions.newBuilder(1).build(), x);
            }
        } catch (IntentSender.SendIntentException e) {
            e.printStackTrace();
            a0();
            Toast.makeText(getApplicationContext(), "Error startAppUpdateImmediate " + e, 1).show();
        }
    }

    public final void Z() {
        Object systemService = getSystemService(FirebaseAnalytics.Param.LOCATION);
        Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.location.LocationManager");
        LocationManager locationManager = (LocationManager) systemService;
        boolean isProviderEnabled = locationManager.isProviderEnabled("gps");
        boolean isProviderEnabled2 = locationManager.isProviderEnabled("network");
        if (isProviderEnabled || isProviderEnabled2) {
            LocationRequest.Builder builder = new LocationRequest.Builder(100, 5000L);
            builder.setMinUpdateIntervalMillis(2000L);
            LocationRequest build = builder.build();
            Intrinsics.checkNotNullExpressionValue(build, "Builder(\n            Pri…nterval\n        }.build()");
            this.locationCallback = new LocationCallback() {
                @Override
                public void onLocationResult(@NotNull LocationResult locationResult) {
                    Intrinsics.checkNotNullParameter(locationResult, "locationResult");
                    for (Location location : locationResult.getLocations()) {
                        if (location != null) {
                            BottomNavigationActivity.this.H(location.isFromMockProvider());
                        }
                    }
                }
            };
            if (ContextCompat.checkSelfPermission(this, "android.permission.ACCESS_FINE_LOCATION") == 0 && ContextCompat.checkSelfPermission(this, "android.permission.ACCESS_COARSE_LOCATION") == 0) {
                FusedLocationProviderClient fusedLocationProviderClient = this.fusedLocationClient;
                LocationCallback locationCallback = null;
                if (fusedLocationProviderClient == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("fusedLocationClient");
                    fusedLocationProviderClient = null;
                }
                LocationCallback locationCallback2 = this.locationCallback;
                if (locationCallback2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("locationCallback");
                } else {
                    locationCallback = locationCallback2;
                }
                fusedLocationProviderClient.requestLocationUpdates(build, locationCallback, Looper.getMainLooper());
            }
        }
    }

    public final void a0() {
        AppUpdateManager appUpdateManager = this.appUpdateManager;
        if (appUpdateManager == null || this.installStateUpdatedListener == null) {
            return;
        }
        Intrinsics.checkNotNull(appUpdateManager);
        InstallStateUpdatedListener installStateUpdatedListener = this.installStateUpdatedListener;
        Intrinsics.checkNotNull(installStateUpdatedListener);
        appUpdateManager.unregisterListener(installStateUpdatedListener);
    }

    public final void checkUpdateAppOnGooglePlayStore() {
        Task<AppUpdateInfo> appUpdateInfo;
        this.installStateUpdatedListener = new InstallStateUpdatedListener() {
            @Override
            public final void onStateUpdate(InstallState installState) {
                BottomNavigationActivity.F(BottomNavigationActivity.this, installState);
            }
        };
        AppUpdateManager appUpdateManager = this.appUpdateManager;
        Intrinsics.checkNotNull(appUpdateManager);
        InstallStateUpdatedListener installStateUpdatedListener = this.installStateUpdatedListener;
        Intrinsics.checkNotNull(installStateUpdatedListener);
        appUpdateManager.registerListener(installStateUpdatedListener);
        AppUpdateManager appUpdateManager2 = this.appUpdateManager;
        if (appUpdateManager2 != null) {
            appUpdateManager2.getAppUpdateInfo();
        }
        AppUpdateManager appUpdateManager3 = this.appUpdateManager;
        if (appUpdateManager3 == null || (appUpdateInfo = appUpdateManager3.getAppUpdateInfo()) == null) {
            return;
        }
        final a aVar = new a();
        appUpdateInfo.addOnSuccessListener(new OnSuccessListener() {
            @Override
            public final void onSuccess(Object obj) {
                BottomNavigationActivity.G(Function1.this, obj);
            }
        });
    }

    public final void d0() {
        LayoutInflater layoutInflater = getLayoutInflater();
        Intrinsics.checkNotNullExpressionValue(layoutInflater, "this.layoutInflater");
        View inflate = layoutInflater.inflate(R.layout.widget_empty_privilege, (ViewGroup) null);
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setView(inflate);
        final AlertDialog create = builder.create();
        Window window = create.getWindow();
        Objects.requireNonNull(window);
        window.setBackgroundDrawable(new ColorDrawable(0));
        create.show();
        ImageView imageView = (ImageView) create.findViewById(R.id.iv_close_upgrade);
        TextView textView = (TextView) create.findViewById(R.id.ok_btn);
        TextView textView2 = (TextView) create.findViewById(R.id.return_btn);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BottomNavigationActivity.f0(create, view);
            }
        });
        textView.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BottomNavigationActivity.g0(BottomNavigationActivity.this, create, view);
            }
        });
        textView2.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BottomNavigationActivity.e0(create, view);
            }
        });
    }

    @Override
    public int getLayoutResource() {
        return R.layout.activity_bottom_navigation;
    }

    @Override
    @NotNull
    public String getWikiNameSpace() {
        String classSimpleName = getClassSimpleName();
        Intrinsics.checkNotNullExpressionValue(classSimpleName, "classSimpleName");
        return classSimpleName;
    }

    @Override
    public boolean isEligibleForFavorit() {
        return false;
    }

    @Override
    @Deprecated(message = "Deprecated in Java")
    public void onBackPressed() {
        Toast toast = new Toast(this);
        int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount();
        BottomNavigationView bottomNavigationView = this.bottomNavigationView;
        BottomNavigationView bottomNavigationView2 = null;
        if (bottomNavigationView == null) {
            Intrinsics.throwUninitializedPropertyAccessException("bottomNavigationView");
            bottomNavigationView = null;
        }
        if (bottomNavigationView.getSelectedItemId() == R.id.menu_home) {
            if (backStackEntryCount == 0) {
                if (!this.allowedToExit) {
                    this.allowedToExit = true;
                    final Toast makeText = Toast.makeText(this, "Tekan sekali lagi untuk keluar", 0);
                    Intrinsics.checkNotNullExpressionValue(makeText, "makeText(\n              …ORT\n                    )");
                    makeText.show();
                    new Handler().postDelayed(new Runnable() {
                        @Override
                        public final void run() {
                            BottomNavigationActivity.O(BottomNavigationActivity.this, makeText);
                        }
                    }, 2000L);
                    return;
                }
                finish();
            }
            if (backStackEntryCount > 1) {
                hideKeyboard();
                toast.cancel();
                return;
            } else {
                toast.cancel();
                super.onBackPressed();
                return;
            }
        }
        ArrayList<Fragment> arrayList = this.fragments;
        if (arrayList == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList = null;
        }
        SwipeDisabledViewPager swipeDisabledViewPager = this.viewPager;
        if (swipeDisabledViewPager == null) {
            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
            swipeDisabledViewPager = null;
        }
        if (!(arrayList.get(swipeDisabledViewPager.getCurrentItem()) instanceof MissionFragment)) {
            BottomNavigationView bottomNavigationView3 = this.bottomNavigationView;
            if (bottomNavigationView3 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("bottomNavigationView");
            } else {
                bottomNavigationView2 = bottomNavigationView3;
            }
            bottomNavigationView2.setSelectedItemId(R.id.menu_home);
            return;
        }
        ArrayList<Fragment> arrayList2 = this.fragments;
        if (arrayList2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList2 = null;
        }
        SwipeDisabledViewPager swipeDisabledViewPager2 = this.viewPager;
        if (swipeDisabledViewPager2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
            swipeDisabledViewPager2 = null;
        }
        Fragment fragment = arrayList2.get(swipeDisabledViewPager2.getCurrentItem());
        Intrinsics.checkNotNull(fragment, "null cannot be cast to non-null type com.bm.sc.bebasbayar.ui.fragment.home.MissionFragment");
        MissionFragment missionFragment = (MissionFragment) fragment;
        if (missionFragment.getWvContent() != null) {
            if (missionFragment.getWvContent().canGoBack()) {
                missionFragment.getWvContent().goBack();
                return;
            }
            BottomNavigationView bottomNavigationView4 = this.bottomNavigationView;
            if (bottomNavigationView4 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("bottomNavigationView");
            } else {
                bottomNavigationView2 = bottomNavigationView4;
            }
            bottomNavigationView2.setSelectedItemId(R.id.menu_home);
        }
    }

    @Override
    public void onClick(@NotNull View view) {
        Intrinsics.checkNotNullParameter(view, "view");
        super.onClick(view);
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.fragments = new ArrayList<>(1);
        this.appSession = new AppSession(this);
        this.bundle = getIntent().getExtras();
        FusedLocationProviderClient fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient((Activity) this);
        Intrinsics.checkNotNullExpressionValue(fusedLocationProviderClient, "getFusedLocationProviderClient(this)");
        this.fusedLocationClient = fusedLocationProviderClient;
        if (ContextCompat.checkSelfPermission(this, "android.permission.ACCESS_FINE_LOCATION") == 0 && ContextCompat.checkSelfPermission(this, "android.permission.ACCESS_COARSE_LOCATION") == 0) {
            Z();
        }
        SwipeDisabledViewPager swipeDisabledViewPager = null;
        int color = ResourcesCompat.getColor(getResources(), R.color.colorBackground, null);
        ActionBar supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.setDisplayHomeAsUpEnabled(true);
            supportActionBar.setHomeButtonEnabled(true);
            supportActionBar.setDisplayShowTitleEnabled(false);
        }
        if (getToolbar() != null) {
            getToolbar().setVisibility(8);
            getToolbar().setBackgroundColor(color);
            getToolbar().setNavigationIcon(R.drawable.ic_sidebar_icon);
            getToolbar().setTitle("");
        }
        if (this.appSession.retrieve(AppSession.PROPERTY_PRIVILEGE) == null || this.appSession.retrieve(AppSession.PROPERTY_LEVEL) == null) {
            d0();
        } else {
            String retrieve = this.appSession.retrieve(AppSession.PROPERTY_PRIVILEGE);
            Intrinsics.checkNotNullExpressionValue(retrieve, "appSession.retrieve(AppSession.PROPERTY_PRIVILEGE)");
            if (!(retrieve.length() == 0)) {
                String retrieve2 = this.appSession.retrieve(AppSession.PROPERTY_LEVEL);
                Intrinsics.checkNotNullExpressionValue(retrieve2, "appSession.retrieve(AppSession.PROPERTY_LEVEL)");
            }
            d0();
        }
        StringBuilder sb = new StringBuilder();
        sb.append("onCreate: ");
        sb.append(this.appSession.retrieve(AppSession.PROPERTY_PRIVILEGE));
        sb.append(' ');
        sb.append(this.appSession.retrieve(AppSession.PROPERTY_LEVEL));
        Compat.setTransparentStatusBar(this);
        findViewById(R.id.bb_toolbar_center_image).setVisibility(0);
        HomeFragment1 homeFragment1 = new HomeFragment1();
        ScannerFragment scannerFragment = new ScannerFragment();
        ProfileFragment profileFragment = new ProfileFragment();
        ArrayList<Fragment> arrayList = this.fragments;
        if (arrayList == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList = null;
        }
        arrayList.add(homeFragment1);
        ArrayList<Fragment> arrayList2 = this.fragments;
        if (arrayList2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList2 = null;
        }
        arrayList2.add(scannerFragment);
        ArrayList<Fragment> arrayList3 = this.fragments;
        if (arrayList3 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList3 = null;
        }
        arrayList3.add(profileFragment);
        FragmentManager supportFragmentManager = getSupportFragmentManager();
        Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
        ArrayList<Fragment> arrayList4 = this.fragments;
        if (arrayList4 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("fragments");
            arrayList4 = null;
        }
        this.adapter = new VpAdapter(supportFragmentManager, arrayList4);
        View findViewById = findViewById(R.id.bottom_navigation_vp);
        Intrinsics.checkNotNullExpressionValue(findViewById, "findViewById(R.id.bottom_navigation_vp)");
        SwipeDisabledViewPager swipeDisabledViewPager2 = (SwipeDisabledViewPager) findViewById;
        this.viewPager = swipeDisabledViewPager2;
        if (swipeDisabledViewPager2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
            swipeDisabledViewPager2 = null;
        }
        swipeDisabledViewPager2.setSwipeEnabled(false);
        SwipeDisabledViewPager swipeDisabledViewPager3 = this.viewPager;
        if (swipeDisabledViewPager3 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
            swipeDisabledViewPager3 = null;
        }
        VpAdapter vpAdapter = this.adapter;
        if (vpAdapter == null) {
            Intrinsics.throwUninitializedPropertyAccessException("adapter");
            vpAdapter = null;
        }
        swipeDisabledViewPager3.setAdapter(vpAdapter);
        SwipeDisabledViewPager swipeDisabledViewPager4 = this.viewPager;
        if (swipeDisabledViewPager4 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
            swipeDisabledViewPager4 = null;
        }
        swipeDisabledViewPager4.setOffscreenPageLimit(5);
        View findViewById2 = findViewById(R.id.menu_home_navigation);
        Intrinsics.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.menu_home_navigation)");
        BottomNavigationView bottomNavigationView = (BottomNavigationView) findViewById2;
        this.bottomNavigationView = bottomNavigationView;
        if (bottomNavigationView == null) {
            Intrinsics.throwUninitializedPropertyAccessException("bottomNavigationView");
            bottomNavigationView = null;
        }
        bottomNavigationView.setOnNavigationItemSelectedListener(this);
        BottomNavigationView bottomNavigationView2 = this.bottomNavigationView;
        if (bottomNavigationView2 == null) {
            Intrinsics.throwUninitializedPropertyAccessException("bottomNavigationView");
            bottomNavigationView2 = null;
        }
        bottomNavigationView2.setSelectedItemId(R.id.menu_home);
        Bundle bundle = this.bundle;
        if (bundle != null) {
            Intrinsics.checkNotNull(bundle);
            String var = Var.toString(bundle.getString("FromReservation"), "");
            Intrinsics.checkNotNullExpressionValue(var, "toString(bundle!!.getStr…g(\"FromReservation\"), \"\")");
            this.strNav = var;
            Bundle bundle2 = this.bundle;
            Intrinsics.checkNotNull(bundle2);
            String var2 = Var.toString(bundle2.getString("LOGINNEW"), "");
            Intrinsics.checkNotNullExpressionValue(var2, "toString(bundle!!.getString(\"LOGINNEW\"), \"\")");
            this.newLogin = var2;
            if (var2 == null) {
                Intrinsics.throwUninitializedPropertyAccessException("newLogin");
                var2 = null;
            }
            if (Intrinsics.areEqual(var2, "LOGINNEW")) {
                ApiConfig.fetchDepositRegister(this, new BBCallback() {
                    @Override
                    public final void do_callback(int i, Object obj) {
                        BottomNavigationActivity.P(i, (String) obj);
                    }
                });
            }
            String str = this.strNav;
            if (str == null) {
                Intrinsics.throwUninitializedPropertyAccessException("strNav");
                str = null;
            }
            if (Intrinsics.areEqual(str, "0")) {
                SwipeDisabledViewPager swipeDisabledViewPager5 = this.viewPager;
                if (swipeDisabledViewPager5 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                } else {
                    swipeDisabledViewPager = swipeDisabledViewPager5;
                }
                swipeDisabledViewPager.setCurrentItem(0);
                getWindow().clearFlags(128);
            } else {
                String str2 = this.strNav;
                if (str2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("strNav");
                    str2 = null;
                }
                if (Intrinsics.areEqual(str2, "1")) {
                    SwipeDisabledViewPager swipeDisabledViewPager6 = this.viewPager;
                    if (swipeDisabledViewPager6 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                    } else {
                        swipeDisabledViewPager = swipeDisabledViewPager6;
                    }
                    swipeDisabledViewPager.setCurrentItem(1);
                    getWindow().clearFlags(128);
                } else {
                    String str3 = this.strNav;
                    if (str3 == null) {
                        Intrinsics.throwUninitializedPropertyAccessException("strNav");
                        str3 = null;
                    }
                    if (Intrinsics.areEqual(str3, "2")) {
                        SwipeDisabledViewPager swipeDisabledViewPager7 = this.viewPager;
                        if (swipeDisabledViewPager7 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                        } else {
                            swipeDisabledViewPager = swipeDisabledViewPager7;
                        }
                        swipeDisabledViewPager.setCurrentItem(2);
                        getWindow().addFlags(128);
                    } else {
                        String str4 = this.strNav;
                        if (str4 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("strNav");
                            str4 = null;
                        }
                        if (Intrinsics.areEqual(str4, ExifInterface.GPS_MEASUREMENT_3D)) {
                            SwipeDisabledViewPager swipeDisabledViewPager8 = this.viewPager;
                            if (swipeDisabledViewPager8 == null) {
                                Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                            } else {
                                swipeDisabledViewPager = swipeDisabledViewPager8;
                            }
                            swipeDisabledViewPager.setCurrentItem(3);
                            getWindow().clearFlags(128);
                        } else {
                            String str5 = this.strNav;
                            if (str5 == null) {
                                Intrinsics.throwUninitializedPropertyAccessException("strNav");
                                str5 = null;
                            }
                            if (Intrinsics.areEqual(str5, CashWdTokenAdapter.STATE_EXPIRED)) {
                                SwipeDisabledViewPager swipeDisabledViewPager9 = this.viewPager;
                                if (swipeDisabledViewPager9 == null) {
                                    Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                                } else {
                                    swipeDisabledViewPager = swipeDisabledViewPager9;
                                }
                                swipeDisabledViewPager.setCurrentItem(4);
                                getWindow().clearFlags(128);
                            }
                        }
                    }
                }
            }
        }
        AppSession appSession = this.appSession;
        Intrinsics.checkNotNull(appSession);
        if (appSession.isEnterHomeFromSplash()) {
            Boolean valueOf = Boolean.valueOf(Var.toBoolean(this.appSession.retrieve(AppSession.IS_NEW_REGISTRANT_USER), false));
            this.newRegisterUser = valueOf;
            Intrinsics.checkNotNull(valueOf, "null cannot be cast to non-null type kotlin.Boolean");
            if (valueOf.booleanValue()) {
                ApiConfig.fetchPromoNewRegister(this, new BBCallback() {
                    @Override
                    public final void do_callback(int i, Object obj) {
                        BottomNavigationActivity.Q(BottomNavigationActivity.this, i, (String) obj);
                    }
                });
            }
        }
        ((FloatingActionButton) findViewById(R.id.middle_button)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                BottomNavigationActivity.R(BottomNavigationActivity.this, view);
            }
        });
        this.appUpdateManager = AppUpdateManagerFactory.create(getApplicationContext());
        if (this.appSession.isEnterHomeFromSplash()) {
            checkUpdateAppOnGooglePlayStore();
        }
        AppSession appSession2 = this.appSession;
        Intrinsics.checkNotNull(appSession2);
        if (appSession2.isEnterHomeFromSplash()) {
            AppSession appSession3 = this.appSession;
            Intrinsics.checkNotNull(appSession3);
            String retrieve3 = appSession3.retrieve(AppSession.SOF_LINK_REF);
            Intrinsics.checkNotNullExpressionValue(retrieve3, "appSession!!.retrieve(AppSession.SOF_LINK_REF)");
            if (!(retrieve3.length() == 0)) {
                AppSession appSession4 = this.appSession;
                Intrinsics.checkNotNull(appSession4);
                Uri parse = Uri.parse(appSession4.retrieve(AppSession.SOF_LINK_REF));
                if (parse != null) {
                    M(parse);
                }
            }
        }
        final String retrieve4 = this.appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID);
        ApiConfig.fetchConfig(this, R.xml.sc_webview_topup_game, "sc_webview_topup_game", new BBCallback() {
            @Override
            public final void do_callback(int i, Object obj) {
                BottomNavigationActivity.S(retrieve4, this, i, (String) obj);
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(@NotNull Menu menu) {
        Intrinsics.checkNotNullParameter(menu, "menu");
        boolean onCreateOptionsMenu = super.onCreateOptionsMenu(menu);
        MenuItem menuItem = getMenuItem(R.id.menu_item_new_mail);
        if (menuItem != null) {
            menuItem.setVisible(true);
        }
        MenuItem menuItem2 = getMenuItem(R.id.menu_item_new_message);
        if (menuItem2 != null) {
            menuItem2.setVisible(true);
        }
        return onCreateOptionsMenu;
    }

    @Subscribe(threadMode = ThreadMode.MAIN)
    public final void onMessageEvent(@NotNull BusMessage event) {
        Intrinsics.checkNotNullParameter(event, "event");
        if (event.getEventType() == 1) {
            AppSession appSession = this.appSession;
            Intrinsics.checkNotNull(appSession);
            appSession.store(AppSession.PROPERTY_BALANCE, Var.toString(Double.valueOf(event.getBalance()), "0"));
        }
    }

    @Override
    public boolean onNavigationItemSelected(@NotNull MenuItem item) {
        Intrinsics.checkNotNullParameter(item, "item");
        if (getToolbar() != null) {
            VpAdapter vpAdapter = null;
            if (item.getItemId() == R.id.menu_home) {
                getToolbar().setVisibility(8);
                SwipeDisabledViewPager swipeDisabledViewPager = this.viewPager;
                if (swipeDisabledViewPager == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                    swipeDisabledViewPager = null;
                }
                swipeDisabledViewPager.setCurrentItem(0);
                VpAdapter vpAdapter2 = this.adapter;
                if (vpAdapter2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("adapter");
                } else {
                    vpAdapter = vpAdapter2;
                }
                EventHelper.sendAllEvents(this, "screen_view", K(vpAdapter.getItem(0)));
                T();
                return true;
            }
            if (item.getItemId() == R.id.menu_history) {
                Bundle bundle = new Bundle();
                bundle.putByte(ReportingActivity.REPORT_MODE_TAG, (byte) 2);
                Affinity.launch(this, TransactionReportNewActivity.class, bundle);
                String simpleName = TransactionReportNewActivity.class.getSimpleName();
                Intrinsics.checkNotNullExpressionValue(simpleName, "TransactionReportNewActi…ty::class.java.simpleName");
                EventHelper.sendAllEvents(this, "screen_view", CASE_INSENSITIVE_ORDER.replace$default(simpleName, "Activity", "", false, 4, (Object) null));
                return false;
            }
            if (item.getItemId() == R.id.menu_scan) {
                item.setChecked(true);
                Affinity.launch(this, QRScanner2Activity.class);
                String simpleName2 = QRScanner2Activity.class.getSimpleName();
                Intrinsics.checkNotNullExpressionValue(simpleName2, "QRScanner2Activity::class.java.simpleName");
                EventHelper.sendAllEvents(this, "screen_view", CASE_INSENSITIVE_ORDER.replace$default(simpleName2, "Activity", "", false, 4, (Object) null));
                return false;
            }
            if (item.getItemId() == R.id.menu_chat) {
                Affinity.launch(this, LiveChatActivity.class);
                String simpleName3 = LiveChatActivity.class.getSimpleName();
                Intrinsics.checkNotNullExpressionValue(simpleName3, "LiveChatActivity::class.java.simpleName");
                EventHelper.sendAllEvents(this, "screen_view", CASE_INSENSITIVE_ORDER.replace$default(simpleName3, "Activity", "", false, 4, (Object) null));
                return false;
            }
            if (item.getItemId() == R.id.menu_profile) {
                getToolbar().setVisibility(8);
                SwipeDisabledViewPager swipeDisabledViewPager2 = this.viewPager;
                if (swipeDisabledViewPager2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("viewPager");
                    swipeDisabledViewPager2 = null;
                }
                swipeDisabledViewPager2.setCurrentItem(4);
                VpAdapter vpAdapter3 = this.adapter;
                if (vpAdapter3 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("adapter");
                } else {
                    vpAdapter = vpAdapter3;
                }
                EventHelper.sendAllEvents(this, "screen_view", K(vpAdapter.getItem(2)));
                return true;
            }
        }
        return false;
    }

    @Override
    public void onResume() {
        AppUpdateInfo appUpdateInfo;
        super.onResume();
        if (this.appUpdateManager == null || this.installStateUpdatedListener == null || (appUpdateInfo = this.appUpdateInfo) == null) {
            return;
        }
        Intrinsics.checkNotNull(appUpdateInfo);
        startUpdateAfterCheckSukses(appUpdateInfo);
    }

    @Override
    public void onStart() {
        super.onStart();
        if (EventBus.getDefault().isRegistered(this)) {
            return;
        }
        EventBus.getDefault().register(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        EventBus.getDefault().unregister(this);
    }

    public final void startUpdateAfterCheckSukses(@NotNull AppUpdateInfo appUpdateInfo) {
        AppUpdateManager appUpdateManager;
        Intrinsics.checkNotNullParameter(appUpdateInfo, "appUpdateInfo");
        if (appUpdateInfo.updateAvailability() != 2) {
            if (appUpdateInfo.updateAvailability() == 3) {
                Y(appUpdateInfo);
                return;
            } else {
                if (appUpdateInfo.installStatus() != 11 || (appUpdateManager = this.appUpdateManager) == null) {
                    return;
                }
                appUpdateManager.completeUpdate();
                return;
            }
        }
        if (appUpdateInfo.availableVersionCode() > 0) {
            if (appUpdateInfo.availableVersionCode() - 482 <= 5) {
                X(appUpdateInfo);
            } else if (482 < appUpdateInfo.availableVersionCode()) {
                Y(appUpdateInfo);
            }
        }
    }

    public final void updatePrivilegedContent() {
        MenuConfig.getListSidebarMenu(this);
    }

    @Override
    public void onSuccess(@Nullable AppUpdateInfo p0) {
        AppUpdateInfo appUpdateInfo = this.appUpdateInfo;
        if (appUpdateInfo != null) {
            startUpdateAfterCheckSukses(appUpdateInfo);
        }
    }
}