package ca.canadapost.core.common.ui;

import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.view.h0;
import androidx.core.view.h1;
import androidx.core.view.s0;
import ca.canadapost.core.common.ui.CpcBarCodeScannerActivity;
import com.journeyapps.barcodescanner.CaptureActivity;
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
import d9.f;
import h7.i;
import nm.e;

/* loaded from: classes.dex */
public class CpcBarCodeScannerActivity extends CaptureActivity implements e {

    /* renamed from: r, reason: collision with root package name */
    protected nm.c f7953r;

    /* renamed from: s, reason: collision with root package name */
    protected q8.a f7954s;

    /* renamed from: t, reason: collision with root package name */
    protected f f7955t;

    /* JADX INFO: Access modifiers changed from: private */
    public static /* synthetic */ h1 d(View view, h1 h1Var) {
        androidx.core.graphics.b f10 = h1Var.f(h1.l.h());
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
        marginLayoutParams.bottomMargin = f10.f3727d;
        view.setLayoutParams(marginLayoutParams);
        return h1.f3850b;
    }

    @Override // nm.e
    public nm.b a() {
        return this.f7953r;
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // com.journeyapps.barcodescanner.CaptureActivity, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.f7955t.c("TrackScan", null);
        DecoratedBarcodeView decoratedBarcodeView = (DecoratedBarcodeView) findViewById(i.R0);
        int i10 = Build.VERSION.SDK_INT;
        if (i10 >= 35) {
            s0.A0(decoratedBarcodeView, new h0() { // from class: u8.h
                @Override // androidx.core.view.h0
                public final h1 a(View view, h1 h1Var) {
                    h1 d10;
                    d10 = CpcBarCodeScannerActivity.d(view, h1Var);
                    return d10;
                }
            });
        }
        if (i10 >= 35) {
            getWindow().setNavigationBarContrastEnforced(true);
            getWindow().setNavigationBarColor(h7.f.f20960a);
        }
    }

    @Override // android.app.Activity
    protected void onStop() {
        super.onStop();
    }
}
