Loading core/java/android/service/credentials/BeginCreateCredentialRequest.java +3 −3 Original line number Diff line number Diff line Loading @@ -25,8 +25,6 @@ import android.os.Parcelable; import com.android.internal.util.Preconditions; import java.util.Objects; /** * Request for beginning a create credential request. * Loading Loading @@ -54,7 +52,9 @@ public class BeginCreateCredentialRequest implements Parcelable { @Nullable CallingAppInfo callingAppInfo) { mType = Preconditions.checkStringNotEmpty(type, "type must not be null or empty"); mData = Objects.requireNonNull(data, "data must not be null"); Bundle dataCopy = new Bundle(); dataCopy.putAll(data); mData = dataCopy; mCallingAppInfo = callingAppInfo; } Loading core/java/android/service/credentials/BeginGetCredentialOption.java +4 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.service.credentials; import static java.util.Objects.requireNonNull; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Bundle; Loading Loading @@ -60,9 +58,7 @@ public class BeginGetCredentialOption implements Parcelable { private final Bundle mCandidateQueryData; /** * Returns the unique id associated with this request. Providers must pass this id * to the constructor of {@link CredentialEntry} while creating a candidate credential * entry for this request option. * Returns the unique id associated with this request. This is for internal use only. */ @NonNull public String getId() { Loading Loading @@ -127,8 +123,9 @@ public class BeginGetCredentialOption implements Parcelable { @NonNull Bundle candidateQueryData) { mId = id; mType = Preconditions.checkStringNotEmpty(type, "type must not be empty"); mCandidateQueryData = requireNonNull( candidateQueryData, "candidateQueryData must not be null"); Bundle bundle = new Bundle(); bundle.putAll(candidateQueryData); mCandidateQueryData = bundle; addIdToBundle(); } Loading services/credentials/java/com/android/server/credentials/ProviderCreateSession.java +9 −4 Original line number Diff line number Diff line Loading @@ -77,14 +77,19 @@ public final class ProviderCreateSession extends ProviderSession< createRequestSession.mClientRequest, createRequestSession.mClientAppInfo); if (providerCreateRequest != null) { BeginCreateCredentialRequest providerBeginCreateRequest = return new ProviderCreateSession( context, providerInfo, createRequestSession, userId, remoteCredentialService, constructQueryPhaseRequest(createRequestSession.mClientRequest.getType(), createRequestSession.mClientRequest.getCandidateQueryData(), createRequestSession.mClientAppInfo, createRequestSession .mClientRequest.alwaysSendAppInfoToProvider()); return new ProviderCreateSession(context, providerInfo, createRequestSession, userId, remoteCredentialService, providerBeginCreateRequest, providerCreateRequest); .mClientRequest.alwaysSendAppInfoToProvider()), providerCreateRequest ); } Log.i(TAG, "Unable to create provider session"); return null; Loading services/credentials/java/com/android/server/credentials/ProviderGetSession.java +14 −8 Original line number Diff line number Diff line Loading @@ -97,14 +97,20 @@ public final class ProviderGetSession extends ProviderSession<BeginGetCredential if (filteredRequest != null) { Map<String, CredentialOption> beginGetOptionToCredentialOptionMap = new HashMap<>(); BeginGetCredentialRequest beginGetCredentialRequest = constructQueryPhaseRequest( return new ProviderGetSession( context, providerInfo, getRequestSession, userId, remoteCredentialService, constructQueryPhaseRequest( filteredRequest, getRequestSession.mClientAppInfo, getRequestSession.mClientRequest.alwaysSendAppInfoToProvider(), beginGetOptionToCredentialOptionMap); return new ProviderGetSession(context, providerInfo, getRequestSession, userId, remoteCredentialService, beginGetCredentialRequest, filteredRequest, beginGetOptionToCredentialOptionMap), filteredRequest, getRequestSession.mClientAppInfo, beginGetOptionToCredentialOptionMap); beginGetOptionToCredentialOptionMap ); } Log.i(TAG, "Unable to create provider session"); return null; Loading Loading @@ -168,7 +174,7 @@ public final class ProviderGetSession extends ProviderSession<BeginGetCredential mCompleteRequest = completeGetRequest; mCallingAppInfo = callingAppInfo; setStatus(Status.PENDING); mBeginGetOptionToCredentialOptionMap = beginGetOptionToCredentialOptionMap; mBeginGetOptionToCredentialOptionMap = new HashMap<>(beginGetOptionToCredentialOptionMap); } /** Called when the provider response has been updated by an external source. */ Loading Loading
core/java/android/service/credentials/BeginCreateCredentialRequest.java +3 −3 Original line number Diff line number Diff line Loading @@ -25,8 +25,6 @@ import android.os.Parcelable; import com.android.internal.util.Preconditions; import java.util.Objects; /** * Request for beginning a create credential request. * Loading Loading @@ -54,7 +52,9 @@ public class BeginCreateCredentialRequest implements Parcelable { @Nullable CallingAppInfo callingAppInfo) { mType = Preconditions.checkStringNotEmpty(type, "type must not be null or empty"); mData = Objects.requireNonNull(data, "data must not be null"); Bundle dataCopy = new Bundle(); dataCopy.putAll(data); mData = dataCopy; mCallingAppInfo = callingAppInfo; } Loading
core/java/android/service/credentials/BeginGetCredentialOption.java +4 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.service.credentials; import static java.util.Objects.requireNonNull; import android.annotation.NonNull; import android.annotation.SuppressLint; import android.os.Bundle; Loading Loading @@ -60,9 +58,7 @@ public class BeginGetCredentialOption implements Parcelable { private final Bundle mCandidateQueryData; /** * Returns the unique id associated with this request. Providers must pass this id * to the constructor of {@link CredentialEntry} while creating a candidate credential * entry for this request option. * Returns the unique id associated with this request. This is for internal use only. */ @NonNull public String getId() { Loading Loading @@ -127,8 +123,9 @@ public class BeginGetCredentialOption implements Parcelable { @NonNull Bundle candidateQueryData) { mId = id; mType = Preconditions.checkStringNotEmpty(type, "type must not be empty"); mCandidateQueryData = requireNonNull( candidateQueryData, "candidateQueryData must not be null"); Bundle bundle = new Bundle(); bundle.putAll(candidateQueryData); mCandidateQueryData = bundle; addIdToBundle(); } Loading
services/credentials/java/com/android/server/credentials/ProviderCreateSession.java +9 −4 Original line number Diff line number Diff line Loading @@ -77,14 +77,19 @@ public final class ProviderCreateSession extends ProviderSession< createRequestSession.mClientRequest, createRequestSession.mClientAppInfo); if (providerCreateRequest != null) { BeginCreateCredentialRequest providerBeginCreateRequest = return new ProviderCreateSession( context, providerInfo, createRequestSession, userId, remoteCredentialService, constructQueryPhaseRequest(createRequestSession.mClientRequest.getType(), createRequestSession.mClientRequest.getCandidateQueryData(), createRequestSession.mClientAppInfo, createRequestSession .mClientRequest.alwaysSendAppInfoToProvider()); return new ProviderCreateSession(context, providerInfo, createRequestSession, userId, remoteCredentialService, providerBeginCreateRequest, providerCreateRequest); .mClientRequest.alwaysSendAppInfoToProvider()), providerCreateRequest ); } Log.i(TAG, "Unable to create provider session"); return null; Loading
services/credentials/java/com/android/server/credentials/ProviderGetSession.java +14 −8 Original line number Diff line number Diff line Loading @@ -97,14 +97,20 @@ public final class ProviderGetSession extends ProviderSession<BeginGetCredential if (filteredRequest != null) { Map<String, CredentialOption> beginGetOptionToCredentialOptionMap = new HashMap<>(); BeginGetCredentialRequest beginGetCredentialRequest = constructQueryPhaseRequest( return new ProviderGetSession( context, providerInfo, getRequestSession, userId, remoteCredentialService, constructQueryPhaseRequest( filteredRequest, getRequestSession.mClientAppInfo, getRequestSession.mClientRequest.alwaysSendAppInfoToProvider(), beginGetOptionToCredentialOptionMap); return new ProviderGetSession(context, providerInfo, getRequestSession, userId, remoteCredentialService, beginGetCredentialRequest, filteredRequest, beginGetOptionToCredentialOptionMap), filteredRequest, getRequestSession.mClientAppInfo, beginGetOptionToCredentialOptionMap); beginGetOptionToCredentialOptionMap ); } Log.i(TAG, "Unable to create provider session"); return null; Loading Loading @@ -168,7 +174,7 @@ public final class ProviderGetSession extends ProviderSession<BeginGetCredential mCompleteRequest = completeGetRequest; mCallingAppInfo = callingAppInfo; setStatus(Status.PENDING); mBeginGetOptionToCredentialOptionMap = beginGetOptionToCredentialOptionMap; mBeginGetOptionToCredentialOptionMap = new HashMap<>(beginGetOptionToCredentialOptionMap); } /** Called when the provider response has been updated by an external source. */ Loading