Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d92c1689 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Add API to query for AID prefix support.

For future devices which may support
registering AID prefixes. Get the API in for now,
the actual implementation is pretty simple and
will follow later.

Change-Id: I6c16dae9a4dbc0f9cd84bdb61a4de93cffd278ec
parent b92dc6b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17797,6 +17797,7 @@ package android.nfc.cardemulation {
    method public boolean registerAidsForService(android.content.ComponentName, java.lang.String, java.util.List<java.lang.String>);
    method public boolean removeAidsForService(android.content.ComponentName, java.lang.String);
    method public boolean setPreferredService(android.app.Activity, android.content.ComponentName);
    method public boolean supportsAidPrefixRegistration();
    method public boolean unsetPreferredService(android.app.Activity);
    field public static final java.lang.String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT";
    field public static final java.lang.String CATEGORY_OTHER = "other";
+15 −0
Original line number Diff line number Diff line
@@ -504,6 +504,21 @@ public final class CardEmulation {
        }
    }

    /**
     * Some devices may allow an application to register all
     * AIDs that starts with a certain prefix, e.g.
     * "A000000004*" to register all MasterCard AIDs.
     *
     * Use this method to determine whether this device
     * supports registering AID prefixes.
     *
     * @return whether AID prefix registering is supported on this device.
     */
    public boolean supportsAidPrefixRegistration() {
        // TODO
        return false;
    }

    /**
     * @hide
     */
+8 −0
Original line number Diff line number Diff line
@@ -2941,6 +2941,14 @@
        <attr name="name" />
    </declare-styleable>

    <!-- Specify one or more <code>aid-prefix-filter</code> elements inside a
         <code>aid-group</code> element to specify an ISO7816 Application ID (AID)
         prefix your service can handle. -->
    <declare-styleable name="AidPrefixFilter">
        <!-- The ISO7816 Application ID. This attribute is mandatory. -->
        <attr name="name" />
    </declare-styleable>

    <declare-styleable name="ActionMenuItemView">
        <attr name="minWidth" />
    </declare-styleable>