From dbb6d8373fb3a0f642bd3b4750de7144eef61b9d Mon Sep 17 00:00:00 2001 From: John Wu Date: Wed, 23 Mar 2022 16:39:08 +0000 Subject: [PATCH] Merge "Revert "Update AndroidKeyStoreMaintenance framework API"" am: b8ebf69571 This was erroneously merged blank. Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2017095 Bug: 226691866 Change-Id: I80b9a9a9f84466c49e4dfe80d14cd302fcc7f4e3 (cherry picked from commit 2e64dda5719c738da2e5a9372a3c5b2e031cd38b) --- .../security/AndroidKeyStoreMaintenance.java | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/keystore/java/android/security/AndroidKeyStoreMaintenance.java b/keystore/java/android/security/AndroidKeyStoreMaintenance.java index 05fb4c3cf76f3..919a93b8f1071 100644 --- a/keystore/java/android/security/AndroidKeyStoreMaintenance.java +++ b/keystore/java/android/security/AndroidKeyStoreMaintenance.java @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.os.ServiceManager; import android.os.ServiceSpecificException; -import android.security.keystore.KeyProperties; import android.security.maintenance.IKeystoreMaintenance; import android.system.keystore2.Domain; import android.system.keystore2.KeyDescriptor; @@ -158,11 +157,6 @@ public class AndroidKeyStoreMaintenance { * Migrates a key given by the source descriptor to the location designated by the destination * descriptor. * - * If Domain::APP is selected in either source or destination, nspace must be set to - * {@link KeyProperties#NAMESPACE_APPLICATION}, implying the caller's UID. - * If the caller has the MIGRATE_ANY_KEY permission, Domain::APP may be used with - * other nspace values which then indicates the UID of a different application. - * * @param source - The key to migrate may be specified by Domain.APP, Domain.SELINUX, or * Domain.KEY_ID. The caller needs the permissions use, delete, and grant for the * source namespace. @@ -189,20 +183,4 @@ public class AndroidKeyStoreMaintenance { return SYSTEM_ERROR; } } - - /** - * @see IKeystoreMaintenance#listEntries(int, long) - */ - @Nullable - public static KeyDescriptor[] listEntries(int domain, long nspace) { - try { - return getService().listEntries(domain, nspace); - } catch (ServiceSpecificException e) { - Log.e(TAG, "listEntries failed", e); - return null; - } catch (Exception e) { - Log.e(TAG, "Can not connect to keystore", e); - return null; - } - } }