diff options
author | Brad Fitzpatrick <bradfitz@android.com> | 2010-10-18 14:02:58 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2010-10-18 15:17:48 -0700 |
commit | afb082dba5232a45a7563e085f12284f7d5ffc1d (patch) | |
tree | d9512fd9dac3df7991b3c20435a3ba44dd1b975c /core/java | |
parent | 31bcbdaa6c0e910ec9fd395d20910909309e2b31 (diff) | |
download | frameworks_base-afb082dba5232a45a7563e085f12284f7d5ffc1d.zip frameworks_base-afb082dba5232a45a7563e085f12284f7d5ffc1d.tar.gz frameworks_base-afb082dba5232a45a7563e085f12284f7d5ffc1d.tar.bz2 |
NFC: broadcast intent constants for adapter state change
These are @hide for now. Sent by Iec9596a and used in Ief09a5a4
Bug: 3097279
Change-Id: Ie5dc05e33a98366fbe1767d19ac0253651abe862
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/nfc/NfcAdapter.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java index d76ac41..bc3c6d9 100644 --- a/core/java/android/nfc/NfcAdapter.java +++ b/core/java/android/nfc/NfcAdapter.java @@ -75,6 +75,25 @@ public final class NfcAdapter { "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}. * <p> @@ -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() { |