Loading api/current.txt +2 −6 Original line number Diff line number Diff line Loading @@ -38342,10 +38342,8 @@ package android.se.omapi { method public void shutdown(); } public static abstract class SEService.SecureElementListener extends android.os.Binder { ctor public SEService.SecureElementListener(); method public android.os.IBinder asBinder(); method public void serviceConnected(); public static abstract interface SEService.SecureElementListener { method public abstract void onServiceConnected(); } public class Session { Loading @@ -38355,9 +38353,7 @@ package android.se.omapi { method public android.se.omapi.Reader getReader(); method public boolean isClosed(); method public android.se.omapi.Channel openBasicChannel(byte[], byte) throws java.io.IOException; method public android.se.omapi.Channel openBasicChannel(byte[]) throws java.io.IOException; method public android.se.omapi.Channel openLogicalChannel(byte[], byte) throws java.io.IOException; method public android.se.omapi.Channel openLogicalChannel(byte[]) throws java.io.IOException; } } core/java/android/se/omapi/Channel.java +3 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ public class Channel { private final SEService mService; private final Object mLock = new Object(); Channel(SEService service, Session session, ISecureElementChannel channel) { Channel(@NonNull SEService service, @NonNull Session session, @NonNull ISecureElementChannel channel) { if (service == null || session == null || channel == null) { throw new IllegalArgumentException("Parameters cannot be null"); } Loading Loading @@ -158,7 +159,7 @@ public class Channel { * @throws SecurityException if the command is filtered by the security policy. * @throws NullPointerException if command is NULL. */ public @NonNull byte[] transmit(byte[] command) throws IOException { public @NonNull byte[] transmit(@NonNull byte[] command) throws IOException { if (!mService.isConnected()) { throw new IllegalStateException("service not connected to system"); } Loading core/java/android/se/omapi/ISecureElementListener.aidl +0 −4 Original line number Diff line number Diff line Loading @@ -24,8 +24,4 @@ package android.se.omapi; * @hide */ interface ISecureElementListener { /** * Called by the framework when the service is connected. */ void serviceConnected(); } core/java/android/se/omapi/Reader.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class Reader { private final Object mLock = new Object(); Reader(SEService service, String name, ISecureElementReader reader) { Reader(@NonNull SEService service, @NonNull String name, @NonNull ISecureElementReader reader) { if (reader == null || service == null || name == null) { throw new IllegalArgumentException("Parameters cannot be null"); } Loading core/java/android/se/omapi/SEService.java +26 −19 Original line number Diff line number Diff line Loading @@ -62,17 +62,32 @@ public class SEService { /** * Interface to send call-backs to the application when the service is connected. */ public abstract static class SecureElementListener extends ISecureElementListener.Stub { public interface SecureElementListener { /** * Called by the framework when the service is connected. */ void onServiceConnected(); } /** * Listener object that allows the notification of the caller if this * SEService could be bound to the backend. */ private class SEListener extends ISecureElementListener.Stub { public SecureElementListener mListener = null; @Override public IBinder asBinder() { return this; } /** * Called by the framework when the service is connected. */ public void serviceConnected() {}; public void onServiceConnected() { if (mListener != null) { mListener.onServiceConnected(); } } } private SEListener mSEListener = new SEListener(); private static final String TAG = "OMAPI.SEService"; Loading @@ -94,12 +109,6 @@ public class SEService { */ private final HashMap<String, Reader> mReaders = new HashMap<String, Reader>(); /** * Listener object that allows the notification of the caller if this * SEService could be bound to the backend. */ private ISecureElementListener mSEListener; /** * Establishes a new connection that can be used to connect to all the * Secure Elements available in the system. The connection process can be Loading @@ -107,22 +116,22 @@ public class SEService { * the specified listener is called or if isConnected() returns * <code>true</code>. <br> * The call-back object passed as a parameter will have its * serviceConnected() method called when the connection actually happen. * onServiceConnected() method called when the connection actually happen. * * @param context * the context of the calling application. Cannot be * <code>null</code>. * @param listener * a SecureElementListener object. Can be <code>null</code>. * a SecureElementListener object. */ public SEService(Context context, SecureElementListener listener) { public SEService(@NonNull Context context, @NonNull SecureElementListener listener) { if (context == null) { throw new NullPointerException("context must not be null"); } mContext = context; mSEListener = listener; mSEListener.mListener = listener; mConnection = new ServiceConnection() { Loading @@ -131,9 +140,7 @@ public class SEService { mSecureElementService = ISecureElementService.Stub.asInterface(service); if (mSEListener != null) { try { mSEListener.serviceConnected(); } catch (RemoteException ignore) { } mSEListener.onServiceConnected(); } Log.i(TAG, "Service onServiceConnected"); } Loading Loading @@ -233,7 +240,7 @@ public class SEService { * * @return String containing the OpenMobile API version (e.g. "3.0"). */ public String getVersion() { public @NonNull String getVersion() { return "3.2"; } Loading Loading
api/current.txt +2 −6 Original line number Diff line number Diff line Loading @@ -38342,10 +38342,8 @@ package android.se.omapi { method public void shutdown(); } public static abstract class SEService.SecureElementListener extends android.os.Binder { ctor public SEService.SecureElementListener(); method public android.os.IBinder asBinder(); method public void serviceConnected(); public static abstract interface SEService.SecureElementListener { method public abstract void onServiceConnected(); } public class Session { Loading @@ -38355,9 +38353,7 @@ package android.se.omapi { method public android.se.omapi.Reader getReader(); method public boolean isClosed(); method public android.se.omapi.Channel openBasicChannel(byte[], byte) throws java.io.IOException; method public android.se.omapi.Channel openBasicChannel(byte[]) throws java.io.IOException; method public android.se.omapi.Channel openLogicalChannel(byte[], byte) throws java.io.IOException; method public android.se.omapi.Channel openLogicalChannel(byte[]) throws java.io.IOException; } }
core/java/android/se/omapi/Channel.java +3 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ public class Channel { private final SEService mService; private final Object mLock = new Object(); Channel(SEService service, Session session, ISecureElementChannel channel) { Channel(@NonNull SEService service, @NonNull Session session, @NonNull ISecureElementChannel channel) { if (service == null || session == null || channel == null) { throw new IllegalArgumentException("Parameters cannot be null"); } Loading Loading @@ -158,7 +159,7 @@ public class Channel { * @throws SecurityException if the command is filtered by the security policy. * @throws NullPointerException if command is NULL. */ public @NonNull byte[] transmit(byte[] command) throws IOException { public @NonNull byte[] transmit(@NonNull byte[] command) throws IOException { if (!mService.isConnected()) { throw new IllegalStateException("service not connected to system"); } Loading
core/java/android/se/omapi/ISecureElementListener.aidl +0 −4 Original line number Diff line number Diff line Loading @@ -24,8 +24,4 @@ package android.se.omapi; * @hide */ interface ISecureElementListener { /** * Called by the framework when the service is connected. */ void serviceConnected(); }
core/java/android/se/omapi/Reader.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class Reader { private final Object mLock = new Object(); Reader(SEService service, String name, ISecureElementReader reader) { Reader(@NonNull SEService service, @NonNull String name, @NonNull ISecureElementReader reader) { if (reader == null || service == null || name == null) { throw new IllegalArgumentException("Parameters cannot be null"); } Loading
core/java/android/se/omapi/SEService.java +26 −19 Original line number Diff line number Diff line Loading @@ -62,17 +62,32 @@ public class SEService { /** * Interface to send call-backs to the application when the service is connected. */ public abstract static class SecureElementListener extends ISecureElementListener.Stub { public interface SecureElementListener { /** * Called by the framework when the service is connected. */ void onServiceConnected(); } /** * Listener object that allows the notification of the caller if this * SEService could be bound to the backend. */ private class SEListener extends ISecureElementListener.Stub { public SecureElementListener mListener = null; @Override public IBinder asBinder() { return this; } /** * Called by the framework when the service is connected. */ public void serviceConnected() {}; public void onServiceConnected() { if (mListener != null) { mListener.onServiceConnected(); } } } private SEListener mSEListener = new SEListener(); private static final String TAG = "OMAPI.SEService"; Loading @@ -94,12 +109,6 @@ public class SEService { */ private final HashMap<String, Reader> mReaders = new HashMap<String, Reader>(); /** * Listener object that allows the notification of the caller if this * SEService could be bound to the backend. */ private ISecureElementListener mSEListener; /** * Establishes a new connection that can be used to connect to all the * Secure Elements available in the system. The connection process can be Loading @@ -107,22 +116,22 @@ public class SEService { * the specified listener is called or if isConnected() returns * <code>true</code>. <br> * The call-back object passed as a parameter will have its * serviceConnected() method called when the connection actually happen. * onServiceConnected() method called when the connection actually happen. * * @param context * the context of the calling application. Cannot be * <code>null</code>. * @param listener * a SecureElementListener object. Can be <code>null</code>. * a SecureElementListener object. */ public SEService(Context context, SecureElementListener listener) { public SEService(@NonNull Context context, @NonNull SecureElementListener listener) { if (context == null) { throw new NullPointerException("context must not be null"); } mContext = context; mSEListener = listener; mSEListener.mListener = listener; mConnection = new ServiceConnection() { Loading @@ -131,9 +140,7 @@ public class SEService { mSecureElementService = ISecureElementService.Stub.asInterface(service); if (mSEListener != null) { try { mSEListener.serviceConnected(); } catch (RemoteException ignore) { } mSEListener.onServiceConnected(); } Log.i(TAG, "Service onServiceConnected"); } Loading Loading @@ -233,7 +240,7 @@ public class SEService { * * @return String containing the OpenMobile API version (e.g. "3.0"). */ public String getVersion() { public @NonNull String getVersion() { return "3.2"; } Loading