super.onResume();
Log.v(TAG, "Starting the work");
+ setResult(RESULT_CANCELED);
+ int slot = prefs.getInt("slot_number", -1);
+ if (slot != 1 && slot != 2) {
+ Log.e(TAG, "Slot " + slot + " cannot be used");
+ Toast.makeText(this, R.string.need_slot,
+ Toast.LENGTH_LONG).show();
+ finish();
+ }
new AlertDialog.Builder(this)
.setTitle(R.string.challenging)
.setMessage(R.string.swipe)
Intent intent = getIntent();
ArrayList<String> challenge =
intent.getStringArrayListExtra("challenge");
- int slot = prefs.getInt("slot_number", -1);
intent.putExtra("yubikey_neo_slot", slot);
- setResult(RESULT_CANCELED);
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();