app/src/main/java/com/sap/cloud/mobile/fiori/demo/onboarding/OnboardingView.java
@RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    public void startFingerprint() {
        int requestCode;
        Intent i = new Intent();
        i.setComponent(new ComponentName(activity.getPackageName(), "com.sap.cloud.mobile.onboarding.fingerprint.FingerprintActivity"));

        EnableFingerprintSettings enableSettings;
        FingerprintSettings fingerprintSettings;
        FingerprintErrorSettings fingerprintErrorSettings;

        if (activity.isUITest) {
            boolean isCreateScenario = activity.getIntent().getBooleanExtra(KEY_TEST_CREATE_RANDOM_PASSCODE, false);
            if(isCreateScenario){
                KeyHandler.passcodeInputMode = PasscodeInputMode.CREATE;
                requestCode = OnboardingActivity.FINGERPRINT_CREATE;
            }else{
                KeyHandler.passcodeInputMode = PasscodeInputMode.MATCH;
                requestCode = OnboardingActivity.FINGERPRINT_ENTER;
            }

            String fingerprintKeyAlgorythm = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_KEY_ALGORITHM);
            KeyHandler.algorithm = fingerprintKeyAlgorythm;

            String fingerprintBlockMode = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_BLOCK_MODE);
            KeyHandler.blockMode = fingerprintBlockMode;

            String fingerprintEncryptionPadding = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_ENCRYPTION_PADDING);
            KeyHandler.encryptionPadding = fingerprintEncryptionPadding;

            enableSettings = new EnableFingerprintSettings(activity.getIntent());
            fingerprintSettings = new FingerprintSettings(activity.getIntent());
            fingerprintErrorSettings = new FingerprintErrorSettings(activity.getIntent());
        } else {

            boolean isCreateScenario = activity.sharedPreferences.getBoolean(
                    KEY_CREATE_RANDOM_PASSCODE, false);
            if (isCreateScenario) {
                KeyHandler.passcodeInputMode = PasscodeInputMode.CREATE;
                requestCode = OnboardingActivity.FINGERPRINT_CREATE;
            } else {
                KeyHandler.passcodeInputMode = PasscodeInputMode.MATCH;
                requestCode = OnboardingActivity.FINGERPRINT_ENTER;
            }

            String fingerprintKeyAlgorithm = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_KEY_ALGORITHM, KeyProperties.KEY_ALGORITHM_AES);
            KeyHandler.algorithm = fingerprintKeyAlgorithm;

            String fingerprintBlockMode = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_BLOCK_MODE, KeyProperties.BLOCK_MODE_CBC);
            KeyHandler.blockMode = fingerprintBlockMode;

            String fingerprintEncryptionPadding = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_ENCRYPTION_PADDING, KeyProperties.ENCRYPTION_PADDING_PKCS7);
            KeyHandler.encryptionPadding = fingerprintEncryptionPadding;

            enableSettings = new EnableFingerprintSettings();
                String fingerprintEnableHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_ENABLE_HEADLINE_LABEL, null);
                if (fingerprintEnableHeadlineLabel != null) {
                    enableSettings.setEnableHeadlineLabel(fingerprintEnableHeadlineLabel);
                }

                String fingerprintEnableDetailLabel = activity.sharedPreferences.getString(
                        KEY_ENABLE_DETAIL_LABEL, null);
                if (fingerprintEnableDetailLabel != null) {
                    enableSettings.setEnableDetailLabel(fingerprintEnableDetailLabel);
                }

                String fingerprintEnableButtonTitle = activity.sharedPreferences.getString(
                        KEY_ENABLE_BUTTON_TITLE, null);
                if (fingerprintEnableButtonTitle != null) {
                    enableSettings.setEnableButtonTitle(fingerprintEnableButtonTitle);
                }

                String fingerprintEnableAlertTitle = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_TITLE, null);
                if (fingerprintEnableAlertTitle != null) {
                    enableSettings.setAlertTitleText(fingerprintEnableAlertTitle);
                }

                String fingerprintEnableAlertMessage = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_MESSAGE, null);
                if (fingerprintEnableAlertMessage != null) {
                    enableSettings.setAlertMessageText(fingerprintEnableAlertMessage);
                }

                String fingerprintEnableAlertCancelText = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT, null);
                if (fingerprintEnableAlertCancelText != null) {
                    enableSettings.setAlertCancelButtonText(fingerprintEnableAlertCancelText);
                }

                String fingerprintEnableAlertSettingsText = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT, null);
                if (fingerprintEnableAlertSettingsText != null) {
                    enableSettings.setAlertSettingsButtonText(fingerprintEnableAlertSettingsText);
                }

                String fingerprintEnableSkipButtonext = activity.sharedPreferences.getString(
                        KEY_SKIP_FOR_NOW_BUTTON_TITLE, null);
                if (fingerprintEnableSkipButtonext != null) {
                    enableSettings.setSkipForNowButtonTitle(fingerprintEnableSkipButtonext);
                }

            fingerprintSettings = new FingerprintSettings();
                String fingerprintHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_FINGERPRINT_HEADLINE_LABEL, null);
                if (fingerprintHeadlineLabel != null) {
                    fingerprintSettings.setHeadlineLabel(fingerprintHeadlineLabel);
                }

            String fingerprintActionHandler = activity.sharedPreferences.getString(
                    KEY_GENERAL_ACTION_HANDLER, null);
            if (fingerprintActionHandler != null  && !fingerprintActionHandler.equals("")) {
                fingerprintActionHandler = FingerprintActionHandlerImpl.class.getName();
                fingerprintSettings.setActionHandler(fingerprintActionHandler);
            }

                String fingerprintFallbackButtonTitle = activity.sharedPreferences.getString(KEY_FINGERPRINT_BUTTON_TITLE
                        , null);
                if (fingerprintFallbackButtonTitle != null) {
                    fingerprintSettings.setFallbackButtonTitle(fingerprintFallbackButtonTitle);
                }

                boolean fallbackEnabled = activity.sharedPreferences.getBoolean(KEY_FINGERPRINT_BUTTON_ENABLED
                        , false);
                fingerprintSettings.setFallbackButtonEnabled(fallbackEnabled);

                String fingerprintDetailLabel = activity.sharedPreferences.getString(
                        KEY_FINGERPRINT_DETAIL_LABEL, null);
                if (fingerprintDetailLabel != null) {
                    fingerprintSettings.setDetailLabel(fingerprintDetailLabel);
                }

            fingerprintErrorSettings = new FingerprintErrorSettings();
                String fingerprintErrorHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_ERROR_HEADLINE_LABEL, null);
                if (fingerprintErrorHeadlineLabel != null) {
                    fingerprintErrorSettings.setFingerprintErrorHeadlineLabel(
                            fingerprintErrorHeadlineLabel);
                }

                String fingerprintErrorDetailLabel = activity.sharedPreferences.getString(
                        KEY_ERROR_DETAIL_LABEL, null);
                if (fingerprintErrorDetailLabel != null) {
                    fingerprintErrorSettings.setFingerprintErrorDetailLabel(fingerprintErrorDetailLabel);
                }

                String fingerprintErrorResetButton = activity.sharedPreferences.getString(
                        KEY_ERROR_RESET_BUTTON, null);
                if (fingerprintErrorResetButton != null) {
                    fingerprintErrorSettings.setFingerprintErrorResetButtonTitle(
                            fingerprintErrorResetButton);
                }
                boolean resetEnabled = activity.sharedPreferences.getBoolean(
                        KEY_ERROR_RESET_ENABLED, false);
                fingerprintErrorSettings.setFingerprintErrorResetEnabled(resetEnabled);
        }

        enableSettings.saveToIntent(i);
        fingerprintSettings.saveToIntent(i);
        fingerprintErrorSettings.saveToIntent(i);

        activity.startActivityForResult(i, requestCode);
    }
