Updated on 2026-08-14
This commit is contained in:
parent
19b642e599
commit
f5320a1952
64 changed files with 174 additions and 174 deletions
|
|
@ -0,0 +1,34 @@
|
|||
package com.tangem.cardcommon.tasks;
|
||||
|
||||
import com.tangem.cardcommon.data.external.CardDataSubstitutionProvider;
|
||||
import com.tangem.cardcommon.data.external.PINsProvider;
|
||||
import com.tangem.cardcommon.reader.CardProtocol;
|
||||
import com.tangem.cardcommon.data.TangemCard;
|
||||
import com.tangem.cardcommon.reader.NfcReader;
|
||||
import com.tangem.cardcommon.util.Log;
|
||||
|
||||
public class CreateNewWalletTask extends CustomReadCardTask {
|
||||
public static final String TAG = CreateNewWalletTask.class.getSimpleName();
|
||||
|
||||
public CreateNewWalletTask(TangemCard card, NfcReader reader, CardDataSubstitutionProvider cardDataSubstitutionProvider, PINsProvider pinsProvider, CardProtocol.Notifications notifications) {
|
||||
super(card, reader, cardDataSubstitutionProvider, pinsProvider, notifications);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run_Task() throws Exception {
|
||||
mNotifications.onReadProgress(protocol, 20);
|
||||
protocol.run_VerifyCard();
|
||||
|
||||
Log.i(TAG, "Manufacturer: " + protocol.getCard().getManufacturer().getOfficialName());
|
||||
|
||||
mNotifications.onReadProgress(protocol, 30);
|
||||
if (isCancelled) return;
|
||||
protocol.run_CreateWallet(pinsProvider.getPIN2());
|
||||
mNotifications.onReadProgress(protocol, 60);
|
||||
if (isCancelled) return;
|
||||
|
||||
protocol.run_Read();
|
||||
parseReadResult();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue