package com.journeyapps.barcodescanner;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import dl.k;
import dl.l;

/* loaded from: classes3.dex */
public class CaptureActivity extends Activity {

    /* renamed from: p, reason: collision with root package name */
    private e f15284p;

    /* renamed from: q, reason: collision with root package name */
    private DecoratedBarcodeView f15285q;

    protected DecoratedBarcodeView b() {
        setContentView(l.f16351b);
        return (DecoratedBarcodeView) findViewById(k.f16338a);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.f15285q = b();
        e eVar = new e(this, this.f15285q);
        this.f15284p = eVar;
        eVar.p(getIntent(), bundle);
        this.f15284p.l();
    }

    @Override // android.app.Activity
    protected void onDestroy() {
        super.onDestroy();
        this.f15284p.u();
    }

    @Override // android.app.Activity, android.view.KeyEvent.Callback
    public boolean onKeyDown(int i10, KeyEvent keyEvent) {
        return this.f15285q.onKeyDown(i10, keyEvent) || super.onKeyDown(i10, keyEvent);
    }

    @Override // android.app.Activity
    protected void onPause() {
        super.onPause();
        this.f15284p.v();
    }

    @Override // android.app.Activity
    public void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
        this.f15284p.w(i10, strArr, iArr);
    }

    @Override // android.app.Activity
    protected void onResume() {
        super.onResume();
        this.f15284p.x();
    }

    @Override // android.app.Activity
    protected void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        this.f15284p.y(bundle);
    }
}
