diff options
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/nfc/NfcAdapter.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java index 622bcdb..8c56fda 100644 --- a/core/java/android/nfc/NfcAdapter.java +++ b/core/java/android/nfc/NfcAdapter.java @@ -702,4 +702,28 @@ public final class NfcAdapter { return null; } } + + /** + * To change the Secure Element Card Emulation state (ON/OFF) + * @hide + */ + public void changeNfcSecureElementCardEmulationState(boolean state) + { + int seId = 11259375; + if(state){ + /* Enable card emulation */ + try { + sService.selectSecureElement(seId); + } catch (RemoteException e) { + Log.e(TAG, "Enable card emulation failed", e); + } + }else{ + /* Disable card emulation */ + try { + sService.deselectSecureElement(); + } catch (RemoteException e) { + Log.e(TAG, " card emulation failed", e); + } + } + } } |