Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 303e266b authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Revert "Update AndroidKeyStoreMaintenance framework API"" am:...

Merge "Merge "Revert "Update AndroidKeyStoreMaintenance framework API"" am: b8ebf695 am: 2e64dda5 am: 289609bd am: 7128e884"
parents 9e29506d 7b9354bf
Loading
Loading
Loading
Loading
+0 −22
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
import android.os.ServiceManager;
import android.os.ServiceManager;
import android.os.ServiceSpecificException;
import android.os.ServiceSpecificException;
import android.security.keystore.KeyProperties;
import android.security.maintenance.IKeystoreMaintenance;
import android.security.maintenance.IKeystoreMaintenance;
import android.system.keystore2.Domain;
import android.system.keystore2.Domain;
import android.system.keystore2.KeyDescriptor;
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
     * Migrates a key given by the source descriptor to the location designated by the destination
     * descriptor.
     * 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
     * @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
     *               Domain.KEY_ID. The caller needs the permissions use, delete, and grant for the
     *               source namespace.
     *               source namespace.
@@ -189,20 +183,4 @@ public class AndroidKeyStoreMaintenance {
            return SYSTEM_ERROR;
            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;
        }
    }
}
}