Merge "Propagate the right permission information on empty prepare response" into udc-dev am: 17d57e9f30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23680731 Change-Id: Iffb7a08ab51282b5f90d4bc59d6839906d778e22 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import static android.Manifest.permission.CREDENTIAL_MANAGER_SET_ORIGIN;
|
|||||||
import static android.content.Context.CREDENTIAL_SERVICE;
|
import static android.content.Context.CREDENTIAL_SERVICE;
|
||||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.annotation.UserIdInt;
|
import android.annotation.UserIdInt;
|
||||||
@@ -55,6 +56,7 @@ import android.provider.DeviceConfig;
|
|||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.service.credentials.CallingAppInfo;
|
import android.service.credentials.CallingAppInfo;
|
||||||
import android.service.credentials.CredentialProviderInfoFactory;
|
import android.service.credentials.CredentialProviderInfoFactory;
|
||||||
|
import android.service.credentials.PermissionUtils;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
@@ -546,11 +548,16 @@ public final class CredentialManagerService
|
|||||||
|
|
||||||
if (providerSessions.isEmpty()) {
|
if (providerSessions.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
// TODO: fix
|
|
||||||
prepareGetCredentialCallback.onResponse(
|
prepareGetCredentialCallback.onResponse(
|
||||||
new PrepareGetCredentialResponseInternal(
|
new PrepareGetCredentialResponseInternal(PermissionUtils.hasPermission(
|
||||||
false, null,
|
mContext,
|
||||||
false, false, null));
|
callingPackage,
|
||||||
|
Manifest.permission
|
||||||
|
.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS),
|
||||||
|
/*credentialResultTypes=*/null,
|
||||||
|
/*hasAuthenticationResults=*/false,
|
||||||
|
/*hasRemoteResults=*/false,
|
||||||
|
/*pendingIntent=*/null));
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Slog.e(
|
Slog.e(
|
||||||
TAG,
|
TAG,
|
||||||
|
|||||||
Reference in New Issue
Block a user