New API added in NfcAdapter to enable/disable SE card emulation

Change-Id: Ia0c123873ba9265b45e847d1a30c1300de3c1346
This commit is contained in:
daniel_tomas
2011-01-06 15:44:10 -08:00
committed by Nick Pelly
parent 1df862a465
commit 7bcd2c62eb

View File

@@ -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);
}
}
}
}