Updated on 2026-08-14
This commit is contained in:
parent
238c2c3a16
commit
eda078384e
12 changed files with 21 additions and 105 deletions
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
|
|
@ -15,7 +15,7 @@ android {
|
|||
applicationId "com.tangem.wallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
versionCode 43
|
||||
versionCode 44
|
||||
versionName "0.87.1." + generateVersionName()
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -496,6 +496,14 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
|
||||
if (needResendTX)
|
||||
sendTransaction(LastSignStorage.getTxForSend(mCard!!.wallet))
|
||||
|
||||
|
||||
// if (activity!!.intent.extras!!.containsKey(NfcAdapter.EXTRA_TAG)) {
|
||||
// val tag = activity!!.intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
|
||||
// if (tag != null) {
|
||||
// onTagDiscovered(tag)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
override fun onTagDiscovered(tag: Tag) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import com.tangem.util.Util;
|
|||
import com.tangem.wallet.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
|
@ -219,7 +218,7 @@ public class Main extends Fragment implements NfcAdapter.ReaderCallback, CardLis
|
|||
readCardInfoTask = new ReadCardInfoTask(getActivity(), mNfcManager, isoDep, this);
|
||||
readCardInfoTask.start();
|
||||
|
||||
Log.i(TAG, "onTagDiscovered " + Arrays.toString(tag.getId()));
|
||||
// Log.i(TAG, "onTagDiscovered " + Arrays.toString(tag.getId()));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ public class VerifyCard extends Fragment implements NfcAdapter.ReaderCallback {
|
|||
popup.getMenu().findItem(R.id.action_set_PIN2).setVisible(mCard.allowSwapPIN2());
|
||||
popup.getMenu().findItem(R.id.action_reset_PIN2).setVisible(mCard.allowSwapPIN2() && !mCard.useDefaultPIN2());
|
||||
popup.getMenu().findItem(R.id.action_reset_PINs).setVisible(mCard.allowSwapPIN() && mCard.allowSwapPIN2() && !mCard.useDefaultPIN1() && !mCard.useDefaultPIN2());
|
||||
if (!mCard.isReusable() || !mCard.isWalletPublicKeyValid())
|
||||
if (!mCard.isReusable() || mCard.getStatus() != TangemCard.Status.Loaded)
|
||||
popup.getMenu().findItem(R.id.action_purge).setVisible(false);
|
||||
|
||||
popup.setOnMenuItemClickListener(item -> {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem;
|
||||
package com.tangem.util;
|
||||
|
||||
import android.text.InputFilter;
|
||||
import android.text.Spanned;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.tangem;
|
||||
package com.tangem.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
android:alpha="0.5"
|
||||
android:background="@color/white"/>
|
||||
|
||||
<com.tangem.VerticalTextView
|
||||
<com.tangem.util.VerticalTextView
|
||||
android:id="@+id/tvType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue