Rabbit-R1/switch port/smali/smali_classes3/com/journeyapps/barcodescanner/CaptureActivity.smali
2024-05-21 17:08:36 -04:00

179 lines
5.3 KiB
Smali

.class public Lcom/journeyapps/barcodescanner/CaptureActivity;
.super Landroid/app/Activity;
.source "CaptureActivity.java"
# instance fields
.field private barcodeScannerView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
.field private capture:Lcom/journeyapps/barcodescanner/CaptureManager;
# direct methods
.method public constructor <init>()V
.locals 0
.line 13
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected initializeContent()Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
.locals 1
.line 34
sget v0, Lcom/google/zxing/client/android/R$layout;->zxing_capture:I
invoke-virtual {p0, v0}, Lcom/journeyapps/barcodescanner/CaptureActivity;->setContentView(I)V
.line 35
sget v0, Lcom/google/zxing/client/android/R$id;->zxing_barcode_scanner:I
invoke-virtual {p0, v0}, Lcom/journeyapps/barcodescanner/CaptureActivity;->findViewById(I)Landroid/view/View;
move-result-object p0
check-cast p0, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
return-object p0
.end method
.method protected onCreate(Landroid/os/Bundle;)V
.locals 2
.line 19
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 21
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureActivity;->initializeContent()Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
move-result-object v0
iput-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->barcodeScannerView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
.line 23
new-instance v0, Lcom/journeyapps/barcodescanner/CaptureManager;
iget-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->barcodeScannerView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
invoke-direct {v0, p0, v1}, Lcom/journeyapps/barcodescanner/CaptureManager;-><init>(Landroid/app/Activity;Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;)V
iput-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 24
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureActivity;->getIntent()Landroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1, p1}, Lcom/journeyapps/barcodescanner/CaptureManager;->initializeFromIntent(Landroid/content/Intent;Landroid/os/Bundle;)V
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 25
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->decode()V
return-void
.end method
.method protected onDestroy()V
.locals 0
.line 52
invoke-super {p0}, Landroid/app/Activity;->onDestroy()V
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 53
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->onDestroy()V
return-void
.end method
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
.locals 1
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->barcodeScannerView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
.line 69
invoke-virtual {v0, p1, p2}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->onKeyDown(ILandroid/view/KeyEvent;)Z
move-result v0
if-nez v0, :cond_1
invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z
move-result p0
if-eqz p0, :cond_0
goto :goto_0
:cond_0
const/4 p0, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p0, 0x1
:goto_1
return p0
.end method
.method protected onPause()V
.locals 0
.line 46
invoke-super {p0}, Landroid/app/Activity;->onPause()V
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 47
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->onPause()V
return-void
.end method
.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
.locals 0
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 64
invoke-virtual {p0, p1, p2, p3}, Lcom/journeyapps/barcodescanner/CaptureManager;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V
return-void
.end method
.method protected onResume()V
.locals 0
.line 40
invoke-super {p0}, Landroid/app/Activity;->onResume()V
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 41
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->onResume()V
return-void
.end method
.method protected onSaveInstanceState(Landroid/os/Bundle;)V
.locals 0
.line 58
invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureActivity;->capture:Lcom/journeyapps/barcodescanner/CaptureManager;
.line 59
invoke-virtual {p0, p1}, Lcom/journeyapps/barcodescanner/CaptureManager;->onSaveInstanceState(Landroid/os/Bundle;)V
return-void
.end method