/**
     * Starts a fingerprint activity with intent configured based on the shared preferences.
     */
Starts a fingerprint activity with intent configured based on the shared preferences.
Starts a fingerprint activity with intent configured based on the shared preferences .
@RequiresApi(api = Build.VERSION_CODES.M)
    @Override
    public void startFingerprint() {
        int requestCode;
        Intent i = new Intent();
        i.setComponent(new ComponentName(activity.getPackageName(), "com.sap.cloud.mobile.onboarding.fingerprint.FingerprintActivity"));
        EnableFingerprintSettings enableSettings;
        FingerprintSettings fingerprintSettings;
        FingerprintErrorSettings fingerprintErrorSettings;
        if (activity.isUITest) {
            boolean isCreateScenario = activity.getIntent().getBooleanExtra(KEY_TEST_CREATE_RANDOM_PASSCODE, false);
            if(isCreateScenario){
                KeyHandler.passcodeInputMode = PasscodeInputMode.CREATE;
                requestCode = OnboardingActivity.FINGERPRINT_CREATE;
            }else{
                KeyHandler.passcodeInputMode = PasscodeInputMode.MATCH;
                requestCode = OnboardingActivity.FINGERPRINT_ENTER;
            }
            String fingerprintKeyAlgorythm = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_KEY_ALGORITHM);
            KeyHandler.algorithm = fingerprintKeyAlgorythm;
            String fingerprintBlockMode = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_BLOCK_MODE);
            KeyHandler.blockMode = fingerprintBlockMode;
            String fingerprintEncryptionPadding = activity.getIntent().getStringExtra(KEY_TEST_FINGERPRINT_ENCRYPTION_PADDING);
            KeyHandler.encryptionPadding = fingerprintEncryptionPadding;
            enableSettings = new EnableFingerprintSettings(activity.getIntent());
            fingerprintSettings = new FingerprintSettings(activity.getIntent());
            fingerprintErrorSettings = new FingerprintErrorSettings(activity.getIntent());
        } else {
            boolean isCreateScenario = activity.sharedPreferences.getBoolean(
                    KEY_CREATE_RANDOM_PASSCODE, false);
            if (isCreateScenario) {
                KeyHandler.passcodeInputMode = PasscodeInputMode.CREATE;
                requestCode = OnboardingActivity.FINGERPRINT_CREATE;
            } else {
                KeyHandler.passcodeInputMode = PasscodeInputMode.MATCH;
                requestCode = OnboardingActivity.FINGERPRINT_ENTER;
            }
            String fingerprintKeyAlgorithm = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_KEY_ALGORITHM, KeyProperties.KEY_ALGORITHM_AES);
            KeyHandler.algorithm = fingerprintKeyAlgorithm;
            String fingerprintBlockMode = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_BLOCK_MODE, KeyProperties.BLOCK_MODE_CBC);
            KeyHandler.blockMode = fingerprintBlockMode;
            String fingerprintEncryptionPadding = activity.sharedPreferences.getString(
                    KEY_FINGERPRINT_ENCRYPTION_PADDING, KeyProperties.ENCRYPTION_PADDING_PKCS7);
            KeyHandler.encryptionPadding = fingerprintEncryptionPadding;
            enableSettings = new EnableFingerprintSettings();
                String fingerprintEnableHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_ENABLE_HEADLINE_LABEL, null);
                if (fingerprintEnableHeadlineLabel != null) {
                    enableSettings.setEnableHeadlineLabel(fingerprintEnableHeadlineLabel);
                }
                String fingerprintEnableDetailLabel = activity.sharedPreferences.getString(
                        KEY_ENABLE_DETAIL_LABEL, null);
                if (fingerprintEnableDetailLabel != null) {
                    enableSettings.setEnableDetailLabel(fingerprintEnableDetailLabel);
                }
                String fingerprintEnableButtonTitle = activity.sharedPreferences.getString(
                        KEY_ENABLE_BUTTON_TITLE, null);
                if (fingerprintEnableButtonTitle != null) {
                    enableSettings.setEnableButtonTitle(fingerprintEnableButtonTitle);
                }
                String fingerprintEnableAlertTitle = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_TITLE, null);
                if (fingerprintEnableAlertTitle != null) {
                    enableSettings.setAlertTitleText(fingerprintEnableAlertTitle);
                }
                String fingerprintEnableAlertMessage = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_MESSAGE, null);
                if (fingerprintEnableAlertMessage != null) {
                    enableSettings.setAlertMessageText(fingerprintEnableAlertMessage);
                }
                String fingerprintEnableAlertCancelText = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT, null);
                if (fingerprintEnableAlertCancelText != null) {
                    enableSettings.setAlertCancelButtonText(fingerprintEnableAlertCancelText);
                }
                String fingerprintEnableAlertSettingsText = activity.sharedPreferences.getString(
                        KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT, null);
                if (fingerprintEnableAlertSettingsText != null) {
                    enableSettings.setAlertSettingsButtonText(fingerprintEnableAlertSettingsText);
                }
                String fingerprintEnableSkipButtonext = activity.sharedPreferences.getString(
                        KEY_SKIP_FOR_NOW_BUTTON_TITLE, null);
                if (fingerprintEnableSkipButtonext != null) {
                    enableSettings.setSkipForNowButtonTitle(fingerprintEnableSkipButtonext);
                }
            fingerprintSettings = new FingerprintSettings();
                String fingerprintHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_FINGERPRINT_HEADLINE_LABEL, null);
                if (fingerprintHeadlineLabel != null) {
                    fingerprintSettings.setHeadlineLabel(fingerprintHeadlineLabel);
                }
            String fingerprintActionHandler = activity.sharedPreferences.getString(
                    KEY_GENERAL_ACTION_HANDLER, null);
            if (fingerprintActionHandler != null  && !fingerprintActionHandler.equals("")) {
                fingerprintActionHandler = FingerprintActionHandlerImpl.class.getName();
                fingerprintSettings.setActionHandler(fingerprintActionHandler);
            }
                String fingerprintFallbackButtonTitle = activity.sharedPreferences.getString(KEY_FINGERPRINT_BUTTON_TITLE
                        , null);
                if (fingerprintFallbackButtonTitle != null) {
                    fingerprintSettings.setFallbackButtonTitle(fingerprintFallbackButtonTitle);
                }
                boolean fallbackEnabled = activity.sharedPreferences.getBoolean(KEY_FINGERPRINT_BUTTON_ENABLED
                        , false);
                fingerprintSettings.setFallbackButtonEnabled(fallbackEnabled);
                String fingerprintDetailLabel = activity.sharedPreferences.getString(
                        KEY_FINGERPRINT_DETAIL_LABEL, null);
                if (fingerprintDetailLabel != null) {
                    fingerprintSettings.setDetailLabel(fingerprintDetailLabel);
                }
            fingerprintErrorSettings = new FingerprintErrorSettings();
                String fingerprintErrorHeadlineLabel = activity.sharedPreferences.getString(
                        KEY_ERROR_HEADLINE_LABEL, null);
                if (fingerprintErrorHeadlineLabel != null) {
                    fingerprintErrorSettings.setFingerprintErrorHeadlineLabel(
                            fingerprintErrorHeadlineLabel);
                }
                String fingerprintErrorDetailLabel = activity.sharedPreferences.getString(
                        KEY_ERROR_DETAIL_LABEL, null);
                if (fingerprintErrorDetailLabel != null) {
                    fingerprintErrorSettings.setFingerprintErrorDetailLabel(fingerprintErrorDetailLabel);
                }
                String fingerprintErrorResetButton = activity.sharedPreferences.getString(
                        KEY_ERROR_RESET_BUTTON, null);
                if (fingerprintErrorResetButton != null) {
                    fingerprintErrorSettings.setFingerprintErrorResetButtonTitle(
                            fingerprintErrorResetButton);
                }
                boolean resetEnabled = activity.sharedPreferences.getBoolean(
                        KEY_ERROR_RESET_ENABLED, false);
                fingerprintErrorSettings.setFingerprintErrorResetEnabled(resetEnabled);
        }
        enableSettings.saveToIntent(i);
        fingerprintSettings.saveToIntent(i);
        fingerprintErrorSettings.saveToIntent(i);
        activity.startActivityForResult(i, requestCode);
    }
@ RequiresApi ( api = Build . VERSION_CODES . M ) @ Override public void startFingerprint ( ) { int requestCode ; Intent i = new Intent ( ) ; i . setComponent ( new ComponentName ( activity . getPackageName ( ) , "com.sap.cloud.mobile.onboarding.fingerprint.FingerprintActivity" ) ) ; EnableFingerprintSettings enableSettings ; FingerprintSettings fingerprintSettings ; FingerprintErrorSettings fingerprintErrorSettings ; if ( activity . isUITest ) { boolean isCreateScenario = activity . getIntent ( ) . getBooleanExtra ( KEY_TEST_CREATE_RANDOM_PASSCODE , false ) ; if ( isCreateScenario ) { KeyHandler . passcodeInputMode = PasscodeInputMode . CREATE ; requestCode = OnboardingActivity . FINGERPRINT_CREATE ; } else { KeyHandler . passcodeInputMode = PasscodeInputMode . MATCH ; requestCode = OnboardingActivity . FINGERPRINT_ENTER ; } String fingerprintKeyAlgorythm = activity . getIntent ( ) . getStringExtra ( KEY_TEST_FINGERPRINT_KEY_ALGORITHM ) ; KeyHandler . algorithm = fingerprintKeyAlgorythm ; String fingerprintBlockMode = activity . getIntent ( ) . getStringExtra ( KEY_TEST_FINGERPRINT_BLOCK_MODE ) ; KeyHandler . blockMode = fingerprintBlockMode ; String fingerprintEncryptionPadding = activity . getIntent ( ) . getStringExtra ( KEY_TEST_FINGERPRINT_ENCRYPTION_PADDING ) ; KeyHandler . encryptionPadding = fingerprintEncryptionPadding ; enableSettings = new EnableFingerprintSettings ( activity . getIntent ( ) ) ; fingerprintSettings = new FingerprintSettings ( activity . getIntent ( ) ) ; fingerprintErrorSettings = new FingerprintErrorSettings ( activity . getIntent ( ) ) ; } else { boolean isCreateScenario = activity . sharedPreferences . getBoolean ( KEY_CREATE_RANDOM_PASSCODE , false ) ; if ( isCreateScenario ) { KeyHandler . passcodeInputMode = PasscodeInputMode . CREATE ; requestCode = OnboardingActivity . FINGERPRINT_CREATE ; } else { KeyHandler . passcodeInputMode = PasscodeInputMode . MATCH ; requestCode = OnboardingActivity . FINGERPRINT_ENTER ; } String fingerprintKeyAlgorithm = activity . sharedPreferences . getString ( KEY_FINGERPRINT_KEY_ALGORITHM , KeyProperties . KEY_ALGORITHM_AES ) ; KeyHandler . algorithm = fingerprintKeyAlgorithm ; String fingerprintBlockMode = activity . sharedPreferences . getString ( KEY_FINGERPRINT_BLOCK_MODE , KeyProperties . BLOCK_MODE_CBC ) ; KeyHandler . blockMode = fingerprintBlockMode ; String fingerprintEncryptionPadding = activity . sharedPreferences . getString ( KEY_FINGERPRINT_ENCRYPTION_PADDING , KeyProperties . ENCRYPTION_PADDING_PKCS7 ) ; KeyHandler . encryptionPadding = fingerprintEncryptionPadding ; enableSettings = new EnableFingerprintSettings ( ) ; String fingerprintEnableHeadlineLabel = activity . sharedPreferences . getString ( KEY_ENABLE_HEADLINE_LABEL , null ) ; if ( fingerprintEnableHeadlineLabel != null ) { enableSettings . setEnableHeadlineLabel ( fingerprintEnableHeadlineLabel ) ; } String fingerprintEnableDetailLabel = activity . sharedPreferences . getString ( KEY_ENABLE_DETAIL_LABEL , null ) ; if ( fingerprintEnableDetailLabel != null ) { enableSettings . setEnableDetailLabel ( fingerprintEnableDetailLabel ) ; } String fingerprintEnableButtonTitle = activity . sharedPreferences . getString ( KEY_ENABLE_BUTTON_TITLE , null ) ; if ( fingerprintEnableButtonTitle != null ) { enableSettings . setEnableButtonTitle ( fingerprintEnableButtonTitle ) ; } String fingerprintEnableAlertTitle = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_TITLE , null ) ; if ( fingerprintEnableAlertTitle != null ) { enableSettings . setAlertTitleText ( fingerprintEnableAlertTitle ) ; } String fingerprintEnableAlertMessage = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_MESSAGE , null ) ; if ( fingerprintEnableAlertMessage != null ) { enableSettings . setAlertMessageText ( fingerprintEnableAlertMessage ) ; } String fingerprintEnableAlertCancelText = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_CANCEL_BUTTON_TEXT , null ) ; if ( fingerprintEnableAlertCancelText != null ) { enableSettings . setAlertCancelButtonText ( fingerprintEnableAlertCancelText ) ; } String fingerprintEnableAlertSettingsText = activity . sharedPreferences . getString ( KEY_ENABLE_ALERT_SETTINGS_BUTTON_TEXT , null ) ; if ( fingerprintEnableAlertSettingsText != null ) { enableSettings . setAlertSettingsButtonText ( fingerprintEnableAlertSettingsText ) ; } String fingerprintEnableSkipButtonext = activity . sharedPreferences . getString ( KEY_SKIP_FOR_NOW_BUTTON_TITLE , null ) ; if ( fingerprintEnableSkipButtonext != null ) { enableSettings . setSkipForNowButtonTitle ( fingerprintEnableSkipButtonext ) ; } fingerprintSettings = new FingerprintSettings ( ) ; String fingerprintHeadlineLabel = activity . sharedPreferences . getString ( KEY_FINGERPRINT_HEADLINE_LABEL , null ) ; if ( fingerprintHeadlineLabel != null ) { fingerprintSettings . setHeadlineLabel ( fingerprintHeadlineLabel ) ; } String fingerprintActionHandler = activity . sharedPreferences . getString ( KEY_GENERAL_ACTION_HANDLER , null ) ; if ( fingerprintActionHandler != null && ! fingerprintActionHandler . equals ( "" ) ) { fingerprintActionHandler = FingerprintActionHandlerImpl . class . getName ( ) ; fingerprintSettings . setActionHandler ( fingerprintActionHandler ) ; } String fingerprintFallbackButtonTitle = activity . sharedPreferences . getString ( KEY_FINGERPRINT_BUTTON_TITLE , null ) ; if ( fingerprintFallbackButtonTitle != null ) { fingerprintSettings . setFallbackButtonTitle ( fingerprintFallbackButtonTitle ) ; } boolean fallbackEnabled = activity . sharedPreferences . getBoolean ( KEY_FINGERPRINT_BUTTON_ENABLED , false ) ; fingerprintSettings . setFallbackButtonEnabled ( fallbackEnabled ) ; String fingerprintDetailLabel = activity . sharedPreferences . getString ( KEY_FINGERPRINT_DETAIL_LABEL , null ) ; if ( fingerprintDetailLabel != null ) { fingerprintSettings . setDetailLabel ( fingerprintDetailLabel ) ; } fingerprintErrorSettings = new FingerprintErrorSettings ( ) ; String fingerprintErrorHeadlineLabel = activity . sharedPreferences . getString ( KEY_ERROR_HEADLINE_LABEL , null ) ; if ( fingerprintErrorHeadlineLabel != null ) { fingerprintErrorSettings . setFingerprintErrorHeadlineLabel ( fingerprintErrorHeadlineLabel ) ; } String fingerprintErrorDetailLabel = activity . sharedPreferences . getString ( KEY_ERROR_DETAIL_LABEL , null ) ; if ( fingerprintErrorDetailLabel != null ) { fingerprintErrorSettings . setFingerprintErrorDetailLabel ( fingerprintErrorDetailLabel ) ; } String fingerprintErrorResetButton = activity . sharedPreferences . getString ( KEY_ERROR_RESET_BUTTON , null ) ; if ( fingerprintErrorResetButton != null ) { fingerprintErrorSettings . setFingerprintErrorResetButtonTitle ( fingerprintErrorResetButton ) ; } boolean resetEnabled = activity . sharedPreferences . getBoolean ( KEY_ERROR_RESET_ENABLED , false ) ; fingerprintErrorSettings . setFingerprintErrorResetEnabled ( resetEnabled ) ; } enableSettings . saveToIntent ( i ) ; fingerprintSettings . saveToIntent ( i ) ; fingerprintErrorSettings . saveToIntent ( i ) ; activity . startActivityForResult ( i , requestCode ) ; }
Starts a fingerprint activity with intent configured based on the shared preferences.
Starts a fingerprint activity with intent configured based on the shared preferences .