/* * This file is auto-generated. DO NOT MODIFY. * Original file: frameworks/base/keystore/java/android/security/IKeyChainService.aidl */ package android.security; /** * Caller is required to ensure that {@link KeyStore#unlock * KeyStore.unlock} was successful. * * @hide */ public interface IKeyChainService extends android.os.IInterface { /** Local-side IPC implementation stub class. */ public static abstract class Stub extends android.os.Binder implements android.security.IKeyChainService { private static final java.lang.String DESCRIPTOR = "android.security.IKeyChainService"; /** Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); } /** * Cast an IBinder object into an android.security.IKeyChainService interface, * generating a proxy if needed. */ public static android.security.IKeyChainService asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.security.IKeyChainService))) { return ((android.security.IKeyChainService)iin); } return new android.security.IKeyChainService.Stub.Proxy(obj); } public android.os.IBinder asBinder() { return this; } @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException { switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(DESCRIPTOR); return true; } case TRANSACTION_getPrivateKey: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); byte[] _result = this.getPrivateKey(_arg0); reply.writeNoException(); reply.writeByteArray(_result); return true; } case TRANSACTION_getCertificate: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); byte[] _result = this.getCertificate(_arg0); reply.writeNoException(); reply.writeByteArray(_result); return true; } case TRANSACTION_installCaCertificate: { data.enforceInterface(DESCRIPTOR); byte[] _arg0; _arg0 = data.createByteArray(); this.installCaCertificate(_arg0); reply.writeNoException(); return true; } case TRANSACTION_deleteCaCertificate: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); boolean _result = this.deleteCaCertificate(_arg0); reply.writeNoException(); reply.writeInt(((_result)?(1):(0))); return true; } case TRANSACTION_reset: { data.enforceInterface(DESCRIPTOR); boolean _result = this.reset(); reply.writeNoException(); reply.writeInt(((_result)?(1):(0))); return true; } case TRANSACTION_setGrant: { data.enforceInterface(DESCRIPTOR); int _arg0; _arg0 = data.readInt(); java.lang.String _arg1; _arg1 = data.readString(); boolean _arg2; _arg2 = (0!=data.readInt()); this.setGrant(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_hasGrant: { data.enforceInterface(DESCRIPTOR); int _arg0; _arg0 = data.readInt(); java.lang.String _arg1; _arg1 = data.readString(); boolean _result = this.hasGrant(_arg0, _arg1); reply.writeNoException(); reply.writeInt(((_result)?(1):(0))); return true; } } return super.onTransact(code, data, reply, flags); } private static class Proxy implements android.security.IKeyChainService { private android.os.IBinder mRemote; Proxy(android.os.IBinder remote) { mRemote = remote; } public android.os.IBinder asBinder() { return mRemote; } public java.lang.String getInterfaceDescriptor() { return DESCRIPTOR; } // APIs used by KeyChain public byte[] getPrivateKey(java.lang.String alias) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); byte[] _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(alias); mRemote.transact(Stub.TRANSACTION_getPrivateKey, _data, _reply, 0); _reply.readException(); _result = _reply.createByteArray(); } finally { _reply.recycle(); _data.recycle(); } return _result; } public byte[] getCertificate(java.lang.String alias) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); byte[] _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(alias); mRemote.transact(Stub.TRANSACTION_getCertificate, _data, _reply, 0); _reply.readException(); _result = _reply.createByteArray(); } finally { _reply.recycle(); _data.recycle(); } return _result; } // APIs used by CertInstaller public void installCaCertificate(byte[] caCertificate) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeByteArray(caCertificate); mRemote.transact(Stub.TRANSACTION_installCaCertificate, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } // APIs used by Settings public boolean deleteCaCertificate(java.lang.String alias) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(alias); mRemote.transact(Stub.TRANSACTION_deleteCaCertificate, _data, _reply, 0); _reply.readException(); _result = (0!=_reply.readInt()); } finally { _reply.recycle(); _data.recycle(); } return _result; } public boolean reset() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_reset, _data, _reply, 0); _reply.readException(); _result = (0!=_reply.readInt()); } finally { _reply.recycle(); _data.recycle(); } return _result; } // APIs used by KeyChainActivity public void setGrant(int uid, java.lang.String alias, boolean value) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeInt(uid); _data.writeString(alias); _data.writeInt(((value)?(1):(0))); mRemote.transact(Stub.TRANSACTION_setGrant, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } public boolean hasGrant(int uid, java.lang.String alias) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeInt(uid); _data.writeString(alias); mRemote.transact(Stub.TRANSACTION_hasGrant, _data, _reply, 0); _reply.readException(); _result = (0!=_reply.readInt()); } finally { _reply.recycle(); _data.recycle(); } return _result; } } static final int TRANSACTION_getPrivateKey = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_getCertificate = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_installCaCertificate = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); static final int TRANSACTION_deleteCaCertificate = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); static final int TRANSACTION_reset = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4); static final int TRANSACTION_setGrant = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5); static final int TRANSACTION_hasGrant = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6); } // APIs used by KeyChain public byte[] getPrivateKey(java.lang.String alias) throws android.os.RemoteException; public byte[] getCertificate(java.lang.String alias) throws android.os.RemoteException; // APIs used by CertInstaller public void installCaCertificate(byte[] caCertificate) throws android.os.RemoteException; // APIs used by Settings public boolean deleteCaCertificate(java.lang.String alias) throws android.os.RemoteException; public boolean reset() throws android.os.RemoteException; // APIs used by KeyChainActivity public void setGrant(int uid, java.lang.String alias, boolean value) throws android.os.RemoteException; public boolean hasGrant(int uid, java.lang.String alias) throws android.os.RemoteException; }