Merge "Revert "Throw invalid cert exception when deprecated initRecoveryService method"" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
41d6d7c424
@@ -285,7 +285,17 @@ public class RecoveryController {
|
|||||||
public void initRecoveryService(
|
public void initRecoveryService(
|
||||||
@NonNull String rootCertificateAlias, @NonNull byte[] signedPublicKeyList)
|
@NonNull String rootCertificateAlias, @NonNull byte[] signedPublicKeyList)
|
||||||
throws CertificateException, InternalRecoveryServiceException {
|
throws CertificateException, InternalRecoveryServiceException {
|
||||||
throw new CertificateException("Deprecated initRecoveryService method called");
|
try {
|
||||||
|
mBinder.initRecoveryService(rootCertificateAlias, signedPublicKeyList);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
} catch (ServiceSpecificException e) {
|
||||||
|
if (e.errorCode == ERROR_BAD_CERTIFICATE_FORMAT
|
||||||
|
|| e.errorCode == ERROR_INVALID_CERTIFICATE) {
|
||||||
|
throw new CertificateException("Invalid certificate for recovery service", e);
|
||||||
|
}
|
||||||
|
throw wrapUnexpectedServiceSpecificException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user