导航菜单

页面标题

页面副标题

Oolka v2.4.42 - HVRetakeActivity.java 源代码

正在查看: Oolka v2.4.42 应用的 HVRetakeActivity.java JAVA 源代码文件

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


package co.hyperverge.hypersnapsdk.activities;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.text.Spanned;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.widget.ContentLoadingProgressBar;
import co.hyperverge.hypersnapsdk.HyperSnapSDK;
import co.hyperverge.hypersnapsdk.R;
import co.hyperverge.hypersnapsdk.helpers.CustomTextStringConst;
import co.hyperverge.hypersnapsdk.helpers.FileHelper;
import co.hyperverge.hypersnapsdk.helpers.SDKInternalConfig;
import co.hyperverge.hypersnapsdk.helpers.TimingUtils;
import co.hyperverge.hypersnapsdk.listeners.PermDialogCallback;
import co.hyperverge.hypersnapsdk.model.HVJSONObject;
import co.hyperverge.hypersnapsdk.objects.HVBaseConfig;
import co.hyperverge.hypersnapsdk.objects.HVDocConfig;
import co.hyperverge.hypersnapsdk.objects.HVError;
import co.hyperverge.hypersnapsdk.objects.HVFaceConfig;
import co.hyperverge.hypersnapsdk.utils.HVLogUtils;
import co.hyperverge.hypersnapsdk.utils.HyperSnapUIConfigUtil;
import co.hyperverge.hypersnapsdk.utils.PDFUtils;
import co.hyperverge.hypersnapsdk.utils.StringUtils;
import co.hyperverge.hypersnapsdk.utils.TextConfigUtils;
import co.hyperverge.hypersnapsdk.utils.UIUtils;
import co.hyperverge.hypersnapsdk.utils.Utils;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.io.File;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;

public class HVRetakeActivity extends HVBaseActivity {
    public static final String ASPECT_RATIO_TAG = "aspectRatio";
    public static final String CALLING_ACTIVITY_TAG = "callingActivity";
    public static final int CLOSE_ACTION = 20;
    public static final String CONFIG_TAG = "config";
    public static final String DOC_CALLING_ACTIVITY_VALUE = "Doc";
    public static final int ERROR_ACTION = 18;
    public static final String EXTRA_PADDING_TAG = "extraPadding";
    public static final String FACE_CALLING_ACTIVITY_VALUE = "Face";
    public static final String FACE_TAG = "face";
    public static final String IMAGE_URI_TAG = "imageUri";
    public static final String RADIUS_TAG = "radius";
    public static final int RECHECK_ACTION = 21;
    public static final String RETRY_MESSAGE_TAG = "retryMessage";
    public static final String SET_PADDING_TAG = "setPadding";
    private float aspectRatio;
    private String bitmapNullErrorString;
    private String callingActivity;
    private ContentLoadingProgressBar clProgressBar;
    private HVBaseConfig config;
    private CardView cvPdfPageSwitcher;
    private ImageView errorPlaceHolderImageView;
    private FloatingActionButton fabNext;
    private FloatingActionButton fabPrevious;
    private int height;
    private ImageView ivBack;
    private double padding;
    private int radius;
    private MaterialButton retakeButton;
    private String retryMessage;
    private ImageView reviewImage;
    private TextView tvError;
    private TextView tvPage;
    private TextView tvTitle;
    private int width;
    private final String TAG = getClass().getSimpleName();
    private final TimingUtils retakeScreenOpenedTimingUtils = new TimingUtils();
    private final TimingUtils retakeButtonClickTimingUtils = new TimingUtils();
    private String filePath = "";
    private boolean isShouldSetPadding = false;
    private final ExecutorService executorService = Executors.newSingleThreadExecutor();

    private String capitalize(String str) {
        HVLogUtils.d(this.TAG, "capitalize() called with: capString = [" + str + "]");
        return Character.toUpperCase(str.charAt(0)) + str.substring(1);
    }

    private void findViews() {
        HVLogUtils.d(this.TAG, "findViews() called");
        this.reviewImage = (ImageView) findViewById(R.id.review_image);
        this.errorPlaceHolderImageView = (ImageView) findViewById(R.id.review_file_upload_error_image_view);
        this.tvTitle = (TextView) findViewById(R.id.title_text);
        MaterialButton findViewById = findViewById(R.id.btnRetake);
        this.retakeButton = findViewById;
        findViewById.setEnabled(true);
        ImageView imageView = (ImageView) findViewById(R.id.ivBack);
        this.ivBack = imageView;
        imageView.setEnabled(true);
        this.tvError = (TextView) findViewById(R.id.tvError);
        View.OnClickListener onClickListener = new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HVRetakeActivity.this.lambda$findViews$0(view);
            }
        };
        this.retakeButton.setOnClickListener(onClickListener);
        this.ivBack.setOnClickListener(onClickListener);
        this.cvPdfPageSwitcher = findViewById(R.id.cvPdfPageSwitcher);
        this.fabPrevious = findViewById(R.id.fabPrevious);
        this.fabNext = findViewById(R.id.fabNext);
        this.tvPage = (TextView) findViewById(R.id.tvPage);
        this.clProgressBar = findViewById(R.id.clProgressBar);
    }

    public void lambda$findViews$0(View view) {
        long longValue = this.retakeButtonClickTimingUtils.getTimeDifferenceLong().longValue();
        if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE)) {
            if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenRetakeButtonClicked((HVFaceConfig) this.config, longValue);
            }
            if (HyperSnapSDK.getInstance().getHyperSnapSDKConfig().isShouldUseSensorBiometrics()) {
                SDKInternalConfig.getInstance().getHvSensorBiometrics().updateSensorDataEvents(System.currentTimeMillis(), "selfieRetakeClicked");
            }
            if (HyperSnapSDK.getInstance().getHyperSnapSDKConfig().isShouldUseSensorBiometrics() && SDKInternalConfig.getInstance().getHvSensorBiometrics() != null) {
                SDKInternalConfig.getInstance().getHvSensorBiometrics().updateSensorDataEvents(System.currentTimeMillis(), "selfieRetakeClicked");
            }
        }
        if (this.callingActivity.contains(DOC_CALLING_ACTIVITY_VALUE) && SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
            SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenRetakeButtonClicked((HVDocConfig) this.config, longValue);
        }
        onBackPressed();
    }

    public void lambda$loadPdfBitmaps$3(AtomicInteger atomicInteger, List list, View view) {
        int i = atomicInteger.get();
        if (i > 0) {
            i = atomicInteger.decrementAndGet();
            setReviewImageBitmap((Bitmap) list.get(i));
            this.tvPage.setText(String.format(getString(R.string.hv_pdf_page_count), Integer.valueOf(i + 1), Integer.valueOf(list.size())));
        }
        boolean z = false;
        this.fabPrevious.setEnabled(i != 0 && list.size() > 1);
        FloatingActionButton floatingActionButton = this.fabNext;
        if (i != list.size() - 1 && list.size() > 1) {
            z = true;
        }
        floatingActionButton.setEnabled(z);
    }

    public void lambda$loadPdfBitmaps$4(AtomicInteger atomicInteger, List list, View view) {
        int i = atomicInteger.get();
        if (i < list.size() - 1) {
            i = atomicInteger.incrementAndGet();
            setReviewImageBitmap((Bitmap) list.get(i));
            this.tvPage.setText(String.format(getString(R.string.hv_pdf_page_count), Integer.valueOf(i + 1), Integer.valueOf(list.size())));
        }
        this.fabPrevious.setEnabled(i != 0 && list.size() > 1);
        this.fabNext.setEnabled(i != list.size() - 1 && list.size() > 1);
    }

    public void lambda$loadReviewImage$1(List list) {
        showProgress(false);
        loadPdfBitmaps(list);
    }

    public void lambda$loadReviewImage$2(File file) {
        final List<Bitmap> asBitmaps = PDFUtils.asBitmaps(file);
        runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                HVRetakeActivity.this.lambda$loadReviewImage$1(asBitmaps);
            }
        });
    }

    private void loadPdfBitmaps(final List<Bitmap> list) {
        HVLogUtils.d(this.TAG, "loadPdfBitmaps() called with: pdfBitmaps = [" + list + "]");
        if (list.isEmpty()) {
            setReviewImageBitmap(null);
            return;
        }
        final AtomicInteger atomicInteger = new AtomicInteger(0);
        if (list.size() > 1) {
            this.cvPdfPageSwitcher.setVisibility(0);
        }
        setReviewImageBitmap(list.get(atomicInteger.get()));
        this.tvPage.setText(String.format(getString(R.string.hv_pdf_page_count), Integer.valueOf(atomicInteger.get() + 1), Integer.valueOf(list.size())));
        this.fabPrevious.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HVRetakeActivity.this.lambda$loadPdfBitmaps$3(atomicInteger, list, view);
            }
        });
        this.fabNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                HVRetakeActivity.this.lambda$loadPdfBitmaps$4(atomicInteger, list, view);
            }
        });
    }

    private void onError(HVError hVError) {
        HVLogUtils.d(this.TAG, "onError() called with: error = [" + hVError + "]");
        Intent intent = new Intent();
        intent.putExtra("hvError", hVError);
        setResult(18, intent);
        finish();
    }

    private void setReviewImageBitmap(Bitmap bitmap) {
        HVLogUtils.d(this.TAG, "setReviewImageBitmap() called with: bitmap = [" + bitmap + "]");
        if (bitmap == null) {
            this.reviewImage.setVisibility(4);
            this.errorPlaceHolderImageView.setVisibility(0);
        } else {
            this.reviewImage.setVisibility(0);
            this.errorPlaceHolderImageView.setVisibility(4);
        }
        this.reviewImage.setImageBitmap(bitmap);
        adjustTitleText();
    }

    private void setTypefaces() {
        HVLogUtils.d(this.TAG, "setTypefaces() called");
        try {
            if (this.config.getErrorReviewScreenTitleTypeface() > 0) {
                this.tvTitle.setTypeface(ResourcesCompat.h(getApplicationContext(), this.config.getErrorReviewScreenTitleTypeface()));
            }
            this.config.getErrorReviewScreenDescTypeface();
            if (this.config.getErroReviewScreenRetakeButtonTypeface() > 0) {
                this.retakeButton.setTypeface(ResourcesCompat.h(getApplicationContext(), this.config.getErroReviewScreenRetakeButtonTypeface()));
            }
        } catch (Exception e) {
            HVLogUtils.e(this.TAG, "setTypefaces(): exception = [" + Utils.getErrorMessage(e) + "]", e);
            Utils.getErrorMessage(e);
            HVError hVError = new HVError(2, Utils.getErrorMessage(e));
            if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE) && SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenLoadFailure(hVError);
            }
            if (this.callingActivity.contains(DOC_CALLING_ACTIVITY_VALUE) && SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenLoadFailure(hVError);
            }
            if (SDKInternalConfig.getInstance().getErrorMonitoringService() != null) {
                SDKInternalConfig.getInstance().getErrorMonitoringService().sendErrorMessage(e);
            }
        }
    }

    private void showProgress(boolean z) {
        HVLogUtils.d(this.TAG, "showProgress() called with: show = [" + z + "]");
        this.clProgressBar.setVisibility(z ? 0 : 8);
        this.ivBack.setVisibility(z ? 4 : 0);
        this.retakeButton.setVisibility(z ? 4 : 0);
    }

    public void adjustDescText() {
        HVLogUtils.d(this.TAG, "adjustDescText() called");
        try {
            HyperSnapUIConfigUtil.getInstance().customiseTitleTextView(this.tvTitle);
            HyperSnapUIConfigUtil.getInstance().customisePrimaryButton(this.retakeButton);
            HyperSnapUIConfigUtil.getInstance().customiseRetakeMessageTextView(this.tvError);
            HyperSnapUIConfigUtil.getInstance().customiseClientLogo((ImageView) findViewById(R.id.clientLogo));
            String str = this.retryMessage;
            if (str != null) {
                this.tvError.setText(StringUtils.getHTML(capitalize(str)));
            }
        } catch (Exception e) {
            HVLogUtils.e(this.TAG, "adjustDescText(): exception = [" + Utils.getErrorMessage(e) + "]", e);
            Utils.getErrorMessage(e);
            HVError hVError = new HVError(2, Utils.getErrorMessage(e));
            if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE) && SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenLoadFailure(hVError);
            }
            if (this.callingActivity.contains(DOC_CALLING_ACTIVITY_VALUE) && SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenLoadFailure(hVError);
            }
            if (SDKInternalConfig.getInstance().getErrorMonitoringService() != null) {
                SDKInternalConfig.getInstance().getErrorMonitoringService().sendErrorMessage(e);
            }
        }
    }

    public void adjustTitleText() {
        HVLogUtils.d(this.TAG, "adjustTitleText() called");
        boolean z = this.config instanceof HVFaceConfig;
    }

    @Override
    public void lambda$checkAndWaitForRemoteConfig$0() {
        super.lambda$checkAndWaitForRemoteConfig$0();
    }

    @Override
    public HVBaseConfig getBaseConfig() {
        return this.config;
    }

    @Override
    public void handleCloseAction() {
        super.handleCloseAction();
    }

    public void loadReviewImage() {
        Bitmap roundedCornerBitmap;
        HVLogUtils.d(this.TAG, "loadReviewImage() called");
        try {
            final File file = new File(this.filePath);
            if (Objects.equals(Utils.extractFileExtension(file.getPath()), "pdf")) {
                showProgress(true);
                this.executorService.submit(new Runnable() {
                    @Override
                    public final void run() {
                        HVRetakeActivity.this.lambda$loadReviewImage$2(file);
                    }
                });
                return;
            }
            Bitmap processBitmap = FileHelper.processBitmap(this.filePath);
            if (processBitmap != null) {
                if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE)) {
                    roundedCornerBitmap = UIUtils.getCircularCroppedBitmap(processBitmap, Integer.valueOf(this.radius));
                } else {
                    roundedCornerBitmap = UIUtils.getRoundedCornerBitmap(this, processBitmap, this.padding, this.aspectRatio, UIUtils.dpToPx(this, 5.0f), this.isShouldSetPadding);
                    ((RelativeLayout.LayoutParams) this.reviewImage.getLayoutParams()).addRule(13);
                }
                this.reviewImage.getLayoutParams().height = -2;
                this.reviewImage.setAdjustViewBounds(true);
                this.reviewImage.requestLayout();
                this.reviewImage.setScaleType(ImageView.ScaleType.FIT_CENTER);
                if (roundedCornerBitmap == null) {
                    onError(new HVError(2, this.bitmapNullErrorString));
                } else {
                    this.reviewImage.setImageBitmap(roundedCornerBitmap);
                }
            }
        } catch (Exception e) {
            HVLogUtils.e(this.TAG, "adjustDescText(): exception = [" + Utils.getErrorMessage(e) + "]", e);
            Utils.getErrorMessage(e);
            if (SDKInternalConfig.getInstance().getErrorMonitoringService() != null) {
                SDKInternalConfig.getInstance().getErrorMonitoringService().sendErrorMessage(e);
            }
            setReviewImageBitmap(null);
        }
    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
    }

    @Override
    public void onCloseActivity() {
        HVLogUtils.d(this.TAG, "onCloseActivity() called");
        retakePicture();
        if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser()) {
            if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE)) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenBackPressed();
            } else if (this.callingActivity.contains(DOC_CALLING_ACTIVITY_VALUE)) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenBackPressed();
            }
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        HVLogUtils.d(this.TAG, "onCreate() called with: savedInstanceState = [" + bundle + "]");
        this.retakeScreenOpenedTimingUtils.init();
        setContentView(R.layout.hv_activity_retake);
        if (bundle != null) {
            HVLogUtils.d(this.TAG, "onCreate() savedInstance is not null, finishing activity");
            finish();
            return;
        }
        findViews();
        if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser() && SDKInternalConfig.getInstance().getAnalyticsTrackerService() != null) {
            SDKInternalConfig.getInstance().getAnalyticsTrackerService().logIdCaptureReviewScreenLaunched();
        }
        Intent intent = getIntent();
        this.filePath = intent.getStringExtra(IMAGE_URI_TAG);
        if (intent.hasExtra(EXTRA_PADDING_TAG)) {
            this.padding = intent.getDoubleExtra(EXTRA_PADDING_TAG, 0.0d);
        }
        if (intent.hasExtra(SET_PADDING_TAG)) {
            this.isShouldSetPadding = intent.getBooleanExtra(SET_PADDING_TAG, false);
        }
        if (intent.hasExtra(ASPECT_RATIO_TAG)) {
            this.aspectRatio = intent.getFloatExtra(ASPECT_RATIO_TAG, 0.0f);
        }
        if (intent.hasExtra(FACE_CALLING_ACTIVITY_VALUE)) {
            intent.getBooleanExtra(FACE_CALLING_ACTIVITY_VALUE, false);
        }
        if (intent.hasExtra(RADIUS_TAG)) {
            this.radius = intent.getIntExtra(RADIUS_TAG, 0);
        }
        this.config = (HVBaseConfig) intent.getSerializableExtra("config");
        if (intent.hasExtra(RETRY_MESSAGE_TAG)) {
            this.retryMessage = intent.getStringExtra(RETRY_MESSAGE_TAG);
        }
        if (intent.hasExtra(CALLING_ACTIVITY_TAG)) {
            this.callingActivity = intent.getStringExtra(CALLING_ACTIVITY_TAG);
        }
        setTypefaces();
        HVJSONObject hVJSONObject = null;
        setupBranding(null);
        adjustDescText();
        if (this.config instanceof HVDocConfig) {
            adjustTitleText();
        }
        try {
            HVBaseConfig hVBaseConfig = this.config;
            if (hVBaseConfig instanceof HVDocConfig) {
                hVJSONObject = ((HVDocConfig) hVBaseConfig).getCustomUIStrings();
            } else if (hVBaseConfig instanceof HVFaceConfig) {
                hVJSONObject = ((HVFaceConfig) hVBaseConfig).getCustomUIStrings();
            }
        } catch (Exception e) {
            HVLogUtils.e(this.TAG, "onCreate(): exception = [" + Utils.getErrorMessage(e) + "]", e);
            Utils.getErrorMessage(e);
            if (SDKInternalConfig.getInstance().getErrorMonitoringService() != null) {
                SDKInternalConfig.getInstance().getErrorMonitoringService().sendErrorMessage(e);
            }
        }
        long longValue = this.retakeScreenOpenedTimingUtils.getTimeDifferenceLong().longValue();
        if (this.callingActivity.contains(FACE_CALLING_ACTIVITY_VALUE)) {
            this.bitmapNullErrorString = "Error while processing the face image";
            if (this.config.getErrorReviewTitle() == null || this.config.getErrorReviewTitle().isEmpty()) {
                Spanned text = TextConfigUtils.getText(hVJSONObject, CustomTextStringConst.FaceCaptureTextConfigs.FACE_RETAKE_TITLE, CustomTextStringConst.FaceCaptureTextConfigs.TEXT_CONFIG_FACE_RETAKE_TITLE);
                if (text != null) {
                    this.tvTitle.setText(text);
                }
            } else {
                this.tvTitle.setText(this.config.getErrorReviewTitle());
            }
            if (this.config.getErrorReviewRetakeButton() == null || this.config.getErrorReviewRetakeButton().isEmpty()) {
                Spanned text2 = TextConfigUtils.getText(hVJSONObject, CustomTextStringConst.FaceCaptureTextConfigs.FACE_RETAKE_BUTTON, CustomTextStringConst.FaceCaptureTextConfigs.TEXT_CONFIG_FACE_RETAKE_BUTTON);
                if (text2 != null) {
                    this.retakeButton.setText(text2);
                }
            } else {
                this.retakeButton.setText(this.config.getErrorReviewRetakeButton());
            }
            if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser() && SDKInternalConfig.getInstance().getAnalyticsTrackerService() != null) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenLoadSuccess(longValue);
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logSelfieRetakeScreenLaunched();
            }
        }
        if (this.callingActivity.contains(DOC_CALLING_ACTIVITY_VALUE)) {
            this.bitmapNullErrorString = "Error while processing the document";
            if (this.config.getErrorReviewTitle() == null || this.config.getErrorReviewTitle().isEmpty()) {
                Spanned text3 = TextConfigUtils.getText(hVJSONObject, CustomTextStringConst.DocCaptureTextConfigs.DOC_RETAKE_TITLE, CustomTextStringConst.DocCaptureTextConfigs.TEXT_CONFIG_DOC_RETAKE_TITLE);
                if (text3 != null) {
                    this.tvTitle.setText(text3);
                }
            } else {
                this.tvTitle.setText(this.config.getErrorReviewTitle());
            }
            if (this.config.getErrorReviewRetakeButton() == null || this.config.getErrorReviewRetakeButton().isEmpty()) {
                Spanned text4 = TextConfigUtils.getText(hVJSONObject, CustomTextStringConst.DocCaptureTextConfigs.DOC_RETAKE_BUTTON, CustomTextStringConst.DocCaptureTextConfigs.TEXT_CONFIG_DOC_RETAKE_BUTTON);
                if (text4 != null) {
                    this.retakeButton.setText(text4);
                }
            } else {
                this.retakeButton.setText(this.config.getErrorReviewRetakeButton());
            }
            if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser() && SDKInternalConfig.getInstance().getAnalyticsTrackerService() != null) {
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenLoadSuccess(longValue);
                SDKInternalConfig.getInstance().getAnalyticsTrackerService(getApplicationContext()).logDocumentRetakeScreenLaunched();
            }
        }
        this.retakeButtonClickTimingUtils.init();
    }

    @Override
    public void onRemoteConfigFetchDone() {
        HVLogUtils.d(this.TAG, "onRemoteConfigFetchDone() called");
    }

    @Override
    public void onResume() {
        super.onResume();
        HVLogUtils.d(this.TAG, "onResume() called");
        loadReviewImage();
    }

    public void onSaveInstanceState(Bundle bundle) {
        super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
        HVLogUtils.d(this.TAG, "onSaveInstanceState() called with: outState = [" + bundle + "]");
    }

    @Override
    public boolean onSupportNavigateUp() {
        return super.onSupportNavigateUp();
    }

    public void retakePicture() {
        HVLogUtils.d(this.TAG, "retakePicture() called");
        if (SDKInternalConfig.getInstance().isShouldLogAnalyticsForThisUser() && SDKInternalConfig.getInstance().getAnalyticsTrackerService() != null) {
            SDKInternalConfig.getInstance().getAnalyticsTrackerService().logIdCaptureReviewScreenRetake();
        }
        setResult(21);
        finish();
    }

    @Override
    public boolean shouldAllowActivityClose() {
        return true;
    }

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

    @Override
    public void showCameraPermissionBS(Spanned spanned, Spanned spanned2, Spanned spanned3, PermDialogCallback permDialogCallback) {
        super.showCameraPermissionBS(spanned, spanned2, spanned3, permDialogCallback);
    }

    @Override
    public Context updateBaseContextLocale(Context context) {
        return super.updateBaseContextLocale(context);
    }
}