mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 05:52:52 +00:00
Get rid of the dummy scanner
This commit is contained in:
parent
68709148e6
commit
363fc789ef
2 changed files with 0 additions and 36 deletions
|
@ -8,7 +8,6 @@ import android.content.SharedPreferences;
|
|||
import android.content.pm.ShortcutInfo;
|
||||
import android.content.pm.ShortcutManager;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.BottomSheetDialog;
|
||||
|
@ -27,7 +26,6 @@ import android.view.View;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.UndeclaredThrowableException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -35,18 +33,8 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
import me.impy.aegis.crypto.CryptResult;
|
||||
import me.impy.aegis.crypto.MasterKey;
|
||||
import me.impy.aegis.crypto.otp.OTP;
|
||||
import me.impy.aegis.crypto.slots.FingerprintSlot;
|
||||
import me.impy.aegis.crypto.slots.PasswordSlot;
|
||||
import me.impy.aegis.crypto.slots.Slot;
|
||||
import me.impy.aegis.crypto.slots.SlotCollection;
|
||||
import me.impy.aegis.db.Database;
|
||||
import me.impy.aegis.db.DatabaseFile;
|
||||
import me.impy.aegis.db.DatabaseManager;
|
||||
import me.impy.aegis.helpers.SimpleItemTouchHelperCallback;
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ public class ScannerActivity extends Activity implements ZXingScannerView.Result
|
|||
@Override
|
||||
public void onCreate(Bundle state) {
|
||||
super.onCreate(state);
|
||||
handleDummyResult();
|
||||
|
||||
mScannerView = new ZXingScannerView(this) {
|
||||
@Override
|
||||
|
@ -52,29 +51,6 @@ public class ScannerActivity extends Activity implements ZXingScannerView.Result
|
|||
mScannerView.stopCamera(); // Stop camera on pause
|
||||
}
|
||||
|
||||
public void handleDummyResult() {
|
||||
// Do something with the result here
|
||||
//Toast.makeText(this, rawResult.getText(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
try {
|
||||
KeyInfo info = KeyInfo.FromURL("otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ");
|
||||
KeyProfile keyProfile = new KeyProfile();
|
||||
keyProfile.Info = info;
|
||||
keyProfile.Name = String.format("%s/%s", info.getIssuer(), info.getAccountName());
|
||||
|
||||
Intent resultIntent = new Intent();
|
||||
resultIntent.putExtra("KeyProfile", keyProfile);
|
||||
|
||||
setResult(Activity.RESULT_OK, resultIntent);
|
||||
finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// If you would like to resume scanning, call this method below:
|
||||
//mScannerView.resumeCameraPreview(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleResult(Result rawResult) {
|
||||
// Do something with the result here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue