Source:
<code>protected void onNfcPerform() throws IOException { if (mCurrentFragment instanceof NfcListenerFragment) { ((NfcListenerFragment) mCurrentFragment).onNfcPerform(); return; } byte[] scannedFingerprints = nfcGetFingerprints(); byte[] nfcAid = nfcGetAid(); String userId = nfcGetUserId(); boolean cardContainsKeys = false; for (byte b : scannedFingerprints) { if (b != 0) { cardContainsKeys = true; break; } } if (cardContainsKeys) { try { long masterKeyId = KeyFormattingUtils.getKeyIdFromFingerprint(scannedFingerprints); CachedPublicKeyRing ring = new ProviderHelper(this).getCachedPublicKeyRing(masterKeyId); ring.getMasterKeyId(); Intent intent = new Intent(this, ViewKeyActivity.class); intent.setData(KeyRings.buildGenericKeyRingUri(masterKeyId)); intent.putExtra(ViewKeyActivity.EXTRA_NFC_AID, nfcAid); intent.putExtra(ViewKeyActivity.EXTRA_NFC_USER_ID, userId); intent.putExtra(ViewKeyActivity.EXTRA_NFC_FINGERPRINTS, scannedFingerprints); startActivity(intent); finish(); } catch (PgpKeyNotFoundException e) { Fragment frag = CreateKeyYubiKeyImportFragment.createInstance( scannedFingerprints, nfcAid, userId); loadFragment(frag, FragAction.TO_RIGHT); } } else { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Blank Smart Card / Yubikey Detected") <START> .setMessage("Would you like to generate a smart card compatible key?") <END> .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int button) { CreateKeyActivity.this.mUseSmartCardSettings = true; } }) .setNegativeButton(android.R.string.no, null).show(); } }</code><technical_language>strings added strings.xml Maybe, fits wizard-like process ask this part of a fragment instead of a dialog, this is important for this pull request. I do this for you</technical_language>

Target:
protected void onNfcPerform() throws IOException { if (mCurrentFragment instanceof NfcListenerFragment) { ((NfcListenerFragment) mCurrentFragment).onNfcPerform(); return; } byte[] scannedFingerprints = nfcGetFingerprints(); byte[] nfcAid = nfcGetAid(); String userId = nfcGetUserId(); boolean cardContainsKeys = false; for (byte b : scannedFingerprints) { if (b != 0) { cardContainsKeys = true; break; } } if (cardContainsKeys) { try { long masterKeyId = KeyFormattingUtils.getKeyIdFromFingerprint(scannedFingerprints); CachedPublicKeyRing ring = new ProviderHelper(this).getCachedPublicKeyRing(masterKeyId); ring.getMasterKeyId(); Intent intent = new Intent(this, ViewKeyActivity.class); intent.setData(KeyRings.buildGenericKeyRingUri(masterKeyId)); intent.putExtra(ViewKeyActivity.EXTRA_NFC_AID, nfcAid); intent.putExtra(ViewKeyActivity.EXTRA_NFC_USER_ID, userId); intent.putExtra(ViewKeyActivity.EXTRA_NFC_FINGERPRINTS, scannedFingerprints); startActivity(intent); finish(); } catch (PgpKeyNotFoundException e) { Fragment frag = CreateKeyYubiKeyImportFragment.createInstance( scannedFingerprints, nfcAid, userId); loadFragment(frag, FragAction.TO_RIGHT); } } else { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.first_time_blank_smartcard_title) .setMessage(R.string.first_time_blank_smartcard_message) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int button) { CreateKeyActivity.this.mUseSmartCardSettings = true; } }) .setNegativeButton(android.R.string.no, null).show(); } }