xref: /aosp_15_r20/prebuilts/sdk/34/system/api/framework-nfc.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0
2*344a7f5eSAndroid Build Coastguard Workerpackage android.nfc {
3*344a7f5eSAndroid Build Coastguard Worker
4*344a7f5eSAndroid Build Coastguard Worker  public final class NfcAdapter {
5*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean addNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler, String[]);
6*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable();
7*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(boolean);
8*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable();
9*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableSecureNfc(boolean);
10*344a7f5eSAndroid Build Coastguard Worker    method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public java.util.Map<java.lang.String,java.lang.Boolean> getTagIntentAppPreferenceForUser(int);
11*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOn();
12*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOnSupported();
13*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean isTagIntentAppPreferenceSupported();
14*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void registerControllerAlwaysOnListener(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener);
15*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler);
16*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean setControllerAlwaysOn(boolean);
17*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public int setTagIntentAppPreferenceForUser(int, @NonNull String, boolean);
18*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void unregisterControllerAlwaysOnListener(@NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener);
19*344a7f5eSAndroid Build Coastguard Worker    field public static final int TAG_INTENT_APP_PREF_RESULT_PACKAGE_NOT_FOUND = -1; // 0xffffffff
20*344a7f5eSAndroid Build Coastguard Worker    field public static final int TAG_INTENT_APP_PREF_RESULT_SUCCESS = 0; // 0x0
21*344a7f5eSAndroid Build Coastguard Worker    field public static final int TAG_INTENT_APP_PREF_RESULT_UNAVAILABLE = -2; // 0xfffffffe
22*344a7f5eSAndroid Build Coastguard Worker  }
23*344a7f5eSAndroid Build Coastguard Worker
24*344a7f5eSAndroid Build Coastguard Worker  public static interface NfcAdapter.ControllerAlwaysOnListener {
25*344a7f5eSAndroid Build Coastguard Worker    method public void onControllerAlwaysOnChanged(boolean);
26*344a7f5eSAndroid Build Coastguard Worker  }
27*344a7f5eSAndroid Build Coastguard Worker
28*344a7f5eSAndroid Build Coastguard Worker  public static interface NfcAdapter.NfcUnlockHandler {
29*344a7f5eSAndroid Build Coastguard Worker    method public boolean onUnlockAttempted(android.nfc.Tag);
30*344a7f5eSAndroid Build Coastguard Worker  }
31*344a7f5eSAndroid Build Coastguard Worker
32*344a7f5eSAndroid Build Coastguard Worker}
33*344a7f5eSAndroid Build Coastguard Worker
34