Use AndroidNavigator as base class for android pinmanagement GUI
@@ -29,7 +29,7 @@ import java.util.concurrent.Future;
import org.openecard.common.DynamicContext;
import org.openecard.gui.ResultStatus;
import org.openecard.gui.StepResult;
-import org.openecard.gui.UserConsentNavigator;
+import org.openecard.gui.android.AndroidNavigator;
import org.openecard.gui.android.AndroidResult;
import org.openecard.gui.android.GuiIfaceReceiver;
import org.openecard.gui.definition.InputInfoUnit;
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
* @author Sebastian Schuberth
* @author Tobias Wich
*/
-public class PINManagementNavigator implements UserConsentNavigator {
+public class PINManagementNavigator extends AndroidNavigator {
private static final Logger LOG = LoggerFactory.getLogger(PINManagementNavigator.class);
@@ -90,6 +90,7 @@ public class PINManagementNavigator implements UserConsentNavigator {
idx++;
Step pinStep = steps.get(0);
+ return displayAndExecuteBackground(pinStep, () -> {
DynamicContext ctx = DynamicContext.getInstance(GetCardsAndPINStatusAction.DYNCTX_INSTANCE_KEY);
RecognizedState uiPinState = (RecognizedState) ctx.get(GetCardsAndPINStatusAction.PIN_STATUS);
Boolean pinCorrect = (Boolean) ctx.get(GetCardsAndPINStatusAction.PIN_CORRECT);
@@ -127,8 +128,9 @@ public class PINManagementNavigator implements UserConsentNavigator {
writeBackValues(pinStep.getInputInfoUnits(), outInfo);
return new AndroidResult(pinStep, ResultStatus.OK, outInfo);
} catch (InterruptedException ex) {
- return new AndroidResult(pinStep, ResultStatus.CANCEL, Collections.EMPTY_LIST);
+ return new AndroidResult(pinStep, ResultStatus.INTERRUPTED, Collections.EMPTY_LIST);
}
+ });
}
@Override
