Optimize import

This commit is contained in:
jacques 2022-02-08 07:48:12 +01:00
parent cc3eb801f1
commit e11e1c1b4a

View file

@ -1,6 +1,8 @@
package net.foucry.pilldroid;
import android.app.Activity;
import android.app.job.JobService;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Bundle;
@ -12,6 +14,7 @@ import androidx.annotation.NonNull;
import com.journeyapps.barcodescanner.CaptureManager;
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
import com.journeyapps.barcodescanner.ScanContract;
import com.journeyapps.barcodescanner.ViewfinderView;
import java.util.Random;
@ -21,12 +24,14 @@ import java.util.Random;
*/
public class CustomScannerActivity extends Activity implements
DecoratedBarcodeView.TorchListener {
private static final String TAG = CustomScannerActivity.class.getName();
private CaptureManager capture;
private DecoratedBarcodeView barcodeScannerView;
private ImageButton switchFlashlightButton;
private ViewfinderView viewfinderView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -36,7 +41,6 @@ public class CustomScannerActivity extends Activity implements
barcodeScannerView.setTorchListener(this);
switchFlashlightButton = findViewById(R.id.switch_flashlight);
viewfinderView = findViewById(R.id.zxing_viewfinder_view);
// if the device does not have flashlight in its camera,
@ -50,6 +54,7 @@ public class CustomScannerActivity extends Activity implements
capture.setShowMissingCameraPermissionDialog(false);
capture.decode();
changeMaskColor(null);
changeLaserVisibility(true);
}
@ -125,7 +130,6 @@ public class CustomScannerActivity extends Activity implements
capture.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
public void onKeyboard(View view) {
setResult(3);
finish();