Merge "Keystore 2.0 SPI: Silence warning about blocking calls to Keystore."
This commit is contained in:
@ -19,6 +19,7 @@ package android.security;
|
|||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.compat.annotation.ChangeId;
|
import android.compat.annotation.ChangeId;
|
||||||
import android.compat.annotation.Disabled;
|
import android.compat.annotation.Disabled;
|
||||||
|
import android.os.Binder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
import android.os.ServiceSpecificException;
|
import android.os.ServiceSpecificException;
|
||||||
@ -140,6 +141,7 @@ public class KeyStore2 {
|
|||||||
if (mBinder == null || retryLookup) {
|
if (mBinder == null || retryLookup) {
|
||||||
mBinder = IKeystoreService.Stub.asInterface(ServiceManager
|
mBinder = IKeystoreService.Stub.asInterface(ServiceManager
|
||||||
.getService(KEYSTORE2_SERVICE_NAME));
|
.getService(KEYSTORE2_SERVICE_NAME));
|
||||||
|
Binder.allowBlocking(mBinder.asBinder());
|
||||||
}
|
}
|
||||||
return mBinder;
|
return mBinder;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ package android.security;
|
|||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.hardware.security.keymint.KeyParameter;
|
import android.hardware.security.keymint.KeyParameter;
|
||||||
|
import android.os.Binder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceSpecificException;
|
import android.os.ServiceSpecificException;
|
||||||
import android.security.keymaster.KeymasterDefs;
|
import android.security.keymaster.KeymasterDefs;
|
||||||
@ -39,6 +40,7 @@ public class KeyStoreOperation {
|
|||||||
Long challenge,
|
Long challenge,
|
||||||
KeyParameter[] parameters
|
KeyParameter[] parameters
|
||||||
) {
|
) {
|
||||||
|
Binder.allowBlocking(operation.asBinder());
|
||||||
this.mOperation = operation;
|
this.mOperation = operation;
|
||||||
this.mChallenge = challenge;
|
this.mChallenge = challenge;
|
||||||
this.mParameters = parameters;
|
this.mParameters = parameters;
|
||||||
|
@ -19,6 +19,7 @@ package android.security;
|
|||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.app.compat.CompatChanges;
|
import android.app.compat.CompatChanges;
|
||||||
import android.hardware.security.keymint.KeyParameter;
|
import android.hardware.security.keymint.KeyParameter;
|
||||||
|
import android.os.Binder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceSpecificException;
|
import android.os.ServiceSpecificException;
|
||||||
import android.security.keystore.BackendBusyException;
|
import android.security.keystore.BackendBusyException;
|
||||||
@ -45,6 +46,7 @@ public class KeyStoreSecurityLevel {
|
|||||||
private final IKeystoreSecurityLevel mSecurityLevel;
|
private final IKeystoreSecurityLevel mSecurityLevel;
|
||||||
|
|
||||||
public KeyStoreSecurityLevel(IKeystoreSecurityLevel securityLevel) {
|
public KeyStoreSecurityLevel(IKeystoreSecurityLevel securityLevel) {
|
||||||
|
Binder.allowBlocking(securityLevel.asBinder());
|
||||||
this.mSecurityLevel = securityLevel;
|
this.mSecurityLevel = securityLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user