Merge "Wrap raw binder interface into public classes" am: a4bde27012 am: 3cd878df0f

am: 21b4edb3cd

Change-Id: I9797e593a44b86f32f6c8c343d8bb15076e6ca87
This commit is contained in:
Ruchi Kandoi
2018-02-24 02:12:34 +00:00
committed by android-build-merger
3 changed files with 25 additions and 14 deletions

View File

@@ -21,6 +21,7 @@ package android.se.omapi;
/**
* Interface to receive call-backs when the service is connected.
* @hide
*/
interface ISecureElementListener {
/**

View File

@@ -59,6 +59,21 @@ public class SEService {
*/
public static final int NO_SUCH_ELEMENT_ERROR = 2;
/**
* Interface to send call-backs to the application when the service is connected.
*/
public abstract static class SecureElementListener extends ISecureElementListener.Stub {
@Override
public IBinder asBinder() {
return this;
}
/**
* Called by the framework when the service is connected.
*/
public void serviceConnected() {};
}
private static final String TAG = "OMAPI.SEService";
private final Object mLock = new Object();
@@ -98,9 +113,9 @@ public class SEService {
* the context of the calling application. Cannot be
* <code>null</code>.
* @param listener
* a ISecureElementListener object. Can be <code>null</code>.
* a SecureElementListener object. Can be <code>null</code>.
*/
public SEService(Context context, ISecureElementListener listener) {
public SEService(Context context, SecureElementListener listener) {
if (context == null) {
throw new NullPointerException("context must not be null");