Fix NfcActivity task stack problem
This commit is contained in:
@@ -97,7 +97,6 @@ public abstract class DecryptFragment extends Fragment {
|
||||
intent.putExtra(NfcActivity.EXTRA_PIN, pin);
|
||||
|
||||
intent.putExtra(NfcActivity.EXTRA_NFC_ENC_SESSION_KEY, encryptedSessionKey);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
|
||||
startActivityForResult(intent, REQUEST_CODE_NFC_DECRYPT);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public abstract class EncryptActivity extends DrawerActivity {
|
||||
intent.putExtra(NfcActivity.EXTRA_PIN, pin);
|
||||
intent.putExtra(NfcActivity.EXTRA_NFC_HASH_TO_SIGN, hashToSign);
|
||||
intent.putExtra(NfcActivity.EXTRA_NFC_HASH_ALGO, hashAlgo);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
|
||||
startActivityForResult(intent, REQUEST_CODE_NFC);
|
||||
}
|
||||
|
||||
@@ -111,9 +111,8 @@ public class NfcActivity extends ActionBarActivity {
|
||||
Log.d(Constants.TAG, "NfcActivity mEncryptedSessionKey as hex: " + getHex(mEncryptedSessionKey));
|
||||
Log.d(Constants.TAG, "NfcActivity mServiceIntent: " + mServiceIntent.toString());
|
||||
} else if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {
|
||||
Log.e(Constants.TAG, "This should not happen, but there is a bug in Android!");
|
||||
|
||||
toast("This should not happen, but there is a bug in Android! Clear all app tasks and start app from launcher again!");
|
||||
Log.e(Constants.TAG, "This should not happen! NfcActivity.onCreate() is being called instead of onNewIntent()!");
|
||||
toast("This should not happen! Please create a new bug report that the NFC screen is restarted!");
|
||||
finish();
|
||||
} else {
|
||||
Log.d(Constants.TAG, "Action not supported: " + action);
|
||||
|
||||
Reference in New Issue
Block a user