return early if cannot init adapter
[YkNeoCR.git] / src / org / average / nfcauthcr / QueryCrToken.java
index 68a8d0e9762e1a04d71a7e948c7d7f56cd5eb749..f8565c975ee86ab9e96c5fd48e7d388085e9b3cf 100644 (file)
@@ -64,7 +64,10 @@ public class QueryCrToken extends Activity {
                                intent.getStringArrayListExtra("challenge");
                intent.putExtra("yubikey_neo_slot", slot);
                if (challenge != null) {
-                       dispatch.onResume(challenge);
+                       if (!dispatch.onResume(challenge)) {
+                               Log.e(TAG, "Failed to enable fg dispatch");
+                               finish();
+                       }
                } else {
                        Log.e(TAG, "Challenge missing in the Intent");
                        finish();