Cred mng app URI documentation

* Add URI matching documentation

Bug: 177979648
Test: build docs
Change-Id: I44d40e919cce1b4f955f562b1cf6cbad450b4b58
This commit is contained in:
Alex Johnston
2021-04-20 16:26:04 +01:00
parent f715fddd3c
commit c271813dcf

View File

@@ -18,6 +18,7 @@ package android.security;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.Activity;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -27,6 +28,7 @@ import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
import java.io.IOException;
import java.security.Principal;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -89,6 +91,13 @@ public final class AppUriAuthenticationPolicy implements Parcelable {
* <p>
* If this method is called with a package name and URI that was previously added, the
* previous alias will be overwritten.
* <p>
* When the system tries to determine which alias to return to a requesting app calling
* {@code KeyChain.choosePrivateKeyAlias}, it will choose the alias whose associated URI
* exactly matches the URI provided in {@link KeyChain#choosePrivateKeyAlias(
* Activity, KeyChainAliasCallback, String[], Principal[], Uri, String)} or the URI
* built from the host and port provided in {@link KeyChain#choosePrivateKeyAlias(
* Activity, KeyChainAliasCallback, String[], Principal[], String, int, String)}.
*
* @param appPackageName The app's package name to authenticate the user to.
* @param uri The URI to authenticate the user to.