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

Commit 7dced8de authored by Nick Pelly's avatar Nick Pelly Committed by Android Git Automerger
Browse files

am 2b51fcb9: Merge "NFC: broadcast intent constants for adapter state change" into gingerbread

Merge commit '2b51fcb9' into gingerbread-plus-aosp

* commit '2b51fcb9':
  NFC: broadcast intent constants for adapter state change
parents 38476ef2 2b51fcb9
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -74,6 +74,25 @@ public final class NfcAdapter {
    public static final String ACTION_TRANSACTION_DETECTED =
            "android.nfc.action.TRANSACTION_DETECTED";

    /**
     * Broadcast Action: an adapter's state changed between enabled and disabled.
     *
     * The new value is stored in the extra EXTRA_NEW_BOOLEAN_STATE and just contains
     * whether it's enabled or disabled, not including any information about whether it's
     * actively enabling or disabling.
     *
     * @hide
     */
    public static final String ACTION_ADAPTER_STATE_CHANGE =
            "android.nfc.action.ADAPTER_STATE_CHANGE";

    /**
     * The Intent extra for ACTION_ADAPTER_STATE_CHANGE, saying what the new state is.
     *
     * @hide
     */
    public static final String EXTRA_NEW_BOOLEAN_STATE = "android.nfc.isEnabled";

    /**
     * Mandatory byte array extra field in
     * {@link android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED}.
@@ -145,6 +164,7 @@ public final class NfcAdapter {

    private static final String TAG = "NFC";

    // Both guarded by NfcAdapter.class:
    private static boolean sIsInitialized = false;
    private static NfcAdapter sAdapter;

@@ -224,6 +244,9 @@ public final class NfcAdapter {
    }

    /**
     * NOTE: may block for ~second or more.  Poor API.  Avoid
     * calling from the UI thread.
     *
     * @hide
     */
    public boolean enableTagDiscovery() {
@@ -236,6 +259,9 @@ public final class NfcAdapter {
    }

    /**
     * NOTE: may block for ~second or more.  Poor API.  Avoid
     * calling from the UI thread.
     *
     * @hide
     */
    public boolean disableTagDiscovery() {