Merge "Revert "Remove deprecated RecoveryController API."" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4147a83ae5
@@ -4355,6 +4355,7 @@ package android.security.keystore.recovery {
|
||||
method public byte[] getServerParams();
|
||||
method public int getSnapshotVersion();
|
||||
method public java.security.cert.CertPath getTrustedHardwareCertPath();
|
||||
method public deprecated byte[] getTrustedHardwarePublicKey();
|
||||
method public java.util.List<android.security.keystore.recovery.WrappedApplicationKey> getWrappedApplicationKeys();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyChainSnapshot> CREATOR;
|
||||
@@ -4379,18 +4380,25 @@ package android.security.keystore.recovery {
|
||||
|
||||
public class RecoveryController {
|
||||
method public android.security.keystore.recovery.RecoverySession createRecoverySession();
|
||||
method public byte[] generateAndStoreKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
|
||||
method public deprecated java.security.Key generateKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
|
||||
method public java.security.Key generateKey(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
|
||||
method public deprecated java.util.List<java.lang.String> getAliases(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public java.util.List<java.lang.String> getAliases() throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public static android.security.keystore.recovery.RecoveryController getInstance(android.content.Context);
|
||||
method public java.security.Key getKey(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException, java.security.UnrecoverableKeyException;
|
||||
method public android.security.keystore.recovery.KeyChainSnapshot getKeyChainSnapshot() throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated android.security.keystore.recovery.KeyChainSnapshot getRecoveryData() throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public int[] getRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated int getRecoveryStatus(java.lang.String, java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public int getRecoveryStatus(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public java.util.Map<java.lang.String, java.security.cert.X509Certificate> getRootCertificates();
|
||||
method public java.security.Key importKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
|
||||
method public deprecated void initRecoveryService(java.lang.String, byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public void initRecoveryService(java.lang.String, byte[], byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public void removeKey(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public void setRecoverySecretTypes(int[]) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated void setRecoveryStatus(java.lang.String, java.lang.String, int) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.content.pm.PackageManager.NameNotFoundException;
|
||||
method public void setRecoveryStatus(java.lang.String, int) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public void setServerParams(byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public void setSnapshotCreatedPendingIntent(android.app.PendingIntent) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
@@ -4402,6 +4410,9 @@ package android.security.keystore.recovery {
|
||||
public class RecoverySession implements java.lang.AutoCloseable {
|
||||
method public void close();
|
||||
method public java.util.Map<java.lang.String, java.security.Key> recoverKeyChainSnapshot(byte[], java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
|
||||
method public deprecated java.util.Map<java.lang.String, byte[]> recoverKeys(byte[], java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
|
||||
method public deprecated byte[] start(byte[], byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated byte[] start(java.security.cert.CertPath, byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public byte[] start(java.lang.String, java.security.cert.CertPath, byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
}
|
||||
|
||||
@@ -4411,6 +4422,7 @@ package android.security.keystore.recovery {
|
||||
|
||||
public final class WrappedApplicationKey implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public deprecated byte[] getAccount();
|
||||
method public java.lang.String getAlias();
|
||||
method public byte[] getEncryptedKeyMaterial();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
@@ -4420,6 +4432,7 @@ package android.security.keystore.recovery {
|
||||
public static class WrappedApplicationKey.Builder {
|
||||
ctor public WrappedApplicationKey.Builder();
|
||||
method public android.security.keystore.recovery.WrappedApplicationKey build();
|
||||
method public deprecated android.security.keystore.recovery.WrappedApplicationKey.Builder setAccount(byte[]);
|
||||
method public android.security.keystore.recovery.WrappedApplicationKey.Builder setAlias(java.lang.String);
|
||||
method public android.security.keystore.recovery.WrappedApplicationKey.Builder setEncryptedKeyMaterial(byte[]);
|
||||
}
|
||||
|
||||
@@ -91,37 +91,6 @@ package android.os {
|
||||
|
||||
}
|
||||
|
||||
package android.security.keystore.recovery {
|
||||
|
||||
public final class KeyChainSnapshot implements android.os.Parcelable {
|
||||
method public deprecated byte[] getTrustedHardwarePublicKey();
|
||||
}
|
||||
|
||||
public class RecoveryController {
|
||||
method public deprecated java.security.Key generateKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
|
||||
method public deprecated java.util.List<java.lang.String> getAliases(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated android.security.keystore.recovery.KeyChainSnapshot getRecoveryData() throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated int getRecoveryStatus(java.lang.String, java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated void initRecoveryService(java.lang.String, byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated void setRecoveryStatus(java.lang.String, java.lang.String, int) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.content.pm.PackageManager.NameNotFoundException;
|
||||
}
|
||||
|
||||
public class RecoverySession implements java.lang.AutoCloseable {
|
||||
method public deprecated java.util.Map<java.lang.String, byte[]> recoverKeys(byte[], java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException;
|
||||
method public deprecated byte[] start(byte[], byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
method public deprecated byte[] start(java.security.cert.CertPath, byte[], byte[], java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
}
|
||||
|
||||
public final class WrappedApplicationKey implements android.os.Parcelable {
|
||||
method public deprecated byte[] getAccount();
|
||||
}
|
||||
|
||||
public static class WrappedApplicationKey.Builder {
|
||||
method public deprecated android.security.keystore.recovery.WrappedApplicationKey.Builder setAccount(byte[]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.service.notification {
|
||||
|
||||
public abstract class NotificationListenerService extends android.app.Service {
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class KeyChainSnapshot implements Parcelable {
|
||||
*
|
||||
* See implementation for binary key format.
|
||||
*
|
||||
* @removed Use {@link #getTrustedHardwareCertPath} instead.
|
||||
* @deprecated Use {@link #getTrustedHardwareCertPath} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public @NonNull byte[] getTrustedHardwarePublicKey() {
|
||||
@@ -227,7 +227,7 @@ public final class KeyChainSnapshot implements Parcelable {
|
||||
*
|
||||
* @param publicKey The public key
|
||||
* @return This builder.
|
||||
* @removed Use {@link #setTrustedHardwareCertPath} instead.
|
||||
* @deprecated Use {@link #setTrustedHardwareCertPath} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public Builder setTrustedHardwarePublicKey(byte[] publicKey) {
|
||||
|
||||
@@ -288,7 +288,7 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #initRecoveryService(String, byte[], byte[])} instead.
|
||||
* @deprecated Use {@link #initRecoveryService(String, byte[], byte[])} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -359,7 +359,7 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #getKeyChainSnapshot()}
|
||||
* @deprecated Use {@link #getKeyChainSnapshot()}
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -435,7 +435,7 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #getAliases()}.
|
||||
* @deprecated Use {@link #getAliases()}.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -460,7 +460,7 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #setRecoveryStatus(String, int)}
|
||||
* @deprecated Use {@link #setRecoveryStatus(String, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -494,7 +494,7 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #getRecoveryStatus(String)}.
|
||||
* @deprecated Use {@link #getRecoveryStatus(String)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -576,7 +576,26 @@ public class RecoveryController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #generateKey(String)}.
|
||||
* Deprecated.
|
||||
* Generates a AES256/GCM/NoPADDING key called {@code alias} and loads it into the recoverable
|
||||
* key store. Returns the raw material of the key.
|
||||
*
|
||||
* @param alias The key alias.
|
||||
* @param account The account associated with the key
|
||||
* @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery
|
||||
* service.
|
||||
* @throws LockScreenRequiredException if the user has not set a lock screen. This is required
|
||||
* to generate recoverable keys, as the snapshots are encrypted using a key derived from the
|
||||
* lock screen.
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
public byte[] generateAndStoreKey(@NonNull String alias, byte[] account)
|
||||
throws InternalRecoveryServiceException, LockScreenRequiredException {
|
||||
throw new UnsupportedOperationException("Operation is not supported, use generateKey");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #generateKey(String)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
|
||||
@@ -78,7 +78,7 @@ public class RecoverySession implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #start(String, CertPath, byte[], byte[], List)} instead.
|
||||
* @deprecated Use {@link #start(String, CertPath, byte[], byte[], List)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -109,7 +109,7 @@ public class RecoverySession implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #start(String, CertPath, byte[], byte[], List)} instead.
|
||||
* @deprecated Use {@link #start(String, CertPath, byte[], byte[], List)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
@@ -198,7 +198,7 @@ public class RecoverySession implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed Use {@link #recoverKeyChainSnapshot(byte[], List)} instead.
|
||||
* @deprecated Use {@link #recoverKeyChainSnapshot(byte[], List)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE)
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class WrappedApplicationKey implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed AOSP does not associate keys with accounts. This may be done by system app.
|
||||
* @deprecated AOSP does not associate keys with accounts. This may be done by system app.
|
||||
*/
|
||||
@Deprecated
|
||||
public Builder setAccount(@NonNull byte[] account) {
|
||||
@@ -133,7 +133,7 @@ public final class WrappedApplicationKey implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* @removed AOSP does not associate keys with accounts. This may be done by system app.
|
||||
* @deprecated AOSP does not associate keys with accounts. This may be done by system app.
|
||||
*/
|
||||
@Deprecated
|
||||
public @NonNull byte[] getAccount() {
|
||||
|
||||
Reference in New Issue
Block a user