Updated on 2026-08-14
This commit is contained in:
parent
238c2c3a16
commit
eda078384e
12 changed files with 21 additions and 105 deletions
|
|
@ -35,89 +35,6 @@ public class CreateNewWalletActivity extends AppCompatActivity implements NfcAda
|
|||
private CreateNewWalletTask createNewWalletTask;
|
||||
private boolean lastReadSuccess = true;
|
||||
|
||||
// private class CreateNewWalletTask extends Thread {
|
||||
//
|
||||
// private IsoDep mIsoDep;
|
||||
// private CardProtocol.Notifications mNotifications;
|
||||
// private boolean isCancelled = false;
|
||||
//
|
||||
// public CreateNewWalletTask(IsoDep isoDep, CardProtocol.Notifications notifications) {
|
||||
// mIsoDep = isoDep;
|
||||
// mNotifications = notifications;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void run() {
|
||||
// if (mIsoDep == null) {
|
||||
// return;
|
||||
// }
|
||||
// CardProtocol protocol = new CardProtocol(getBaseContext(), mIsoDep, mCard, mNotifications);
|
||||
// mNotifications.OnReadStart(protocol);
|
||||
// try {
|
||||
// // for Samsung's bugs -
|
||||
// // Workaround for the Samsung Galaxy S5 (since the
|
||||
// // first connection always hangs on transceive).
|
||||
// int timeout = mIsoDep.getTimeout();
|
||||
// mIsoDep.connect();
|
||||
// mIsoDep.close();
|
||||
// mIsoDep.connect();
|
||||
// mIsoDep.setTimeout(timeout);
|
||||
// try {
|
||||
// mNotifications.OnReadProgress(protocol, 5);
|
||||
//
|
||||
// Log.i("CreateNewWalletTask", "[-- Start create new wallet --]");
|
||||
//
|
||||
// if (isCancelled) return;
|
||||
// protocol.run_VerifyCard();
|
||||
//
|
||||
// Log.i("CreateNewWalletTask", "Manufacturer: " + protocol.getCard().getManufacturer().getOfficialName());
|
||||
//
|
||||
// mNotifications.OnReadProgress(protocol, 30);
|
||||
// if (isCancelled) return;
|
||||
//
|
||||
//// if (mCard.getPauseBeforePIN2() > 0) {
|
||||
//// mNotifications.OnReadWait(mCard.getPauseBeforePIN2());
|
||||
//// }
|
||||
//// try {
|
||||
// protocol.run_CreateWallet(PINStorage.getPIN2());
|
||||
//// } finally {
|
||||
//// mNotifications.OnReadWait(0);
|
||||
//// }
|
||||
// mNotifications.OnReadProgress(protocol, 60);
|
||||
// if (isCancelled) return;
|
||||
//
|
||||
// protocol.run_Read();
|
||||
//
|
||||
// } finally {
|
||||
// mNfcManager.ignoreTag(mIsoDep.getTag());
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// protocol.setError(e);
|
||||
//
|
||||
// } finally {
|
||||
// Log.i("CreateNewWalletTask", "[-- Finish create new wallet --]");
|
||||
// mNotifications.OnReadFinish(protocol);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void cancel(Boolean AllowInterrupt) {
|
||||
// try {
|
||||
// if (this.isAlive()) {
|
||||
// isCancelled = true;
|
||||
// join(500);
|
||||
// }
|
||||
// if (this.isAlive() && AllowInterrupt) {
|
||||
// interrupt();
|
||||
// mNotifications.OnReadCancel();
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
|||
|
|
@ -112,12 +112,12 @@ public class EmptyWalletActivity extends AppCompatActivity implements NfcAdapter
|
|||
startActivityForResult(intent, REQUEST_CODE_REQUEST_PIN2);
|
||||
});
|
||||
|
||||
if (getIntent().getExtras().containsKey(NfcAdapter.EXTRA_TAG)) {
|
||||
Tag tag = getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG);
|
||||
if (tag != null) {
|
||||
onTagDiscovered(tag);
|
||||
}
|
||||
}
|
||||
// if (getIntent().getExtras().containsKey(NfcAdapter.EXTRA_TAG)) {
|
||||
// Tag tag = getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG);
|
||||
// if (tag != null) {
|
||||
// onTagDiscovered(tag);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.presentation.activity;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
|
|
@ -97,13 +96,6 @@ public class MainActivity extends AppCompatActivity implements PopupMenu.OnMenuI
|
|||
antenna = new DeviceNFCAntennaLocation();
|
||||
antenna.getAntennaLocation();
|
||||
|
||||
try {
|
||||
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
// set card orientation
|
||||
switch (antenna.getOrientation()) {
|
||||
case DeviceNFCAntennaLocation.CARD_ORIENTATION_HORIZONTAL:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import android.os.Bundle
|
|||
import android.support.v7.app.AppCompatActivity
|
||||
import android.text.Html
|
||||
import android.text.InputFilter
|
||||
import com.tangem.DecimalDigitsInputFilter
|
||||
import com.tangem.util.DecimalDigitsInputFilter
|
||||
import com.tangem.domain.cardReader.NfcManager
|
||||
import com.tangem.domain.wallet.Blockchain
|
||||
import com.tangem.domain.wallet.CoinEngineFactory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue