am 2b51fcb9: Merge "NFC: broadcast intent constants for adapter state change" into gingerbread
Merge commit '2b51fcb9ac80c7c42be8f53763773414ba9ca4fa' into gingerbread-plus-aosp * commit '2b51fcb9ac80c7c42be8f53763773414ba9ca4fa': NFC: broadcast intent constants for adapter state change
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user