导航菜单

页面标题

页面副标题

RummyCircle v11000.89 - PlaceholderActivity.java 源代码

正在查看: RummyCircle v11000.89 应用的 PlaceholderActivity.java JAVA 源代码文件

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


package com.games24x7.onboarding.placeholder.ui;

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import androidx.activity.t;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.c;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.b;
import androidx.core.view.G0;
import androidx.core.view.j0;
import androidx.lifecycle.p;
import com.games24x7.coregame.KrakenApplication;
import com.games24x7.coregame.common.deeplink.util.NativeUtil;
import com.games24x7.coregame.common.deeplink.util.PreferenceManager;
import com.games24x7.coregame.common.utility.Constants;
import com.games24x7.coregame.common.utility.attributions.controller.AttributionController;
import com.games24x7.coregame.common.utility.attributions.factory.AttributionProviderFactory;
import com.games24x7.coregame.common.utility.crashlytics.CrashlyticsUtility;
import com.games24x7.coregame.common.utility.log.Logger;
import com.games24x7.onboarding.R;
import com.games24x7.onboarding.R$color;
import com.games24x7.onboarding.R$drawable;
import com.games24x7.onboarding.R$id;
import com.games24x7.onboarding.R$layout;
import com.games24x7.onboarding.splash.ui.SplashActivity;
import com.google.android.material.snackbar.Snackbar;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.e;
import kotlin.f;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineStart;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class PlaceholderActivity extends AppCompatActivity {

    @NotNull
    public static final Companion Companion = new Companion(null);

    @NotNull
    public static final String TAG = "PlacholderActivity";
    private boolean isResourceNotFound;
    private ConstraintLayout parentLayout;

    @NotNull
    private final e placeholderViewModel$delegate = f.b(new PlaceholderActivity$placeholderViewModel$2(this));

    @NotNull
    private AtomicBoolean splashTransitionIsInProgress = new AtomicBoolean(false);

    @Metadata
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }
    }

    private final void decideNavigation(String str) {
        if (!Intrinsics.a(str, "SUCCESS")) {
            showABFetchError();
            return;
        }
        Intent intent = getIntent();
        Intrinsics.checkNotNullExpressionValue(intent, "intent");
        launchSplash(intent);
    }

    public final PlaceholderViewModel getPlaceholderViewModel() {
        return (PlaceholderViewModel) this.placeholderViewModel$delegate.getValue();
    }

    private final boolean isResourceAvailable() {
        if (getResources().getIdentifier("rummy_image", "drawable", getPackageName()) != 0) {
            return true;
        }
        showAppNotSupportedDialog();
        CrashlyticsUtility.INSTANCE.logError("PlaceHolderActivity :: rummy_image not found in the resources...");
        return false;
    }

    private final void launchSplash(final Intent intent) {
        Logger.d$default(Logger.INSTANCE, TAG, "launchSplash 1", false, 4, (Object) null);
        runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                PlaceholderActivity.launchSplash$lambda$7(PlaceholderActivity.this, intent);
            }
        });
    }

    public static final void launchSplash$lambda$7(PlaceholderActivity placeholderActivity, Intent intent) {
        Intrinsics.checkNotNullParameter(placeholderActivity, "this$0");
        Intrinsics.checkNotNullParameter(intent, "$placeholderIntent");
        if (placeholderActivity.isResourceNotFound || placeholderActivity.splashTransitionIsInProgress.get()) {
            return;
        }
        Logger.d$default(Logger.INSTANCE, TAG, "launchSplash 2", false, 4, (Object) null);
        placeholderActivity.splashTransitionIsInProgress.set(true);
        Intent intent2 = new Intent((Context) placeholderActivity, (Class<?>) SplashActivity.class);
        Bundle extras = intent.getExtras();
        if (extras != null) {
            intent2.putExtras(extras);
        }
        NativeUtil nativeUtil = NativeUtil.INSTANCE;
        PreferenceManager.Companion companion = PreferenceManager.Companion;
        PreferenceManager companion2 = companion.getInstance();
        Constants.RedesignLobby.RedesignLobbyOrientations redesignLobbyOrientations = Constants.RedesignLobby.RedesignLobbyOrientations.DEFAULT;
        nativeUtil.setRedesignLobbyOrientationRuntimeVar(companion2.getRedesignLobbyOrientationSP(redesignLobbyOrientations.getOrientationString()));
        companion.getInstance().setRedesignLobbyOrientationSP(redesignLobbyOrientations.getOrientationString());
        placeholderActivity.startActivity(intent2);
        placeholderActivity.getPlaceholderViewModel().placeholderDSCancelModuleResponseFlowJob();
        placeholderActivity.finishAffinity();
    }

    private final void setInstallTimeAndStoreToNAE() {
        long j = getPackageManager().getPackageInfo(getPackageName(), 0).firstInstallTime;
        NativeUtil nativeUtil = NativeUtil.INSTANCE;
        String installerInfo = nativeUtil.getInstallerInfo(this);
        String deviceArchitecture = nativeUtil.getDeviceArchitecture();
        String[] strArr = Build.SUPPORTED_32_BIT_ABIS;
        Intrinsics.checkNotNullExpressionValue(strArr, "SUPPORTED_32_BIT_ABIS");
        boolean z = !(strArr.length == 0);
        String[] strArr2 = Build.SUPPORTED_64_BIT_ABIS;
        Intrinsics.checkNotNullExpressionValue(strArr2, "SUPPORTED_64_BIT_ABIS");
        boolean z2 = !(strArr2.length == 0);
        Logger.e$default(Logger.INSTANCE, TAG, "setInstallTimeAndStoreToNAE :: Device Arch :: " + deviceArchitecture + " :: Device 32bit OS Arch :: " + z + " :: Device 64bit OS Arch :: " + z2, false, 4, (Object) null);
        CrashlyticsUtility crashlyticsUtility = CrashlyticsUtility.INSTANCE;
        StringBuilder sb = new StringBuilder("Installer details: Install Time :: ");
        sb.append(j);
        crashlyticsUtility.logError(sb.toString());
        crashlyticsUtility.logError("Installer Details: Install via " + (Build.VERSION.SDK_INT >= 30 ? "GetInstallSourceInfo" : "getInstallerPackageName") + " :: " + installerInfo);
        AttributionController createInstance = AttributionProviderFactory.Companion.createInstance(KrakenApplication.Companion.getApplicationContext(), "nae");
        createInstance.setPersistantParam("app_install_time", String.valueOf(j));
        createInstance.setPersistantParam("device_arch_info", deviceArchitecture);
        createInstance.setPersistantParam("device_os_32_bit_supported", String.valueOf(z));
        createInstance.setPersistantParam("device_os_64_bit_supported", String.valueOf(z2));
        if (installerInfo != null) {
            createInstance.setPersistantParam("install_store_name", installerInfo);
        }
    }

    private final void showABFetchError() {
        Logger.d$default(Logger.INSTANCE, TAG, "showError", false, 4, (Object) null);
        runOnUiThread(new c(this));
    }

    public static final void showABFetchError$lambda$4(PlaceholderActivity placeholderActivity) {
        Intrinsics.checkNotNullParameter(placeholderActivity, "this$0");
        Toast.makeText(placeholderActivity.getApplicationContext(), R.string.retry_message, 0).show();
        Snackbar j = Snackbar.j(placeholderActivity.findViewById(R$id.parentLayout), R.string.api_error, -2);
        j.l(R.string.connection_action, new ConnectionRetryListener(placeholderActivity, true));
        j.p();
    }

    private final void showAppNotSupportedDialog() {
        this.isResourceNotFound = true;
        c.a aVar = new c.a(this);
        aVar.c(R.string.app_not_supported_title);
        aVar.b(R.string.app_not_supported_message);
        c.a positiveButton = aVar.setPositiveButton(android.R.string.ok, new a(this));
        positiveButton.a();
        c.a negativeButton = positiveButton.setNegativeButton(android.R.string.cancel, new b(this));
        if (isFinishing()) {
            return;
        }
        negativeButton.d();
    }

    public static final void showAppNotSupportedDialog$lambda$0(PlaceholderActivity placeholderActivity, DialogInterface dialogInterface, int i) {
        Intrinsics.checkNotNullParameter(placeholderActivity, "this$0");
        NativeUtil.redirectUserToPlayStore$default(NativeUtil.INSTANCE, "com.games24x7.rummycircle.rummy", false, (String) null, 6, (Object) null);
        placeholderActivity.finish();
    }

    public static final void showAppNotSupportedDialog$lambda$1(PlaceholderActivity placeholderActivity, DialogInterface dialogInterface, int i) {
        Intrinsics.checkNotNullParameter(placeholderActivity, "this$0");
        placeholderActivity.finish();
    }

    private final void showFullScreen() {
        j0.a(getWindow(), false);
        G0 g0 = new G0(getWindow(), getWindow().getDecorView());
        getWindow().getDecorView().setBackgroundColor(b.b(getWindow().getContext(), R$color.black));
        g0.a(7);
        g0.d();
        g0.c(false);
        g0.b(false);
    }

    public final void showNetworkError() {
        Logger.d$default(Logger.INSTANCE, TAG, "showNetworkError", false, 4, (Object) null);
        runOnUiThread(new com.games24x7.onboarding.common.webview.c(this, 1));
    }

    public static final void showNetworkError$lambda$5(PlaceholderActivity placeholderActivity) {
        Intrinsics.checkNotNullParameter(placeholderActivity, "this$0");
        Snackbar j = Snackbar.j(placeholderActivity.findViewById(R$id.parentLayout), R.string.connection_error, -2);
        j.l(R.string.connection_action, new ConnectionRetryListener(placeholderActivity, true));
        j.p();
    }

    public void onBackPressed() {
        finishAffinity();
        System.exit(0);
    }

    public void onCreate(Bundle bundle) {
        t.a(this);
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        Log.d("Performance testing", "PlaceholderActivity launch");
        try {
            if (getResources().getDrawableForDensity(R$drawable.rummy_image, getResources().getDisplayMetrics().densityDpi, null) == null) {
                Logger.e$default(Logger.INSTANCE, TAG, "onCreate :: App density not supported...", false, 4, (Object) null);
                showAppNotSupportedDialog();
            } else {
                setContentView(R$layout.activity_placeholder);
                showFullScreen();
                getPlaceholderViewModel().onViewCreate(this);
            }
        } catch (Resources.NotFoundException e) {
            e.printStackTrace();
            Log.e(TAG, "onCreate :: App density not supported...");
            showAppNotSupportedDialog();
        }
    }

    public void onResume() {
        super/*androidx.fragment.app.FragmentActivity*/.onResume();
        BuildersKt.launch$default(p.a(this), (CoroutineContext) null, (CoroutineStart) null, new PlaceholderActivity$onResume$1(this, null), 3, (Object) null);
    }

    public void onStart() {
        super.onStart();
    }

    public void onWindowFocusChanged(boolean z) {
        super/*android.app.Activity*/.onWindowFocusChanged(z);
        Logger.d$default(Logger.INSTANCE, TAG, "onWindowFocusChanged:: " + z, false, 4, (Object) null);
        if (!z || this.splashTransitionIsInProgress.get()) {
            return;
        }
        FirebaseCrashlytics.getInstance().log("onWindowFocusChanged:: Placeholder");
        Intent intent = getIntent();
        Intrinsics.checkNotNullExpressionValue(intent, "intent");
        decideNavigation(intent);
    }

    public final void decideNavigation(Intent intent) {
        Logger.d$default(Logger.INSTANCE, TAG, "decideNavigation", false, 4, (Object) null);
        launchSplash(intent);
    }
}