Loading core/java/android/security/keystore/RecoveryController.java +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class RecoveryController { public @NonNull KeychainSnapshot getRecoveryData(@NonNull byte[] account) throws InternalRecoveryServiceException { try { return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getRecoveryData(account)); return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getKeyChainSnapshot()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { Loading core/java/android/security/keystore/recovery/RecoveryController.java +29 −2 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ public class RecoveryController { } /** * Deprecated - use getKeyChainSnapshot. * * Returns data necessary to store all recoverable keys. Key material is * encrypted with user secret and recovery public key. * Loading @@ -179,10 +181,35 @@ public class RecoveryController { * service. */ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public @NonNull KeyChainSnapshot getRecoveryData() public @Nullable KeyChainSnapshot getRecoveryData() throws InternalRecoveryServiceException { try { return mBinder.getKeyChainSnapshot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { if (e.errorCode == ERROR_NO_SNAPSHOT_PENDING) { return null; } throw wrapUnexpectedServiceSpecificException(e); } } /** * Returns data necessary to store all recoverable keys. Key material is * encrypted with user secret and recovery public key. * * @return Data necessary to recover keystore or {@code null} if snapshot is not available. * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery * service. * * @hide */ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public @Nullable KeyChainSnapshot getKeyChainSnapshot() throws InternalRecoveryServiceException { try { return mBinder.getRecoveryData(/*account=*/ new byte[]{}); return mBinder.getKeyChainSnapshot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { Loading core/java/com/android/internal/widget/ILockSettings.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ interface ILockSettings { // {@code ServiceSpecificException} may be thrown to signal an error, which caller can // convert to {@code RecoveryManagerException}. void initRecoveryService(in String rootCertificateAlias, in byte[] signedPublicKeyList); KeyChainSnapshot getRecoveryData(in byte[] account); KeyChainSnapshot getKeyChainSnapshot(); byte[] generateAndStoreKey(String alias); void removeKey(String alias); void setSnapshotCreatedPendingIntent(in PendingIntent intent); Loading services/core/java/com/android/server/locksettings/LockSettingsService.java +2 −2 Original line number Diff line number Diff line Loading @@ -1982,8 +1982,8 @@ public class LockSettingsService extends ILockSettings.Stub { } @Override public KeyChainSnapshot getRecoveryData(@NonNull byte[] account) throws RemoteException { return mRecoverableKeyStoreManager.getRecoveryData(account); public KeyChainSnapshot getKeyChainSnapshot() throws RemoteException { return mRecoverableKeyStoreManager.getKeyChainSnapshot(); } public void setSnapshotCreatedPendingIntent(@Nullable PendingIntent intent) Loading services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class RecoverableKeyStoreManager { * @hide */ public @NonNull KeyChainSnapshot getRecoveryData(@NonNull byte[] account) KeyChainSnapshot getKeyChainSnapshot() throws RemoteException { checkRecoverKeyStorePermission(); int uid = Binder.getCallingUid(); Loading Loading
core/java/android/security/keystore/RecoveryController.java +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class RecoveryController { public @NonNull KeychainSnapshot getRecoveryData(@NonNull byte[] account) throws InternalRecoveryServiceException { try { return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getRecoveryData(account)); return BackwardsCompat.toLegacyKeychainSnapshot(mBinder.getKeyChainSnapshot()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { Loading
core/java/android/security/keystore/recovery/RecoveryController.java +29 −2 Original line number Diff line number Diff line Loading @@ -171,6 +171,8 @@ public class RecoveryController { } /** * Deprecated - use getKeyChainSnapshot. * * Returns data necessary to store all recoverable keys. Key material is * encrypted with user secret and recovery public key. * Loading @@ -179,10 +181,35 @@ public class RecoveryController { * service. */ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public @NonNull KeyChainSnapshot getRecoveryData() public @Nullable KeyChainSnapshot getRecoveryData() throws InternalRecoveryServiceException { try { return mBinder.getKeyChainSnapshot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { if (e.errorCode == ERROR_NO_SNAPSHOT_PENDING) { return null; } throw wrapUnexpectedServiceSpecificException(e); } } /** * Returns data necessary to store all recoverable keys. Key material is * encrypted with user secret and recovery public key. * * @return Data necessary to recover keystore or {@code null} if snapshot is not available. * @throws InternalRecoveryServiceException if an unexpected error occurred in the recovery * service. * * @hide */ @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public @Nullable KeyChainSnapshot getKeyChainSnapshot() throws InternalRecoveryServiceException { try { return mBinder.getRecoveryData(/*account=*/ new byte[]{}); return mBinder.getKeyChainSnapshot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (ServiceSpecificException e) { Loading
core/java/com/android/internal/widget/ILockSettings.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ interface ILockSettings { // {@code ServiceSpecificException} may be thrown to signal an error, which caller can // convert to {@code RecoveryManagerException}. void initRecoveryService(in String rootCertificateAlias, in byte[] signedPublicKeyList); KeyChainSnapshot getRecoveryData(in byte[] account); KeyChainSnapshot getKeyChainSnapshot(); byte[] generateAndStoreKey(String alias); void removeKey(String alias); void setSnapshotCreatedPendingIntent(in PendingIntent intent); Loading
services/core/java/com/android/server/locksettings/LockSettingsService.java +2 −2 Original line number Diff line number Diff line Loading @@ -1982,8 +1982,8 @@ public class LockSettingsService extends ILockSettings.Stub { } @Override public KeyChainSnapshot getRecoveryData(@NonNull byte[] account) throws RemoteException { return mRecoverableKeyStoreManager.getRecoveryData(account); public KeyChainSnapshot getKeyChainSnapshot() throws RemoteException { return mRecoverableKeyStoreManager.getKeyChainSnapshot(); } public void setSnapshotCreatedPendingIntent(@Nullable PendingIntent intent) Loading
services/core/java/com/android/server/locksettings/recoverablekeystore/RecoverableKeyStoreManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class RecoverableKeyStoreManager { * @hide */ public @NonNull KeyChainSnapshot getRecoveryData(@NonNull byte[] account) KeyChainSnapshot getKeyChainSnapshot() throws RemoteException { checkRecoverKeyStorePermission(); int uid = Binder.getCallingUid(); Loading