Updated on 2026-08-14
This commit is contained in:
parent
0433526469
commit
200d940418
4 changed files with 11 additions and 17 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package com.tangem.data.network.task.loaded_wallet;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tangem.data.network.request.ElectrumRequest;
|
||||
import com.tangem.data.network.task.ElectrumTask;
|
||||
|
|
@ -315,8 +314,6 @@ public class UpdateWalletInfoTask extends ElectrumTask {
|
|||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Toast.makeText(reference.get().getContext(), "NullPointerException", Toast.LENGTH_LONG).show();
|
||||
|
||||
if (reference.get() != null) {
|
||||
reference.get().mSwipeRefreshLayout.setRefreshing(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import android.os.Build;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.tangem.presentation.dialog.NFCEnableDialog;
|
||||
|
||||
|
|
@ -77,21 +76,19 @@ public class NfcManager {
|
|||
// }
|
||||
}
|
||||
|
||||
int errorCount=0;
|
||||
public void notifyReadResult(boolean success)
|
||||
{
|
||||
if(success)
|
||||
{
|
||||
errorCount=0;
|
||||
}else{
|
||||
int errorCount = 0;
|
||||
|
||||
public void notifyReadResult(boolean success) {
|
||||
if (success) {
|
||||
errorCount = 0;
|
||||
} else {
|
||||
errorCount++;
|
||||
}
|
||||
if( errorCount>=3 )
|
||||
{
|
||||
if (errorCount >= 3) {
|
||||
disableReaderMode();
|
||||
mNfcAdapter=null;
|
||||
Toast.makeText(mActivity,"NFC restarted!",Toast.LENGTH_SHORT).show();
|
||||
mActivity.runOnUiThread(()->{
|
||||
mNfcAdapter = null;
|
||||
// Toast.makeText(mActivity,"NFC restarted!",Toast.LENGTH_SHORT).show();
|
||||
mActivity.runOnUiThread(() -> {
|
||||
mNfcAdapter = NfcAdapter.getDefaultAdapter(mActivity);
|
||||
enableReaderMode();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue