'Deprecated method createConfirmDeviceCredentialIntent (CharSequence, CharSequence)

There is a method for creating intent for asking user to authenticate. It was prompting to authenticate with biometrics (if exists) or with PIN/Pattern/Password if no biometrics enrolled. Now it is deprecated and suggests to build biometric prompt manually. But in the source code I see almost the same public method that returns same intent, but requesting another parameter - userId

/**
 * Get an intent to prompt the user to confirm credentials (pin, pattern or password)
 * for the given user. The caller is expected to launch this activity using
 * {@link android.app.Activity#startActivityForResult(Intent, int)} and check for
 * {@link android.app.Activity#RESULT_OK} if the user successfully completes the challenge.
 *
 * @return the intent for launching the activity or null if no password is required.
 *
 * @hide
 */
public Intent createConfirmDeviceCredentialIntent(
        CharSequence title, CharSequence description, int userId) {
    if (!isDeviceSecure(userId)) return null;
    Intent intent = new Intent(ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER);
    intent.putExtra(EXTRA_TITLE, title);
    intent.putExtra(EXTRA_DESCRIPTION, description);
    intent.putExtra(Intent.EXTRA_USER_ID, userId);

    // explicitly set the package for security
    intent.setPackage(getSettingsPackageForIntent(intent));

    return intent;
}

Now there is no explanation what is userId expected in this method. Can someone point me to the relevant documentation, please? And second, is it better than building biometric prompt by myself and handling all its states ? I'm using currently

implementation 'androidx.biometric:biometric:1.2.0-alpha04


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source