am 7bcd2c62: New API added in NfcAdapter to enable/disable SE card emulation

* commit '7bcd2c62ebfad640e8082c1dc700c9d8c57aba81':
  New API added in NfcAdapter to enable/disable SE card emulation
This commit is contained in:
daniel_tomas
2011-02-16 09:41:00 -08:00
committed by Android Git Automerger

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