mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 08:32:38 -06:00
1176 lines
34 KiB
Smali
1176 lines
34 KiB
Smali
.class public Lcom/journeyapps/barcodescanner/CaptureManager;
|
|
.super Ljava/lang/Object;
|
|
.source "CaptureManager.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final SAVED_ORIENTATION_LOCK:Ljava/lang/String; = "SAVED_ORIENTATION_LOCK"
|
|
|
|
.field private static final TAG:Ljava/lang/String; = "CaptureManager"
|
|
|
|
.field private static cameraPermissionReqCode:I = 0xfa
|
|
|
|
|
|
# instance fields
|
|
.field private activity:Landroid/app/Activity;
|
|
|
|
.field private askedPermission:Z
|
|
|
|
.field private barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.field private beepManager:Lcom/google/zxing/client/android/BeepManager;
|
|
|
|
.field private callback:Lcom/journeyapps/barcodescanner/BarcodeCallback;
|
|
|
|
.field private destroyed:Z
|
|
|
|
.field private finishWhenClosed:Z
|
|
|
|
.field private handler:Landroid/os/Handler;
|
|
|
|
.field private inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.field private missingCameraPermissionDialogMessage:Ljava/lang/String;
|
|
|
|
.field private orientationLock:I
|
|
|
|
.field private returnBarcodeImagePath:Z
|
|
|
|
.field private showDialogIfMissingCameraPermission:Z
|
|
|
|
.field private final stateListener:Lcom/journeyapps/barcodescanner/CameraPreview$StateListener;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/app/Activity;Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;)V
|
|
.locals 2
|
|
|
|
.line 123
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, -0x1
|
|
|
|
iput v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->returnBarcodeImagePath:Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
iput-boolean v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->showDialogIfMissingCameraPermission:Z
|
|
|
|
const-string v1, ""
|
|
|
|
iput-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->missingCameraPermissionDialogMessage:Ljava/lang/String;
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->destroyed:Z
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->finishWhenClosed:Z
|
|
|
|
.line 76
|
|
new-instance v1, Lcom/journeyapps/barcodescanner/CaptureManager$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$1;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
iput-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->callback:Lcom/journeyapps/barcodescanner/BarcodeCallback;
|
|
|
|
.line 91
|
|
new-instance v1, Lcom/journeyapps/barcodescanner/CaptureManager$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$2;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
iput-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->stateListener:Lcom/journeyapps/barcodescanner/CameraPreview$StateListener;
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->askedPermission:Z
|
|
|
|
iput-object p1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
iput-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 126
|
|
invoke-virtual {p2}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->getBarcodeView()Lcom/journeyapps/barcodescanner/BarcodeView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, v1}, Lcom/journeyapps/barcodescanner/BarcodeView;->addStateListener(Lcom/journeyapps/barcodescanner/CameraPreview$StateListener;)V
|
|
|
|
.line 128
|
|
new-instance p2, Landroid/os/Handler;
|
|
|
|
invoke-direct {p2}, Landroid/os/Handler;-><init>()V
|
|
|
|
iput-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->handler:Landroid/os/Handler;
|
|
|
|
.line 130
|
|
new-instance p2, Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
new-instance v0, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda0;
|
|
|
|
invoke-direct {v0, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda0;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
invoke-direct {p2, p1, v0}, Lcom/google/zxing/client/android/InactivityTimer;-><init>(Landroid/content/Context;Ljava/lang/Runnable;)V
|
|
|
|
iput-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.line 135
|
|
new-instance p2, Lcom/google/zxing/client/android/BeepManager;
|
|
|
|
invoke-direct {p2, p1}, Lcom/google/zxing/client/android/BeepManager;-><init>(Landroid/app/Activity;)V
|
|
|
|
iput-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->beepManager:Lcom/google/zxing/client/android/BeepManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$000(Lcom/journeyapps/barcodescanner/CaptureManager;)Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
.locals 0
|
|
|
|
.line 53
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$100(Lcom/journeyapps/barcodescanner/CaptureManager;)Lcom/google/zxing/client/android/BeepManager;
|
|
.locals 0
|
|
|
|
.line 53
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->beepManager:Lcom/google/zxing/client/android/BeepManager;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$200(Lcom/journeyapps/barcodescanner/CaptureManager;)Landroid/os/Handler;
|
|
.locals 0
|
|
|
|
.line 53
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->handler:Landroid/os/Handler;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$300(Lcom/journeyapps/barcodescanner/CaptureManager;)Landroid/app/Activity;
|
|
.locals 0
|
|
|
|
.line 53
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$400(Lcom/journeyapps/barcodescanner/CaptureManager;)Z
|
|
.locals 0
|
|
|
|
.line 53
|
|
iget-boolean p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->finishWhenClosed:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic access$500()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/journeyapps/barcodescanner/CaptureManager;->TAG:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$600(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
.locals 0
|
|
|
|
.line 53
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private finish()V
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 373
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private getBarcodeImagePath(Lcom/journeyapps/barcodescanner/BarcodeResult;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
iget-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->returnBarcodeImagePath:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 358
|
|
invoke-virtual {p1}, Lcom/journeyapps/barcodescanner/BarcodeResult;->getBitmap()Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
:try_start_0
|
|
const-string v0, "barcodeimage"
|
|
|
|
const-string v1, ".jpg"
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 360
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getCacheDir()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, v1, p0}, Ljava/io/File;->createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
.line 361
|
|
new-instance v0, Ljava/io/FileOutputStream;
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
|
|
|
.line 362
|
|
sget-object v1, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;
|
|
|
|
const/16 v2, 0x64
|
|
|
|
invoke-virtual {p1, v1, v2, v0}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
|
|
|
|
.line 363
|
|
invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
|
|
|
|
.line 364
|
|
invoke-virtual {p0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
sget-object p1, Lcom/journeyapps/barcodescanner/CaptureManager;->TAG:Ljava/lang/String;
|
|
|
|
.line 366
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "Unable to create temporary file and store bitmap! "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getCameraPermissionReqCode()I
|
|
.locals 1
|
|
|
|
sget v0, Lcom/journeyapps/barcodescanner/CaptureManager;->cameraPermissionReqCode:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private openCameraWithPermission()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
const-string v1, "android.permission.CAMERA"
|
|
|
|
.line 241
|
|
invoke-static {v0, v1}, Landroidx/core/content/ContextCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 243
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->resume()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->askedPermission:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 245
|
|
filled-new-array {v1}, [Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
sget v2, Lcom/journeyapps/barcodescanner/CaptureManager;->cameraPermissionReqCode:I
|
|
|
|
invoke-static {v0, v1, v2}, Landroidx/core/app/ActivityCompat;->requestPermissions(Landroid/app/Activity;[Ljava/lang/String;I)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->askedPermission:Z
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static resultIntent(Lcom/journeyapps/barcodescanner/BarcodeResult;Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 5
|
|
|
|
.line 310
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "com.google.zxing.client.android.SCAN"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const/high16 v1, 0x80000
|
|
|
|
.line 311
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
const-string v1, "SCAN_RESULT"
|
|
|
|
.line 312
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/BarcodeResult;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 313
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/BarcodeResult;->getBarcodeFormat()Lcom/google/zxing/BarcodeFormat;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/google/zxing/BarcodeFormat;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "SCAN_RESULT_FORMAT"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 314
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/BarcodeResult;->getRawBytes()[B
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 315
|
|
array-length v2, v1
|
|
|
|
if-lez v2, :cond_0
|
|
|
|
const-string v2, "SCAN_RESULT_BYTES"
|
|
|
|
.line 316
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[B)Landroid/content/Intent;
|
|
|
|
.line 318
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/BarcodeResult;->getResultMetadata()Ljava/util/Map;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
.line 320
|
|
sget-object v1, Lcom/google/zxing/ResultMetadataType;->UPC_EAN_EXTENSION:Lcom/google/zxing/ResultMetadataType;
|
|
|
|
invoke-interface {p0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 321
|
|
sget-object v1, Lcom/google/zxing/ResultMetadataType;->UPC_EAN_EXTENSION:Lcom/google/zxing/ResultMetadataType;
|
|
|
|
.line 322
|
|
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "SCAN_RESULT_UPC_EAN_EXTENSION"
|
|
|
|
.line 321
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 324
|
|
:cond_1
|
|
sget-object v1, Lcom/google/zxing/ResultMetadataType;->ORIENTATION:Lcom/google/zxing/ResultMetadataType;
|
|
|
|
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
const-string v2, "SCAN_RESULT_ORIENTATION"
|
|
|
|
.line 326
|
|
invoke-virtual {v1}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
|
|
|
|
.line 328
|
|
:cond_2
|
|
sget-object v1, Lcom/google/zxing/ResultMetadataType;->ERROR_CORRECTION_LEVEL:Lcom/google/zxing/ResultMetadataType;
|
|
|
|
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
const-string v2, "SCAN_RESULT_ERROR_CORRECTION_LEVEL"
|
|
|
|
.line 330
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 333
|
|
:cond_3
|
|
sget-object v1, Lcom/google/zxing/ResultMetadataType;->BYTE_SEGMENTS:Lcom/google/zxing/ResultMetadataType;
|
|
|
|
invoke-interface {p0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Ljava/lang/Iterable;
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
.line 336
|
|
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, [B
|
|
|
|
.line 337
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "SCAN_RESULT_BYTE_SEGMENTS_"
|
|
|
|
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[B)Landroid/content/Intent;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
if-eqz p1, :cond_5
|
|
|
|
const-string p0, "SCAN_RESULT_IMAGE_PATH"
|
|
|
|
.line 343
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
:cond_5
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static setCameraPermissionReqCode(I)V
|
|
.locals 0
|
|
|
|
sput p0, Lcom/journeyapps/barcodescanner/CaptureManager;->cameraPermissionReqCode:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setMissingCameraPermissionResult()V
|
|
.locals 3
|
|
|
|
.line 388
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "com.google.zxing.client.android.SCAN"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "MISSING_CAMERA_PERMISSION"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 389
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 390
|
|
invoke-virtual {p0, v1, v0}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected closeAndFinish()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 377
|
|
invoke-virtual {v0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->getBarcodeView()Lcom/journeyapps/barcodescanner/BarcodeView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/journeyapps/barcodescanner/BarcodeView;->isCameraClosed()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 378
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->finish()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->finishWhenClosed:Z
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 383
|
|
invoke-virtual {v0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->pause()V
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.line 384
|
|
invoke-virtual {p0}, Lcom/google/zxing/client/android/InactivityTimer;->cancel()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public decode()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->callback:Lcom/journeyapps/barcodescanner/BarcodeCallback;
|
|
|
|
.line 222
|
|
invoke-virtual {v0, p0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->decodeSingle(Lcom/journeyapps/barcodescanner/BarcodeCallback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected displayFrameworkBugMessageAndExit(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 407
|
|
invoke-virtual {v0}, Landroid/app/Activity;->isFinishing()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->destroyed:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->finishWhenClosed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 411
|
|
:cond_0
|
|
invoke-virtual {p1}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 412
|
|
sget v0, Lcom/google/zxing/client/android/R$string;->zxing_msg_camera_framework_bug:I
|
|
|
|
invoke-virtual {p1, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 415
|
|
:cond_1
|
|
new-instance v0, Landroid/app/AlertDialog$Builder;
|
|
|
|
iget-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
|
|
|
|
iget-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 416
|
|
sget v2, Lcom/google/zxing/client/android/R$string;->zxing_app_name:I
|
|
|
|
invoke-virtual {v1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
|
|
|
|
.line 417
|
|
invoke-virtual {v0, p1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
|
|
|
|
.line 418
|
|
sget p1, Lcom/google/zxing/client/android/R$string;->zxing_button_ok:I
|
|
|
|
new-instance v1, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda1;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
|
|
|
|
.line 419
|
|
new-instance p1, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda2;
|
|
|
|
invoke-direct {p1, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda2;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
invoke-virtual {v0, p1}, Landroid/app/AlertDialog$Builder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Landroid/app/AlertDialog$Builder;
|
|
|
|
.line 420
|
|
invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public initializeFromIntent(Landroid/content/Intent;Landroid/os/Bundle;)V
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 145
|
|
invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object v0
|
|
|
|
const/16 v1, 0x80
|
|
|
|
.line 146
|
|
invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const-string v0, "SAVED_ORIENTATION_LOCK"
|
|
|
|
const/4 v1, -0x1
|
|
|
|
.line 152
|
|
invoke-virtual {p2, v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
:cond_0
|
|
if-eqz p1, :cond_6
|
|
|
|
const-string p2, "SCAN_ORIENTATION_LOCKED"
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 157
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 159
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->lockOrientation()V
|
|
|
|
:cond_1
|
|
const-string p2, "com.google.zxing.client.android.SCAN"
|
|
|
|
.line 162
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
iget-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 163
|
|
invoke-virtual {p2, p1}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->initializeFromIntent(Landroid/content/Intent;)V
|
|
|
|
:cond_2
|
|
const-string p2, "BEEP_ENABLED"
|
|
|
|
.line 166
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result p2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
iget-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->beepManager:Lcom/google/zxing/client/android/BeepManager;
|
|
|
|
.line 167
|
|
invoke-virtual {p2, v1}, Lcom/google/zxing/client/android/BeepManager;->setBeepEnabled(Z)V
|
|
|
|
:cond_3
|
|
const-string p2, "SHOW_MISSING_CAMERA_PERMISSION_DIALOG"
|
|
|
|
.line 170
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 172
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result p2
|
|
|
|
const-string v2, "MISSING_CAMERA_PERMISSION_DIALOG_MESSAGE"
|
|
|
|
.line 173
|
|
invoke-virtual {p1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 171
|
|
invoke-virtual {p0, p2, v2}, Lcom/journeyapps/barcodescanner/CaptureManager;->setShowMissingCameraPermissionDialog(ZLjava/lang/String;)V
|
|
|
|
:cond_4
|
|
const-string p2, "TIMEOUT"
|
|
|
|
.line 177
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-object v2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->handler:Landroid/os/Handler;
|
|
|
|
.line 178
|
|
new-instance v3, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda3;
|
|
|
|
invoke-direct {v3, p0}, Lcom/journeyapps/barcodescanner/CaptureManager$$ExternalSyntheticLambda3;-><init>(Lcom/journeyapps/barcodescanner/CaptureManager;)V
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
invoke-virtual {p1, p2, v4, v5}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v2, v3, v4, v5}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
:cond_5
|
|
const-string p2, "BARCODE_IMAGE_ENABLED"
|
|
|
|
.line 181
|
|
invoke-virtual {p1, p2, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->returnBarcodeImagePath:Z
|
|
|
|
:cond_6
|
|
return-void
|
|
.end method
|
|
|
|
.method synthetic lambda$displayFrameworkBugMessageAndExit$1$com-journeyapps-barcodescanner-CaptureManager(Landroid/content/DialogInterface;I)V
|
|
.locals 0
|
|
|
|
.line 418
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method synthetic lambda$displayFrameworkBugMessageAndExit$2$com-journeyapps-barcodescanner-CaptureManager(Landroid/content/DialogInterface;)V
|
|
.locals 0
|
|
|
|
.line 419
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method synthetic lambda$new$0$com-journeyapps-barcodescanner-CaptureManager()V
|
|
.locals 2
|
|
|
|
.line 0
|
|
sget-object v0, Lcom/journeyapps/barcodescanner/CaptureManager;->TAG:Ljava/lang/String;
|
|
|
|
const-string v1, "Finishing due to inactivity"
|
|
|
|
.line 131
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 132
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected lockOrientation()V
|
|
.locals 5
|
|
|
|
iget v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 194
|
|
invoke-virtual {v0}, Landroid/app/Activity;->getWindowManager()Landroid/view/WindowManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;
|
|
|
|
move-result-object v0
|
|
|
|
.line 195
|
|
invoke-virtual {v0}, Landroid/view/Display;->getRotation()I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
.line 196
|
|
invoke-virtual {v1}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object v1
|
|
|
|
iget v1, v1, Landroid/content/res/Configuration;->orientation:I
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
if-ne v0, v4, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/16 v3, 0x8
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
if-ne v1, v4, :cond_4
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/16 v3, 0x9
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
move v3, v4
|
|
|
|
:cond_4
|
|
:goto_1
|
|
iput v3, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
iget p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
.line 215
|
|
invoke-virtual {v0, p0}, Landroid/app/Activity;->setRequestedOrientation(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->destroyed:Z
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.line 291
|
|
invoke-virtual {v0}, Lcom/google/zxing/client/android/InactivityTimer;->cancel()V
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->handler:Landroid/os/Handler;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 292
|
|
invoke-virtual {p0, v0}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onPause()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.line 282
|
|
invoke-virtual {v0}, Lcom/google/zxing/client/android/InactivityTimer;->cancel()V
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 283
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->pauseAndWait()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
|
|
.locals 0
|
|
|
|
sget p2, Lcom/journeyapps/barcodescanner/CaptureManager;->cameraPermissionReqCode:I
|
|
|
|
if-ne p1, p2, :cond_2
|
|
|
|
.line 262
|
|
array-length p1, p3
|
|
|
|
if-lez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
aget p1, p3, p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->barcodeView:Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;
|
|
|
|
.line 264
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/DecoratedBarcodeView;->resume()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 266
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->setMissingCameraPermissionResult()V
|
|
|
|
iget-boolean p1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->showDialogIfMissingCameraPermission:Z
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->missingCameraPermissionDialogMessage:Ljava/lang/String;
|
|
|
|
.line 269
|
|
invoke-virtual {p0, p1}, Lcom/journeyapps/barcodescanner/CaptureManager;->displayFrameworkBugMessageAndExit(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 271
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->closeAndFinish()V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 0
|
|
|
|
.line 230
|
|
invoke-direct {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->openCameraWithPermission()V
|
|
|
|
iget-object p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->inactivityTimer:Lcom/google/zxing/client/android/InactivityTimer;
|
|
|
|
.line 234
|
|
invoke-virtual {p0}, Lcom/google/zxing/client/android/InactivityTimer;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSaveInstanceState(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
const-string v0, "SAVED_ORIENTATION_LOCK"
|
|
|
|
iget p0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->orientationLock:I
|
|
|
|
.line 299
|
|
invoke-virtual {p1, v0, p0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected returnResult(Lcom/journeyapps/barcodescanner/BarcodeResult;)V
|
|
.locals 2
|
|
|
|
.line 401
|
|
invoke-direct {p0, p1}, Lcom/journeyapps/barcodescanner/CaptureManager;->getBarcodeImagePath(Lcom/journeyapps/barcodescanner/BarcodeResult;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, v0}, Lcom/journeyapps/barcodescanner/CaptureManager;->resultIntent(Lcom/journeyapps/barcodescanner/BarcodeResult;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
const/4 v1, -0x1
|
|
|
|
.line 402
|
|
invoke-virtual {v0, v1, p1}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
.line 403
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->closeAndFinish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected returnResultTimeout()V
|
|
.locals 3
|
|
|
|
.line 394
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "com.google.zxing.client.android.SCAN"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "TIMEOUT"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 395
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
iget-object v1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->activity:Landroid/app/Activity;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 396
|
|
invoke-virtual {v1, v2, v0}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
.line 397
|
|
invoke-virtual {p0}, Lcom/journeyapps/barcodescanner/CaptureManager;->closeAndFinish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowMissingCameraPermissionDialog(Z)V
|
|
.locals 1
|
|
|
|
const-string v0, ""
|
|
|
|
.line 440
|
|
invoke-virtual {p0, p1, v0}, Lcom/journeyapps/barcodescanner/CaptureManager;->setShowMissingCameraPermissionDialog(ZLjava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShowMissingCameraPermissionDialog(ZLjava/lang/String;)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->showDialogIfMissingCameraPermission:Z
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p2, ""
|
|
|
|
:goto_0
|
|
iput-object p2, p0, Lcom/journeyapps/barcodescanner/CaptureManager;->missingCameraPermissionDialogMessage:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|